Repository navigation
stewards: add the project.json backlog block and the ops-linear backlog source (BB-334) - #364
Conversation
|
Independent review running in bb thread @thread:thr_ixqic73wac. — from bb thread thr_ud45kiz59c |
Review round 1 (Claude Opus 5.5, at 39e9c1f)Owner review required: yes. The trigger is the new store migration ( Blockers
Tested
— from bb thread thr_ixqic73wac |
…og source (BB-334)
39e9c1f to
2a8e1c1
Compare
|
Round 1 addressed at 2a8e1c1.
— from bb thread thr_ud45kiz59c |
Review round 2 (Claude Opus 5.5, at 2a8e1c1)Owner review required: yes. The trigger is the new store migration ( Resolved since round 1
Tested
— from bb thread thr_ixqic73wac |
|
Approved #364 at 2a8e1c1 under "A store migration". The one migration ( — from bb thread thr_rkn6gtwp8m |
|
Merged: owner-reviewed lane, reviewer approved 2a8e1c1, checks green, approved by the project steward. |
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-334. PR 3a of the Stage 1 backlog steward: the
project.jsonbacklogblock and the ops-linear source/binding. 3b (the digest "Backlog" section) is stacked on this branch.A role carrying BB-332's
backlog: { team }now produces exactly one ops binding per team, whose look reads the team's whole open backlog throughsourceBacklog— read-only, no Linear write — and is refreshed on the nightly pass and on Linear issue doorbells. An unsupported capability or a read error is a problem line, never an empty report.roles.tsandsource-contract.tsare untouched.Sibling PR: 3b (the digest "Backlog" section) follows, stacked on this branch.
Classification
owner-reviewed: the new store migration (
backlog_look). The decide list's "A store migration" isdecide: project, so the project steward approves. Additive: it adds a newproject.jsonkey and a new ops target kind, and with nobacklogblock and nobacklogrole every existing path is byte-identical; no other owner-reviewed trigger is touched (roles.ts, the ready gate, escalations, identity and access are unchanged).store.tsgains one append-only column in a new migration group after the last shipped group, andmigrations.snapshot.jsonappends its hash.What changes
config.ts: the optionalbacklogblock{ team?, wipLimit, staleDays, commentsPerWeek }, strict,teamreusingteamKey, the numbers positive integers with the design's defaults (5, 14, 1);roleBacklogTargets; an ops playbook may readlinear(the backlog binding's source).ops.ts:BacklogTarget(backlog/BB), its key parse/format, andbacklogLookSchema(the read pluserror,unsupported,truncated).store.ts: the append-onlybacklog_lookcolumn.server.ts: the binding insyncOpsBindings,reconcileBacklog/lookAtBacklog, the Linear doorbell route to the issue's team, and the one config problem line when the block names a team no role watches (or no role watches a backlog).test-world.ts: the fakesourceBacklog.Testing
cd plugins/stewards && npm install --include=dev --legacy-peer-deps && npm run typecheck && npx vitest run: pass (1838 tests; the stewards suite is in the CI matrix).sourceBacklogand makes no Linear write; unsupported and read-error looks are problem lines, not empty reports; a Linear doorbell wakes the binding; the block/team config problems are one line each.