test(rfc64): certify finalized private SWM retirement - #2411
Conversation
8e6c071 to
0e75ae4
Compare
|
Revalidated the certification gate after restacking onto lifecycle head
This confirms the lifecycle fixes did not regress private recovery or failover. |
0e75ae4 to
8bc1af5
Compare
8bc1af5 to
a73d28e
Compare
a73d28e to
4fae89f
Compare
2c6d86e to
9ad9fde
Compare
85d9bec to
f36a3f0
Compare
e0c5029 to
2cb8c14
Compare
f36a3f0 to
066a5f1
Compare
…lifecycle' into codex/pr2411-review-fixes # Conflicts: # packages/agent/src/rfc64/catalog-applied-head-coordinator-v1.ts # packages/agent/src/rfc64/catalog-synchronization-evidence-v1.ts
# Conflicts: # packages/agent/package.json # packages/agent/scripts/test-package-root.mjs # packages/agent/src/dkg-agent-rfc64-catalog.ts # packages/agent/src/dkg-agent-rfc64-swm-catalog-projection-supervisor.ts # packages/agent/src/dkg-agent-rfc64-swm-catalog-projection.ts # packages/agent/src/rfc64/public-catalog-native-receiver-v1.ts
…lifecycle' into HEAD # Conflicts: # packages/agent/src/dkg-agent-rfc64-swm-catalog-projection-supervisor.ts # packages/agent/src/rfc64/catalog-applied-head-coordinator-v1.ts # packages/agent/src/rfc64/catalog-synchronization-evidence-v1.ts # packages/agent/src/rfc64/finalized-swm-retirement-lifecycle-receipt-v1.ts # packages/agent/test/rfc64-catalog-synchronization-evidence-v1.test.ts
otReviewAgent
left a comment
There was a problem hiding this comment.
Operational Notice: Review Agent could not complete this review.
Business logic reviewer failed: Selected model is at capacity. Please try a different model.
| delete(repair: Readonly<Rfc64FinalizedPrivatePlacementRepairV1>): Promise<void>; | ||
| } | ||
|
|
||
| export function createRfc64FinalizedPrivatePlacementRepairStoreV1( |
There was a problem hiding this comment.
🟡 Issue: The repair store is a pass-through facade while the monolith keeps growing
What's wrong
The new store abstraction does not own storage behavior; it merely renames synchronous inventory methods and presents them as promises. Persistence then wraps it again, while all substantive queue logic is inserted into the 3k-line CandidateInventoryV1 class. This adds indirection without modularity and materially worsens an already oversized core file.
Example
A put currently travels through the owned-persistence wrapper, the repair-store wrapper, the inventory foundation forwarding method, and finally CandidateInventoryV1. The nominal store module owns none of the SQLite implementation that would justify these layers.
Suggested direction
Make this module the real repair-queue repository, or delete the store facade and provide one canonical non-owning operations view directly from inventory persistence. Keep one clear boundary rather than four forwarding layers.
For Agents
Move the repair queue's SQLite repository implementation out of inventory-v1/candidate.ts into a focused persistence module, or expose the candidate implementation through one canonical lifecycle-fenced operations view like the existing SWM inventory capability. Remove the duplicate async renaming facade and forwarding layers. Preserve canonical serialization, digest binding, transaction recovery, and close fencing; keep the repair-store and inventory lifecycle tests passing through the simplified boundary.
|
Superseded by merged integration PR #2432. The current head of this stacked PR is contained in testnet-canary. |
User impact
A node recovering a selected private context graph can now be certified against the real RFC-64 lifecycle: it authenticates and activates every catalog SWM payload, reconstructs the exact finalized VM state, durably commits and post-reads the applied catalog head, and only then retires the duplicate SWM twin.
This PR is the release gate for the runtime ordering implemented by #2412. It prevents a canary from passing merely because the final store happens to look correct after an unsafe early retirement.
Before
sequenceDiagram participant Receiver participant Catalog as RFC-64 catalog participant SWM as SWM store participant VM as Finalized VM participant Gate as Release gate Receiver->>Catalog: Fetch private catalog Receiver->>SWM: Activate authenticated payloads Receiver->>VM: Materialize finalized projections Receiver->>SWM: Retire duplicate twins Gate->>SWM: Read final empty state Gate->>VM: Read final VM state Note over Gate: Safe temporal order is inferredAfter
sequenceDiagram participant Receiver participant Catalog as RFC-64 catalog participant VM as Finalized VM participant Head as Applied-head store participant SWM as SWM store participant Gate as Release gate Receiver->>Catalog: Fetch and verify private catalog Receiver->>VM: Materialize and post-read exact finalized rows Receiver->>VM: Commit VM transaction Receiver->>Head: Commit and post-read exact catalog head Head-->>Receiver: Receiver-owned committed-head token Receiver->>SWM: Reconcile duplicate twin after durable token Receiver-->>Gate: Typed per-KA lifecycle receipts Gate->>VM: Independently read exact projection bytes Gate->>Gate: Recompute VM digest and require cold materialization Gate->>SWM: Verify exact retired stateWhat the gate proves
subGraphName, rejects malformed, duplicate, and out-of-order receipts, and emits deterministic canonical UAL order.existingstatus or the wrong VM post-read digest cannot pass.Evidence
Validated at head
f36a3f05don runtime base #2412 heade0c502980.0xd779811873c1e2333aa53ff775c0eb98f8e788f1d37a36c06ae3ea97155832a6.0x4df079ac66073d779672317f74c06dd23e69c7916d15b78595c7300762258ccc.Scope
This PR changes the CP2 certification runner and adds its typed wire decoder/verifier tests. It also extracts the committed-head token and lifecycle-receipt interfaces into pure internal agent contract modules so the harness consumes the exact production types without importing the full runtime. Both extracted modules remain explicitly blocked from the public package root.