Repository navigation
docs(skills): the formula skill says the build refuses date subtraction (end - start) - #29122
Conversation
The "No date arithmetic" note in objectstack-formula said `end - start`
does not fault and yields a duration stored as `{}`. With the formula
gate refusing bare date subtraction, the note now says the build refuses
both `date + n` and `end - start` and prescribes `daysBetween(a, b)`.
The dashboards rule, the analytics eval prompt and a formula eval stop
describing a stored formula that subtracts dates.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAjkjQLh4kZsuRAM4iV
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J Contract-review-claim: session_01J8VVAnMUWA9rufXzFaEh4J · head a36bf3a · 2026-11-02T08:03Z The seat review runs at CONTRACT_REVIEW_TIER in an isolated subagent (the seat session is not at that tier). |
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J Contract reviewServed-tier: Reviewer: the diff (+18/−6 against merge base a4015ab, five files, the same net diff against origin/main 6ada509), card #29061 with triage 6571419284, claim 6571850949 and dev report 6572112933 (read as input), PR #29058's gate code at e029ea7, and the head's check-runs were read; nothing was posted. The PR is ① Derived judgmentsEach changed sentence against the gate at e029ea7:
Evals and their gate: the four Token ratchet: run on a detached worktree of a36bf3a, exit 0. skills/objectstack-formula/SKILL.md 5686 / 5997 (headroom 311), skills/objectstack-ui/rules/dashboards.md 6251 / 6262 (headroom 11), eval fixtures 29165 measured not ratcheted, bundle total 222593: the dev report's figures. The ceilings live in Sweep (card item 3): ② Semver level
③ Boundary flags
④ Design judgment
Must-fix: none. Should-fix: none that blocks; the predicate carve-out is a deliberate omission, recorded above. Check-runs at record time: 2026-11-02T08:08Z · 41 check-runs on a36bf3a · 26 success · 13 skipped · 2 in_progress (Test Core 1/8, Test Core 2/8) · 0 failure · Lint · repo & tooling gates, Lint · docs & code guards, Lint · CI, release & engine gates, Type Check · workspace, Type Check · consumer gates, Governed Surface Queue Guard, Check Changeset, PR-body guards all success. Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J 维护者速读
席位核对 — ACCEPT · domain:skills#1 · head
|
Requested by Irene · project thread
Fixes #29061
Clause-②: no
Metadata-protocol: none
Blocked-by: #29058
维护者速读
date + n和end - start(日期或日期时间相减、today()/now()减日期字段),处方是daysBetween(a, b);Want/Write 表不动。dashboards 规则、两个 eval 里写成日期相减的请假天数公式与说明同步改掉。end - start「不报错、得到存成{}的 duration」,会教 AI 写出构建不过的公式。skills/objectstack-formula/SKILL.md第 151-153 行的说明;②skills/objectstack-ui/rules/dashboards.md第 100 行;③ 两个 eval 的一行改动。node scripts/check-skills-token-ratchet.mjs全绿,skills/objectstack-formula/SKILL.md为 5686/5997。skills/**)。What changes
Text only, inside the claim's file surface. The wording follows PR #29058 at head
e029ea772b1555ea33b2946e0978ff4175dbdd3e(its gate inpackages/formula/src/validate.ts, its refusal messages, its changeset and its new row incontent/docs/data-modeling/formulas.mdx).skills/objectstack-formula/SKILL.md, the "No date arithmetic" note. It saidend - start"does not fault — it yields adurationstored as{}". It now says the build refuses bothdate + nandend - start: a date or date-time mixed with a number, or minus another, readsnull, andtoday()/now()minus a date field reads{}. It prescribesdaysBetween(a, b). The Want / Write table is unchanged.skills/objectstack-ui/evals/analytics-inline-vs-dataset.json, eval 6. The storeddays_requestedformula is restated fromend_date - start_datetodaysBetween(record.start_date, record.end_date). Its onlymust_containtoken,number, is unchanged and still taught by the skill.skills/**, thencontent/docs/**), two more hits, both fixed here:skills/objectstack-ui/rules/dashboards.mdline 100 described the same leave-days formula as`days_requested` (`end - start`). It now reads(`daysBetween(start, end)`). The rule it teaches (neversuma formula) is unchanged.skills/objectstack-formula/evals/cel-predicates-formulas.jsoneval 4 explainedrecord.close_date - today()as "a duration stored as{}", which reads as a shape that builds. It now says "the build refuses it". Assertions unchanged.skills/**:content/docs/data-modeling/formulas.mdxis updated by fix(formula)!: the formula gate refuses bare date subtraction, which reads null or {} at runtime #29058 itself;content/docs/releases/v16.mdxline 726 is release history and stays as written. No othercontent/docs/**text subtracts dates in a formula..changeset/29061-formula-skill-date-subtraction-refused.md:@objectstack/skillspatch.Skills readings (lines, then tokens from
check-skills-token-ratchet):skills/objectstack-formula/SKILL.mdlinesskills/objectstack-ui/rules/dashboards.mdlinesskills/*/SKILL.mdlinesskills/objectstack-formula/SKILL.mdtokens (ceiling 5997)skills/objectstack-ui/rules/dashboards.mdtokens (ceiling 6262)No ceiling moved and no line was re-wrapped.
Tests
No code changes. The claims in the new text were checked against the gate itself, by calling
validateExpression('value', …)from a built@objectstack/formula, once at #29058's head (with this commit cherry-picked on top) and once atorigin/maina4015ab4:#29058 head refuses every shape the note names and accepts every daysBetween shape; origin/main accepts the subtractions
The
origin/mainhalf is why this PR isBlocked-by: #29058: before that lands, the note would describe a refusalmaindoes not make.check:doc-formula-expressions(it judges the formula examples inskills/**with the built@objectstack/formula) is green on both trees: on this branch ata36bf3ab, and on #29058's head with this commit cherry-picked (25 record-scoped examples across 548 files judged clean).Acceptance notes
end - start" without carving out predicates. fix(formula)!: the formula gate refuses bare date subtraction, which reads null or {} at runtime #29058 still accepts a condition that compares a duration (today() - record.start_date > duration("72h")). The skill keeps the simpler rule, which is never wrong for a formula; adding the carve-out would cost tokens for an edge the formula skill does not teach.Verification
Gates derived with
node scripts/pm/dispatch-gates.mjs --commands(merge basea4015ab47, 5 paths, +18/−6) and run one by one on heada36bf3ab, the exit code captured before any pipe.45 derived, 41 exit 0, 4 NOT MEASURED (exit 3, whole-tree build prerequisite); --ran: 0 UNRUN
The four not measured are whole-tree families that read every package's
dist/; this diff touches no package source, so a full local build was declared to CI rather than run.🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAjkjQLh4kZsuRAM4iV
Generated by Claude Code