Fix #307: instance repo totals #309

Merged
crueber merged 1 commit from fix/issue-307 into main 2026-09-10 22:15:59 +00:00
Owner

Closes #307 (remainder of #295): /explore now shows the true instance repo total from a served payload.

Rail: issue option 1 (preferred) — repo_count on each owners/detailed row. Sound source is the registry's new OwnerRepoCounts (one manifest-gated walk, same trip profile as the Owners call it replaces — zero added store trips), NOT the #283 catalog aggregate (the sweep never prunes deleted rows, so a catalog fold would resurrect ghosts; documented in 07 Decisions). Ghost-filtered exactly like liveRepos; verified by TestRepoRegistryOwnerCounts (litter, unborn forks, delete/recreate).

Triple twins + SDK + docs in the same change (law 12): no new endpoint or discovery template (14 §14.12 additive field rule); SDK shape comment; 07_api/12_web_ui Decisions entries; 14 field-rule note. UI: intro card 'Home to N owners and M repositories' via pure instanceRepoTotal (uncapped-payload sum, headless-tested incl. capped-sum-is-not-the-total).

Tests: go test ./internal/api/ ./internal/server/ ./cmd/walhub/ -race green; api cover 95.5% (gate 95); node --test web/test/unit/*.test.js 588/588; vite build green. No browser (shared-daemon loopback guard — proof open).

Closes #307 (remainder of #295): /explore now shows the true instance repo total from a served payload. Rail: issue option 1 (preferred) — `repo_count` on each `owners/detailed` row. Sound source is the registry's new `OwnerRepoCounts` (one manifest-gated walk, same trip profile as the `Owners` call it replaces — zero added store trips), NOT the #283 catalog aggregate (the sweep never prunes deleted rows, so a catalog fold would resurrect ghosts; documented in 07 Decisions). Ghost-filtered exactly like `liveRepos`; verified by `TestRepoRegistryOwnerCounts` (litter, unborn forks, delete/recreate). Triple twins + SDK + docs in the same change (law 12): no new endpoint or discovery template (14 §14.12 additive field rule); SDK shape comment; 07_api/12_web_ui Decisions entries; 14 field-rule note. UI: intro card 'Home to N owners and M repositories' via pure `instanceRepoTotal` (uncapped-payload sum, headless-tested incl. capped-sum-is-not-the-total). Tests: `go test ./internal/api/ ./internal/server/ ./cmd/walhub/ -race` green; api cover 95.5% (gate 95); `node --test web/test/unit/*.test.js` 588/588; vite build green. No browser (shared-daemon loopback guard — proof open).
Rail 1 (the issue's preferred rail): each owners/detailed row gains an
always-present repo_count — the manifest-gated live-repo count, sourced
from the registry's new OwnerRepoCounts (one walk, the same trip profile
as the Owners call it replaces: zero added store trips). Deliberately NOT
the #283 catalog aggregate: the sweep never prunes deleted rows, so a
catalog fold would resurrect ghosts. Triple twins carry the field for
free (no new endpoint/discovery template); SDK shape comment updated.
/explore intro card reads 'Home to N owners and M repositories' via the
new pure instanceRepoTotal (uncapped-payload sum, never the top-5 slice).

docs/go/07_api.md: owners/detailed shape + Decisions entry (law 12).
docs/go/12_web_ui.md: intro-card totals + Decisions entry. 14: additive
field rule note, no new seam. go vet/build clean; api+server+cmd -race
green; api cover 95.5% (gate 95); node --test 588/588; vite build green.
Browser proof open (shared-daemon loopback guard).
Sign in to join this conversation.
No description provided.