Repository navigation
docs(skills): teach the {current_iso_week} period key in the query filter rules - #35743
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
…lter rules The Date Macros section of the published query skill listed the date macros and the session tokens only. It now names the period key beside them: the YYYY-Www value, the text-field-only rule, the INVALID_FILTER / 400 refusal on date, datetime and time fields, and the two date-only surfaces that refuse it. Five restatements in the same section pay first; the ratchet row moves by the measured remainder. One eval case pins the text-field / date-field split. Claude-Session: https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgTRf6qBRCqPh4JZaZL Area b1-D · 2026-11-20T05:09Z · final green head Brief handed to the contract reviewer — PR #35743 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTRf6qBRCqPh4JZaZL Contract reviewServed-tier: Read for this record: card #35496 (body and its three comments: triage 7009568590, claim 7030503012, os-dev-report 7030743883), PR #35743 (body, four-file list, net diff from merge base ① Derived judgments
② Semver level
③ Boundary flags
Read while checking the whole-value flag, not reviewed and not a finding on this diff: the client date-macro resolver does substitute a date macro embedded in a longer string ( SQL push-down: not applicable. The one code file changes a number and a comment. ④ Design judgmentNo must-fix, no should-fix.
The Period key paragraph (head
The other changed sentences:
Attempts to break it, none of which did:
Against the card's six items:
Nits, none affecting correctness or the contract:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgTRf6qBRCqPh4JZaZL Superseded by #35757, which folds this pull with the three other area b1-D skills-text pulls (#35743, #35746, #35750, #35751) onto current main at the seat request: one approval and one merge on the governed |
Requested by Sales · project thread
Fixes #35496
Clause-②: no
Metadata-protocol: none
Skills-docs: updated here
维护者速读
What changes
skills/objectstack-query/rules/filters.md, section "Date Macros (declarative filter metadata)":{current_iso_week}is a member ofPERIOD_KEY_TOKENS, not a date macro; it resolves to today's ISO week keyYYYY-Wwwin the workspace time zone, Monday-start weeks, ISO week-year at year edges (2027-01-01 is2026-W53); it is text, for a text field storing week keys; adate/datetime/timefield refuses it withINVALID_FILTER/ 400 like the literal key, and the date-field spelling is{current_week_start}/{current_week_end}; a date dashboard filter'sdefaultValueandcalendar.initialDaterefuse it, a text dashboard filter may default to it; there is no last- or next-week key.cost_week: '{current_iso_week}').resolveFilterPlaceholders()as the client resolver, the one call overresolveDateMacros(),resolvePeriodKeyTokens()andresolveContextTokens().isKnownFilterToken(tok), the one predicate that answers for all three vocabularies. The two predicates the file named before both answerfalseforcurrent_iso_week, so leaving them would have contradicted the new paragraph.skills/objectstack-query/evals/filters-pagination-search.json: eval 10, a text week-key field filtered with the token and a date field filtered with the week's boundaries, never with the token.scripts/check-skills-token-ratchet.mjs: thefilters.mdrow moves 2473 to 2596, the measured remainder (see the budget below)..changeset/35496-skills-filters-iso-week-key.md:@objectstack/skillspatch.Read first, by risk:
skills/objectstack-query/rules/filters.md, the Period key paragraph (the risky hunk: every clause is a claim about the runtime, sourced below).scripts/check-skills-token-ratchet.mjs, the comment over thefilters.mdrow (the deletion list and the arithmetic).skills/objectstack-query/evals/filters-pagination-search.json, eval 10.Two-minute check:
node scripts/check-skills-token-ratchet.mjs, expected lineskills/objectstack-query/rules/filters.md is 2596 tokens (ceiling 2596; headroom 0)and a passing verdict.Each sentence and where main says it (origin/main 598a34d)
packages/spec/src/data/date-macros.zod.ts:62-67and:179-181(PERIOD_KEY_TOKENS),:190-192YYYY-Www, workspace time zone, Monday-start weeks, ISO week-yearpackages/spec/src/data/date-macros.zod.ts:69-74and:344-348; server resolverpackages/core/src/utils/filter-tokens.ts:471-4732026-W53packages/core/src/utils/filter-tokens.test.ts:568(parity table row), spec prosedate-macros.zod.ts:72date-macros.zod.ts:75-80; positive controlpackages/objectql/src/engine-temporal-comparand-door.test.ts:646-647date/datetime/timerefuse it,INVALID_FILTER/ 400, like the literal keypackages/objectql/src/engine-temporal-comparand-door.test.ts:621-641(both wrappings, code and status asserted, the literal2026-W47in the same loop); over HTTPpackages/rest/src/data-temporal-write-real-day-iso.test.ts:385{current_week_start}/{current_week_end}on a date fielddate-macros.zod.ts:133(the two tokens); the same door test's title and its positive controldefaultValuerefuses it, a text one may default to itpackages/spec/src/ui/dashboard.test.ts:506-518;packages/spec/src/ui/dashboard.zod.ts:1663-1676calendar.initialDaterefuses itpackages/spec/src/ui/calendar-config-initial-date.test.ts:94ui/packages/core/src/utils/date-macros.ts:255(the same wrapper pattern);filter-tokens.test.ts:603-604resolveFilterPlaceholders()over the threeui/packages/core/src/utils/filter-tokens.ts:301-308; exported atui/packages/core/src/index.ts:221-234isKnownFilterToken(tok)packages/spec/src/data/context-tokens.zod.ts:333-335; listed inpackages/spec/api-surface/data.json:1057PERIOD_KEY_TOKENShas one member (date-macros.zod.ts:179-181)Whole-value only (card item 4, last sentence) is true on main (
filter-tokens.test.ts:607and:616,ui/packages/core/src/utils/date-macros.ts:255) and is not written again: the section's "Unknown tokens" paragraph already says a value that merely contains braces is a literal, for every token.Token and line budget
Standing ruling for
skills/**, quoted verbatim: 「A:先削重复,余额按实测提高」 (maintainer, 2026-10-27; ruling record 6513306068).Deleted first, all in the same section of
filters.md:// List-view / dashboard filter values, which repeated the sentence above its block.close_datewith{current_year_start}), a second showing of what the first block shows; the week key takes its place.filters.mdlinesfilters.mdbytes / tokensfilters.mdceiling rowSKILL.mdlines, summedskills/tree, linesTests
Text only; no package source changes, so no package test or ablation is owed. Local readings at head 47fe010:
node scripts/check-skills-token-ratchet.mjs: exit 0,59 authored bundle file(s) within their ceilings.node scripts/check-skills-token-ratchet.mjs --self-test: exit 0,104 cases pass(the script this diff edits).pnpm --filter @objectstack/spec run check:skill-refs,check:skill-docs,check:skill-served-sections: eachVERDICT command-exit 0under the verify lock.pnpm check:skill-links,check:skill-identifier-liveness,check:skill-compatibility,check:skill-frame-sync,check:pm-skill-id-lint,check:nul-bytes,check:doc-authoring,check:ratchet-remedy-authority,check:scripts-symbol-anchors,check:corpus-claim-drift,check:role-word,check:changeset-gate-self-tests,node scripts/check-empty-changeset.mjs --base origin/main,node scripts/check-changeset-no-major.mjs --base origin/main,node scripts/check-declaration-mirrors.mjs,node scripts/check-comment-mask-corpus.mjs: exit 0 each.node scripts/pm/overlap-check.mjs:VERDICT clean exit 0(one open pull shares the ratchet script and merges cleanly).NOT MEASURED:
check:skill-examples, reason:PREREQUISITE NOT MET, it reads built output and this worktree has none; the blocks this diff touches arewherefragments the gate skips by the file's own opening note. CI runs it.Acceptance notes
skills/objectstack-query/:current_weekhas no hit outside the new text;weekoutsidefilters.mdhits once,rules/aggregation.md:83("weeks are ISO-8601, starting Monday"), which agrees.current_iso_weekhad no hit underskills/before this diff.this_weekpreset the card offers as a date-field alternative. It is a date-range preset name, and where a preset is a legal filter comparand is a separate rule this pull did not measure; the two boundary tokens are the measured spelling.$containswith the token on a text field also resolves (door test line 648). True, and not worth its tokens.filter-tokens.ts:172, default UTC when the request carries none); the skill says "workspace time zone", the wording of the spec's own description table.Verification
dispatch-gates --ran: 19 of 65 derived families run locally; the 46 others are declared to CI. They are matched by the edit to onescripts/*.mjsceiling row (script-population gates) or are whole-tree families; none reads the skill text.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL