From 485443a1e4101e487fbe73ed39a42000edd4a209 Mon Sep 17 00:00:00 2001 From: DEls Date: Sat, 19 Sep 2026 19:33:56 +0200 Subject: [PATCH] docs: record migration idempotency verification --- .../final-fix-report.md | 7 +++++++ .../2026-09-18-hybrid-delivery-note-ingestion/progress.md | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/final-fix-report.md b/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/final-fix-report.md index 3fc2369..e9e38cc 100644 --- a/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/final-fix-report.md +++ b/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/final-fix-report.md @@ -46,3 +46,10 @@ Follow-up focused verification: 4 files, 92 tests passed; `npm run typecheck`; ` Follow-up 2 code commit: `bb70f33` Follow-up 2 focused verification: 4 files, 95 tests passed; `npm run typecheck`; `git diff --check`. + +## Migration idempotency follow-up + +`merge_indexes` now compares semantic-normalized CREATE INDEX definitions: index names, keywords, quoted identifiers, whitespace, and punctuation are normalized for comparison, while uniqueness, column order/content, and WHERE predicates remain meaningful. Self-tests cover the exact PocketBase uppercased/multiline variants and near-miss definitions that must replace. + +Migration code commit: `bee2b3d` +Verification: migration self-test passed; authenticated live `--dry-run` against the configured PocketBase reported every collection/index already present and ended with `DRY RUN. No schema changes written.`; `git diff --check` passed. No live writes were made. diff --git a/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/progress.md b/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/progress.md index f9e71dc..f7d67d4 100644 --- a/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/progress.md +++ b/.superpowers/sdd/2026-09-18-hybrid-delivery-note-ingestion/progress.md @@ -183,3 +183,7 @@ Final fix follow-up 2: dispatched at base 9fafec6 Final fix follow-up 2: code complete (ledger totals scoped to site-selected PO item IDs; malformed unrelated rows ignored; malformed relevant and negative quantities fail closed; commit bb70f33) Final fix follow-up 2: focused verification passed — 4 files, 95 tests; npm run typecheck; git diff --check Ruling: cumulative delivery totals are filtered to the batch's site-scoped PO item IDs before quantity validation — cost if wrong: an unrelated legacy ledger row cannot block this batch, while a malformed row attached to a relevant PO item still stops posting. +Migration idempotency follow-up: dispatched at base d12ca92 +Migration idempotency follow-up: code complete (semantic-normalized index comparison and PocketBase variant self-tests; commit bee2b3d) +Migration idempotency follow-up: verification passed — migration self-test; authenticated live dry-run reports every collection/index already present and no writes; git diff --check +Ruling: CREATE INDEX definitions are compared after case, whitespace, quoting, and punctuation normalization while preserving uniqueness, columns, and WHERE predicates — cost if wrong: formatting-only schema drift no longer causes repeated dry-run reconciliation, but semantic index changes still replace the stored definition.