Repository navigation
feat(reconciliation): recovery matrix and simulator composition (C04) - #29
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
oneshot | 6f332f8 | Sep 07 2026, 11:33 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Milestone C04: Reconciliation recovery service, source simulator composition behind public ports, pre-live 36-scenario recovery matrix runner with zero external submissions, append-only persistence seam, and Gate P4 replacement guidance.
Scope and acceptance criteria
RecoveryService,RecoveryJob,RecoveryCommandPack, append-onlyAPPEND_RECOVERY_RECORD, atomic event-ID dedupe, fail-closed on schema/contract version mismatch).SimulatorLocalRecoveryStatePort,SimulatorKnownIdentityEvidencePort,SimulatorSubgraphMcpRecoveryPort,RecoveryAgentSimulator,InMemoryRecoveryCommandStore,createRecoverySimulatorComposition).externalSubmissionCount: 0).GATE_P4_RECOVERY_REPLACEMENT.md,C04_SIMULATOR_LOCK.md,SUBGRAPH_MCP_CHECKLIST.md, documentedEvidencePortenvelope gap,COMPOSITION_MANIFEST.md,GATE_P4_CHECKLIST.md).Product and security invariants
Invariant notes:
RecoveryServicehas no payment submission mechanism;settlementPermissionis strictlyNEVER;MARK_COMMITTEDcommands require authoritative, bound Arc final proofs from the evidence port.HOLD_UNKNOWN,ESCALATE_UNKNOWN, orREAD_ONLY_LOOKUPwith zero external submissions.Validation
Commands and results:
Independent review evidence
Gate A — exact candidate tree before push
4295bd9c909d39bd750eed8d756ec4b0abe7795845302a06def4d8afd0c3d008f94980009034723d6f332f8628b1b09b8ead10f40423f462190e85bafree-pi-cliglm-5.3-flashVERDICT: PASSpackages/reconciliation/src/service.ts:496-506: OnMCP_BOUNDARY_REJECTEDsanitized index view flows to advisor input; safe today due to structuralNON_AUTHORITATIVE_CANDIDATE_DISCOVERY, but guard/comment recommended for future hardening.packages/reconciliation/src/service-simulator.ts:52-66:InMemoryRecoveryCommandStoreenforces atomic event-ID dedupe, while durable state-version CAS (expectedStateVersion) is delegated to the A-owned consumer per Gate P4 replacement guide.packages/reconciliation/src/recovery-matrix.ts:120-134: Ten-concurrent-workers row reportsconcurrentResults[0]in row display; vitest integration tests already assert exactly 1 PROCESSED across all 10 workers.45302a06def4d8afd0c3d008f94980009034723d).Gate B — exact remote PR head
6f332f8628b1b09b8ead10f40423f462190e85ba45302a06def4d8afd0c3d008f94980009034723dfree-pi-cliglm-5.3-flashVERDICT: PASSpackages/reconciliation/docs/C04_RECOVERY_MATRIX_REPORT.md: Prettier column padding alignment in committed markdown vs unpadded raw generator table; identical content.packages/reconciliation/src/recovery-matrix.ts:119-134: Ten-concurrent-workers row rendersconcurrentResults[0]; convergence proven by vitest suite.packages/reconciliation/src/service.ts:497-506: OnMCP_BOUNDARY_REJECTEDsanitized empty index view feeds advisor; safe today, explicit guard recommended at Gate P4.packages/reconciliation/src/service-simulator.ts:52-66:InMemoryRecoveryCommandStorededupe is in-memory; durableexpectedStateVersionCAS is delegated to Gate P4 consumer.Agent policy / repository-policyand all applicable CI checks pass:repository-policy: PASS (run 34170405800)ESLint and TypeScript: PASS (run 34170405836)Markdown and Mermaid: PASS (run 34170405836)Workers Builds (oneshot): PASSRisk and rollback
expectedStateVersionCAS remain in-memory until the real persistence adapter is connected at Gate P4.EvidencePortin live B-lane does not currently return a full proof envelope; live replacement at Gate P4 requires B-side envelope enrichment as documented inGATE_P4_RECOVERY_REPLACEMENT.md.git revert 6f332f8628b1b09b8ead10f40423f462190e85bawithout breaking existing lane A or B functionality.Human merge