Repository navigation
refactor(design-canvas,remote): extract pure canvas-sync reducer and add failure-ambiguity fixture - #904
refactor(design-canvas,remote): extract pure canvas-sync reducer and add failure-ambiguity fixture#904sambitcreate wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Important
The reducer drops or defers pending save work in two in-flight interleavings, and the new cross-platform fixture is not enforced by either native client.
Reviewed changes I reviewed the single commit's design-canvas state-machine extraction, imperative effect integration, added tests, and Remote failure-ambiguity fixture.
- Canvas reducer — Extracts load, edit/history, debounce, conflict replay, lifecycle flush, closed retry, guard, and disposal transitions into
reduceDesignCanvasSync. - Canvas coverage — Adds mounted teardown and recovery cases plus direct reducer checks for backoff, timer cancellation, double conflicts, and late announcements.
- Remote ambiguity matrix — Adds a two-policy fixture, real durable-operation scenarios, and overlap checks against the existing Bot outbox fixture.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I reviewed the follow-up commit that addresses the prior canvas-sync interleavings and narrows the Remote ambiguity fixture's contract scope.
- Elapsed debounce preservation — Recorded when a newer edit's debounce expires during an active save and starts that batch immediately after settlement.
- Queued lifecycle flushes — Honored flush and close requests across successful, conflicting, refused, and failed save paths, including flush-origin and backoff-origin attempts.
- Host-scoped ambiguity contract — Narrowed the fixture to the host durable-operation contract and aligned
revision_conflictwith non-ledger versus replayed-ledger semantics. - Behavioral coverage — Added mounted tests for slow saves, queued retries, refused saves with newer edits, and disposal during a failing flush.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

Summary
reduceDesignCanvasSyncpure state/event/effect reducer inrenderer/design/use-design-canvas.ts(800 ms debounce, single conflict replay,unsettledhistory rebuild, closed backoff timer[2s, 5s, 15s, 30s], close-guard projection) and expanduse-design-canvas.test.tsx(32/32 passed)protocol/aiden-remote/v1/fixtures/mutation-failure-ambiguity.jsoncontract fixture (no protocol revision bump) and behavioral matrix verification inmain/services/aiden-remote-durable-operation.test.tsVerification
npm run test:design-mode(635/635),npm run test:aiden-remote(1,294 passed, 5 skipped + 7/7 LAN spike),npm run type-check(0 errors)