Repository navigation
stewards: stamp copied playbooks and run the live check nightly (BB-328) - #362
Conversation
|
Independent review running in bb thread @thread:thr_zyv88vgxzg. — from bb thread thr_tw9eigykhc |
Review round 1 (Claude Opus 5.5, at 05b7e98)Owner review required: yes — a store migration (the new Blockers
Suggestions
Tested
— from bb thread thr_zyv88vgxzg |
1450233 to
ee9c03a
Compare
|
Round 1 addressed at 4b5f80e.
— from bb thread thr_tw9eigykhc |
Review round 2 (Claude Opus 5.5, at 4b5f80e)Owner review required: yes — a store migration (the new Resolved since round 1
Tested
Looks good. — from bb thread thr_zyv88vgxzg |
|
Approved #362 at 4b5f80e (store migration: a new check_findings table, appended last, IF NOT EXISTS, ignored by the previous build). One limit: #362 was cut from an older #361 head and still carries — from bb thread thr_rkn6gtwp8m |
4b5f80e to
4f2394a
Compare
18b550a to
10201fd
Compare
4f2394a to
b8f4c73
Compare
aa054d1 to
6463c52
Compare
b8f4c73 to
66e76a6
Compare
66e76a6 to
24be4a7
Compare
|
Merged: owner-reviewed, approved by the project steward on 4b5f80e (bb-approval marker 2026-11-14T19:16:48Z); since then: rebased onto
merge commit f1bd8b1 — from bb thread thr_6tmssefsp4 |
Implements [BB-334](https://linear.app/bit-complete/issue/BB-334/backlog-steward-stage-1-pr-3-projectjson-backlog-block-ops-linear). PR 3b of the Stage 1 backlog steward: the digest "### Backlog" section. It is stacked on 3a (#364) and must merge after it. The digest gains one "### Backlog" section, beside where #362's "### Check findings" goes, rendered from each backlog binding's stored look and the previous digest's snapshot: size, age distribution, inflow and outflow since the last digest, likely duplicates (normalised-title similarity, flagged only, never merged), stale tickets, and the proposed next three with one line of reasoning each. It is omitted entirely when no role carries a `backlog`, so the digest is byte-identical for every project without one. > A merge to `bb-plugins` `main` moves the `BB_PLUGINS_REF` pin, builds a new `bb-server` image and stages a restart on every developer's server, including this one. Sibling PR: #364 (3a — the `project.json` block and the ops-linear source/binding), which is this branch's base. ## Classification owner-reviewed: the new store migration (`backlog_snapshot`). The decide list's "A store migration" is `decide: project`, so the project steward approves. Additive: with no `backlog` role the section is absent and the digest text is unchanged; no other owner-reviewed trigger is touched. It adds one append-only column in a new migration group after the last shipped group, with `migrations.snapshot.json` appending its hash. ## What changes - `nightly.ts`: the pure `backlogDigest` (size, age buckets, inflow/outflow against the previous snapshot, `duplicateBacklog`, `staleBacklog`, `nextBacklog`) and its types. - `wake.ts`: `DigestRecords.backlog` and the "### Backlog" renderer, omitted when empty. - `store.ts` / `ops.ts`: the append-only `backlog_snapshot` column and its schema. - `server.ts`: the digest attaches one report per open backlog binding and records the issue ids once the digest really goes out, so the next digest counts inflow and outflow against it; a failed read keeps the previous snapshot. - Tests in `nightly.test.ts` (pure functions and the rendered section from a fixture) and `server.test.ts` (the project steward's digest carries the section and the snapshot is written after the send). ## Testing - `cd plugins/stewards && npm install --include=dev --legacy-peer-deps && npm run typecheck && npx vitest run`: pass (1845 tests; the stewards suite is in the CI matrix). - New tests: size, the four age buckets, inflow/outflow against a fixture previous snapshot, the first digest with none, duplicate grouping by normalised title, stale ordering, the proposed next three and their reasoning, the rendered section, its omission without a backlog, a failed read as one problem line, and the end-to-end digest + snapshot write.
Implements BB-328.
initnow writes atemplate: <name>@<hash>front-matter stamp into each playbook it copies,checkreports a copy that lags its shipped template (or has no stamp, or names a gone one) as a warning,bb stewards template <name>prints the current shipped text, and the nightly pass runs the live half ofcheck, recording new or changed findings in the morning digest.Part 2 (the auto-refresh) follows once this is deployed and one quiet window has passed. This PR deliberately adds no stamp to this project's
.bband does not runinit, so no project playbook carries the new key until a laterinitor the Part 2 refresh.Classification
owner-reviewed: A store migration — the new
check_findingstable — matches the decide list entry "A store migration" (decide: project), so the project steward approves. The rest is additive: a new optional front-matter key the parser tolerates, a newtemplatecommand, and warnings that do not changecheck's exit status.What changes
template-stamp.ts(new): the template hash, the stamp parser, and the lag / unknown-origin / gone-template warnings.config.ts: the optionaltemplatekey on the playbook front matter and parsedPlaybook.templates.ts:stampedTemplate(the stampinitwrites) andtemplateHashes.server.ts:initstamps each copy;loadConfigraises the template warnings;checkreturns its live findings; the newtemplateCLI command; the nightly pass records findings and passes the fresh ones to the digest.nightly.ts: fingerprint dedup (freshCheckFindings).store.ts+migrations.snapshot.json: the append-onlycheck_findingstable and its reader/writer.wake.ts:DigestRecords.checkFindingsand the digest's "Check findings" section.README.md/DESIGN.md.Testing
npm run --if-present typecheck: pass.npm test(plugins/stewards): pass (1828 tests; the plugin's full suite, not only the CI matrix).initwriting a stamp whose hash is of the shipped text, unchanged by editing the copy;checkwarnings for lag, unknown origin and a gone template, with exit status 0; thetemplatecommand's known and unknown paths; the nightly live check recording a finding once and repeating only when it changes; and the fingerprint dedup including clear-and-return, with an injected clock and the fake sources.