beads/scripts/migration-test/lib
matt wilkie 4c3df8dd6b
test(migration): assert bd ready/blocked/close on migrated DB (mybd-ihg5) (#4584)
The migration-test harness (scripts/migration-test/) already builds a
BUG->TASK dependency fixture (create_dataset in lib/features.sh: `dep add
"$bug_id" "$task_id"`, i.e. bug depends on task, task is the blocker) and
migrates it in place with the candidate binary, but only verified fidelity
via bd list/show JSON. It never exercised bd's blocker-aware query paths on
the migrated DB, which is exactly the surface of the historical `bd close`
Dolt errno 1105 failure on a stale post-migration dependency schema
(verified manually for the 1.0.5 release in mybd-kdxj).

Add check_blocker_paths() in lib/snapshot.sh, run against the migrated DB
after check_fidelity in all three harness outcomes (direct upgrade, recipe
fallback, stepping-stone) plus the --self-test path:
  - bd blocked lists the dependent (bug) while the blocker (task) is open
  - bd ready excludes the dependent but includes the open blocker
  - bd close on the blocker succeeds post-migration (the errno 1105 path)
  - bd ready then lists the dependent (unblock/is_blocked recompute)

Violations fold into the existing violation count and flip AUTO/MANUAL
results to BLOCKED so a regression fails the harness loudly, matching the
existing report.sh exit-code convention. Skips gracefully when the source
version's dataset has no dependency.

cross-version-smoke.yml's parallel gate (scripts/upgrade-smoke-test.sh)
already added equivalent Scenario 6 blocker-path assertions in #4238; no
change needed there.

Verified: `--self-test` (candidate -> candidate, no downloads) and a real
`v0.63.3 -> candidate` direct upgrade both pass with the new BLOCKER-CHECK
line green.


Agent-Signature: claude-opus-4-8-high on behalf of matt wilkie

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 13:32:37 -07:00
..
binary.sh docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
features.sh fix: unblock v0.62.0 migration test by allowing Dolt auto-start (#3072) (#3076) 2026-04-06 16:02:13 -07:00
report.sh feat: add migration test harness for cross-era upgrade fidelity (#3067) 2026-04-06 14:30:35 -07:00
snapshot.sh test(migration): assert bd ready/blocked/close on migrated DB (mybd-ihg5) (#4584) 2026-07-07 13:32:37 -07:00
versions.sh fix: remove unsupported stepping-stone migration paths (#3073) (#3110) 2026-04-07 12:56:56 -07:00
workspace.sh fix: unblock v0.62.0 migration test by allowing Dolt auto-start (#3072) (#3076) 2026-04-06 16:02:13 -07:00