You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dashboard text global filter cannot default to the current ISO week (2026-W47-style period keys) #34938
An app's dashboards slice weekly data by a text period key (cost_week / supply_week, e.g. 2026-W46), because its weekly master data is keyed by ISO week rather than by a date. The dashboard's global text filter works (typing 2026-W46 + Enter narrows to that week). However:
it cannot default to the current ISO week, so on open the dashboard sums every week, and a "this week's sellable tonnage" view shows a multi-week total;
date filters do have relative presets (本周, 上周), but they do not apply to a text period key.
Ask
A dynamic default for a dashboard filter on a text field. This could be a macro such as {{currentIsoWeek}} / {{isoWeek(today())}}, or a CEL default evaluated at view time. Alternatively, allow a "relative ISO week" preset on a filter declared over a week-key field.
Consumer
The app's 「工厂原料占用」 and 「牌号 × 工厂可售量」 dashboards. The app has changed their wording to explain the filter and does not work around this.
First touch (R1200, 17:5xZ): p2 · domain:ui → pm:queue.
Theme: zh-CN customers. This asks for a dynamic default on a dashboard text filter (the current ISO week), for an app's weekly dashboards. It is a feature with a named consumer, not a break: the app has worded around it. So p2.
Ruling-ref: maintainer 2026-11-19T05:03Z on seat 5's decision card for #34938, option chosen verbatim: 「B 加一个固定占位符」. Analysis: project file objectstack-seat5/area-ux/data-2/decision-35045-35046-34938.md.
Execution (area data-2): add ONE fixed token for the current ISO week (suggested {current_iso_week}, resolving to YYYY-Www), in the same view-time token mechanism as the existing date macros, usable as a text filter default and in any filter condition. Loosening of a closed vocabulary, so Clause-②: yes. Only this one word: no expression defaults, no new week filter control. A static default (2026-W47) keeps working.
Claim: area ux-1 round 8 · 2026-11-19T06:40Z
Session: session_01Utp6CbSphdunq2aJq7ktuY
Account: os-bill
Area: ux-1 (moved from data-2 by the seat)
Branch: claude/issue-34938-current-iso-week-token
Worktree: objectstack-issue-34938
Domain: domain:ui (+ packages/spec vocabulary)
Seat: repo:objectstack#5
File surface: the filter-placeholder vocabulary in packages/spec/src/data/ (a sibling list next to date-macros.zod.ts, not inside DATE_MACRO_TOKENS) and its export; packages/spec/src/ui/dashboard.zod.ts (text default docblock only if needed); server resolver packages/core/src/utils/filter-tokens.ts (+ datetime.ts read-only reuse of bucketDateKey / isoWeekLabelFromCalendarDay); packages/lint/src/validate-filter-tokens.ts if it holds the known-token set; client resolver ui/packages/core/src/utils/date-macros.ts (or a sibling) and ui/packages/core/src/utils/dashboard-filters.ts (text box seeded with the resolved key); their tests; generated spec docs/references; content/docs/ (dashboards, filter placeholders); root .changeset/.
Container & model: M, mode:subagent, model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② suspect surface → contract review by the seat after L1-a), effort: xhigh (contract widening)
Clause-②: yes (widening: the closed filter-placeholder vocabulary gains one token)
Metadata-protocol: added
Responsibility: a dashboard text filter over an ISO-week period key (2026-W47) cannot default to the current week, so the dashboard opens on all weeks | the view-time placeholder mechanism ({today}, {current_week_start}; resolved on both client and server, closed vocabulary) and the analytics week-bucket label (YYYY-Www) already exist | zh-CN app authors with weekly master data keyed by ISO week
Thread-read: 7000277555
Premise: holds on origin/main1aac465fe1 (seat analysis read at de8d54975c; no change to the token files since per the card's history).
Pre-claim lane: packages/spec/src/** contract surface + packages/core + ui/packages/core → spec-lane widening executed in area ux-1 by the seat's move; contract review at the seat.
Pre-claim deps: none open. No Claim or os-bill dispatch on the card before this one.
Prior rulings read: maintainer ruling 2026-11-19T05:03Z, option B 「B 加一个固定占位符」 (record 7000277555) · seat analysis decision-35045-35046-34938.md decision 2 (ADR-0053 D-D / addendum D-G1, ADR-0032 :103/:106, date-macros.zod.ts / context-tokens.zod.ts module contracts, #30133 widening precedent) — execution of a ruling, no conflict.
Serial constraints cleared: no other ux-1 card touches these files; the dev runs overlap-check before the first push.
Scope: ONE token {current_iso_week} resolving to YYYY-Www (ISO week, Monday start, workspace time zone, ISO week-year at year edges) on server and client, one rule; kept out of DATE_MACRO_TOKENS so date defaults and calendar.initialDate still refuse it; usable as a text filter default (box shows the resolved key) and in any filter condition; a static 2026-W47 default keeps working. No expression defaults, no week filter control, no last/next-week tokens. Client/server parity pin incl. year-edge days. Fixes #34938.
{
"issue": 34938,
"status": "done",
"branch": "claude/issue-34938-current-iso-week-token",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35391",
"pr_number": 35391,
"final_head": "fa840834a0fa7bab6b99484992acee7896f660e4",
"session": "session_01Utp6CbSphdunq2aJq7ktuY",
"premise_still_valid": true,
"summary": "One placeholder, {current_iso_week} (also ${current_iso_week}), resolves to today's ISO-8601 week key YYYY-Www in the workspace zone (Monday start, ISO week-year at the year edges), per ruling B on record 7000277555. It is its own closed list, PERIOD_KEY_TOKENS in spec data/date-macros.zod.ts, outside DATE_MACRO_TOKENS, so date defaults, isDateMacroPlaceholder and calendar initialDate still refuse it; classifyFilterToken gains the kind period-key and isKnownFilterToken knows it (so lint, flow CRUD filter operands and the server resolver accept it). Server: resolveFilterTokens resolves it with core bucketDateKey(now, 'week', ctx.timezone), the analytics week label; client: resolvePeriodKeyTokens in @object-ui/core carries the same rule (it cannot import core), held equal by one 16-row parity table run on both sides, and resolveFilterPlaceholders plus resolveDashboardFilterDefs call it so a text filter box opens with the resolved key; a literal 2026-W47 default stays fixed. Docs: dashboards guide section with an os:check example, analytics and plugin-view paragraphs, regenerated date-macros and dashboard references; changeset spec minor, core/lint/@object-ui/core patch.",
"tests": "All at f3bf7beb08 (fa840834a0 changes only the changeset text). Reader test files per package, under os-verify-lock (VERDICT command-exit 0 on each run): spec 10 files / 1046 passed; core 6 / 392; lint 7 / 334; objectql 8 / 222; service-analytics 6 / 326 passed + 20 skipped; service-automation 1 / 65; driver-memory 2 / 78; driver-sql 2 / 79 + 2 skipped; formula 1 / 52; platform-objects 1 / 18; app-showcase 1 / 3; ui (core, plugin-dashboard, plugin-designer, grid, list, view, react, console, app-shell) 28 files / 437 passed + 6 skipped. New pins: the 16-row parity table (2020-12-31, 2021-01-03/04, 2024-12-30, 2025-12-29, 2026-11-19, 2026-12-31, 2027-01-01/03/04 and Tokyo, New York, Los Angeles, Shanghai zone rows) in core filter-tokens.test.ts and ui date-macros.test.ts; a sibling spec-parity pin date-macros.specTokens-30134.test.ts for PERIOD_KEY_TOKENS; spec classify/known/near-spelling and dashboard schema cases (date filter refuses both spellings, text filter keeps them and a literal key); lint no-finding cases; dashboard-filter seeding cases. Refusal case asserts code FILTER_TOKEN_UNKNOWN + status 400. Typecheck: spec, core, lint typecheck exit 0 (TC spec=0 core=0 lint=0); @object-ui/core type-check (includes tsconfig.test.json) VERDICT command-exit 0 after building @object-ui/types closure. Ablation NOT MEASURED: none run. The pins cover a new token; on base the door probe measured it as FILTER_TOKEN_UNKNOWN/400, so the resolve pins could not have passed there, but no pin was mutated and re-run.",
"gates": "Local derived subset: node scripts/pm/dispatch-gates.mjs --commands (no paths) = 120 families at fa840834a0 (same list as at f3bf7beb08); run, then --ran reconciliation exit 0: 'dispatch-gates --ran: 120 derived famil(ies) accounted for, 118 run, 2 NOT-MEASURED'. 118 exit 0 (each exit captured to a per-command log before any pipe). check:skill-examples first exit 3 (packages/client-react had no dist), rerun after building it exit 0 (346 prose examples type-check, incl. the new dashboards example). NOT MEASURED: check:dual-build-cjs-loads (PREREQUISITE NOT MET, needs every package dist; whole-repo build left to CI). NOT MEASURED: pnpm --dir ui exec vitest run scripts/ (170/171 files passed; unit-registry-absence-collision failed only on an unbuilt @objectstack/client, and after building it that file passed 15/15). Changeset-reading families re-run at fa840834a0: check-changeset-no-major, check-empty-changeset, check:nul-bytes, check-issue-citations, all exit 0. Also: spec check:generated green after gen:api-surface/gen:export-origins/gen:docs; ui check:new-line-citations 0 new citations exit 0; overlap-check VERDICT clean exit 0 before each push. CI check-runs on fa840834a0 at report time: 20 pending (Type Check workspace/source/consumer/debt ledger, Lint ESLint, Lint PM dispatch-gates, Lint repo and tooling gates, Lint docs and code guards, Lint CI release and engine gates, scoped lints and others), 5 skipped (queue verdicts, opt-in smoke and upgrade harness, schedule gate): in_progress, not awaited. Note: dispatch-gates warned the first derivation was from a tree 5 commits behind origin/main, with only scripts/pm/check-skill-line-ratchet.mjs and scripts/pm/label-write.mjs changed across that range (neither in the derived list); branch not merged with main.",
"dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0: no MCP GitHub calls",
"api_writes": "2 relay strokes, 3 platform writes: (1) POST /repos/objectstack-ai/objectstack/dispatches carrying pr_create, executed by run 44482850703 as POST /repos/objectstack-ai/objectstack/pulls (draft #35391) + POST /repos/objectstack-ai/objectstack/issues/35391/assignees (os-bill), read-back 9935 bytes sent = 9935 stored; (2) this os-dev-report comment, POST /repos/objectstack-ai/objectstack/issues/34938/comments via scripts/pm/post-stamped.mjs. git push x3 to the branch (not REST). Reads only otherwise (claim comment 7001845808, PR read-back, check-runs).",
"diff_lines": "26 files, +737 / -39 = 776 changed lines vs merge base c05a8a01c9, generated included; generated share 4 files +46 / -2 (packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, content/docs/references/data/date-macros.mdx, content/docs/references/ui/dashboard.mdx)",
"skills_paths_touched": "none: no path under skills/** in the diff and no generator wrote there (check:skill-refs, check:skill-served-sections, check:skill-examples green). PR body declares Skills-docs: follow-up owed, skills/objectstack-query/rules/filters.md (its Date Macros vocabulary section should name {current_iso_week} as a period key, text not a date).",
"temporal_comparand_finding": "Measured with engine.find on SqlDriver (SQLite) and InMemoryDriver, identical answers, now pinned 2026-11-19. The door does NOT refuse {current_iso_week} on a temporal column, and does not read it as a date: the resolved key reaches the driver and is compared as TEXT. placed_on (date) $eq -> 200 [], $gte -> 200 [], $lt -> 200 every row; opened_at (datetime) the same three answers; opens_at (time) $gt -> 200 []. The literal '2026-W47' on the same columns is refused INVALID_FILTER/400 by the door. Text column cost_week $eq / $contains -> the W47 row, correct. On base the token was FILTER_TOKEN_UNKNOWN/400. Why: core isUninterpretableTemporalComparand steps around every placeholder as written (classifyFilterToken !== null), and the post-resolution judge (judgeResolvedToken) checks only date-macro kinds. Control: {current_user_id} on placed_on answers the same shape ($eq [], $lt every row), so this is a pre-existing class, not new to period keys; {current_week_start} $gte gives the W47 row; unknown {current_iso_wek} -> FILTER_TOKEN_UNKNOWN/400. Meets the dispatch's bar (refused or text, never silently as a date) on the text side; door not widened. Suggested fix site for the seat: the core temporal-comparand step-around, stepping around date-macro placeholders only and judging period-key and context placeholders as written. Docs say to use the token only on week-key fields. Not measured over HTTP.",
"deviations": "(1) Fence extensions, all named in the PR Acceptance notes: packages/lint/src/rule-explanations.ts (its 'exactly two vocabularies' text became false with this change); ui/packages/core/src/utils/filter-tokens.ts (the client sibling resolver, resolveFilterPlaceholders); content/docs/data-modeling/analytics.mdx and content/docs/frontend/plugins/plugin-view.mdx (filter-placeholder paragraphs). (2) Conflict, dispatch vs os-dev.md: the dispatch caps the 维护者速读 at four Chinese lines with no code names, paths or commands; os-dev.md requires the six fixed lines (先看 names files, 两分钟验证 is one command). Followed os-dev.md (it prevails on conflict) and wrote the six lines; the seat finalises it as a comment. (3) Commit trailers are model-free per os-dev.md and the dispatch, not the harness reminder's model-named Co-Authored-By. (4) Changeset levels as dispatched (spec minor, core/lint/@object-ui/core patch): checked against the Check Changeset rule, which needs a declared kind to grade at least one moved package minor. (5) Claim Clause-② line copied verbatim into PR body and changeset. (6) Not changed, outside the fence: the spec flow-value-slot-template.ts docblock says a CRUD filter placeholder is 'a context token or a date macro' (isKnownFilterToken now also admits period keys); lint hint text untouched; no near-miss suggestion for currentIsoWeek (would change the published CONTEXT_TOKEN_SUGGESTIONS type). (7) Overlap-check at fa840834a0: open PRs #35387 (api-surface/export-origins data shards) and #35378 (rule-explanations.ts) share files, both merge cleanly. (8) Scratch door probe deleted; worktree removed after this report.",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"class: a · reach: engine.find on SqlDriver(SQLite) and InMemoryDriver only, no public door measured (HTTP not run), so noted rather than filed unless the seat measures it · evidence: a known placeholder on a date/datetime/time column is stepped around by the temporal-comparand door and compared as text: {current_user_id} or {current_iso_week} with $lt on a date column answers 200 with every row, $eq/$gte answer 200 [], while the same literal value is refused INVALID_FILTER/400 · dedupe words: temporal comparand placeholder step-around, context token date column, isUninterpretableTemporalComparand, judgeResolvedToken, period-key",
"carrier: none · noted, not filed: a chart's compare-to (previous period) shift leaves {current_iso_week} unshifted, so the comparison series filters the same week; not measured in a UI",
"carrier: seat · Skills-docs follow-up owed: skills/objectstack-query/rules/filters.md should name {current_iso_week}",
"carrier: none · noted: lint does not walk dashboard globalFilters[].defaultValue, so a token typo there surfaces only at query time as FILTER_TOKEN_UNKNOWN/400"
]
}
{
"issue": 34938,
"status": "done",
"branch": "claude/issue-34938-current-iso-week-token",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35391",
"pr_number": 35391,
"round": "fix round for contract review 7003932618 (S1, N1, N3; N2 dropped by the seat)",
"final_head": "6b8fc7b5630f6db6aa1b05652a9f626caeb633ee",
"session": "session_01Utp6CbSphdunq2aJq7ktuY",
"premise_still_valid": true,
"summary": "S1 closed in this PR. Core isUninterpretableTemporalComparand no longer steps around a period-key placeholder: it judges it as written. {current_iso_week} is not a calendar day, an instant or a wall clock, so on a date, datetime or time column it now gets the literal '2026-W47''s refusal, INVALID_FILTER/400, before any driver read. The core predicate is the narrowest correct place, because it is the one rule both doors ask: the engine where / per-aggregation filter / having door and the analytics raw-SQL decline. judgeResolvedToken gains only a docblock clause. Date macros, unknown placeholders and the context tokens are still stepped around; the context-token half stays with #35394. The record validator's write door already refused every placeholder through its readable gate, so its verdicts do not change. The docs, the changeset and the spec module doc now say 'refused' where they said 'compared as text, so the answer is wrong'. N1: the changeset carries the 17.5.0 compile-error sentence. N3: the lint hints and the inline comment name the week key and three vocabularies. N2 dropped as instructed; flow-value-slot-template.ts is untouched. The PR body gained a '## Fix round (contract review 7003932618)' section before the footer, written through the relay issue_patch; the 维护者速读 and everything else are unchanged, and the last line is the signed trailer.",
"files_changed_this_round": [
"packages/core/src/utils/temporal-comparand.ts (the fix: placeholder.kind !== 'period-key' arm, docblock)",
"packages/core/src/utils/temporal-comparand.test.ts (pin)",
"packages/objectql/src/temporal-comparand-door.ts (judgeResolvedToken docblock only)",
"packages/objectql/src/engine-temporal-comparand-door.test.ts (pin, recording driver)",
"packages/rest/src/data-temporal-write-real-day-iso.test.ts (pin, REST over SqlDriver)",
"packages/lint/src/validate-filter-tokens.ts (N3 hint text and comment)",
"packages/lint/src/validate-filter-tokens.test.ts (the pinned hint line)",
"packages/spec/src/data/date-macros.zod.ts (module doc: the door refuses it)",
"content/docs/references/data/date-macros.mdx (regenerated by gen:docs)",
"content/docs/ui/dashboards.mdx (refused, not compared as text)",
".changeset/34938-current-iso-week-token.md (refused; N1 sentence)"
],
"tests": "Pins, at 6b8fc7b563 under os-verify-lock (VERDICT command-exit 0). (1) Core temporal-comparand.test.ts, 28/28 passed. It refuses every PERIOD_KEY_TOKENS member in both spellings, plus the literal key, on date, datetime and time; as controls, {current_week_start}, {today}, {30_days_ago} and the unknown {current_iso_wek} are still stepped around. (2) objectql engine-temporal-comparand-door.test.ts with the recording driver, 15/15 passed. On due_on (date), created_date (datetime) and opens_at (time), in both spellings, these are refused INVALID_FILTER/400 with 0 driver reads: $eq, $lt, $gte, $gt, implicit equality and an $in member. Positive controls in the same test: text $eq and implicit equality return the W47 row; text $contains reaches the driver as 2026-W47; {current_week_start} on a date column resolves to 2026-11-16 and returns the W47 row. (3) rest data-temporal-write-real-day-iso.test.ts over SqlDriver (SQLite), 7 passed, plus 7 skipped in the PostgreSQL cell, which needs OS_TEST_POSTGRES_URL. On placed_on, opened_at and slot, $eq, $lt and $gte in both spellings answer 400 INVALID_FILTER naming the field, with 0 reads of the object. Controls: text $eq and $contains return k-w47, and {current_week_start} on the date field returns k-w47. InMemoryDriver has no live pin: a new test file that imports @objectstack/driver-memory needs a census ruling (scripts/driver-memory-census.ledger.json). The refusal precedes every driver, which the recording-driver pin asserts with 0 reads, and the pre-fix reading on InMemoryDriver matched SQLite. ABLATION, run once and wrapped by scripts/ablation-replace.mjs with my own EXIT/INT/TERM trap. Anchor \"if (placeholder !== null && placeholder.kind !== 'period-key') return false;\" became \"if (placeholder !== null) return false;\": anchor x1 -> x0, replacement x0 -> x1, blob 7032d83c72e5 -> 1d48a8716483. pnpm --filter @objectstack/core build, then ablation-dist-preflight --absent: marker absent from all 20 built files. The pins then went red, each on its new case: core 1 failed / 27 passed ('date {current_iso_week}: expected false to be true'); objectql 1 failed / 14 passed ('due_on $eq {current_iso_week}: expected null not to be null'); rest 1 failed / 6 passed / 7 skipped ('placed_on $eq ...: expected 200 to be 400'). Restore was git checkout HEAD -- on the absolute path. The HEAD blob 7032d83c72e5 equals the disk blob, git diff HEAD is empty, the core rebuild preflight finds the marker in 2 built files, and the tree is clean. Pins green again: 28/28, 15/15, 7 passed + 7 skipped. Readers at the same head: core 3 files / 214 passed; objectql 14 / 297; rest 4 / 26 passed + 18 skipped; service-analytics 10 / 353 passed + 6 skipped; lint 2 / 45, including the check that every hint line is at most 200 characters; spec 2 / 56. Typecheck core, lint, objectql and rest: all exit 0. spec check:generated exit 0 after gen:docs. A first check:generated run under no heap cap died with 'tsc failed without diagnostics' in check:test-typecheck; that gate alone, and check:generated rerun with NODE_OPTIONS=--max-old-space-size=4096, both exit 0.",
"gates": "node scripts/pm/dispatch-gates.mjs --commands at 6b8fc7b563 derives 123 families, 3 more than last round: check-engine-split-ratio --self-test, check:durability-log-level and check:live-db-isolation. I ran all of them in the background, each exit code captured to its own log. The --ran reconciliation exits 0: '123 derived famil(ies) accounted for — 120 run, 3 NOT-MEASURED'. check:skill-examples exited 3 until client and client-react were built in this new worktree; the rerun exits 0, with 346 examples. NOT MEASURED: check:dual-build-cjs-loads, which needs every package dist. NOT MEASURED: check:type-check-debt. Its re-measure queued a whole-repo turbo build on the shared lock, so I stopped that wait (exit 3 recorded) and leave the wide build to CI. NOT MEASURED: ui vitest run scripts/, because no ui file changed this round; at fa840834a0 it read 170/171 files, and the one prerequisite failure passed 15/15. overlap-check: VERDICT clean exit 0, with origin/main and #35378 merging cleanly. CI on 6b8fc7b563 at report time: 7 success, 11 skipped, 23 pending. Status in_progress, not awaited.",
"dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "This round: 2 relay strokes. (1) POST /repos/objectstack-ai/objectstack/dispatches carrying issue_patch #35391 (the PR body). Run 44501494741 read back 15152 bytes sent = 15152 stored. (2) This os-dev-report comment: POST /issues/34938/comments, sent through post-stamped.mjs and the relay. git push 1 time, to 6b8fc7b563. Reads only otherwise: review comment 7003932618, the PR body and check-runs.",
"diff_lines": "This round, fa840834a0..6b8fc7b563: 11 files, +201 / -20. Generated share: content/docs/references/data/date-macros.mdx, +3 / -1. Whole PR against merge base c05a8a01c9: 31 files, +931 / -52 = 983 changed lines, generated included.",
"skills_paths_touched": "none",
"temporal_comparand_finding": "Closed for period keys. On a date, datetime or time column, {current_iso_week} now answers INVALID_FILTER/400 before any driver read, the same as the literal key. Pinned on the engine door with a recording driver, and on the REST query door over SqlDriver (SQLite; PostgreSQL when OS_TEST_POSTGRES_URL is set). The context-token class is unchanged and remains #35394's.",
"deviations": "(1) InMemoryDriver: no live pin. This is because of the driver-memory census gate; it is not a measurement gap in the door, whose refusal precedes every driver. (2) The fix-round section went in before the existing footer, so the signed trailer stays the last line. (3) I stopped my own gate's whole-repo build wait (check:type-check-debt) and recorded it NOT MEASURED. (4) The worktree was recreated from the pushed branch at fa840834a0 and removed again after this round, without --force.",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
}
Activity
objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
First touch (R1200, 17:5xZ): p2 · domain:ui →
pm:queue.Theme: zh-CN customers. This asks for a dynamic default on a dashboard text filter (the current ISO week), for an app's weekly dashboards. It is a feature with a named consumer, not a break: the app has worded around it. So p2.
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ
Seat ruling record · 2026-11-19T05:04Z
Ruling-ref: maintainer 2026-11-19T05:03Z on seat 5's decision card for #34938, option chosen verbatim: 「B 加一个固定占位符」. Analysis: project file
objectstack-seat5/area-ux/data-2/decision-35045-35046-34938.md.Execution (area data-2): add ONE fixed token for the current ISO week (suggested
{current_iso_week}, resolving toYYYY-Www), in the same view-time token mechanism as the existing date macros, usable as a text filter default and in any filter condition. Loosening of a closed vocabulary, soClause-②: yes. Only this one word: no expression defaults, no new week filter control. A static default (2026-W47) keeps working.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
Claim: area ux-1 round 8 · 2026-11-19T06:40Z
Session:
session_01Utp6CbSphdunq2aJq7ktuYAccount:
os-billArea: ux-1 (moved from data-2 by the seat)
Branch:
claude/issue-34938-current-iso-week-tokenWorktree:
objectstack-issue-34938Domain:
domain:ui(+packages/specvocabulary)Seat:
repo:objectstack#5File surface: the filter-placeholder vocabulary in
packages/spec/src/data/(a sibling list next todate-macros.zod.ts, not insideDATE_MACRO_TOKENS) and its export;packages/spec/src/ui/dashboard.zod.ts(text default docblock only if needed); server resolverpackages/core/src/utils/filter-tokens.ts(+datetime.tsread-only reuse ofbucketDateKey/isoWeekLabelFromCalendarDay);packages/lint/src/validate-filter-tokens.tsif it holds the known-token set; client resolverui/packages/core/src/utils/date-macros.ts(or a sibling) andui/packages/core/src/utils/dashboard-filters.ts(text box seeded with the resolved key); their tests; generated spec docs/references;content/docs/(dashboards, filter placeholders); root.changeset/.Container & model: M,
mode:subagent,model: default tier(dispatch-gates--tier: no path-derived mandate; Clause-② suspect surface → contract review by the seat after L1-a),effort: xhigh(contract widening)Clause-②: yes (widening: the closed filter-placeholder vocabulary gains one token)
Metadata-protocol: added
Responsibility: a dashboard text filter over an ISO-week period key (
2026-W47) cannot default to the current week, so the dashboard opens on all weeks | the view-time placeholder mechanism ({today},{current_week_start}; resolved on both client and server, closed vocabulary) and the analytics week-bucket label (YYYY-Www) already exist | zh-CN app authors with weekly master data keyed by ISO weekThread-read: 7000277555
Premise: holds on
origin/main1aac465fe1(seat analysis read atde8d54975c; no change to the token files since per the card's history).Pre-claim lane:
packages/spec/src/**contract surface +packages/core+ui/packages/core→ spec-lane widening executed in area ux-1 by the seat's move; contract review at the seat.Pre-claim deps: none open. No Claim or os-bill dispatch on the card before this one.
Prior rulings read: maintainer ruling 2026-11-19T05:03Z, option B 「B 加一个固定占位符」 (record 7000277555) · seat analysis
decision-35045-35046-34938.mddecision 2 (ADR-0053 D-D / addendum D-G1, ADR-0032 :103/:106,date-macros.zod.ts/context-tokens.zod.tsmodule contracts, #30133 widening precedent) — execution of a ruling, no conflict.Serial constraints cleared: no other ux-1 card touches these files; the dev runs overlap-check before the first push.
Scope: ONE token
{current_iso_week}resolving toYYYY-Www(ISO week, Monday start, workspace time zone, ISO week-year at year edges) on server and client, one rule; kept out ofDATE_MACRO_TOKENSso date defaults andcalendar.initialDatestill refuse it; usable as a text filter default (box shows the resolved key) and in any filter condition; a static2026-W47default keeps working. No expression defaults, no week filter control, no last/next-week tokens. Client/server parity pin incl. year-edge days.Fixes #34938.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
os-dev-report
{ "issue": 34938, "status": "done", "branch": "claude/issue-34938-current-iso-week-token", "pr": "https://github.com/objectstack-ai/objectstack/pull/35391", "pr_number": 35391, "final_head": "fa840834a0fa7bab6b99484992acee7896f660e4", "session": "session_01Utp6CbSphdunq2aJq7ktuY", "premise_still_valid": true, "summary": "One placeholder, {current_iso_week} (also ${current_iso_week}), resolves to today's ISO-8601 week key YYYY-Www in the workspace zone (Monday start, ISO week-year at the year edges), per ruling B on record 7000277555. It is its own closed list, PERIOD_KEY_TOKENS in spec data/date-macros.zod.ts, outside DATE_MACRO_TOKENS, so date defaults, isDateMacroPlaceholder and calendar initialDate still refuse it; classifyFilterToken gains the kind period-key and isKnownFilterToken knows it (so lint, flow CRUD filter operands and the server resolver accept it). Server: resolveFilterTokens resolves it with core bucketDateKey(now, 'week', ctx.timezone), the analytics week label; client: resolvePeriodKeyTokens in @object-ui/core carries the same rule (it cannot import core), held equal by one 16-row parity table run on both sides, and resolveFilterPlaceholders plus resolveDashboardFilterDefs call it so a text filter box opens with the resolved key; a literal 2026-W47 default stays fixed. Docs: dashboards guide section with an os:check example, analytics and plugin-view paragraphs, regenerated date-macros and dashboard references; changeset spec minor, core/lint/@object-ui/core patch.", "tests": "All at f3bf7beb08 (fa840834a0 changes only the changeset text). Reader test files per package, under os-verify-lock (VERDICT command-exit 0 on each run): spec 10 files / 1046 passed; core 6 / 392; lint 7 / 334; objectql 8 / 222; service-analytics 6 / 326 passed + 20 skipped; service-automation 1 / 65; driver-memory 2 / 78; driver-sql 2 / 79 + 2 skipped; formula 1 / 52; platform-objects 1 / 18; app-showcase 1 / 3; ui (core, plugin-dashboard, plugin-designer, grid, list, view, react, console, app-shell) 28 files / 437 passed + 6 skipped. New pins: the 16-row parity table (2020-12-31, 2021-01-03/04, 2024-12-30, 2025-12-29, 2026-11-19, 2026-12-31, 2027-01-01/03/04 and Tokyo, New York, Los Angeles, Shanghai zone rows) in core filter-tokens.test.ts and ui date-macros.test.ts; a sibling spec-parity pin date-macros.specTokens-30134.test.ts for PERIOD_KEY_TOKENS; spec classify/known/near-spelling and dashboard schema cases (date filter refuses both spellings, text filter keeps them and a literal key); lint no-finding cases; dashboard-filter seeding cases. Refusal case asserts code FILTER_TOKEN_UNKNOWN + status 400. Typecheck: spec, core, lint typecheck exit 0 (TC spec=0 core=0 lint=0); @object-ui/core type-check (includes tsconfig.test.json) VERDICT command-exit 0 after building @object-ui/types closure. Ablation NOT MEASURED: none run. The pins cover a new token; on base the door probe measured it as FILTER_TOKEN_UNKNOWN/400, so the resolve pins could not have passed there, but no pin was mutated and re-run.", "gates": "Local derived subset: node scripts/pm/dispatch-gates.mjs --commands (no paths) = 120 families at fa840834a0 (same list as at f3bf7beb08); run, then --ran reconciliation exit 0: 'dispatch-gates --ran: 120 derived famil(ies) accounted for, 118 run, 2 NOT-MEASURED'. 118 exit 0 (each exit captured to a per-command log before any pipe). check:skill-examples first exit 3 (packages/client-react had no dist), rerun after building it exit 0 (346 prose examples type-check, incl. the new dashboards example). NOT MEASURED: check:dual-build-cjs-loads (PREREQUISITE NOT MET, needs every package dist; whole-repo build left to CI). NOT MEASURED: pnpm --dir ui exec vitest run scripts/ (170/171 files passed; unit-registry-absence-collision failed only on an unbuilt @objectstack/client, and after building it that file passed 15/15). Changeset-reading families re-run at fa840834a0: check-changeset-no-major, check-empty-changeset, check:nul-bytes, check-issue-citations, all exit 0. Also: spec check:generated green after gen:api-surface/gen:export-origins/gen:docs; ui check:new-line-citations 0 new citations exit 0; overlap-check VERDICT clean exit 0 before each push. CI check-runs on fa840834a0 at report time: 20 pending (Type Check workspace/source/consumer/debt ledger, Lint ESLint, Lint PM dispatch-gates, Lint repo and tooling gates, Lint docs and code guards, Lint CI release and engine gates, scoped lints and others), 5 skipped (queue verdicts, opt-in smoke and upgrade harness, schedule gate): in_progress, not awaited. Note: dispatch-gates warned the first derivation was from a tree 5 commits behind origin/main, with only scripts/pm/check-skill-line-ratchet.mjs and scripts/pm/label-write.mjs changed across that range (neither in the derived list); branch not merged with main.", "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm", "mcp_calls": "0: no MCP GitHub calls", "api_writes": "2 relay strokes, 3 platform writes: (1) POST /repos/objectstack-ai/objectstack/dispatches carrying pr_create, executed by run 44482850703 as POST /repos/objectstack-ai/objectstack/pulls (draft #35391) + POST /repos/objectstack-ai/objectstack/issues/35391/assignees (os-bill), read-back 9935 bytes sent = 9935 stored; (2) this os-dev-report comment, POST /repos/objectstack-ai/objectstack/issues/34938/comments via scripts/pm/post-stamped.mjs. git push x3 to the branch (not REST). Reads only otherwise (claim comment 7001845808, PR read-back, check-runs).", "diff_lines": "26 files, +737 / -39 = 776 changed lines vs merge base c05a8a01c9, generated included; generated share 4 files +46 / -2 (packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, content/docs/references/data/date-macros.mdx, content/docs/references/ui/dashboard.mdx)", "skills_paths_touched": "none: no path under skills/** in the diff and no generator wrote there (check:skill-refs, check:skill-served-sections, check:skill-examples green). PR body declares Skills-docs: follow-up owed, skills/objectstack-query/rules/filters.md (its Date Macros vocabulary section should name {current_iso_week} as a period key, text not a date).", "temporal_comparand_finding": "Measured with engine.find on SqlDriver (SQLite) and InMemoryDriver, identical answers, now pinned 2026-11-19. The door does NOT refuse {current_iso_week} on a temporal column, and does not read it as a date: the resolved key reaches the driver and is compared as TEXT. placed_on (date) $eq -> 200 [], $gte -> 200 [], $lt -> 200 every row; opened_at (datetime) the same three answers; opens_at (time) $gt -> 200 []. The literal '2026-W47' on the same columns is refused INVALID_FILTER/400 by the door. Text column cost_week $eq / $contains -> the W47 row, correct. On base the token was FILTER_TOKEN_UNKNOWN/400. Why: core isUninterpretableTemporalComparand steps around every placeholder as written (classifyFilterToken !== null), and the post-resolution judge (judgeResolvedToken) checks only date-macro kinds. Control: {current_user_id} on placed_on answers the same shape ($eq [], $lt every row), so this is a pre-existing class, not new to period keys; {current_week_start} $gte gives the W47 row; unknown {current_iso_wek} -> FILTER_TOKEN_UNKNOWN/400. Meets the dispatch's bar (refused or text, never silently as a date) on the text side; door not widened. Suggested fix site for the seat: the core temporal-comparand step-around, stepping around date-macro placeholders only and judging period-key and context placeholders as written. Docs say to use the token only on week-key fields. Not measured over HTTP.", "deviations": "(1) Fence extensions, all named in the PR Acceptance notes: packages/lint/src/rule-explanations.ts (its 'exactly two vocabularies' text became false with this change); ui/packages/core/src/utils/filter-tokens.ts (the client sibling resolver, resolveFilterPlaceholders); content/docs/data-modeling/analytics.mdx and content/docs/frontend/plugins/plugin-view.mdx (filter-placeholder paragraphs). (2) Conflict, dispatch vs os-dev.md: the dispatch caps the 维护者速读 at four Chinese lines with no code names, paths or commands; os-dev.md requires the six fixed lines (先看 names files, 两分钟验证 is one command). Followed os-dev.md (it prevails on conflict) and wrote the six lines; the seat finalises it as a comment. (3) Commit trailers are model-free per os-dev.md and the dispatch, not the harness reminder's model-named Co-Authored-By. (4) Changeset levels as dispatched (spec minor, core/lint/@object-ui/core patch): checked against the Check Changeset rule, which needs a declared kind to grade at least one moved package minor. (5) Claim Clause-② line copied verbatim into PR body and changeset. (6) Not changed, outside the fence: the spec flow-value-slot-template.ts docblock says a CRUD filter placeholder is 'a context token or a date macro' (isKnownFilterToken now also admits period keys); lint hint text untouched; no near-miss suggestion for currentIsoWeek (would change the published CONTEXT_TOKEN_SUGGESTIONS type). (7) Overlap-check at fa840834a0: open PRs #35387 (api-surface/export-origins data shards) and #35378 (rule-explanations.ts) share files, both merge cleanly. (8) Scratch door probe deleted; worktree removed after this report.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: engine.find on SqlDriver(SQLite) and InMemoryDriver only, no public door measured (HTTP not run), so noted rather than filed unless the seat measures it · evidence: a known placeholder on a date/datetime/time column is stepped around by the temporal-comparand door and compared as text: {current_user_id} or {current_iso_week} with $lt on a date column answers 200 with every row, $eq/$gte answer 200 [], while the same literal value is refused INVALID_FILTER/400 · dedupe words: temporal comparand placeholder step-around, context token date column, isUninterpretableTemporalComparand, judgeResolvedToken, period-key", "carrier: none · noted, not filed: a chart's compare-to (previous period) shift leaves {current_iso_week} unshifted, so the comparison series filters the same week; not measured in a UI", "carrier: seat · Skills-docs follow-up owed: skills/objectstack-query/rules/filters.md should name {current_iso_week}", "carrier: none · noted: lint does not walk dashboard globalFilters[].defaultValue, so a token typo there surfaces only at query time as FILTER_TOKEN_UNKNOWN/400" ] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
os-dev-report
{ "issue": 34938, "status": "done", "branch": "claude/issue-34938-current-iso-week-token", "pr": "https://github.com/objectstack-ai/objectstack/pull/35391", "pr_number": 35391, "round": "fix round for contract review 7003932618 (S1, N1, N3; N2 dropped by the seat)", "final_head": "6b8fc7b5630f6db6aa1b05652a9f626caeb633ee", "session": "session_01Utp6CbSphdunq2aJq7ktuY", "premise_still_valid": true, "summary": "S1 closed in this PR. Core isUninterpretableTemporalComparand no longer steps around a period-key placeholder: it judges it as written. {current_iso_week} is not a calendar day, an instant or a wall clock, so on a date, datetime or time column it now gets the literal '2026-W47''s refusal, INVALID_FILTER/400, before any driver read. The core predicate is the narrowest correct place, because it is the one rule both doors ask: the engine where / per-aggregation filter / having door and the analytics raw-SQL decline. judgeResolvedToken gains only a docblock clause. Date macros, unknown placeholders and the context tokens are still stepped around; the context-token half stays with #35394. The record validator's write door already refused every placeholder through its readable gate, so its verdicts do not change. The docs, the changeset and the spec module doc now say 'refused' where they said 'compared as text, so the answer is wrong'. N1: the changeset carries the 17.5.0 compile-error sentence. N3: the lint hints and the inline comment name the week key and three vocabularies. N2 dropped as instructed; flow-value-slot-template.ts is untouched. The PR body gained a '## Fix round (contract review 7003932618)' section before the footer, written through the relay issue_patch; the 维护者速读 and everything else are unchanged, and the last line is the signed trailer.", "files_changed_this_round": [ "packages/core/src/utils/temporal-comparand.ts (the fix: placeholder.kind !== 'period-key' arm, docblock)", "packages/core/src/utils/temporal-comparand.test.ts (pin)", "packages/objectql/src/temporal-comparand-door.ts (judgeResolvedToken docblock only)", "packages/objectql/src/engine-temporal-comparand-door.test.ts (pin, recording driver)", "packages/rest/src/data-temporal-write-real-day-iso.test.ts (pin, REST over SqlDriver)", "packages/lint/src/validate-filter-tokens.ts (N3 hint text and comment)", "packages/lint/src/validate-filter-tokens.test.ts (the pinned hint line)", "packages/spec/src/data/date-macros.zod.ts (module doc: the door refuses it)", "content/docs/references/data/date-macros.mdx (regenerated by gen:docs)", "content/docs/ui/dashboards.mdx (refused, not compared as text)", ".changeset/34938-current-iso-week-token.md (refused; N1 sentence)" ], "tests": "Pins, at 6b8fc7b563 under os-verify-lock (VERDICT command-exit 0). (1) Core temporal-comparand.test.ts, 28/28 passed. It refuses every PERIOD_KEY_TOKENS member in both spellings, plus the literal key, on date, datetime and time; as controls, {current_week_start}, {today}, {30_days_ago} and the unknown {current_iso_wek} are still stepped around. (2) objectql engine-temporal-comparand-door.test.ts with the recording driver, 15/15 passed. On due_on (date), created_date (datetime) and opens_at (time), in both spellings, these are refused INVALID_FILTER/400 with 0 driver reads: $eq, $lt, $gte, $gt, implicit equality and an $in member. Positive controls in the same test: text $eq and implicit equality return the W47 row; text $contains reaches the driver as 2026-W47; {current_week_start} on a date column resolves to 2026-11-16 and returns the W47 row. (3) rest data-temporal-write-real-day-iso.test.ts over SqlDriver (SQLite), 7 passed, plus 7 skipped in the PostgreSQL cell, which needs OS_TEST_POSTGRES_URL. On placed_on, opened_at and slot, $eq, $lt and $gte in both spellings answer 400 INVALID_FILTER naming the field, with 0 reads of the object. Controls: text $eq and $contains return k-w47, and {current_week_start} on the date field returns k-w47. InMemoryDriver has no live pin: a new test file that imports @objectstack/driver-memory needs a census ruling (scripts/driver-memory-census.ledger.json). The refusal precedes every driver, which the recording-driver pin asserts with 0 reads, and the pre-fix reading on InMemoryDriver matched SQLite. ABLATION, run once and wrapped by scripts/ablation-replace.mjs with my own EXIT/INT/TERM trap. Anchor \"if (placeholder !== null && placeholder.kind !== 'period-key') return false;\" became \"if (placeholder !== null) return false;\": anchor x1 -> x0, replacement x0 -> x1, blob 7032d83c72e5 -> 1d48a8716483. pnpm --filter @objectstack/core build, then ablation-dist-preflight --absent: marker absent from all 20 built files. The pins then went red, each on its new case: core 1 failed / 27 passed ('date {current_iso_week}: expected false to be true'); objectql 1 failed / 14 passed ('due_on $eq {current_iso_week}: expected null not to be null'); rest 1 failed / 6 passed / 7 skipped ('placed_on $eq ...: expected 200 to be 400'). Restore was git checkout HEAD -- on the absolute path. The HEAD blob 7032d83c72e5 equals the disk blob, git diff HEAD is empty, the core rebuild preflight finds the marker in 2 built files, and the tree is clean. Pins green again: 28/28, 15/15, 7 passed + 7 skipped. Readers at the same head: core 3 files / 214 passed; objectql 14 / 297; rest 4 / 26 passed + 18 skipped; service-analytics 10 / 353 passed + 6 skipped; lint 2 / 45, including the check that every hint line is at most 200 characters; spec 2 / 56. Typecheck core, lint, objectql and rest: all exit 0. spec check:generated exit 0 after gen:docs. A first check:generated run under no heap cap died with 'tsc failed without diagnostics' in check:test-typecheck; that gate alone, and check:generated rerun with NODE_OPTIONS=--max-old-space-size=4096, both exit 0.", "gates": "node scripts/pm/dispatch-gates.mjs --commands at 6b8fc7b563 derives 123 families, 3 more than last round: check-engine-split-ratio --self-test, check:durability-log-level and check:live-db-isolation. I ran all of them in the background, each exit code captured to its own log. The --ran reconciliation exits 0: '123 derived famil(ies) accounted for — 120 run, 3 NOT-MEASURED'. check:skill-examples exited 3 until client and client-react were built in this new worktree; the rerun exits 0, with 346 examples. NOT MEASURED: check:dual-build-cjs-loads, which needs every package dist. NOT MEASURED: check:type-check-debt. Its re-measure queued a whole-repo turbo build on the shared lock, so I stopped that wait (exit 3 recorded) and leave the wide build to CI. NOT MEASURED: ui vitest run scripts/, because no ui file changed this round; at fa840834a0 it read 170/171 files, and the one prerequisite failure passed 15/15. overlap-check: VERDICT clean exit 0, with origin/main and #35378 merging cleanly. CI on 6b8fc7b563 at report time: 7 success, 11 skipped, 23 pending. Status in_progress, not awaited.", "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "This round: 2 relay strokes. (1) POST /repos/objectstack-ai/objectstack/dispatches carrying issue_patch #35391 (the PR body). Run 44501494741 read back 15152 bytes sent = 15152 stored. (2) This os-dev-report comment: POST /issues/34938/comments, sent through post-stamped.mjs and the relay. git push 1 time, to 6b8fc7b563. Reads only otherwise: review comment 7003932618, the PR body and check-runs.", "diff_lines": "This round, fa840834a0..6b8fc7b563: 11 files, +201 / -20. Generated share: content/docs/references/data/date-macros.mdx, +3 / -1. Whole PR against merge base c05a8a01c9: 31 files, +931 / -52 = 983 changed lines, generated included.", "skills_paths_touched": "none", "temporal_comparand_finding": "Closed for period keys. On a date, datetime or time column, {current_iso_week} now answers INVALID_FILTER/400 before any driver read, the same as the literal key. Pinned on the engine door with a recording driver, and on the REST query door over SqlDriver (SQLite; PostgreSQL when OS_TEST_POSTGRES_URL is set). The context-token class is unchanged and remains #35394's.", "deviations": "(1) InMemoryDriver: no live pin. This is because of the driver-memory census gate; it is not a measurement gap in the door, whose refusal precedes every driver. (2) The fix-round section went in before the existing footer, so the signed trailer stays the last line. (3) I stopped my own gate's whole-repo build wait (check:type-check-debt) and recorded it NOT MEASURED. (4) The worktree was recreated from the pushed branch at fa840834a0 and removed again after this round, without --force.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
Close-out · 2026-11-19T11:40Z: PR #35391 merged as 89364b4 (L1-a ACCEPT 7003847515 + delta 7006460618; seat contract review PASS 7003932618 + delta 7006476812; landing 7007257840); the card closed on merge. Follow-ups: #35394, #35395 (now unblocked), #35396; the skills filters.md follow-up is the seat's. pm:dispatched removed.