~bigbes/sr-ht-dolt: f9c82b0b

beads: extract the projection out of web/

web/beads.go held the one reading of the beads schema — the table
fingerprint, the lane bucketing, the ready rule, the status categories,
the transitive dependency walk, the event humanizer, the filter model and
the milestone rollup — where a second consumer could not reach it. The
MCP surface and the cross-database ready page both need it.

Move it to a new root package beads/ that depends on browse/ and the
standard library only: rows in, view model out, no net/http, no
html/template, no core. The BrowseSession seam is declared consumer-side
there and names the one method the projections call, so web's larger
BrowseSession satisfies it structurally and a session passes straight
through.

web/beads.go and web/milestones.go keep only their View adapters — slug,
label, template, Applies, and the hand-off of ref and query. The
templates are unchanged: the moved types keep their names and their
display methods, so every dot still resolves.

Pure move plus the beadsMax -> beads.Max export rename. The projection
tests move with the code and become testify; the render tests stay in
web/ unchanged. Same 63 tests pass before and after.

Eugene Blikh <bigbes@gmail.com> — 2026-08-12 20:27:39 UTC

Commit f9c82b0b52a29d95365455e3a975ca9e3608ef2bview raw patch

Parent(s): 0f6d50a6

14 changed file(s)

FileStatus+
beads/beads.go A +116
beads/beads_test.go A +493
beads/build.go A +463
beads/deps.go A +102
beads/events.go A +135
beads/milestones.go A +227
beads/milestones_test.go A +111
beads/model.go A +241
beads/rows.go A +87
web/beads.go M +12 -1054
web/beads_test.go M +57 -484
web/milestones.go M +9 -220
web/milestones_test.go M +3 -62
web/realdata_test.go M +5 -4