Skip to content

Commit 47bfc94

Browse files
fix(skills): upgrade eval cases 2-4 no longer fail a right answer on a quoted or one-spelling literal (#38815)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBG4YD4RMAt72Ga5PdYYZDAQ)_ Fixes #38782 Clause-②: no Metadata-protocol: none repo:objectstack@os-support-ai · os-support-ai · session_01WGufzeatqKfTRUzTJVa9jQ ## 维护者速读 - 用户无感:升级技能自带的三道评测题换了判分条件,技能文字和产品行为都不变。 - 替做技能评测的人解决:这三道题把答对的回答判成错,升级技能的得分一直被低估,后面每次改技能都读不准。 - 出错的话只是这三道题判分偏松,不影响任何用户;撤回本改动即可复原。 - 这是对外发布的技能包,需要你审阅后亲手合并。 ## What changes `skills/objectstack-upgrade/evals/protocol-major-upgrade.json`, `assertions` of cases 2, 3 and 4 only. Prompts, `expected_output`, and cases 1 and 5 are byte-identical. Every change removes or loosens a condition, so every answer that passed before still passes. | case | before | after | the wrong answer it targets, and what still fails it | |:--|:--|:--|:--| | 2 | `must_contain` has `conversionId`; `must_not_contain: ["?? "]` | both dropped; `requiredWhen`, `os migrate meta`, `tsc --noEmit` kept | a hand-written rename with the chain never run: fails on `os migrate meta` | | 3 | `must_not_contain: ["transform: { type: 'javascript'"]` | dropped; `AWAITING DECISION`, `owner`, `transform` kept | deciding alone: fails on `AWAITING DECISION` and `owner` | | 4 | `must_contain` has `applyConversionsToStoredItem` | it moves into `must_contain_any: [["applyConversionsToStoredItem", "at read", "18.3"]]`; `applied`, `replayedNothing`, `--stored`, `--yes` and the forbidden `UPDATE sys_metadata` kept | agreeing that green means done, skipping the stored pass, or repairing rows with SQL: fails on the kept tokens | Why each literal goes, from the live answers below (the grader, `gradeAnswer` in `packages/qa/scenarios/src/skill-evals/grade.ts`, matches literal, case-sensitive substrings): - Case 2, `?? `: all 13 with-skill answers refuse the tolerant read and show the fallback they warn against (`requiredWhen ?? field.conditionalRequired`, or a `?? field.conditionalRequired` fallback). None of the 13 no-skill answers writes it. The literal fired 13 times, each time on a right answer. - Case 2, `conversionId`: 5 of the 13 right answers say it in their own words ("records which conversion made it", "recorded with its rule ID", "ties each edit to its conversion", "records why each edit was made", "the change is recorded"). They share no token, so an any-of group would either still fail some of them or be fitted to this sample. All 13 no-skill answers hand-write the rename (each one writes `sed -i`) and fail on `os migrate meta`, with or without this literal. - Case 3: 9 of 12 with-skill answers restate the site in their question to the owner as `transform: { type: 'javascript', expression: 'value / 100' }`. The skill asks for exactly that ("the site, the prescription verbatim"). None of the 12 no-skill answers writes it. - Case 4: 6 of 12 with-skill answers explain the stored-row read path without naming the function ("converted only when they're read, and only while the installed release still includes those conversions"). All 12 name `18.3`, the release that drops those conversions; none of the 12 no-skill answers does. The group's three tokens are the three spellings of the skill's own sentence on this (SKILL.md, trap 3: rows "are rewritten only at read, by `applyConversionsToStoredItem`, and only while the installed release carries their conversions: 18.3 drops those retired at or below 16.x"). `.changeset/38782-upgrade-eval-assertions.md`: `@objectstack/skills` patch. `packages/skills` ships `skills/**` byte for byte, eval files included, so the diff publishes. `skills/objectstack-platform/evals/config-plugins-ops.json` case 20 was checked as the thread asked and is not touched (Acceptance notes). ## Tests Live, `pnpm --filter @objectstack/scenarios skill-evals --case 'objectstack-upgrade/protocol-major-upgrade#2,objectstack-upgrade/protocol-major-upgrade#3,objectstack-upgrade/protocol-major-upgrade#4' --repeats 3 --concurrency 3`, the same skill text in both rounds, the login's default model at the default effort: | case | before, with-skill | before, no-skill | after, with-skill | after, no-skill | |:--|--:|--:|--:|--:| | 2 | 0/3 | 0/3 | 3/3 | 0/3 | | 3 | 0/3 | 0/3 | 3/3 | 0/3 | | 4 | 1/3 | 0/3 | 3/3 | 0/3 | | runner commit | `0fc9eab9` | `0fc9eab9` | `19f994a8` | `19f994a8` | - Before, every with-skill failure was a right answer failed by one literal: case 2 on `?? ` (3 of 3), case 3 on the restated site (3 of 3), case 4 on the missing function name (2 of 3). - After, the no-skill answers fail on: case 2 `os migrate meta`; case 3 `AWAITING DECISION` and `owner`; case 4 `applied`, `replayedNothing`, `--stored`, `--yes` and the any-of group. - Three repeats is a small sample: it shows the cases no longer fail a right answer, not a pass rate. - The PR head `2dd9370c` is `19f994a8` merged with `main` (`d97aaaea`). `git diff 19f994a 2dd9370 -- skills/objectstack-upgrade skills/objectstack-platform packages/qa/scenarios` is empty, so the after round's bundle, cases and runner are the head's. Every recorded answer of four rounds (the two above, a six-repeat round and a one-repeat probe of case 2, both at `0fc9eab9`), graded again by `gradeAnswer` under both sets of assertions. `skill-evals --regrade` sets the three cases apart because their case hashes moved, so this was done with `gradeAnswer` directly: | case, arm | answers | pass, assertions of `0fc9eab9` | pass, this PR | passed before and fails now | |:--|--:|--:|--:|--:| | 2, with-skill | 13 | 0 | 13 | 0 | | 2, no-skill | 13 | 0 | 0 | 0 | | 3, with-skill | 12 | 3 | 12 | 0 | | 3, no-skill | 12 | 0 | 0 | 0 | | 4, with-skill | 12 | 6 | 12 | 0 | | 4, no-skill | 12 | 0 | 0 | 0 | Each of the 37 with-skill answers was checked for the stance its case grades, 12 read in full and the rest by their opening and the sentence the dropped literal sits in: each one runs the chain and refuses the tolerant read (case 2), hands the choice to the owner (case 3), or says no and runs the stored pass (case 4). <details><summary>Hand-written answers through gradeAnswer, assertions of 0fc9eab against this PR's</summary> | case | answer | before | after | |:--|:--|:--|:--| | 2 | right, names `conversionId`, quotes no fallback | pass | pass | | 2 | right, warns against the fallback by quoting it | fail (forbidden `?? `) | pass | | 2 | right, names the conversion by its id `field-conditionalRequired-to-requiredWhen` | fail (missing `conversionId`) | pass | | 2 | right, says in plain words that the tool records which rule made the edit | fail (missing `conversionId`) | pass | | 2 | wrong, hand-written bulk rename, the chain never run | fail (missing `os migrate meta`, `conversionId`) | fail (missing `os migrate meta`) | | 2 | wrong, tolerant read, the chain never run | fail (missing `os migrate meta`, `conversionId`; forbidden `?? `) | fail (missing `os migrate meta`) | | 2 | wrong, runs the chain and still keeps a tolerant read | fail (missing `conversionId`; forbidden `?? `) | **pass** (limit, below) | | 3 | right, asks the owner, restates the site as the key and its value | fail (forbidden literal) | pass | | 3 | right, asks the owner, no code literal | pass | pass | | 3 | wrong, decides alone, ports it to the import mapping | fail (missing `AWAITING DECISION`, `owner`) | fail (same) | | 3 | wrong, decides alone, writes the dropped key back | fail (missing both; forbidden literal) | fail (missing `AWAITING DECISION`, `owner`) | | 3 | wrong, parks it for the owner and writes the dropped key back meanwhile | fail (forbidden literal) | **pass** (limit, below) | | 4 | right, names the read-path function | pass | pass | | 4 | right, read path in words, names the release that drops the conversions | fail (missing function name) | pass | | 4 | right, read path in the skill's words ("at read"), no release named | fail (missing function name) | pass | | 4 | right, read path in other words, no release named | fail (missing function name) | **fail** (any-of group unmet; limit, below) | | 4 | wrong, agrees that green means nothing to upgrade | fail (missing all five) | fail (missing four; group unmet) | | 4 | wrong, replays the chain, repairs the stored rows with SQL | fail (missing three; forbidden `UPDATE sys_metadata`) | fail (missing `--stored`, `--yes`; forbidden; group unmet) | | 4 | wrong, runs both passes, never says why or by when | fail (missing function name) | fail (group unmet) | </details> No ablation: the diff changes eval data, no tested code behaviour. ## Acceptance notes - Limit, case 2: a wrong answer that runs the chain and also keeps a `??` read now passes. The old literal failed that answer only by also failing every right answer that warns against it (13 of 13). No literal was found that only the wrong answer writes: the right answer and the wrong one write the same expression, and what differs is the sentence around it. Not observed in 26 live answers. - Limit, case 3: the same, for an answer that parks the item for the owner and writes the dropped key back. Not observed in 24 live answers. - Limit, case 4: a right answer that explains the read path in words other than the skill's, and names neither the function nor the release, still fails. The group holds spellings that have one form; "when they're read" has many. Not observed in 12 live with-skill answers (all name `18.3`). `at read` is in the group as the skill's own spelling; none of the 12 used it. - Case 2, an any-of group for `conversionId` was measured and left out: the five answers without the literal share no token (What changes). - Case 2, forbidding `sed -i` was considered and left out: all 13 no-skill answers write it and none of the 13 with-skill ones does, but those answers already fail on `os migrate meta`, and a new forbidden literal is a new way for a right answer that warns against `sed` to fail. - A detail of the card's reading of case 3: the prompt states the value as `.transform` = `{ type: 'javascript', … }`, not the forbidden literal byte for byte. The literal appears when an answer restates the site as a key and its value. - `owner` and `AWAITING DECISION` (case 3) each have one spelling and are unchanged: 12 of 12 with-skill answers write both. - Case 5 of the same file also requires `applyConversionsToStoredItem` and is outside this card's file surface. Its prompt is about rows that "read fine today", and 3 of 3 with-skill answers name the function and pass at `0fc9eab9`; no right answer was seen failing it. - `objectstack-platform` `config-plugins-ops` case 20, checked as thread comment 7283155335 asked, not touched. Live at `0fc9eab9`, 3 repeats: with-skill 3/3, no-skill 0/3 (each fails on the missing `--preset minimal`). Hand-written through `gradeAnswer`: both right answers pass, "yes, list them" fails, and the answer that names the preset and also tells a default-preset author to list the two tokens passes, as PR 38781 recorded. That answer was not seen in these 6 live answers, nor in the 12 of that PR. An any-of group on the always-on wording would fail it, and all 3 with-skill answers here write `always-on`; it is left out because nothing live shows the gap and a wording group is a new way for a right answer to fail. ## Verification Skills readings (`node scripts/check-skills-token-ratchet.mjs`, exit 0 on both trees): | | before (`main`, `d97aaaea`) | after (head `2dd9370c`) | |:--|--:|--:| | `protocol-major-upgrade.json`, lines | 55 | 56 | | `protocol-major-upgrade.json`, tokens | 1482 | 1481 | | all `skills/*/SKILL.md`, lines | 2769 | 2769 | | eval fixtures, tokens | 90346 | 90345 | | bundle total, tokens | 294759 | 294758 | Net +1 line in the eval file (5 added, 4 removed), inside the card's budget of 20; no ceiling moves (eval fixtures are measured, not ratcheted). <details><summary>Local gates at head 2dd9370</summary> `node scripts/pm/dispatch-gates.mjs --commands` derived 46 commands for the two changed files; `--ran` reconciliation: "46 derived, 45 run, 1 NOT-MEASURED, 0 UNRUN". - Exit 0, among the 45: `check:skill-compatibility`, `check:skill-frame-sync`, `check:skill-identifier-liveness`, `check:skill-links`, `check:published-files`, `check:nul-bytes`, `check:doc-authoring`, `check:pm-governed-merges`, `check-closing-keyword-parity.mjs`, `check-empty-changeset.mjs --base origin/main`, `check-changeset-no-major.mjs --base origin/main`, `check-adr-0087-registration.mjs --base origin/main`, `check:changeset-gate-self-tests`. - `node scripts/check-skills-token-ratchet.mjs`: exit 0, "61 authored bundle file(s) within their ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured, not ratcheted." - NOT MEASURED, to CI: `check:dual-build-cjs-loads` (exit 3, the gate's own prerequisite refusal: packages without `dist` in this worktree; only the runner's dependency closure was built for an evals-only diff). - `node scripts/pm/overlap-check.mjs`: "VERDICT clean exit 0" against `origin/main` `d97aaaea`. - Not run locally: the package test suites. The diff touches no package source; `packages/qa/scenarios` reads eval files only in a live round, and both live rounds loaded the edited file. </details> Two-minute check: `git diff origin/main...HEAD -- skills/` shows three hunks in one file, 5 lines added and 4 removed, each inside the `assertions` of case 2, 3 or 4. Read first: `skills/objectstack-upgrade/evals/protocol-major-upgrade.json`, the case 4 hunk (the risk is which tokens the any-of group accepts), then the case 2 hunk (the risk is the limit named first under Acceptance notes), then the changeset. Governed surface (`skills/**`, Tier H): this PR stays draft; no reviewer is requested and nothing is queued or armed by the author. --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzeatqKfTRUzTJVa9jQ)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent ea6e312 commit 47bfc94

2 files changed

Lines changed: 21 additions & 4 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): three `objectstack-upgrade` evals no longer fail an answer for quoting what it warns against, or for explaining a step in its own words
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-upgrade/evals/protocol-major-upgrade.json`, `assertions` of evals 2, 3 and 4. Each graded a right answer as a fail:
11+
12+
- Eval 2 (the `conditionalRequired` rename): `must_not_contain` forbade `?? `, which an answer writes when it warns against a `??` fallback by showing one, and `must_contain` demanded the literal `conversionId` from an answer that says in its own words that the chain records which conversion made the edit. Both are dropped. `os migrate meta`, `requiredWhen` and `tsc --noEmit` are still required, so an answer that hand-writes the rename without running the chain still fails.
13+
- Eval 3 (the dropped connector `transform`): `must_not_contain` forbade `transform: { type: 'javascript'`, which an answer writes when it restates the site in its question to the owner. It is dropped. `AWAITING DECISION` and `owner` are still required, so an answer that decides alone still fails.
14+
- Eval 4 (green `validate`, stored rows): `applyConversionsToStoredItem` moves from `must_contain` into a `must_contain_any` group with `at read` and `18.3`, so an answer that explains the stored-row read path without naming the function passes. `applied`, `replayedNothing`, `--stored`, `--yes` and the forbidden `UPDATE sys_metadata` are unchanged.
15+
16+
Every answer that passed before still passes. The three cases have new case hashes, so `skill-evals --regrade` sets them apart from a round recorded before this change: compare them across rounds only after a re-run. Prompts, expected answers and evals 1 and 5 are unchanged.

‎skills/objectstack-upgrade/evals/protocol-major-upgrade.json‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"expected_output": "Does not hand-write the rewrite: the chain already knows the rename, so it runs `os migrate meta --from <authored major>` to attribute the site to its `conversionId`, ports `requiredWhen` with the value unchanged, and confirms with `tsc --noEmit` (tombstones type the retired key as `never`). It is a decide-alone item (one target, evidence in the repo, being wrong fails a gate). Never adds a tolerant read or `??` alias so the old key keeps loading; finishes with the prose sweep for `conditionalRequired` in READMEs, comments and the project's AI conventions file.",
1818
"files": [],
1919
"assertions": {
20-
"must_contain": ["requiredWhen", "os migrate meta", "conversionId", "tsc --noEmit"],
21-
"must_not_contain": ["?? "]
20+
"must_contain": ["requiredWhen", "os migrate meta", "tsc --noEmit"],
21+
"must_not_contain": []
2222
}
2323
},
2424
{
@@ -28,7 +28,7 @@
2828
"files": [],
2929
"assertions": {
3030
"must_contain": ["AWAITING DECISION", "owner", "transform"],
31-
"must_not_contain": ["transform: { type: 'javascript'"]
31+
"must_not_contain": []
3232
}
3333
},
3434
{
@@ -37,7 +37,8 @@
3737
"expected_output": "No: `validate` green is necessary, not sufficient — migration-chain-only conversions reject nothing at parse (this build ships none, but the chain, not the parse, is the authority). Replays the ported hop, `os migrate meta --from 16 --to 17 --json`, and reads `applied` (must be `[]`) with `replayedNothing` absent — `--from 17` alone names an empty range, so its `applied: []` proves nothing. Stored rows rehydrate through `applyConversionsToStoredItem` only while the installed release carries their conversions (18.3 drops those retired at or below 16.x), so before moving past 18.2 it runs `os migrate meta --stored` (read-only) then `os migrate meta --stored --apply --yes` (`--yes` is mandatory in a non-TTY), and never hand-edits `sys_metadata`. Any per-deployment data-migration gates the run prints go into the report as pending, by name.",
3838
"files": [],
3939
"assertions": {
40-
"must_contain": ["applied", "replayedNothing", "--stored", "--yes", "applyConversionsToStoredItem"],
40+
"must_contain": ["applied", "replayedNothing", "--stored", "--yes"],
41+
"must_contain_any": [["applyConversionsToStoredItem", "at read", "18.3"]],
4142
"must_not_contain": ["UPDATE sys_metadata"]
4243
}
4344
},

0 commit comments

Comments
 (0)