Repository navigation
Commit f6e1db1
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DXVvNqWc3NAaChEvSCx3DJX)_
domain:skills#2 · os-elon-musk · session_016WV4d1BfaajCZsT5GLe2M7
Fixes #26940
Ruling-ref: 6512920986
## What changes
- `skills/objectstack-formula/evals/cel-predicates-formulas.json`: case
8 asks for an `email_template` that mails one overdue notice per
`contract`, the amount shown in that contract's own currency. The
reference answer is `{{ amount | currency:@currency_code }}`: only a
mail template may read the code from the send's data; the stored code is
three capitals (`EUR`), exactly as stored; when the template declares
`variables`, the path must be one of them or lie under one.
`must_contain`: `currency:@`. `must_not_contain`: the bare
`currency:currency_code`, `currency:USD`, `currency:CNY` and the
no-argument `| currency }}`. Six restatements in the reference answers
of cases 1, 2, 4, 5 and 7 are shortened (-160 bytes); every assertion
and every fact is kept.
- `scripts/check-skills-token-ratchet.mjs`: that file's row moves 1352 →
1506, the row comment quoting the ruling below.
- `.changeset/26940-formula-eval-currency-at-path.md`:
`@objectstack/skills` patch.
The eval case, the six trims and the changeset are the blocked round's
commit `1c67d742`, cherry-picked unchanged (it keeps its own trailer);
the ratchet row is the only new change, as the ruling binds.
## Why
PR #26937 (#26660) added `currency:@path` to mail templates, and
`skills/objectstack-formula/SKILL.md:450` teaches it, but no eval scored
it: `grep -rn 'currency:@' skills/objectstack-formula/evals` on
`origin/main` `88d60203c` has 0 hits. An AI author writing a per-record
overdue mail could write a bare path after the colon (refused at
authoring, `currency-code-literal`), hard-code one code for every
record, or leave the argument out, which formats every record in the
organization's default currency
(`packages/formula/src/template-currency-tenant-default.test.ts`; the
card first said US dollars, the reference answer follows the
implementation). Nothing caught any of the three.
The file sat at its ceiling: 5407 bytes of 5408, 1352 tokens. The case
costs 194 tokens, the lossless trims paid 40, and no further deletion
inside the file pays the remaining 154 (the arithmetic is in the blocked
report 6488686813). The maintainer ruled on the director's brief, ruling
record 6512920986, letter A, verbatim and untranslated:
> 「26940同意,并继续帮我评估这种天花板的价值是什么,为什么要卡住车队的开发进度」
同意 is letter A: raise the row to 1506. The second clause asks the
director seat for a separate evaluation of the ceiling and is not part
of this PR.
## Verification
Token measurements (`node scripts/check-skills-token-ratchet.mjs`,
`ceil(utf8 bytes / 4)`):
| Reading | Before (`origin/main` `88d60203c`) | After (`ee7516b7`) |
Ceiling |
|:--|--:|--:|:--|
| `skills/objectstack-formula/evals/cel-predicates-formulas.json` | 75
lines · 5407 B · 1352 | 85 lines · 6021 B · 1506 | 1352 → 1506, headroom
0 |
| All `skills/*/SKILL.md` | 4610 lines · 226161 B | unchanged | — |
| Bundle total, whole shipped tree | 219245 | 219399 (+154) | — |
Facts in the reference answer re-read on `origin/main` `88d60203c`:
`skills/objectstack-formula/SKILL.md:448-450`; `CURRENCY_ARGUMENT_RULE`
and the mail-dialect refusal of a bare argument in
`packages/formula/src/template-engine.ts`; `isDeclaredPath` and
`currency-code-path-undeclared` in
`packages/formula/src/mail-hole-grammar.ts`; the tenant-default test
above. Eval self-consistency (every `must_contain` string in its own
`expected_output`, no `must_not_contain` string in its own prompt or
answer): `cases=8 failures=0`. JSON parses; no control bytes in the
three files; `eslint --no-inline-config` on the edited script is clean;
`node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD`
passes.
Gates: `node scripts/pm/dispatch-gates.mjs --commands` derived 60
families on `ee7516b7` (after the last commit, in a fresh worktree after
`pnpm install --frozen-lockfile --ignore-scripts`); `--ran`
reconciliation: 60 accounted for, 58 run and exit 0, 2 NOT MEASURED
(exit 3, prerequisite: whole-tree `dist/`):
`check:dual-build-cjs-loads`, `check:lean-entry-closure`. Among the 58:
`check-skills-token-ratchet` and its `--self-test` (79 cases),
`check:skill-compatibility`, `check:skill-identifier-liveness`,
`check:skill-frame-sync`, `check:published-files`,
`check:pm-governed-merges`, `check:nul-bytes`, `check-empty-changeset`
and `check-adr-0087-registration` against `origin/main`, and
`check:doc-formula-expressions` after building `@objectstack/formula`
and `@objectstack/lint`. `check:dts-closure` and
`check:sourcemap-no-sources-content` ran green over the 4 packages built
here only; CI sweeps the whole tree. No package source changed, so no
package test or typecheck is owed;
`ui/scripts/check-skill-eval-tokens.mjs` grades `skills/objectui` only,
so it does not read this file.
Clause-②: no
Metadata-protocol: none
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No spec change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; eslint on the edited script passes (full
`pnpm lint` 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` not touched.
- [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.
## 维护者速读
- 改了什么:objectstack-formula 技能新增第 8 条 eval:按合同各自的货币发逾期邮件,期望写 `{{ amount |
currency:@currency_code }}`,拒收裸路径、写死 `USD`/`CNY` 与不带参数三种写法。
- 为什么改:PR #26937 已让邮件模板支持 `currency:@path`,技能也在教,但没有任何 eval 计分;AI
写错了没人发现。
- 风险与回滚:只动 eval 文件、ratchet 一行与 changeset,无 schema、键或运行时行为变化;回滚即 revert 本
PR。
- 先看:`scripts/check-skills-token-ratchet.mjs` 的 1352 → 1506 行注释(引裁决
6512920986);再看 eval 第 8 条。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期该文件一行显示 `1506
tokens (ceiling 1506; headroom 0)`,整体 exit 0。
- 需要你做的:欠 CONTRACT_REVIEW_TIER 契约复审;落地为 Tier H,待受管批准人批准。
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016WV4d1BfaajCZsT5GLe2M7
---------
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 427c943 commit f6e1db1
2 files changed
Lines changed: 27 additions & 5 deletions
File tree
- .changeset
- skills/objectstack-formula/evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
0 commit comments