fix(skills): state the ADR-0053 upper-bound rule in filters.md by reference - #17943
fix(skills): state the ADR-0053 upper-bound rule in filters.md by reference#17943claude[bot] wants to merge 1 commit into
Conversation
…erence
`skills/objectstack-query/rules/filters.md` taught the pre-ADR-0053 rule:
that `<= {current_year_end}` on a `datetime` column stops at midnight on
the 31st and that an author should hand-write `< {next_year_start}`.
`packages/spec/src/data/calendar-day.ts` (ADR-0053 D-D) states the
opposite: `$lte`, a `$between` max and a `dateRange` end mean the WHOLE
day and the platform compiles them to the next calendar day, so the
detour is unnecessary. Replace the three lines with the rule stated by
reference, mirroring the wording PR #17651 landed in
`date-macros.zod.ts`, at net +0 lines (251 -> 251) and +9 bytes under
the file's token ceiling.
Claude-Session: https://claude.ai/code/session_01DAcomhvR9kKizeYgg89Vo8
Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewHead: ① derived judgments: the diff makes ONE operator-semantics claim on a published skill — an upper bound written as Implemented-by: claude/issue-17656-filters-upper-bound-adr-0053 (mode:subagent) Verdict: PASS. Governed surface ( Generated by Claude Code |
维护者速读改了什么 —— 为什么改 —— 这个文件是 agent 照做的指令。同一句错话已在 风险与代价(含回滚) —— 纯文档面,不动运行时与测试;该文件 token 余量从 3 降到 1。回滚 = revert 单文件三行。 席位意见 —— 收。本席在 head 你要做的(一个动作) —— 受管面( Generated by Claude Code |
Fixes #17656
skills/objectstack-query/rules/filters.mdtaught the pre-ADR-0053 upper-bound rule: that the$lteform of{current_year_end}on adatetimecolumn "stops at midnight on the 31st", and that an author should hand-write a strict-less-than{next_year_start}detour.packages/spec/src/data/calendar-day.ts(ADR-0053 D-D, its table row at line 20) states the opposite:$lte, a$betweenmax and adateRangeend mean the WHOLE day and compile to the next calendar day, so the detour is unnecessary. Because this file is instructions an agent executes, the wrong rule was being copied into every query written from it.What changed
One block,
skills/objectstack-query/rules/filters.mdlines 249-251, replaced by the same rule stated by REFERENCE tocalendar-day.ts/ ADR-0053 D-D, mirroring the vocabulary PR #17651 landed inpackages/spec/src/data/date-macros.zod.ts("WHOLE day", "reaches the final instant of Dec 31", "⛔ Do NOT hand-write"). The compile rule is not restated here: restating it is how the three copies came about (triage ruling 5651107129 on this card).Acceptance greps (whitespace-flattened, content-anchored, on
be0de0b)84e6b05)be0de0b)stops at midnight on the 31sthalf-opencalendar-day.tsorADR-0053current_year_endTwo readings for
skills/**(governed; line budget net +0)84e6b05)be0de0b)rules/filters.mdlinesrules/filters.mdbytes, and tokens as ceil(bytes/4)skills/**/SKILL.mdline sum (11 files)skills/objectstack-query/**line sum (every file)Re-wrap was not used as currency: the three old lines (206 bytes) became three new lines (215 bytes); the +9 bytes sit inside the 14-byte slack the ratchet left.
node scripts/check-skills-token-ratchet.mjsbefore:filters.md2146/2149; after: 2148/2149, exit 0 ("34 authored bundle file(s) within their ceilings");--self-test: 65 cases pass.Gates
Derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(change set taken from git off merge base84e6b05; 1 path), run onbe0de0b, every exit code captured before any pipe, reconciled with--ranin thecommand :: exit Nform: 23 derived, 23 run, 0 unrun.node scripts/check-ci-filter-parity.mjsnode scripts/check-closing-keyword-parity.mjsnode scripts/check-closing-keyword-parity.mjs --self-testnode scripts/check-comment-mask-corpus.mjsnode scripts/check-doc-route-spelling.mjs --advisorynode scripts/check-doc-route-spelling.mjs --self-testnode scripts/check-skills-token-ratchet.mjsnode scripts/check-skills-token-ratchet.mjs --self-testnode scripts/report-test-timings.mjs --self-testpnpm --filter @objectstack/lint run check:doc-formula-expressionspnpm check:agent-test-spellingpnpm check:corpus-claim-driftpnpm check:cross-package-test-inputspnpm check:doc-authoringpnpm check:driver-memory-censuspnpm check:nul-bytespnpm check:pm-governed-mergespnpm check:refd-timer-probepnpm check:role-wordpnpm check:skill-compatibilitypnpm check:skill-frame-syncpnpm check:skill-identifier-livenesspnpm check:watch-hint-literalcheck:doc-formula-expressionsfirst exited 3, PREREQUISITE NOT MET (@objectstack/formulaand@objectstack/lintnot built; the gate says "nothing was measured", not a finding). Afterturbo run build --filter=@objectstack/formula --filter=@objectstack/lintunder the verify lock (4 tasks, 2m49s, waited 0s) the re-run is the row above: exit 0, verdict line:✓ check:doc-formula-expressions (field-level*When, #11407): 14 predicate(s) on a statically determinable field layer judged clean; 6 skipped as undeterminable.No package build or test is owed: the diff touches no package (
turbo ls --affectedwould list none; the root-level gates above are outside that graph, which is why they were derived from the path instead). Repo-widepnpm lintis CI's run.Changeset
Measured: no package
files[]names or globsskills/; the only consumer insidepackages/iscreate-objectstack, which pulls skills into a scaffolded project at scaffold time vianpx skills add objectstack-ai/objectstack/skills(from git, not from an npm tarball). Nothing any released npm package ships moves, soskip-changesetis applied as a label and read back.Premise checks
84e6b05: the content of lines 249-251,calendar-day.tsline 20, thenext_year_start|midnightgrep hitting only :206 (alias list) and :250-:251 withcurrent_year_end= 2 as lit control, PR docs(spec): state the ADR-0053 D-D upper-bound rule in the date-macros header #17651's landed wording, and no open PR touchingskills/objectstack-query/**. The one PR opened after 06:58Z, test(service-automation): characterize a config-lesswait/boundary_eventnode at run time #17937, touches a single test file underpackages/services/service-automation.filters.mditself carried no⛔(0 before the edit). The marker is in use in the same package (rules/pagination.md: 2) and in 6 catalog files, and it is the shape PR docs(spec): state the ADR-0053 D-D upper-bound rule in the date-macros header #17651 and the triage ruling asked to mirror, so it is used here.3327d02c56f8a0eca88569dad2270f32); no fork was hit, so the frame was not needed.Acceptance notes
No out-of-scope findings. Not filed: line 206 still lists
{next_year_start}because that is the token alias list, not the rule (P3); and the file's widest line is 94 columns, a pre-existing style matter with no bearer.Governed surface
skills/**is governed (Prime Directive #14): this PR stays a DRAFT for the maintainer's hand merge. No seat flips it ready, queues it, arms auto-merge or submits a review on it.维护者速读(草稿)
改了什么:把
skills/objectstack-query/rules/filters.md末尾三行的日期上界规则换掉。原文告诉 agent「{current_year_end}在 datetime 列上只到 31 日零点,要改写成下一年一月一日的严格小于」;新文按 ADR-0053 D-D 引用packages/spec/src/data/calendar-day.ts:上界就是整天,平台已自动补到当天最后一刻,⛔ 不要手写绕路。行数 251 → 251,token 2146 → 2148(上限 2149)。为什么改:这个文件是 agent 照做的指令,不是给人读的散文;错规则会被逐条执行,每条查询都带一个多余且与平台行为相反的绕路。同一句错话已在
date-macros.zod.ts(PR #17651)与packages/core头注释(#17655,另一张卡)分别修正;本卡是三份拷贝里最后一份,改法按分诊裁决只引用、不重述。风险与代价(含回滚):纯文档面,不动任何运行时代码与测试;唯一代价是该文件的 token 余量从 3 降到 1。回滚 = revert 本 commit(单文件三行)。
席位意见:
你要做的:确认措辞后人工直合(governed 面,⛔ 不入队、不 auto-merge);本 PR 首行的关单句会在合并时关闭 #17656。
Generated by Claude Code