dd56e38c
refactor(doc): one route from a revision to an Archive (spec-wcr #2, #4)
doc.Scan/DocumentSource were production-dead after service.Archive landed — their only consumer was doc's own test fixture — and they were the seam that made web's layering violation writable: a surface could reach past service/ into gitx and build its own archive. Deleted, so doc/ now owns no way to read a revision and service.Archive is the single route from rev to Archive. The fixture reads through ListDocuments + FromDocuments instead. TestScanReportsGitErrors covered an unknown revision failing rather than walking empty, which gitx did not test itself. Relocated there as TestWalkOfAnUnknownRevisionFails rather than dropped. linkHierarchy passed path.Dir(p.Path) where every other call site passes DirOf. Unobservable today: the two differ only at the space root, and there the section-proximity step is subsumed by the same-directory step above it, so "." only ever skipped a lookup that had already answered. Verified by reverting and re-running. Changed anyway — it stays unobservable only by coincidence of two ranking rules — with a test pinning the invariant that `parent:` resolves to whatever the same wikilink in the body resolves to. spec-wcr
Eugene Blikh <bigbes@gmail.com> — 2026-07-24 18:38:24 UTC
Commit dd56e38c60d154ed0db6d60101a2fb92667438ea —
view raw patch
Parent(s):
2dc6b717
| File | Status | + | − |
|---|---|---|---|
.beads/interactions.jsonl
|
M | +1 | |
.beads/issues.jsonl
|
M | +3 | -1 |
doc/archive.go
|
M | +5 | -4 |
doc/doc.go
|
M | +9 | -7 |
doc/fixture_test.go
|
M | +16 | -5 |
doc/scan.go
|
M | +18 | -35 |
doc/scan_test.go
|
M | +42 | -15 |
gitx/read_test.go
|
M | +21 |