Repository navigation
Commit 3ffa92d
docs(skills,spec): agent model.provider is refused, bar the 18.x openai residue; objectstack-ai eval cases 2, 6, 7 grade every correct spelling (#38156)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuFLwsbUXqRkpg67fCZfuCf3)_
Fixes #37850
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:用 AI
技能写智能体的开发者会读到更准确的一句话:智能体模型里的「服务商」字段已退役、会被拒绝,唯一例外是旧版工具自动写进去的 openai
默认值,会被接受并自动删掉;做法不变,仍是删掉它。运行时行为不变。
- 为什么做:上一次去掉这个字段的改动在审核里留下的四个尾巴:说法不准一处、评测判分词太窄三处(另一处过期行号已被别的改动删掉)。
-
出错会怎样:只影响技能文字和评测读数,产品行为不变;判分若放得太松会把没学会的答案判对,本次用两轮旧录音重判,不带技能的答案一个也没有因此变对。可以直接撤回。
- 要你做什么:技能包是对外发布的受管文件,需要你批准合并。
## What changes
- `skills/objectstack-ai/SKILL.md` (Model Configuration): "`provider` is
retired (protocol 19): writing it is a parse error" becomes "retired
(protocol 19) and refused, except the `'openai'` an 18.x toolchain wrote
out, which parses and is stripped. Delete it." The instruction is
unchanged. The file sits at zero token headroom, so the clause is paid
for by deletions in the same section: ", never a provider" (the next
clause says the deployment chooses it), the `model` row's "for the
environment" and "model " in "free-string model name", and the
`temperature` row's "`min(0).max(2)`, " (the same cell says "Outside 0–2
is a parse error"). Ceiling unchanged.
- `packages/spec/src/ai/agent.zod.ts`: the `provider` tombstone's jsdoc,
which said the same words, names the one value that parses
(`MODEL_PROVIDER_RETIRED_KEY_RESIDUE`) and that `tsc` refuses it all the
same. Comment only.
- `skills/objectstack-ai/evals/skills-tools-knowledge.json`:
- case 2 (sampling settings): `expected_output` says "refused" instead
of "a parse error"; `must_not_contain` goes from the one spelling
`provider: 'anthropic',` to nine code spellings: single or double
quotes, followed by a comma, a newline, ` }` or `}`, and the JSON form
`"provider": "anthropic"`. The backtick-terminated inline warning (``
`provider: 'anthropic'` ``) still passes.
- case 6 (nightly approval script): the `must_contain_any` group gains
`refuses`.
- case 7 (`run_action` with `confirm: true`): `do not retry` moves from
`must_contain` into a `must_contain_any` group `["do not retry", "Do not
retry", "don't retry", "Don't retry"]`.
- `.changeset/37850-agent-model-provider-refused-residue.md`:
`@objectstack/skills` patch, `@objectstack/spec` patch (jsdoc).
## Why
The four boxes of #37850, each against `main` 581ae76:
1. **N1, the parse-error wording.** True for every value but one:
`acceptRetiredDefaultResidue(…, { provider: 'openai' })` at
`agent.zod.ts:71`/`:96` strips the 18.x default (pinned by
`agent-model-provider-retirement.test.ts:91-95`). Fixed in the skill and
the jsdoc.
2. **N2, case 2's single forbidden spelling.** Fixed as a set of
spellings, not the bare key: a bare `provider:` fails correct answers
that quote the retired spelling to warn (round-1 answers do exactly
that).
3. **`SKILL.md:457` citing `agent.zod.ts:234, :251`.** Already gone on
`main`: #37939 (62dd9e1) rewrote that passage and dropped the citation.
Closed with that reason; nothing to change.
4. **Cases 6 and 7 missing their literal phrases.** Judged against the
recorded answers of both #37796 rounds (round records kept by the seat):
the **grading token** was wrong in both, the teaching is right.
- Case 7: all six with-skill answers say "Don't retry" / "Do not retry"
/ "**don't retry**" next to the right handling of `pending_confirmation`
and `no_confirmation_service`; the grader is a case-sensitive literal
match (`grade.ts`), and `SKILL.md:212` teaches "do not retry".
- Case 6: #37969 (dc45b1e) already moved it to an any-of group; one
correct with-skill answer still failed it only because it wrote
"refuses" ("ObjectStack refuses decisions made with API tokens").
## Verification
<details><summary>Re-grade of the recorded rounds under the new
assertions (literal grader, script in the thread scratchpad)</summary>
Round 2 (runner fb8b3f2, the clean round):
| case | with-skill before → after | no-skill before → after |
|:--|:--|:--|
| 2 | 3/3 → 3/3 | 0/3 → 0/3 |
| 6 | 1/3 → 3/3 | 0/3 → 0/3 |
| 7 | 0/3 → 3/3 | 0/3 → 0/3 |
Round 1 (789e0c7) with-skill: case 6 0/3 → 3/3, case 7 0/3 → 3/3. Round
1's no-skill arm read project memory (#37842), so its case 2 flips
(graded then under an older assertion) are not evidence either way.
`pnpm --filter @objectstack/scenarios skill-evals --regrade` on a copy
of round 2 exits 0: the catalog loads; it sets cases 2/6/7 apart as
changed since the round, as designed, so the table above is the
literal-grader reading.
</details>
<details><summary>Local gates at c5dee31; at 72007e7 (S1, a line
number only) and at 61188fd (main merged + the 5-byte cut) the token
ratchet, check-nul-bytes, check:skill-links, check:skill-frame-sync,
check:skill-identifier-liveness, check:skill-docs, check:skill-refs and
check:empty-changeset re-run, exit 0</summary>
All exit 0: `node scripts/check-skills-token-ratchet.mjs`
(`skills/objectstack-ai/SKILL.md is 6893 tokens (ceiling 6893; headroom
0)`), `check-affected-docs`, `check-drift-comment`, `@objectstack/spec`
`build` + `check:generated` (`All 14 generated artifacts are up to
date`), `check:docs`, `check:skill-docs`, `check:skill-refs`,
`check:liveness`, `check:llms-txt`, `check:doc-authoring`,
`check:pm-skill-id-lint`, `check:skill-compatibility`,
`check:skill-frame-sync`, `check:skill-frame-freshness`,
`check:skill-identifier-liveness`, `check:skill-links`,
`check:spec-docblock-symbol-anchors`, `check:spec-parsed-alias`,
`check:skill-top-level-keys`, `check-nul-bytes`,
`check:empty-changeset`. The rest of the derived families are CI's.
</details>
Skills readings (lines), against `main` at the merge:
`skills/objectstack-ai/SKILL.md` 488 → 489; bundle (all
`skills/*/SKILL.md`) 4953 → 4954. Tokens: 6906 → 6906 of 6906 (before
the merge: 6893 → 6893 of 6893).
No eval round run (Sales paused rounds). Two-minute check: `node
scripts/check-skills-token-ratchet.mjs | grep objectstack-ai/SKILL`
prints ✓ at 6893.
## Acceptance notes
- Read first: the SKILL.md hunk (the residue sentence and the three
deletions paying for it), then case 2's spellings.
- Case 2 still lets a code line with trailing spaces or a `//` comment
after `provider: 'anthropic'` (no comma), or `provider:'anthropic'` with
no space, slip past; closing those with literal substrings would start
catching the inline prose warning. Left open.
- Accepted nits from the contract review (not changed this round): case
2's two `}` spellings also fail a correct answer that warns inline with
the braces (the retired key shown inside a backticked `model: { … }`),
so "the inline warning still passes" holds for the bare-key form only,
and a fenced counter-example still fails; case 7 still misses a
typographic apostrophe, "never retry", or bold inside the phrase; case
6's any-of group is met by generic refusal wording and leans on its one
forbidden call spelling (older than this PR).
- `SKILL.md:365`'s cite moves `agent.zod.ts:87-95` → `:89-97`: the jsdoc
hunk adds two lines above the `model` block's keys (review S1).
## Serial
Open PR #38013 edits other hunks of the same two skill files (the
knowledge-service sentence at `SKILL.md:244`, case 14); the text merges
clean. It does not fit under the token ceiling, though: #38013 re-pins
`skills/objectstack-ai/SKILL.md` to 6906 at its own measurement (27650
bytes), this PR adds 3 bytes (27596 → 27599), and the two merged are
27653 bytes, `ceil((27653 - 27) / 4)` = 6907, one over #38013's row.
Whichever lands second goes red on the token ratchet and must cut 2
bytes or re-pin; merging `main` alone is not enough.
**Resolved here:** #38013 landed first, and this PR's first merge-queue
run went red on exactly that row (6907 / 6906). `main` is merged in
(c725268) and 61188fd deletes a repeated noun inside this PR's own
Model Configuration hunk ("among the providers turned on" → "among the
ones turned on", 5 bytes; "the ones" refers back to "the provider" five
words earlier). The file is 6906 / 6906 and no ceiling moves. The cut is
sized to land on the row: the ratchet is red below its ceiling too, so a
larger cut would have had to lower the row in the same commit.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(jsdoc only)
- [x] 2. Every name I added uses the casing for its kind. (none added)
- [x] 3. No formatter ran; `pnpm lint` passes. (left to CI)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (`check:generated`: all up to date, nothing
to commit)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgUDWstaVZQkWbWFNBK
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgUDWstaVZQkWbWFNBK)_
<!-- signed: repo:objectstack#2 · os-sales ·
session_01L6bhgUDWstaVZQkWbWFNBK -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 22e1089 commit 3ffa92d
4 files changed
Lines changed: 42 additions & 11 deletions
File tree
- .changeset
- packages/spec/src/ai
- skills/objectstack-ai
- 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 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
373 | | - | |
374 | | - | |
| 374 | + | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
| |||
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
61 | | - | |
| 71 | + | |
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
| |||
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
71 | | - | |
| 81 | + | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
| |||
0 commit comments