Files
Joseph Turian f456a2667c test(regression): Dolt migration regression discovery (long-lived branch) (#1906)
* feat(test): differential regression suite (v0.49.6 baseline)

Adds 53 regression test scenarios comparing current bd behavior against
v0.49.6 SQLite baseline. Tests run identical CLI scenarios against both
binaries in isolated workspaces, capture JSONL snapshots via bd export,
normalize volatile fields, and fail on any unexpected difference.

44 PASS, 9 SKIP (documenting known regressions/intentional changes), 0 FAIL.

Build-tagged `//go:build regression` so it never runs in normal `go test`.
Run with: `go test -tags=regression -timeout=10m -v ./tests/regression/...`

* test(regression): add 17 scenarios targeting recent open bugs

New scenarios covering subtle bugs found by surveying GH issues since v0.50:

Epic lifecycle (GH#1495):
- TestEpicAllChildrenClosedNotBlocked: epic with all children closed
  should not show as BLOCKED with "0 dependencies"
- TestBlockedEpicChildrenNotReady: children of blocked epic should not
  appear in bd ready

Dependency semantics (GH#1524, GH#1858):
- TestCloseGuardNonBlocksDepTypes: close guard should not reject close
  for non-blocks dep types (caused-by, validates, tracks)
- TestListResolvedBlockerAnnotation: bd list should not show "blocked by"
  after blocker is closed

CLI surface coverage (GH#1840, GH#1954):
- TestListAllOverridesLimitWithLabel: --all should override limit of 50
  when combined with --label filter
- TestDepTreeOutput: bd dep tree should show full parent-child hierarchy
- TestChildrenCommand: bd children parity between backends
- TestBlockedCommandParity: bd blocked --json agreement
- TestCountCommandParity: bd count agreement
- TestStaleCommandParity: bd stale agreement
- TestQueryDSLParity: bd query DSL returns same results

Data integrity (GH#1914, GH#1926, GH#1927, GH#1969, GH#1973):
- TestShowJSONFieldCompleteness: bd show --json includes all fields from
  baseline (catches scan projection drift)
- TestExportImportEpicTree: multi-level epic tree export → import round-trip
- TestRapidLabelAddRemoveStability: rapid label churn not silently rolled back
- TestRapidDepAddRemoveStability: rapid dep churn consistency
- TestRapidCommentAddStability: 10 rapid comments all survive
- TestLargeExportImportRoundTrip: 20 issues with deps/labels/comments
  round-trip at scale

* test(regression): add bug discovery tests and 14 confirmed bug reports

Systematic manual testing against current main (Dolt server mode) found
14 bugs and confirmed 23 protocol invariants. All tests require a running
Dolt server on :3307 and use unique prefixes for test isolation.

Bug reproduction tests (10 FAIL = confirmed bugs):
- BUG-2: dep tree shows no children (ParentID never set)
- BUG-3: dep tree shows [READY] on blocked root
- BUG-4: list --status blocked returns empty
- BUG-7: dep add silently overwrites dep type
- BUG-8: reparented child appears under both parents
- BUG-10: close guard / claim exit 0 on soft failure
- BUG-11: update --status accepts arbitrary values
- BUG-12: update --title "" stores empty title
- BUG-13: reopen of closed+deferred creates limbo state
- BUG-14: empty string label accepted

Protocol invariant tests (23 PASS):
Close guard, epic lifecycle, delete cleanup, reopen preservation,
transitive blocking, cycle detection, force close, defer/undefer,
claim semantics, notes, supersede, duplicate, count grouping,
special chars, SQL injection safety, dep remove, self-dep prevention,
status/type/due-date round-trips, label/comment round-trips.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(regression): add audit verdicts and session log to DISCOVERY.md

Triage all 14 bugs: 5-6 clear fix PRs, 2 need design discussion,
5-6 wontfix/by-design. Add session log to avoid redoing work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(regression): revised audit, protocol test classifications, prior art

- Updated bug verdicts based on code review: BUG-4 upgraded to DOCS FIX,
  BUG-5 upgraded to INVESTIGATE (INSERT IGNORE is correct but concurrent
  Dolt working-set commits may race), BUG-7 downgraded to FILE ISSUE
  (upsert is intentionally coded, needs product decision)
- Tagged all 32 protocol test ideas as DATA INTEGRITY, POLICY/UX, or
  MESSAGE CONTRACT to distinguish hard invariants from policy decisions
- Added "Prior Art" section documenting key Dolt migration fixes already
  merged (PRs #1797, #1816, #1909, #1914, #1966-1969, #1948) and
  Dolt-specific constraints learned from them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:18:56 -08:00

2 lines
8 B
Plaintext