Skip to content

fix(ci): refuse and audit what the cache security matrix found (P7-CACHE-11) - #559

Closed
acamarata wants to merge 2 commits into
meas/p7-cache-11from
fix/p7-cache-11-matrix
Closed

acamarata wants to merge 2 commits into
meas/p7-cache-11from
fix/p7-cache-11-matrix

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Stacked on #553. Fixes the product so the P7-CACHE-11 security matrix passes as written. matrix.yaml is unchanged.

Result: 41 of 41 cases match on mm4 (darwin/arm64). Before this PR, 21 of 41 matched. The drill (scripts/drill/cache-security/run) and --check-mapping both pass.

Gap Root cause Fix
secret-snapshot (TM-12) entries.lookup turned an ineligible ro-snapshot into a silent miss ResolveForRestore names secret_match. specs.Engine.Restore refuses with E711 and writes an audit row
partial-local (TM-15) A size mismatch at lookup dropped the entry and returned a miss Restore refuses with E711 blob_invalid and writes an audit row
corrupt-local The cas E710 digest_mismatch came back unwrapped, and the audit reason was unreadable A cas fault during restore is wrapped as E711 blob_invalid (E710 stays in the chain)
release-no-deps Runner fixture bug: it flipped result/checks but not counts, so the evidence was inconsistent and evidence.invalid outranked not_passing The fixture builds coordinator evidence with a failed dep
16 missing audit rows These refusal paths wrote no row: collect, commit digest, get, transfer publish, node read-through, revoke, release admission, verify, signer client Each path now writes <op>.refused reason=<key>, wired in production (run hooks, cmd) and in the rig

Runner changes: the transit, read-through, admission and signer cases now run through the product paths that own the audit. Before, they called lower layers that have no audit sink.

Notes for review:

  • Epic D20 defines E711 as "cache write refused" and E710 as "blob integrity". The matrix's E711 for corrupt-local, partial-local and secret-snapshot (restore-side refusals) stretches D20. P7-CACHE-01's acceptance also says a corrupt blob makes Lookup a miss. Lookup keeps that behaviour; only Restore refuses. No ADR conflicts with this.
  • sign-uncommitted: the signer process never writes the store (signing/source.go), so the coordinator signing.Client audits. The runner still delegates the signer check to TestSignerRefuses, then replays the signer's wire answer to the client.
  • nself artifacts verify now writes one audit row per refusal when a coordinator store exists. Its "writes nothing" comment is updated to say so.
  • This PR touches files outside P7-CACHE-11's write_scope, so that ticket's scope-guard verification line fails for this diff.
  • Not run: Linux evidence (acceptance says "on Linux") and parity-with-core.sh. No argv changed.

…CHE-11)

- restore refuses, rather than misses, a read-only snapshot of a
  secret-bearing writer (E711 secret_match, TM-12) and a stored blob that is
  missing, short or fails its digest (E711 blob_invalid, TM-15); both leave
  a cache.restore.refused row (entries.ResolveForRestore; Lookup and
  LookupForRestore keep their miss semantics for the remote plan)
- artifact collect, commit (digest_mismatch, uncommitted) and get refusals
  write artifact.collect/commit/get.refused rows
- the transfer receiver tells Refused about digest and short-blob refusals
  at publish, not only stale epochs; the coordinator audits a node's failed
  read-through re-hash as cache.restore.refused
- release admission (Stash.Guard), release verify and the coordinator's
  signer client audit their refusals; node revocation writes one
  evidence.quarantined row per quarantined run (reason key_revoked)
…of 41 (P7-CACHE-11)

- release-no-deps builds coordinator evidence with a failed dep; the old
  fixture flipped the result without the counts, which is evidence.invalid
- release admission cases go through Stash.Guard, transit and read-through
  cases through the coordinator lease, sign-uncommitted through the
  coordinator signer client, each with the rig store as audit sink
- results.json rerun on mm4 (darwin/arm64): 41 of 41 match
@acamarata

Copy link
Copy Markdown
Contributor Author

Folded into #543 (land/p7f-plugins) to land in one CI run.

@acamarata acamarata closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant