Skip to content

docs(skills): objectstack-formula eval case 4 names the refused date forms without spelling its own must_not_contain strings - #26978

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-htz15g
Oct 28, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-htz15g

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #26814

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:skills/objectstack-formula/evals/cel-predicates-formulas.json 第 4 例的参考答案改写——不再把自己 must_not_contain 要拒的两个字符串(JS 的 Date 构造、today() 加数字)原样拼出来,改为点名其形态;七个断言、全部事实一字不少,文件字节数不变(5407 B),token 棘轮行不动;附 @objectstack/skills patch changeset。
  • 为什么改:参考答案自己含被拒字符串,按该例标准作答反而判错(总监复审 PR docs(skills): objectstack-formula evals exercise label(record.kind), and refuse it in a predicate #26810 发现)。
  • 风险与回滚:只改一条 JSON 字符串与一个 changeset,无 schema/行为变化;回滚即 revert 本 PR。
  • 先看:skills/objectstack-formula/evals/cel-predicates-formulas.json(第 4 例 expected_output 一行)。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,预期看到该文件 1352 tokens (ceiling 1352; headroom 0) 且总判定 ✓。
  • 需要你做的:批准本 PR(skills/** 受管面,Tier H,保持 draft 等 GOVERNED_APPROVERS 批准;席位不 ready/不入队)。

What changes

  • Case 4 expected_output of skills/objectstack-formula/evals/cel-predicates-formulas.json no longer spells its own must_not_contain strings. The two phrases that carried them are reworded; everything else in the case is byte-identical:
    • "never new Date() / Date.now()" → "never a JS Date / Date.now()"
    • "never today() + 45 (date arithmetic faults)" → "never date arithmetic on today() (it faults)"
  • Every assertion and fact kept: the CEL-envelope seed close_date: celdaysFromNow(45)``, the determinism gate (two os build runs byte-identical), `daysBetween(today(), record.close_date)`, the `record.close_date - today()` duration-stored-as-`{}` trap, and the date-arithmetic fault. `must_contain` / `must_not_contain` are untouched.
  • Changeset .changeset/26814-formula-eval-case4-self-consistent.md, @objectstack/skills patch (the evals ship in the published catalog).
  • No forced test edits. No ratchet row moves.

Why

Case 4 refused new Date( and today() + in an answer while its own reference answer contained both, so an answer that matched the reference was graded wrong. Found by the contract review of PR #26810 (card #26814).

Tests

Per-case cross-check over the file (each case: no must_not_contain string inside its own expected_output, every must_contain string present), at origin/main 912076f and at this head:

origin/main 912076f8:  case 4: must_not_contain "new Date(" PRESENT
                       case 4: must_not_contain "today() + " PRESENT
                       cases=7 failures=2
head f8531858:         cases=7 failures=0

JSON.parse of the file succeeds at this head.

Skills readings (skills/** diff — whole-file and whole-package, before → after)

Reading before (912076f) after (f853185)
evals/cel-predicates-formulas.json lines / bytes / tokens 75 / 5407 / 1352 75 / 5407 / 1352
whole package, all skills/*/SKILL.md lines / bytes 4605 / 224961 4605 / 224961
whole package, all skills/*/evals/*.json lines / bytes 1479 / 94793 1479 / 94793

Token = ceil(bytes / 4), the convention scripts/check-skills-token-ratchet.mjs declares. Ceiling row for the file stays at 1352 (headroom 0, unchanged).

Acceptance notes

  • Same-byte rewrite achieved, so the standing ruling 「A:先削重复,余额按实测提高」 was not needed and the ratchet row did not move.
  • The cross-check script is a local probe (not committed); its two rules are the ones the card's acceptance line states.

Verification

Local gate subset at head f853185 (node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, no paths; 42 derived commands run serially, each exit code captured before any pipe):

42 / 42 exit 0 · `--ran` reconciliation: 42 derived, 42 run, 0 NOT-MEASURED, 0 UNRUN
✓ check-skills-token-ratchet: skills/objectstack-formula/evals/cel-predicates-formulas.json is 1352 tokens (ceiling 1352; headroom 0).
✓ check-skills-token-ratchet: 82 authored bundle file(s) within their ceilings; 10 generator-owned file(s) measured, not ratcheted.
Run reconciliation — 42 derived, 42 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 42 derived famil(ies) accounted for — 42 run, 0 NOT-MEASURED (a DERIVED zero — all 42 recorded an exit code and none of them is 3).

Build closure first: bash scripts/pm/os-verify-lock.sh -c 'pnpm build --concurrency=2' → VERDICT command-exit 0 · held the lock 841s (14m01s).

Every family CI runs on the PR (Lint & Repo Gates, TypeScript Type Check, Check Changeset, Governed Surface Queue Guard, …) is read from this PR's check-runs, not re-run locally. test:repo is not in the local subset (it is CI's; this diff edits no test). Dogfood battery: n/a (no ! in the title, no (narrowing) arm).


Generated by Claude Code

…forms without spelling its own must_not_contain strings

Case 4's expected_output carried both strings its own must_not_contain
refuses (`new Date(` and `today() + `), so a reference-grade answer was
graded wrong. The reference now says "never a JS `Date` / `Date.now()`"
and "never date arithmetic on `today()` (it faults)"; every assertion and
fact stays, the file keeps its 5407 bytes, and a per-case cross-check of
all seven cases reports 0 failures. Patch changeset for @objectstack/skills.

Claude-Session: https://claude.ai/code/session_01ADHkmPQ8p3cVKear7Mchi2
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:skills#1 · session_01ADHkmSrRBdu9MdC6fc33Uu · head f8531858 · 2026-10-27T23:58Z

  1. 形态 — Tier H (skills/**): skills/objectstack-formula/evals/cel-predicates-formulas.json case 4's expected_output names the refused forms without spelling its own must_not_contain strings ("never a JS Date / Date.now()", "never date arithmetic on today()"); every assertion and fact kept; patch changeset for @objectstack/skills.
  2. 前提实测 — the seat read the one-line diff: byte-neutral (5407 B / 1352 tokens before and after, ratchet row untouched, ruling A not needed); new Date( and today() + no longer occur in case 4's expected_output, and its must_contain strings (cel\``, daysFromNow(, daysBetween() still do. The dev's per-case cross-check: 2 failures on main` (both case 4), 0 at the head over 7 cases.
  3. 门禁 check-runs — dev ran the 42 derived commands, all exit 0 (--ran 42, 0 NOT-MEASURED, 0 UNRUN). CI on the head is read again before landing.
  4. 接受的偏差 — none (open question: "a JS Date" byte-neutral, accepted over the +14 B spelling).
  5. 范围外去向 — none. Contract review at CONTRACT_REVIEW_TIER: requested from the director seat.
  6. 落地条款 — governed, Tier H: stays draft until a GOVERNED_APPROVERS approval; then it lands through the queue.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f853185879c294028b63896cce49866f5e7bc7ad
Local-runs: none
Scope: skills/objectstack-formula/evals/cel-predicates-formulas.json, .changeset/26814-formula-eval-case4-self-consistent.md + scripts/check-skills-token-ratchet.mjs

Director seat (summon #52, ledger objectstack#12708), summoned by the domain:skills#1 seat; the card is this seat's own should-fix from the #26810 record (6448530347). Read-only at the head above: the diff, card #26814 and its thread (triage 6449631119, claim 6456131454, dev report 6456649541), the seat's ACCEPT 6456679102, the head and origin/main (7bb80845) copies of the eval file and the ratchet table, the head's check runs. skills/** is a governed-register row ⇒ the rules face, CONTRACT_REVIEW_TIER; Tier H, lands by a GOVERNED_APPROVERS hand, not on this record. The seat records; it does not approve, ready, queue or merge.

① Derived judgments

  • The defect is gone and nothing else moved. Parsing both copies: on main, case 4's expected_output contains both of its own must_not_contain strings (new Date(, today() + ) — the one failure in the file; at the head, all seven cases pass the per-case cross-check (every must_contain present, no must_not_contain present). Case 4's assertions are identical on both sides; cases 1–3 and 5–7 are byte-identical; only expected_output of case 4 differs.
  • Every fact of the reference answer survives the rewording. The CEL-envelope seed, the determinism gate (two os build runs byte-identical), daysBetween(today(), record.close_date), the record.close_date - today() duration-as-{} trap, and the date-arithmetic fault are all still stated; the two refused forms are now named by kind ("a JS Date / Date.now()", "date arithmetic on today()"), the device case 7 already uses for "the label macro".
  • Same-byte, so the ratchet is untouched by right. Case 4's expected_output is 346 B before and after; the file is 5407 B → 5407 B, ceil/4 = 1352 on both sides, the CEILINGS row on main is 1352 (headroom 0) and the head leaves the table alone. The standing ruling 「A:先削重复,余额按实测提高」 was not needed, as the card's budget line foresaw.
  • Changeset is right for what moves. @objectstack/skills patch (the evals ship in the published catalog); Clause-②: no / Metadata-protocol: none — a fixture string, no exported shape. Two files in the PR, nothing outside the claim's surface.

② Semver level

@objectstack/skills patch. Correct.

③ Boundary flags

  • Governed path (skills/**, Tier H): draft, requested_reviewers hotlong / os-zhuang, no review yet. This seat's account is not a GOVERNED_APPROVERS member; this record is not an approval.
  • Card order honoured: #26810 merged (40264bee) and is an ancestor of the branch base 7bb80845, which is origin/main at this record; main has not moved on the eval file or the ratchet table since the base.
  • Check runs on f8531858 at this record: 15 success, 12 expected skips, 10 still in_progress — among them Lint · repo & tooling gates (home of check:skills-token-ratchet) and the Test Core shards. Nothing red; a red there re-opens this record. The dev reports the ratchet line green locally (1352 tokens (ceiling 1352; headroom 0)).
  • Dev deviations: none. The "a JS Date" spelling the seat flagged as an open question is accepted here too: it names the form (case 7's device) and keeps the byte count.
  • Nothing to carry: no should-fix. The docs(skills): objectstack-formula evals exercise label(record.kind), and refuse it in a predicate #26810 should-fix that filed this card is closed by this diff.

④ Design judgment

  • A reference answer must be gradable by its own assertions; naming the refused form instead of quoting it is the one fix that keeps the teaching and makes the grader honest, at zero budget. Holds.

Implemented-by: claude/project-thread-htz15g
Reviewed-by: session_01ADHkmQr732toX135tyo5zs

VERDICT: PASS


Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review October 28, 2026 00:09
@os-zhuang
os-zhuang added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 1bd7574 Oct 28, 2026
41 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-htz15g branch October 28, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills(objectstack-formula): eval case 4's expected_output carries both strings its own must_not_contain refuses

3 participants