8000 chore: restore round 5's tree over the empty-tree commit f9b033ef · gominimal/minimal@a1d4ce0 · GitHub
[go: up one dir, main page]

Skip to content

chore: restore round 5's tree over the empty-tree commit f9b033ef

Minimal Arch / arch-review failed Nov 12, 2026 in 0s

CONDITIONS

Baseline. This re-reviews a1d4ce0a against the PASS on 167aa388 (this PR), on arch 15b603e6. The checkout has no arch-map.md, so I found the sections by search. The tree of a1d4ce0a equals the tree of e72bad32 (f9b033ef and a1d4ce0a delete and then restore the tree). pr.diff equals git diff 2505edee a1d4ce0a. In since.diff, the changes to common, minimal-client, minimal and sandbox come from the merge of main, and they are not this PR's. This PR changes one thing since the PASS: e72bad32 flips SecretServiceKey::exportable() from false to true and adds a test that asserts Custody::Refused in a release build.

Governs. Gatehouse §6.10 line 837: hardware custody is a SHOULD where the host offers it, and hardware gives no export. Line 832: the sealing key is non-exportable (hardware-backed, as line 837 describes). Principle 7, architecture.md line 337: safe by default. The repo spec 24-spec-box-egress-proxy uses that SHOULD in BEP-088 (TPM first, then Secret Service, the owner's decision of 2026-11-12). BEP-014 and BEP-059 exempt keys "in Secret Service", and line 265 calls them "the one exception". BEP-089 requires that the key loads from the store that holds it at each start. BEP-090 reports the reduced custody.

Ruling. The flag is now truthful, and that is better for audit exactness than false. But keys::custody decides only on that flag. In a release build, load_with now refuses a stored Secret Service sealing key, and it tells the operator to run bep --replace-key. The replacement generates in Secret Service again, so the refusal repeats. A host with no TPM cannot run a release proxy, which contradicts BEP-088 and BEP-089 and the SHOULD of line 837. The new test pins that refusal (rule 3). C1 keeps the truthful flag and makes custody store-aware. C2 replaces the test. The spec and the design agree, so no spec amendment or escalation is necessary.

Departure. This is not a departure from the PASS on 167aa388. That ruling accepted a Secret Service key that a release build loads. This head removes that behaviour. A return to exportable() == false also restores the behaviour that the PASS accepted. But the trait documents the flag as "whether the store lets the private half out", so C1 is the exact fix.

Not checked. I did not compile or run the tests. The store is not yet chosen at start (bep serve on Linux does not use it, BEP-088 is a later task), so the refusal is latent until that task. I could read only the first 400 characters of each earlier ruling in the ledger.

Conditions

  • C1: Keep SecretServiceKey::exportable() as true, and make the custody rule store-aware. In crates/bep/src/keys.rs, add fn software_store(&self) -> bool { false } to HeldKey, and override it to return true in impl HeldKey for SecretServiceKey (crates/bep/src/secret_service.rs). Add the variant Custody::Software ("the store holds a software key by design, BEP-088, and BEP-090 reports it"). Make custody() return Custody::Software for a key whose software_store() is true, in both builds, before the exportable() match. Then load_with does not return StartError::Exportable for a Secret Service key, keep_generated keeps it, and the debug-build kept the proxy's {role} key although the keychain made it exportable warning does not print for it. Update the doc comment on exportable() (secret_service.rs line 409-411) to say that custody holds the key as a software key, not that it refuses it.
  • C2: In crates/bep/src/secret_service.rs, replace the test secret_service_key_is_exportable (it asserts Custody::Refused in Build::Release, which pins the deviation) with a_release_build_holds_a_secret_service_key. It asserts key.exportable(), asserts custody(&key, Build::Release) == Custody::Software, and asserts that keys::load_with over the fake secret-tool store, with each key answering Build::Release from build(), loads a stored sealing key and returns no StartError::Exportable. Add a keys.rs test that a non-Secret-Service exportable key is still Custody::Refused in Build::Release, so the macOS keychain rule stays hard.

Ruled at a1d4ce0 against gominimal/arch@15b603e6afb8 by claude-opus-5-5; arch_rulings 1217, job 057c8123-6200-4f5a-a4e0-e78d672124dc.

0