Repository navigation
Commit 47bfc94
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
- .changeset
- skills/objectstack-upgrade/evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments