diff --git a/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/task-5-report.md b/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/task-5-report.md index 4b1acd1..2980aad 100644 --- a/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/task-5-report.md +++ b/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/task-5-report.md @@ -20,3 +20,17 @@ Tests: - `git diff --check` — passed. Concerns: no production schema was applied. The route defensively sorts notes by `note_index`; posted detection covers legacy status, staged `stage=posted`, and non-empty `posted_at`. + +## Fix round 2 evidence + +Task 5 implementation/fix commit: `dd0560c2d66f013e173e432d27bfffd34a6146f3`. + +This round removes surplus unposted candidates during merges, captures the full before-state for the audit event, and serializes revisions through the existing unique `dn_pipeline_locks` batch lease. Live leases return 409; expired leases are reclaimed; leases release in `finally` on success, stale revision, and failure. Added coverage for merge deletion, live/reclaimed leases, release behavior, malformed payloads, staged posted candidates, and pagination conflicts. No production schema was applied. + +Commands and results: + +- `npx vitest run 'src/app/api/dn-batches/[id]/assembly/route.test.ts'` — 11 passed after test-first failures. +- `npm run typecheck` — passed. +- `npx vitest run src/lib/dn-pipeline src/app/api/dn-batches` — 263 passed. +- `python3 scripts/pb-add-dn-staged-ingestion.py --dry-run` — completed; no schema changes written. +- `git diff --check` — passed.