RFC-64 M1 7/7: add fail-closed selective coverage gate - #2017
RFC-64 M1 7/7: add fail-closed selective coverage gate#2017branarakic wants to merge 14 commits into
Conversation
fe9d92c to
175f486
Compare
9ded5a7 to
e8527e7
Compare
175f486 to
0b053ba
Compare
e8527e7 to
ab95c27
Compare
e7cb778 to
785b434
Compare
2257fee to
9086492
Compare
d9a70d4 to
e176c85
Compare
otReviewAgent
left a comment
There was a problem hiding this comment.
Operational Notice: Review Agent could not complete this review.
Business logic reviewer failed: retry_exhausted
900cca8 to
ba29549
Compare
otReviewAgent
left a comment
There was a problem hiding this comment.
Operational Notice: Review Agent could not complete this review.
Business logic reviewer failed: retry_exhausted
e176c85 to
f123856
Compare
otReviewAgent
left a comment
There was a problem hiding this comment.
Operational Notice: Review Agent could not complete this review.
Business logic reviewer failed: retry_exhausted
9cd51e4 to
cb28be0
Compare
otReviewAgent
left a comment
There was a problem hiding this comment.
Operational Notice: Review Agent could not complete this review.
Business logic reviewer failed: retry_exhausted
branarakic
left a comment
There was a problem hiding this comment.
Review feedback addressed; implementation details are recorded in the inline replies.
branarakic
left a comment
There was a problem hiding this comment.
Review feedback addressed; implementation details are recorded in the inline replies.
M1 stack
This is PR 7 of 7 in the RFC-64 M1 stack. It depends on the bounded runtime-evidence endpoint from PR 6.
f123856165e168f7d15664d7e07d26badcf9ad81cb28be01c0759270cdbc396bb75841636d78ac0cSummary
This PR adds the repository-owned, fail-closed RFC-64 M1 selective-coverage gate for three distinct real DKG processes:
It verifies two publication waves, an Edge restart, explicit and automatic synchronization, and a cold-started Core.
The gate requires proof that:
Exact state means matching heads, inventory digests, KA counts, and payload triple counts—not trusting
synced: true, logs, or metadata presence.User and operator impact
Release operators get one deterministic collection/verification command after supplying a deployment adapter:
The artifact binds an external corpus and trust anchor, exact network and commit, a clean runtime manifest, expected peer IDs, distinct OS processes, durable Edge identity across restart, and the raw bounded journal snapshots for real automatic Edge/Core jobs.
verify-liveindependently revalidates those retained records.Operator-supplied corpus and trust-anchor files are decoded through closed schemas before any build, process launch, or artifact verification begins. Malformed JSON, unknown fields, invalid identifiers, and structurally invalid snapshots therefore stop the run at the input boundary instead of flowing through unchecked TypeScript casts.
Unit tests validate the contract and failure modes; they are not a release PASS.
Deployment adapter required
Important
This repository intentionally does not include a deployment-specific adapter executable.
A live run requires an operator-reviewed adapter:
export DKG_RFC64_M1_ADAPTER_COMMAND=/secure/operator/dkg-m1-adapterThe adapter controls real Publisher, Edge, and Core processes through the documented framed JSON-lines protocol. Without it, the command fails before producing evidence. There is no mock, inferred result, or synthetic PASS fallback.
A PASS artifact is written only after the adapter returns every required observation, the verifier accepts all checks, every controlled process stops, and the adapter exits cleanly.
Evidence sequence
Before
sequenceDiagram participant O as Release operator participant N as DKG processes participant L as Logs and aggregate status participant R as Release decision O->>N: Run manual publication and sync steps N-->>L: Emit logs and status O->>L: Inspect selected observations L-->>O: Partial runtime evidence O->>R: Make a manual judgment Note over O,R: No closed corpus, provenance boundary, or fail-closed artifactAfter
sequenceDiagram participant O as Release operator participant L as Repository launcher participant A as Operator adapter participant P as Publisher process participant E as Edge process participant C as Core process participant J as Node-admin journal participant V as Fail-closed verifier participant F as Evidence artifact O->>L: Supply corpus, trust anchor, and adapter command L->>L: Verify clean source and runtime manifest L->>A: Start Publisher and Edge A->>P: Publish selected and final waves A->>E: Prove empty state and issue selections A->>E: Restart with the same durable directory A->>J: Read automatic Edge evidence J-->>A: Terminal reconciler entry A->>E: Issue second on-demand request L->>A: Start Core cold A->>C: Run bounded automatic rounds A->>J: Read automatic Core evidence J-->>A: Frozen plans and terminal completions A-->>L: Exact VM and SWM observations L->>V: Verify anchored evidence V-->>L: PASS or reject reasons L->>A: Stop roles and close adapter A-->>L: Every process exited alt Every check and cleanup passed L->>F: Atomically write canonical PASS artifact L-->>O: PASS with artifact digest else Any check or cleanup failed L-->>O: FAIL with no PASS artifact endExact and automatic provenance contract
Each VM/SWM plane contains head digest, inventory digest, asset count, payload triple count, separate metadata count, and reported-complete flag. Expected state comes from the external corpus and Publisher observations; Edge/Core output cannot redefine expectations.
Automatic evidence must be terminal, retained, untruncated, and verified across metadata/durable/SWM:
edge-reconciler-jobrecords.core-automatic-roundrecords with no explicit-selection work relabeled as automatic.connection-open,peer-update, orperiodic-reconciler; manual catch-up cannot satisfy the automatic-coverage gate.Compatibility and safety
stableJsoncontract remains narrow and pinned by tests.exit/close.Validation
git diff --check: pass.Review focus