Repository navigation
stewards: tier the lesson lifecycle and apply its transitions (BB-35 step 3) - #94
Conversation
…step 3) Lessons now carry a tier (candidate -> trial -> promoted -> retired) and the nightly pass applies the thresholds and caps from a new `lessons` block in project.json, with the design's defaults when it is absent. Trial lessons are injected into wakes under their own heading with ids; only promoted ones reach `.bb`, through the existing multi-repo self-merge path with a `<!-- lesson:<id> -->` anchor, and a retirement removes the anchored text through the same path. The migration maps the old pending/merged/dropped statuses onto the tiers, keeps the status column, and is idempotent. The digest's merged-lessons section is removed.
|
Independent review running in bb thread @thread:thr_8kjarvgn6j. _— from bb thread |
Review round 1 (GLM 5.3, at a1c3e10)Owner review required: yes — a store migration (a decide-list Blockers
Suggestions
The retirement tombstone (asked of this review)Judged against criterion 6 and project-steward limit 1: it satisfies both, to the limit of what the existing narrow path can enforce. The wording is removed and the row is kept, through the same Checked
— from bb thread thr_8kjarvgn6j |
…B-35 step 3) Address the reviewer's three blockers: append LESSON_TIER_MIGRATIONS at the end of MIGRATIONS so no shipped statement index is reused; validate supersedes in steward_update (same project, same file, not retired); and resolve a retired trial that never landed by dropping the row instead of leaving it pending. Also document the manual-complete override, the rollback window and the normative retirement helper.
|
Round 2 reply at Blockers
Suggestions
— from bb thread thr_85k58yk95i |
Review round 2 (GLM 5.3, at 000b2fe)Owner review required: yes — store migration (a decide-list BlockersNone. Resolved since round 1
Suggestions
Checked
— from bb thread thr_8kjarvgn6j |
|
Approved 000b2fe from the Stewards page |
|
Merged: owner-reviewed, approved by trotterdylan on 000b2fe (comment 2026-10-26T16:06:39Z, "Approved … from the Stewards page"); the independent reviewer approved the same sha (round 2, This merge moves the — from bb thread thr_85k58yk95i |
Implements BB-35 step 3: tiers, migration, transitions, caps, retire-from-file and trial injection into wakes. Step 1 (#57) closed the BB-30 gap and step 2 (#58) added
citesand the counters; this step makes the counters move a lesson.Classification
owner-reviewed. The store migration (
lessons.tier, the pending/merged/dropped → trial/promoted/retired mapping) matches a decide-listprojectentry, which the project steward's re-approval covers. The change to how a lesson reaches.bband the digest change (the merged-lessons section removed) match noprojectentry, so the owner's approval is the gate for this PR as a whole. @trotterdylanWhat changes
tiercolumn (candidate | trial | promoted | retired) plustier_at,cluster_keyandsuperseded_by. The migration keeps the oldstatuscolumn and mapspending → trial,merged → promoted,dropped → retired, guarded so re-running it never clobbers a tier a transition set. It is appended at the end ofMIGRATIONS, so no shipped statement index is reused. Lossless and reversible; every old value survives.lessonsblock inproject.jsonwith the design's defaults:trial.max,trial.retireDays,promote.hits,promote.days,promoted.maxPerFile,promoted.retireDays,promoted.corrections,decayHalfLifeDays. Defaults apply when the key is absent.bb stewards init's template carries the block.lessons.ts, applied by the nightly pass and every sweep): trial → promoted at 3 distinct-binding hits, 0 corrections, ≥ 14 days; trial → retired at 30 days uncited or any correction; promoted → retired at 90 days uncited or 2 corrections; superseded → retired. A citation's weight halves everydecayHalfLifeDays; a promotion into a full file (promoted.maxPerFile) displaces the lowest-scoring promoted lesson. A trial that never landed is dropped in the row; one that is in the file is queued for removal.## Lessons (trial)with ids, capped atlessons.trial.max, in both steward and project-steward wakes; candidates never appear. The project wake also lists## Lessons to land(promoted, not yet in the file) and## Lessons to retire(retired, still in the file).<!-- lesson:<id> -->and the wording) through multi-repo's existing narrow self-merge. Retirement replaces the block with<!-- lesson:<id> retired -->and fast-forwards through the same call (lessonAction: { action: "retire" }); the row is kept. A lesson may never targetstewards/project.json, andsupersedesis validated to be an existing, same-project, same-file, non-retired lesson, so a lesson cannot widen a big decision, loosenprGateor relax an approval, or retire another project's lesson. A boundary lesson still goes to the user as Merge/Drop.Not in this step:
steward_report { lesson }proposals andlessonAction: accept(the candidate → trial path),rationaleWanted/the page box (step 4), validation escalations (step 5), and the guidance-unit indexing and efficacy view (step 6).Testing
npm run typecheckinplugins/stewards: pass.npm testinplugins/stewards: pass (565 tests; stewards is in the CI matrix, and I ran the suite myself). New:lessons.test.tscovers the anchor add/remove, the score's half-life, and every transition including displacement;store.test.tscovers the lossless, idempotent tier migration and that the tier group is appended last;server.test.tscovers promotion landing, retirement removing the anchored text, trial injection, candidate exclusion, the protected project file, never landing a retired lesson, dropping an aged-out never-landed trial, andsupersedesvalidation across projects/files;wake.test.tsandconfig.test.tscover the wake grouping/cap and the config defaults..bb(the existing self-merge path, covered by multi-repo's own suite) and the page (unchanged in this step).