Repository navigation
docs(skills): objectstack-formula eval for a mail amount in each record's own currency (currency:@path) - #27922
Conversation
…rd's own currency (currency:@path), held over the token ceiling for a ruling Case 8 asks for an email_template that mails one overdue notice per contract with the amount in that contract's own currency; its reference answer names the marked form, that only a mail template reads the code from the send's data, that the stored code is three capitals exactly as stored, and the declared-variables rule; the assertions require currency:@ and refuse the bare path, a hard-coded code and the no-argument form. Six reference answers of existing cases are shortened where they restated a point they already make (-160 B, every assertion and fact kept). The file reads 1506 / 1352 tokens (+154): the case cannot be paid by deletion inside the file, so this commit is a measured WIP for the ceiling ruling, not a landing. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmhU5KEj1nukYhp1Tg
…-> 1506 for the currency:@path case The eval case for a mail amount shown in each record's own currency costs 194 tokens; six restatements already cut in the same file paid 40 of them, and the remaining 154 are raised by the maintainer ruling recorded on the card (comment 6512920986, letter A), quoted in the row comment. Pinned AT the measurement, zero headroom. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1BfaajCZsT5GLe2M7
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract-review-claim: session_016WV4d1QkPVVzNz3FJqb2iS · head ee7516b · 2026-10-30T04:06Z |
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract reviewServed-tier: Inputs read: card #26940 (body, Ruling-ref and Resume-from lines); blocked os-dev-report 6488686813; analysis 6488793773; director brief 6493978216; ruling 6512920986 (letter A, maintainer 「26940同意」); claim 6514261477; os-dev-report 6514690365; the seat report at /mnt/project-files/skills-lane-seat2/report-26940.json; PR body and the head's 41 check-runs; Contract-review-claim 6514710939 (this session, this head). Diff read as ① Derived judgments
② Semver levelPatch on ③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS Must-fix: none. Should-fix: none. Observations (no action owed on this head):
|
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS 维护者速读
席位意见:ACCEPT。契约复核 PASS,没有 must-fix,也没有 should-fix。CI 全绿;与已合入的 #27903(同一个棘轮文件,不同行)合并无冲突。 席位核对
|
…-jlqwr0 # Conflicts: # scripts/check-skills-token-ratchet.mjs
…ngeset Eval fixtures carry no token ceiling since the skills ratchet stopped pricing evals/**, so the clause saying the trims paid for the case inside the file's ceiling no longer holds and would ship in the changelog. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1BfaajCZsT5GLe2M7
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract-review-claim: session_016WV4d1QkPVVzNz3FJqb2iS · head 23838ca · 2026-10-30T07:15Z |
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract review (delta)Served-tier: Inputs read: Contract-review-claim 6517177402 (this session, this head, 07:15Z); the previous record at head ① Derived judgments
② Semver levelUnchanged from the PASS: patch on ③ Boundary flags
④ Design judgmentThe delta does the one thing main's new rule requires and nothing more: it takes the gate as main ships it, lets the formula eval stand as an unpriced measured fixture, and removes the one sentence in the release note that would have told the changelog reader about a ceiling that no longer exists. The eval case and the trims, already judged against the formula package and the card's Wanted at Implemented-by: VERDICT: PASS Must-fix: none. Should-fix:
Observations (no action owed on this head):
|
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS 维护者速读(取代 ACCEPT 6514907615:头已变,以本条为准)
席位意见:ACCEPT。增量复核 PASS,没有 must-fix。合并 main 只解决了棘轮文件一处冲突,取 main 的版本;changeset 删掉了「为在上限内付账」这半句,因为该文件已没有上限。should-fix 1:changeset 写「六条参考答案」,实际是五条(六处编辑),不值得为此再推一次。CI 无失败。 席位核对
|
Requested by Elon · project thread
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 anemail_templatethat mails one overdue notice percontract, 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 declaresvariables, the path must be one of them or lie under one.must_contain:currency:@.must_not_contain: the barecurrency:currency_code,currency:USD,currency:CNYand 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/skillspatch.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:@pathto mail templates, andskills/objectstack-formula/SKILL.md:450teaches it, but no eval scored it:grep -rn 'currency:@' skills/objectstack-formula/evalsonorigin/main88d60203chas 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:
同意 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)):origin/main88d60203c)ee7516b7)skills/objectstack-formula/evals/cel-predicates-formulas.jsonskills/*/SKILL.mdFacts in the reference answer re-read on
origin/main88d60203c:skills/objectstack-formula/SKILL.md:448-450;CURRENCY_ARGUMENT_RULEand the mail-dialect refusal of a bare argument inpackages/formula/src/template-engine.ts;isDeclaredPathandcurrency-code-path-undeclaredinpackages/formula/src/mail-hole-grammar.ts; the tenant-default test above. Eval self-consistency (everymust_containstring in its ownexpected_output, nomust_not_containstring in its own prompt or answer):cases=8 failures=0. JSON parses; no control bytes in the three files;eslint --no-inline-configon the edited script is clean;node scripts/check-commit-card-trailers.mjs --range origin/main..HEADpasses.Gates:
node scripts/pm/dispatch-gates.mjs --commandsderived 60 families onee7516b7(after the last commit, in a fresh worktree afterpnpm install --frozen-lockfile --ignore-scripts);--ranreconciliation: 60 accounted for, 58 run and exit 0, 2 NOT MEASURED (exit 3, prerequisite: whole-treedist/):check:dual-build-cjs-loads,check:lean-entry-closure. Among the 58:check-skills-token-ratchetand 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-changesetandcheck-adr-0087-registrationagainstorigin/main, andcheck:doc-formula-expressionsafter building@objectstack/formulaand@objectstack/lint.check:dts-closureandcheck:sourcemap-no-sources-contentran 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.mjsgradesskills/objectuionly, so it does not read this file.Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic. (No spec change.)pnpm lintleft to CI).main, one pull request.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.维护者速读
{{ amount | currency:@currency_code }},拒收裸路径、写死USD/CNY与不带参数三种写法。currency:@path,技能也在教,但没有任何 eval 计分;AI 写错了没人发现。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。🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4d1BfaajCZsT5GLe2M7