RFC-64 M1 2/7: expose verified VM and SWM convergence - #2012
Conversation
494ff1f to
c19f6a6
Compare
61d4902 to
76c5032
Compare
14c4891 to
7042604
Compare
branarakic
left a comment
There was a problem hiding this comment.
Submitting the completed inline feedback responses.
branarakic
left a comment
There was a problem hiding this comment.
Submitting the completed inline feedback responses.
90e9805 to
1a1ad26
Compare
739a9a5 to
9cad49e
Compare
1a1ad26 to
04b9175
Compare
04b9175 to
9871c75
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
| input.result, | ||
| input.includeSharedMemory, | ||
| ); | ||
| if (deferredBackpressure > 0 && !input.result.denied) { |
There was a problem hiding this comment.
🟡 Issue: Add a regression test for denial winning over local deferral
What's wrong
The new two-phase classifier preserves ACL denial by excluding denied results from the local-backpressure short-circuit, but the added tests do not directly verify that precedence for a pure denied round. That status is user-facing and actionable, so an untested regression would tell clients to retry for capacity when the real next step is resolving authorization.
Example
A regression that changes line 530 to if (deferredBackpressure > 0) would make a pure ACL denial with scheduler backpressure return deferred instead of denied, and the current tests would still miss that specific precedence case.
Suggested direction
Cover the pure ACL-denial-plus-backpressure branch so future refactors cannot collapse authorization denial into a retryable scheduler status.
For Agents
Add a focused readiness or coordinator test near the new backpressure tests. Build a denied result with denied: true, deniedPeers: 1, deferredBackpressure: 1, no clean plane completions, no inserted data, and assert the classification/job status remains denied with the denial error and no readiness/state effects.
9471694 to
d946ff8
Compare
M1 stack
This is PR 2 of 7 in the RFC-64 M1 stack.
Stack base:
codex/rfc64-m1-edge-selection(PR #2011).Exact stack provenance
9471694c55f318f65f7691983bbde4fe5bfddb46da58c0c70453b32af4f355b00ca2c7a8fdf78fa9User and operator impact
When a user selects a Context Graph, the node treats authoritative metadata, finalized VM, and requested SWM as separate required proofs. It no longer reports complete convergence when SWM succeeded but VM did not, when metadata is only a legacy placeholder, or when readiness predates the current attempt.
dkg context-graph catchup-status <cg>anddkg sync catchup-status <cg>now show:status, with current verified convergence reported separately;pending,partial, orcomplete;on-demandoralways-on;attemptonly when the immutable runner outcome differs from the current actionable status;A successful lossy public empty round remains a successful attempt (
status: done) while its independently computed convergence remainspartial. The status changes tounreachableonly when a newer persisted readiness update proves that the previously successful attempt was invalidated. This prevents the status endpoint from immediately contradicting a successful runner result without new evidence.A current authorization denial always wins over historical readiness.
Concurrency semantics
Before
sequenceDiagram actor User participant API participant Worker participant Store User->>API: Request VM and SWM catch-up API->>Worker: Start catch-up Worker->>Store: SWM succeeds Worker--xStore: VM or metadata fails API-->>User: done or frozen attempt state Note over API,Store: Partial proof could look complete Note over API: Later recovery was not reflected truthfullyAfter
sequenceDiagram actor UserB as VM and SWM caller actor UserA as VM-only caller participant API participant Coordinator as Daemon-lifetime coordinator participant Worker participant Store as Local proof store UserB->>API: Request VM and SWM catch-up API->>Coordinator: Fill full slot JF Coordinator->>Worker: Run VM and SWM once UserA->>API: Request VM while JF runs API->>Coordinator: Fill durable slot JD Note over Coordinator: JD reuses JF result, no second run Worker->>Store: Verify metadata and VM Worker--xStore: SWM deferred by local capacity Worker-->>Coordinator: VM complete, SWM deferred Coordinator-->>UserB: JF deferred Coordinator->>Store: Persist scoped VM readiness Coordinator-->>UserA: JD done with VM convergence completeThe inverse case is also coalesced: when VM-only starts first, a later full request fills the full slot and runs serially after the durable job. The two public job IDs remain immutable.
Implementation notes
deferredfor either requested plane, while a durable slot ignores SWM-only deferral. Legacy results without per-plane diagnostics fail closed on the aggregate counter.deferred; it cannot freeze readiness even when another peer denied the same round.donetounreachable.CatchupTrackerremains the original public two-map status index (jobspluslatestByContextGraph); active orchestration stays in the coordinator's private map and never leaks into the tracker contract.includeSharedMemoryname. The legacyincludeWorkspacename is deprecated and normalized only at public input/response compatibility boundaries.PROJECT_SYNCEDevent and payload emitted to downstream consumers.includeWorkspaceresponse alias is derived fromincludeSharedMemory, and convergence and historical-attempt fields are additive.Non-goals
Validation
9471694c55f318f65f7691983bbde4fe5bfddb46; six additive review-fix commits sit above them.git diff --check: passed.Review focus