fix(stella-cli): pick the skill holdout from the skills this turn matched - #6496
Conversation
There was a problem hiding this comment.
Sorry @macanderson, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 2 days and 4 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideSkill holdouts are now selected from the current turn’s matched skill population rather than the full catalog, with the choice cached per turn and covered by a regression test that confirms matched skills receive control measurements while unmatched skills are ignored. Sequence diagram for matched skill holdout selectionsequenceDiagram
participant SessionMemory
participant Selection
participant Trials
participant Ledger
SessionMemory->>Selection: note_turn_skills(prompt)
Selection-->>SessionMemory: selected + over_top_k
SessionMemory->>Trials: held_for_skill(matched_names)
Trials->>Trials: holdout::pick(ordinal, matched_names)
Trials-->>SessionMemory: held skill
SessionMemory->>Selection: retain(skill != held)
SessionMemory->>Ledger: record_episode()
Ledger-->>SessionMemory: control trial for held skill
Note over Trials: Cached in shared context_trials cell
SessionMemory->>Trials: held_for_skill(matched_names)
Trials-->>SessionMemory: same held skill
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Witness evidence, run locally with Against With this branch's code: All six |
|
SCR-003 — this PR cannot close its issue yet.
An issue closes only when every DoD item is satisfied and verified. Tick the Ticking those boxes does not by itself re-run this check — it only reacts to |
…ched The pick read the whole loaded catalog, so an ordinal could name a skill the prompt never matched. Nothing was then withheld, the slot produced no control trial, and the schedule counted it anyway. The pick now reads the matched population, and the first selection pass to score settles it on the turn's shared holdout cell, so every later pass withholds the same skill. Closes #6464
fe9cc47 to
859d8c1
Compare
What & why
The skill holdout picked from the whole loaded catalog before knowing what this turn's prompt matched. When the ordinal named a skill the turn never matched, nothing was withheld, the slot produced no control trial, and the schedule still counted it. A skill that is never measured is never promoted under
require_measured_liftand never retired.The pick now reads the matched population: the survivors plus the ones the top-k cut dropped, which cleared the same score floor. It is settled by the first selection pass to score and cached on the turn through the same cell the memory and rule arms already use (
trials::held_for), so every later pass reads the same answer and a turn holds back one skill no matter how many sites render.held_forgained a borrow form for a caller whose names are already&str.Closes #6464
The witness
main, passes here):the_holdout_cannot_pick_a_skill_the_turn_never_matchedincrates/stella-cli/src/memory/learning/skill_lifecycle.rs. The fixture adds an unmatched skill that sorts first, so holdout ordinal 0 names it when the pick reads the whole catalog. Onmainthe turn injects the matched skill and records a secondselectedrow; here it withholds the matched skill and records a control row.The gate
cargo fmt --checkcargo test -p stella-cli holdoutpasses locally, 6 tests)apply_holdoutand the new helper)Closes #6464appears both above and as a commit trailerFix over file
Ground-rule check
stella-core; no new depsAnything reviewers should know?
The first draft of the witness passed on
maintoo: it assumed the second turn was holdout ordinal 1, but at rate 2 the first holdout turn is ordinal 0, and ordinal 0 picks the first sorted name, which was the matched skill. The fixture now makes the unmatched skill sort first. The fail-on-old run is quoted in the PR conversation.Summary by Sourcery
Select skill holdouts from the turn’s matched skill population and consistently record the resulting control trial.
Bug Fixes:
Enhancements:
Tests: