| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The census report gets its after-table, and the README's Layout gets rewritten
— it had drifted into fiction, listing `db/queries.rs`'s successors as "queries"
and omitting `usecase`, `error`, `hash`, `time`, `urlutil`, `git`, `fetch` and
`recipe` entirely. It now states the ranks and says plainly that they are
enforced by `tests/architecture.rs`, not kept in hope, and names the two
commands that keep it true.
This commit also carries the last of the narrowing that fell out of writing the
report, because writing it meant actually reading the numbers:
- `watch::upstream::resolve` looked test-only and was not — the tests contain an
unrelated local function of the same name, which the census matches as a word.
It is crate-internal and now says so.
- `read_tree` closed with it. Its two integration tests were testing the module's
own batching behaviour from outside, so they moved inside as unit tests with a
throwaway git repo, which is where a test about one `ls-tree` and one
`cat-file --batch` belongs. They lost nothing: the empty-blob and NUL-byte
assertions came across verbatim, plus one the old test never made — binary
blobs are still listed, just not read.
- `Assessment::is_high`, `Tree::get`, `approve::current_accepted` and
`diff::full_recipe_text` were dead once their callers closed, and are gone.
- `set_risk_for_tests` is gone too. The bulk-refusal test needed a candidate
marked high-risk, and the honest way to get one was for the fixture to write
the row — `Env::execute` — rather than the library growing a public setter
that exists only so a test can pass. That was the last budget above baseline
apart from `error.pub`.
`error.pub` stays at 21 against a baseline of 15, and the report says why: the
six payload enums are constructed in four modules and matched in `error`, so
they are interface. `error.dead` is 0.
Final: 281 passed / 0 failed across 36 binaries (baseline 273), clippy
-D warnings clean, release clean, census within budget.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Four greps in tests/layers.rs were the entire enforcement. They could say
that db had stopped naming http; they could not say what the architecture
is, could not place a new module, and said nothing about the twenty-odd
modules nobody had tripped over yet.
tests/architecture.rs declares the whole map instead. Every module in src/
gets a rank with the reason it sits there, and a module may name only
modules ranked strictly below it — one rule, every module, cycles
impossible by construction rather than by luck. The census says the graph
already satisfies it, so the map is a description of what is true, not an
aspiration the suite immediately fails on.
The same file holds the interface budgets, because a boundary is only as
strong as what it refuses to let you export: per module, how many pub items
it hands out and how many of them nothing outside the module names. Budgets
live in architecture-budget.json and move one way. A number that grows
fails; a number that got smaller without being written back also fails,
which is what stops a won gain from quietly becoming the new ceiling.
Each rule was probed rather than trusted: naming http from db fails with
`db (rank 3) names http (rank 9)`, tightening db.pub to 200 fails with
`db.pub: 226 > 200`, and leaving a stale budget fails with
`db.deadonly: budget 99, actual 36`.
tests/layers.rs is deleted, not weakened. Three of its four rules are rank
consequences now (db, review, recipe all sit below everything they were
forbidden to name); the fourth, watch -> shims, was already covered by
production_surface.rs, which greps every non-shim file for shims:: and
would catch it in any module, not just watch.
The census definition now lives in two languages, so the test checks them
against each other the way the vercmp oracle checks the hand-written
comparator: without python3 the note prints and the suite moves on.
277 passed / 0 failed (273 + 8 new - 4 subsumed), clippy -D warnings clean.
|
| |
|
|
|
|
|
|
|
| |
DESIGN.md, ARCH_REVIEW.md, docs/DECISIONS.md and docs/INVARIANTS.md are gone,
along with the references that pointed at them: the README links and layout
entry, the §/I-n citations README carried from the design doc, the Cargo.toml
shim comment, and the DESIGN.md citation in the first migration's SQL.
Nothing read these files at build or test time; 267 tests pass unchanged.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
what it means
The end-to-end claim of the seam, tested as one thing: `plain-make` detected,
approved, built and published through `KataBackend` + `LocalAgentProvisioner` —
a real `sandbox-agent` process, a real nonce-matched rendezvous, real frames —
with a VM being the only thing this host cannot provide. The index ends up
serving the package, the agent's output reaches the same log the SSE tail reads,
and the shim saw exactly one `makepkg`.
Documented where the project records such things: the enum and the refusal of an
unwired kind, the shared listener and the shared Kata backend, and the
`shared_workspace` assertion as a guard rather than a fix — the workspace sync is
still the unimplemented thing it was, and the config now says so at startup
instead of letting `makepkg` discover it.
Also reaped two unreaped `sandbox-agent` children in the remote tests, which was
the last clippy warning in the tree; `--all-targets` is now silent.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Publishing renders the index before the DB commits and renames it into place
after, so a crash between the two leaves the old index serving (I4). The way
that was written did it at `<db>.tar.gz.tmp` beside the live file — a filename
real repo-add refuses, because its database argument has to be a name pacman
would accept. Every publish test passed; the first real package anyone tried to
publish died at the last step with the release already committed.
`render_db` now renders into a scratch directory under the served directory,
under the name a consumer will download. Same filesystem, so the rename is still
the atomic swap, and the live database is never the file repo-add is writing
into. `publish`, `reconcile` and `withdraw_package` all had the bug and all share
the helper now; `reconcile` sweeps scratch directories a crash left behind.
`run_repo_add` drops `-s` too: repo-add would sign into scratch space that is
about to be deleted, and `publish::sign` already signs the renamed file.
The reason 238 tests missed this is that the shim would write the database
anywhere it was told. It now enforces the accepted set — measured against
`repo-add (pacman) 7.1.0`, not read out of its docs — with the real tool's
wording and exit status, and a gated test re-derives the set against the
installed tool, in the shape of the vercmp oracle. A shim that is more
permissive than its tool is not a test of the tool.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DECISIONS.md gains the three entries this work turned on: signing moved
hub-side to ingest (the build machine must never hold the key), the
devtools chroot is gone (the sandbox is the isolation boundary, and
I9 gets stronger with it), and dependencies arrive pinned by digest via
pacman -U rather than being resolved at build time. Each states the
pressure, the choice, and the cost — including the costs: the unsigned
window between build and ingest, the makechrootpkg-convention PKGBUILD
tail to hunt in the gated tier, and the official-package pinning that
is honestly still future work.
DESIGN.md's step table and §8.3 now describe what the code does, and a
new §8a documents the sandbox-backend seam: loopback, remote, kata, and
the TTL as the guarantee under every leak. INVARIANTS.md's I9 note moves
from 'enforced by the chroot' to 'enforced by the sandbox' — the
pipeline's own hygiene test still pins what it always pinned. The
README's testing section names the new shim surface and the two new
test tiers, and the gated-tier list reflects the kata live tier in
place of the retired real-chroot one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The structural findings are only durable if they are written down as rules with
the test that enforces each one, so:
`docs/INVARIANTS.md` gains a second table. The first one is the twelve numbered
invariants from DESIGN.md §2 — claims about what the system does. The new one is
about how the code is allowed to be shaped: SQL has one owner, a version is
formatted in one place, the dependency arrows point one way, the state machines
are the ones the transition table defines, the production binary carries no test
scaffolding, the served index has one lock, `canonical_json` is canonical in
fact, the session id is the credential, and a pinned clock pins everything
derived from it. Each row names the test that fails if the shape regresses.
`docs/DECISIONS.md` gains the decisions the review turned into code — the session
id as the credential, `db/` as a boundary that does not hand out connections, a
stale review and a broken database being different answers, shims compiled out of
production, states as enums with compare-and-swap writes, unreadable rows failing
the query, and only momentary I/O counting as transient. Two existing entries
were amended rather than added to: the publisher lock (there is now one, and the
second one that used to sit inside it is gone) and the test hooks (they are a
gated submodule now, not fields on the production config).
`README.md` says where the shims live and that none of them exist in a plain
`cargo build`.
|
|
|
README and the invariant index
Three things.
**A real hole, closed.** `collect` scans the build's srcdir for
`*.pkg.tar.zst`, and `ingest` copies whatever those paths resolve to into the
content-addressed store — from where the bytes are served from our repo and
signed with our key. The paths are generated by our own scan, but their *targets*
are not: a PKGBUILD that drops a symlink called `evil.pkg.tar.zst` pointing at
the signing keyring, the database, or anyone's home directory would have its
target copied in, published and signed by us. The chroot is supposed to be the
layer that prevents that, and the chroot tier is gated — but two protection
layers must not be load-bearing on each other, and the control plane should not
depend on isolation for the safety of its own secrets.
`collect` now rejects symlinks and rejects anything whose canonicalized target
escapes the build's own staging directory, failing the build closed with the path
in the message. `i9_a_build_cannot_smuggle_bytes_in_from_outside_its_own_staging_dir`
acts the attack out — the shim plants a symlink to the database file — and
asserts the build fails, the store is byte-for-byte untouched, and nothing
publishes. This is the last §2 invariant that had no named test; docs/INVARIANTS.md
says plainly which part of I9 this covers and which part belongs to the gated
chroot tier.
**README.md**, written for the person who has to operate this at 3am: the rule
everything else follows, the quick start, the layout, how the shim harness makes
the whole pipeline testable without root or network, the ops commands, the route
table, and the §14 constraints stated as the hard edges they are.
**docs/INVARIANTS.md**, mapping I1-I12 to the named tests that hold them, with
corroborating tests listed, and an explicit note on the two invariants enforced
by the schema (the partial unique index for I7, the append-only triggers for
I10/I7) so a future code path cannot forget them.
Also recorded in DECISIONS.md: metrics served without a session and why,
retention recording a purge instead of deleting the row, and the real-chroot tier
being explicitly skipped with what stands in for it and how to actually run it.
.gitignore already covered .pi/ but the goal-tracker files were tracked from
before the rule existed; untracked now so they stop appearing in every diff.
|