Home's daily signal fails on g1t.sh with "What the work says couldn't be read just now". This fixes that, and tunes the signal against flagon-io's own numbers.
Closes #162
The failure
D1 takes at most five terms in one compound SELECT, while SQLite allows 500. The weekly query's stalled check combined eight activity sources in one UNION ALL, so D1 refused it ("too many terms in compound SELECT"), and the whole batch failed with it.
- The sources are now read in two halves of four.
- The signals tests' databases set the same limit (rusqlite's
limitsfeature, dev only). With the old query they fail with D1's exact error. - I ran all six statements against production with flagon-io's values bound, and they succeed.
Tuned on real data
flagon-io's last ten weeks: 70 merged pull requests, 244 commits recorded by agent sessions, 5 first reviews by a person, one person merging in two of three projects, and no milestones.
- Agent-authored changes: this counts agents' merged pull requests and the commits agent sessions pushed outside any pull request (
agent_commits, by week and by day). Spend per agent change, the quiet headline and each team's rhythm (layer "Changes") count them too. Rework rate stays on merged pull requests, since direct commits get no review. - Knowledge silos only show where three people or more merged lately. With fewer, every project rests on someone.
- The spend tree starts at the work items when the workspace has no milestones.
Tests
cargo test -p g1t-work: 291 passing.apps/web:npm testpasses, andnpm run typecheckat the root is clean.- I looked at the two-column spend tree in a component harness.