Repository navigation
fix(ui): check-skill-eval-tokens reads must_contain_any — shape, every member taught, tally - #37999
Conversation
The skill-evals runner grades assertions.must_contain_any (groups, each met by any one token). The eval-token gate read only must_contain and must_not_contain, so any-of tokens were neither shape-checked nor required to be taught. Now: the runner's four shape refusals are findings; every member of a well-formed group must be taught by the bundle-wide whole-token oracle (a member key carries its group); a groups-only case leaves the EMPTY tally and counts toward the population. Self-test and vitest rows pin each axis in both directions. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
The JS default `group = null` infers as null-only under tsconfig.scripts.json, so Type Check UI refused the vitest pin passing a group index. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Final head for review: |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT on the gate change at head 席位核对Shape and gates. 2 files, +236/-31, both under The gate change, on its merits: right.
N1 (nit), one shape gap against the runner. The scope question: my reading is A, correct the acceptance to the gate's own population. Landing: not governed. The area lands it once the seat rules the acceptance correction. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Landing by area o1-B · 2026-11-27T15:45Z · head
State: ready + auto-merge now; #37978 closes on merge via |
Requested by Elon · project thread
Fixes #37978 — under the maintainer's ruling A on the card (7222376446, 「A 按现状收 PR,改正卡片」), the acceptance is the gate reading
must_contain_anyfor its own population (skills/objectui): shape refusals, every group member scored as taught, groups-only cases out of the EMPTY tally, nomust_containverdict moved. This PR is that change.Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/scripts/check-skill-eval-tokens.mjsnow readsassertions.must_contain_any, the any-of form the skill-evals runner grades since #37969 (anyOfProbleminpackages/qa/scenarios/src/skill-evals/cases.ts):anyOfShape()makes the runner's four refusals, one finding each: the value is not a list (not-an-array), a group is not a list of strings (bad-group), a group is empty (empty-group), a group holds an empty token (bad-token). A malformed group is not scored, the same way a malformedmust_containentry is not.must_containtoken, and also under the rejected per-guide oracle that--measureprints. Why every member: any one member passes an answer. So a member the bundle never says is a word the case accepts as correct without the skill ever teaching it. That is the same untaught-token defect, reached through a group. "At least one" would let that member through.A member's row key carries its group:
... eval ID must_contain_any[G] TOKEN. A baseline row therefore names exactly one member of one group.rowKey()output for amust_containtoken is byte-identical to before.empty-population.--self-testrows (31 to 44), covering each axis in both directions. There are 4 new vitest pins inui/scripts/__tests__/check-skill-eval-tokens.test.ts: the four shape reasons plus the well-formed pass, every-member scoring with the one untaught member red and keyed by its group, the key shape, and the tally and population direction.The header documents the form. The summary lines now also count
must_contain_anymembers and groups. Baselines:KNOWN_UNTAUGHT_EVAL_TOKENSstays empty, and no row is needed.No changeset, labelled
skip-changeset:ui/is the privateobject-ui-monoreporoot package, andui/scripts/**ships in no published package'sfiles[].Tests
Self-test and vitest, on head 8ac75d7
node ui/scripts/check-skill-eval-tokens.mjs --self-testprintedOK check-skill-eval-tokens self-test: 44 cases pass (...)with exit 0. It was 31 cases before.pnpm --dir ui exec vitest run scripts/__tests__/check-skill-eval-tokens.test.tsunder the lock gaveTest Files 1 passed (1),Tests 34 passed (34),VERDICT command-exit 0.node ui/scripts/check-skill-eval-tokens.mjsexited 0:128 must_contain token(s) and 0 must_contain_any member(s) in 0 group(s).Ablation: each new branch broken once, then restored by blob hash
Each run used
node scripts/ablation-replace.mjs ... -- node ui/scripts/check-skill-eval-tokens.mjs --self-test. Each restore was proven as blob == HEAD (f61ab5068e2b) withgit diff HEADempty.anyOf.problemsreplaced by an empty list): exit 1, 4 of 44 failed, all four shape rows.No verdict moves: --list and --measure before and after
Both outputs were captured on
dc45b1e65cand on this head, then diffed. All 128 row lines of--list, and every row of both red lists in--measure, are identical. The only changed lines are the four summary lines: the scan count, the oracle sentence, the EMPTY tally label and the success line. Exit 0 both times. The per-guide red count is 18 both times.Acceptance notes
skillsWalk()inui/scripts/skill-bundle-root.mjsnarrows the walk toskills/objectuiin the monorepo. The vitest pin "the real corpus" asserts the bundle list equals['skills/objectui'], and Lint UI's path filter inci.ymlnamesskills/objectui/**. Soskills/objectstack-ai/evals/skills-tools-knowledge.jsoncase 6 is outside the population onmainand on this branch alike.analyze({ root: REPO_ROOT }), which walks the whole catalog, on this head. All four case-6 members are taught inskills/objectstack-ai:ai:approve1,signed-in session1,refused17,never decides1, whole-token counts. Widening the gate to all 14 bundles would also red 131 existingmust_containrows across 11 of the 13 other bundles, including case 12'scontext:andpolicy_document, plus 4forbids-own-answerfindings. The EMPTY tally there goes 71 to 70 with this change, because case 6 leaves it. So the population question was a scope decision, not a mechanical edit. Ruled A (7222376446): the acceptance is narrowed to this gate's own population; widening to theobjectstack-*bundles (options B, C, D), anyci.ymledit and the one-off audit are not ruled and not in scope. Case 6's four tokens were checked by hand.603494f7adds only a JSDoc type onrowKeyto8ac75d78(the head the Tests section cites), fixing Type Check UI's TS2345; the gate,--self-test, the vitest file andtype-check:scriptswere re-run green on it. L1 ACCEPT 7222137031 at603494f7.--self-testhere has no battery floor or handshake, which is the shape AGENTS.md now asks of self-tests. This is pre-existing. Noted only.Verification
Read first:
anyOfShape()and the scoring loop inanalyze(). The risk is themust_containrow order or key changing. The before and after--listdiff above shows it did not.must_contain_anyself-test block.Two-minute check:
node ui/scripts/check-skill-eval-tokens.mjs --self-testprints44 cases passand exits 0.Generated by Claude Code