mirror of
https://github.com/gastownhall/beads.git
synced 2026-09-14 20:17:24 +08:00
6ee989342a
* test(conformance): pin the PLANE of the importer's cross-plane edge assertions (wy-dpzjid) RunImporterWiresTheCrossPlaneEdgeBetweenItsRows documents that each direction is asserted on its own table and column, but importerEdgeCount sums BOTH dependency tables across all three target columns, so the case passed with either edge written to the other plane's table or under the wrong target column. Only the uow-tier test pinned placement. Add assertImporterPlaneEdgeCount (one table, one column, in the idiom of assertBatchApplyPlaneEdgeCount) and assert exactly one row in wisp_dependencies.depends_on_issue_id for wisp->durable, exactly one in dependencies.depends_on_wisp_id for durable->wisp, and zero in the other plane's table each way. importerEdgeCount stays for the "dropped everywhere" cases, where summing both planes is the right question. Verified (darwin/arm64): - go test ./internal/storage/uow -run TestImporterContract -count=1: ok - Negative control: pointing the wisp->durable assertion at `dependencies` fails with "dependencies.depends_on_issue_id rows ... = 0, want 1" - BEADS_TEST_EMBEDDED_DOLT=1 go test ./internal/storage/embeddeddolt -run 'TestConformance/Audit/molecule-wisp-batch-iter': ok - gofmt -l clean, go vet ./backend/conformance clean Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0173FRLuAy3NUjVvwFaLVj2r * test(conformance): keep the summed edge guard beside the plane pins Maintainer review fixup for PR #6218 (non-gating polish; the review approved the PR as-is). Review finding (minor, gate impact none): replacing the two summed assertions with four plane-pinned ones narrowed observation from all six table x column cells per edge to two — the expected cell and the same-column mirror. Every single-write misroute still fails the positive assertion, but a same-edge DUPLICATE landing under one of the four unnamed cells regressed from caught (the old sum read 2 against want 1) to silent, in the one case whose whole subject is edge placement. Keep both belts instead of trading one for the other: the pinned cells state WHERE the edge landed, the restored sum states that it landed NOWHERE ELSE. Together they also make the helper's claim exact — total 1 with the expected cell at 1 leaves every remaining cell empty — so the doc no longer overstates a single mirror-cell check as "the other plane holds none". Also (nit): give importerEdgeCount's doc the missing pointer to assertImporterPlaneEdgeCount, mirroring the two-way cross-reference the batch pair already sets (batch_apply_contract.go:2093-2113). That doc is this package's navigation system, and a summed counter that names no placement alternative is how the blind spot this PR fixes gets reintroduced. Validation on this tree: go test ./internal/storage/uow -run TestImporterContract -count=1 -tags gms_pure_go — ok 21.0s, 9 subtests green including WiresTheCrossPlaneEdgeBetweenItsRows, no skips. The restored guards were proven live, not vacuous: flipping both wants to 2 fails with "edges ... = 1, want 2" from each, while the pinned assertions stay silent, so the sum is an independent observation of the four cells they cannot see. gofmt, go vet, go build clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Eddie the Engineer <julianknutsen@users.noreply.github.com>