Skip to content

fix(skills): state the ADR-0053 upper-bound rule in filters.md by reference - #17943

Queued
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-17656-filters-upper-bound-adr-0053
Queued

fix(skills): state the ADR-0053 upper-bound rule in filters.md by reference#17943
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-17656-filters-upper-bound-adr-0053

Conversation

@claude

@claude claude Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #17656

skills/objectstack-query/rules/filters.md taught the pre-ADR-0053 upper-bound rule: that the $lte form of {current_year_end} on a datetime column "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 $between max and a dateRange end 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.md lines 249-251, replaced by the same rule stated by REFERENCE to calendar-day.ts / ADR-0053 D-D, mirroring the vocabulary PR #17651 landed in packages/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)

anchor before (84e6b05) after (be0de0b)
stops at midnight on the 31st 1 0
half-open 1 0
calendar-day.ts or ADR-0053 0 1
lit control current_year_end 2 1

Two readings for skills/** (governed; line budget net +0)

reading before (84e6b05) after (be0de0b)
rules/filters.md lines 251 251
rules/filters.md bytes, and tokens as ceil(bytes/4) 8582, 2146 8591, 2148 (ceiling 2149, headroom 1)
catalog skills/**/SKILL.md line sum (11 files) 6134 6134
skills/objectstack-query/** line sum (every file) 1133 1133

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.mjs before: filters.md 2146/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 base 84e6b05; 1 path), run on be0de0b, every exit code captured before any pipe, reconciled with --ran in the command :: exit N form: 23 derived, 23 run, 0 unrun.

command exit
node scripts/check-ci-filter-parity.mjs 0
node scripts/check-closing-keyword-parity.mjs 0
node scripts/check-closing-keyword-parity.mjs --self-test 0
node scripts/check-comment-mask-corpus.mjs 0
node scripts/check-doc-route-spelling.mjs --advisory 0
node scripts/check-doc-route-spelling.mjs --self-test 0
node scripts/check-skills-token-ratchet.mjs 0
node scripts/check-skills-token-ratchet.mjs --self-test 0
node scripts/report-test-timings.mjs --self-test 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions 0
pnpm check:agent-test-spelling 0
pnpm check:corpus-claim-drift 0
pnpm check:cross-package-test-inputs 0
pnpm check:doc-authoring 0
pnpm check:driver-memory-census 0
pnpm check:nul-bytes 0
pnpm check:pm-governed-merges 0
pnpm check:refd-timer-probe 0
pnpm check:role-word 0
pnpm check:skill-compatibility 0
pnpm check:skill-frame-sync 0
pnpm check:skill-identifier-liveness 0
pnpm check:watch-hint-literal 0

check:doc-formula-expressions first exited 3, PREREQUISITE NOT MET (@objectstack/formula and @objectstack/lint not built; the gate says "nothing was measured", not a finding). After turbo run build --filter=@objectstack/formula --filter=@objectstack/lint under 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 --affected would list none; the root-level gates above are outside that graph, which is why they were derived from the path instead). Repo-wide pnpm lint is CI's run.

Changeset

Measured: no package files[] names or globs skills/; the only consumer inside packages/ is create-objectstack, which pulls skills into a scaffolded project at scaffold time via npx skills add objectstack-ai/objectstack/skills (from git, not from an npm tarball). Nothing any released npm package ships moves, so skip-changeset is applied as a label and read back.

Premise checks

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

…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>
@github-actions github-actions Bot added size/xs documentation Improvements or additions to documentation labels Sep 13, 2026
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 13, 2026
@claude

claude Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Contract review

Head: be0de0b2a71153e837301621ad3d9c95f633dff3 (PR #17943, card #17656) — read at 2026-09-13T07:37Z by the skills seat at the contract-review tier (served model claude-fable-5-1, get_session external_metadata.last_served_model at 2026-09-13T07:35Z).

① derived judgments: the diff makes ONE operator-semantics claim on a published skill — an upper bound written as <= {current_year_end} already reaches the final instant of Dec 31, so no half-open detour is hand-written — matched against packages/spec/src/data/calendar-day.ts on origin/main bd25e897 (ADR-0053 D-D: $lte, a $between max and a dateRange end mean the WHOLE day and compile to the next calendar day): correct, stated by reference, no restatement of the compile rule. No accept-set or public-surface change (zero code paths; check-clause2-carriers --pair 17943 exit 0, no widening tell).
② semver: nothing an npm package publishes moves (skip-changeset measured by the dev — no files[] covers skills/; seat control: create-objectstack pulls the catalog from git); consistent with the declared Clause-②: no.
③ boundary flags: none raised (open_questions: []); the one wording deviation (a marker the file did not carry before, mirrored from rules/pagination.md and PR #17651) is accepted.

Implemented-by: claude/issue-17656-filters-upper-bound-adr-0053 (mode:subagent)
Reviewed-by: session_01DAcomhvR9kKizeYgg89Vo8

Verdict: PASS. Governed surface (skills/**): no gate carrier was hung (the content limb is reviewed here); the PR stays a draft for the maintainer's hand merge.


Generated by Claude Code

@claude

claude Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

维护者速读

改了什么 —— skills/objectstack-query/rules/filters.md 末尾三行。原文教 agent「{current_year_end} 在 datetime 列上只到 31 日零点,要手写成下一年一月一日的严格小于」;新文只说一句:上界就是整天,平台已按 ADR-0053 D-D(calendar-day.ts)补到当天最后一刻,⛔ 不要手写绕路。251 → 251 行,token 2146 → 2148(上限 2149)。

为什么改 —— 这个文件是 agent 照做的指令。同一句错话已在 date-macros.zod.ts(PR #17651,已合)修正,packages/core 那份在 #17655(spec 车道);本卡是三份拷贝的最后一份。修法按分诊裁决只引用、不重述——重述正是三份拷贝的来源。

风险与代价(含回滚) —— 纯文档面,不动运行时与测试;该文件 token 余量从 3 降到 1。回滚 = revert 单文件三行。

席位意见 —— 收。本席在 head be0de0b 上亲核:旧句 0 命中、calendar-day.ts / ADR-0053 各 1、对照 current_year_end 仍在;与 packages/spec/src/data/calendar-day.ts 表行一致;单父提交;23 个门禁 exit 0;check-clause2-carriers --pair 17943 exit 0;契约复核 PASS 记录 5651992364。CI 在读时 21 绿、2 在跑(含 token 棘轮所在的 Lint & Repo Gates)。

你要做的(一个动作) —— 受管面(skills/**):CI 转绿后 approve 并合并(人工直合,或批准后由队列落地)。


Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review September 13, 2026 08:08
@os-zhuang
os-zhuang enabled auto-merge September 13, 2026 08:09
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 13, 2026
Any commits made after this event will not be merged.
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 needs-user-decision size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

finding: skills/objectstack-query filters.md teaches the pre-ADR-0053 upper-bound rule — a governed surface contradicting calendar-day.ts

2 participants