fix(agent): verify synchronous state acknowledgements - #202
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Relayfile test server now simulates committed and uncommitted synchronous acknowledgements while tracking operation polls. SDK saves conditionally wait for queued operations and always perform read-back verification. ChangesRelayfile synchronous acknowledgement flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant createSdkProgressStore.save
participant RelayfileStateServer
participant ReadBackVerification
createSdkProgressStore.save->>RelayfileStateServer: PUT SDK content
RelayfileStateServer-->>createSdkProgressStore.save: 204 acknowledgement
createSdkProgressStore.save->>ReadBackVerification: Read back and compare content
ReadBackVerification-->>createSdkProgressStore.save: Exact match or rejection
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Production evidence
Factory guardian run ebc40a61-8192-41a3-829f-5548fba326a5 loaded all 308 manifest features, then a successful non-queued response reached the unconditional opId assertion before readback. PR #200 did not introduce the assertion; it removed the earlier Slack receipt blockage that had masked this latent hosted-response compatibility bug.
RED first
The two new fixtures initially failed at the old unconditional operation-ID guard: 47 pass, 2 fail.
GREEN
Safety
Missing opId is never sufficient for success. Both response branches require canonical state readback; updates also require revision advancement. CAS conflicts, HTTP errors, invalid or terminal operation status, uncommitted writes, unchanged revision, and timeouts remain terminal. No deploy performed.
Summary by cubic
Verify hosted synchronous 2xx state-write acknowledgements using the same exact SDK readback and revision-advance proof as queued writes. Only poll operations when a non-empty
opIdis returned; uncommitted sync acks remain terminal via readback mismatch.agent.ts, always perform exact readback; poll only whenopIdis non-empty.Written for commit f65ca18. Summary will update on new commits.