Repository navigation
fix: bind reviewed-page retries to saved draft - #48
Conversation
jerelvelarde
left a comment
There was a problem hiding this comment.
Reviewed the current head for value, template fit, and security. No blocking findings.
This strengthens the template's review-before-save workflow: new receipts retain the normalized approved draft, identical retries recover the saved page, and changed title/content/destination return 409. I checked the server-side comparison and transaction, client conflict handling, migration/restart behavior, and Space-access checks. Older receipts intentionally retain legacy behavior because their original drafts are unavailable; this is a compatibility limitation, not a regression.
Fresh local validation: 166 tests passed; typecheck, lint, formatter check, and production build passed. The existing large-bundle warning remains. Interactive browser QA was not performed. Approved; merge after CI passes.
User workflow
A Dot presents a Markdown draft for owner review before saving it to a Space. When a save response is lost or the card reconnects, an unchanged review should recover the same saved page. If the title, content, or destination changes while the thread and tool-call ID stay the same, the card should identify the existing save and require a new review for the changed draft.
Change
Reproduction and verification
On the pinned base commit
c2569bb6, saving draft A and then submitting draft B with the same thread and tool-call ID returned HTTP 201 with page A. With this change, the second request returns HTTP 409; the original page and receipt remain intact.Regression coverage exercises identical retries, changed title/content/destination, title normalization, receipt recovery after page edits, Space revocation, database migration/restart, and client recovery before a decision. The existing page-review recovery tests continue to pass.
npm run check-format,npm run lint,npm run typecheck,npm run build: passed.