8000 fix(mfile): read the box type from box.type only, as admission does · gominimal/minimal@9e053ff · GitHub
[go: up one dir, main page]

Skip to content

fix(mfile): read the box type from box.type only, as admission does

Minimal Arch / arch-review completed Nov 13, 2026

PASS_WITH_CONDITIONS

Baseline. This re-reviews 9e053ff7 against the PASS_WITH_CONDITIONS on 7ffedf83 (this PR), on arch 15b603e6. The checkout has no arch-map.md, so I found the sections by search, as the earlier rulings did. since.diff is one PR commit, 9e053ff7, and git diff 7ffedf83 9e053ff7 agrees: it changes only crates/mfile/src/projection.rs. No merge is in the compare. The ledger cuts the baseline's conditions, so I checked the full pr.diff against §6.3.2 again and restated the open work as C1 from the residual that the PR body names.

Governs. Gatehouse §6.3.2 line 649: the client and the node each compute the Box Spec projection, and the STS checks that the digests are equal. Line 654 gives type as name, source and root. Line 672 binds type.root so that policy cannot be escaped by a leaf name. The Box Spec carries its type at [box] type (box.toml lines 12–27). box.toml lines 200–207: upstream and inject come from the client's rules only, and an entry that sets either is exit 3.

Ruling. The compare drops the fallback to a flat top-level type string in TypeFacts::of_spec. That conforms. The expanded Box Spec names its type at box.type. A flat type = "…" is the minimal.toml entry form (architecture.md line 1208), which expansion turns into box.type. The daemon's admission check (spec_type_root, crates/minimald/src/box_manager.rs) reads only box.type. Before this commit, a spec with a flat type string got a digest that named a type admission never checked, which is against line 672. The new test pins this. In the rest of pr.diff the record has exactly the §6.3.2 field set. ingress_ports holds port numbers, nesting the five bounds and secret_grants the per-kind key sets. The digest is base64url SHA-256 over JCS bytes. The daemon stores both digests under projection_digest.client / projection_digest.daemon and records both on the box.create span and in the log. It refuses an entry-written store upstream/inject with exit 3. Note 3 in the PR body ("always dropped") is stale. The code refuses, as the design requires. The one open item is the client call site on a real create (C1, #3377).

Observation, not a condition. A non-string box.type diverges between the two readers: spec_type_root stringifies it, and of_spec falls back to the verb's type. This is unchanged by the compare. Admission refuses such a spec unless it also sets a built-in type.root. BOX-072 (digest equality) will make the edge visible.

Not checked. The agent-verify leg timed out after 1800 s, and its log shows a cancelled run after a test failure. The failing test's name is not in the staged output. That leg is open (rubric rule 4). I did not build, so I cannot say whether the failure is in this change. No findings.json was staged.

Conditions

  • C1: crates/minimal/src/cmd/boxes/create.rs computes Expansion::projection(&resolved_type).digest() for the spec it sends and calls BoxConfig::set_client_projection_digest on the create, so a real create stores projection_digest.client beside projection_digest.daemon. This is the residual the PR files as #3377 (planned as T128, #3387). It can stay open at merge.

Ruled at 9e053ff against gominimal/arch@15b603e6afb8 by claude-opus-5-5; arch_rulings 1273, job 78745de9-8944-4397-83f0-8bfe60dfe057.

0