Skip to content

refactor(design-canvas,remote): extract pure canvas-sync reducer and add failure-ambiguity fixture - #904

Open
sambitcreate wants to merge 2 commits into
mainfrom
feat/sm-design-and-fixture
Open

sambitcreate wants to merge 2 commits into
mainfrom
feat/sm-design-and-fixture

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary

  • Extract reduceDesignCanvasSync pure state/event/effect reducer in renderer/design/use-design-canvas.ts (800 ms debounce, single conflict replay, unsettled history rebuild, closed backoff timer [2s, 5s, 15s, 30s], close-guard projection) and expand use-design-canvas.test.tsx (32/32 passed)
  • Add shared protocol/aiden-remote/v1/fixtures/mutation-failure-ambiguity.json contract fixture (no protocol revision bump) and behavioral matrix verification in main/services/aiden-remote-durable-operation.test.ts

Verification

  • 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)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

Comment thread renderer/design/use-design-canvas.ts Resolved
Comment thread renderer/design/use-design-canvas.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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_conflict with 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.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant