Repository navigation
Commit 884e834
fix(skills): state the ADR-0053 upper-bound rule in filters.md by reference (#17943)
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
- P1 to P5 of the dispatch held on `84e6b05`: the content of lines
249-251, `calendar-day.ts` line 20, the `next_year_start|midnight` grep
hitting only :206 (alias list) and :250-:251 with `current_year_end` = 2
as lit control, PR #17651's landed wording, and no open PR touching
`skills/objectstack-query/**`. The one PR opened after 06:58Z, #17937,
touches a single test file under `packages/services/service-automation`.
- One correction: `filters.md` itself 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 #17651 and the triage
ruling asked to mirror, so it is used here.
- The decision-frame block on this tree matches the dispatch's md5
(`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](https://claude.ai/code/session_01DAcomhvR9kKizeYgg89Vo8)_
Co-authored-by: os-project-manager <pm@objectstack.ai>
Co-authored-by: Claude <noreply@anthropic.com>1 parent cc1b8ac commit 884e834
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
0 commit comments