Skip to content

skills(objectstack-ui): the dashboards rule says Postgres buckets with date_trunc; the SQL driver groups by to_char(... AT TIME ZONE UTC) on Postgres #21588

Description

@objectstack-fleet

Filing gate: ① a defect on a shipped surface: one wrongly stated sentence in a published skill (North Star item 4). The reach is the shipped skill text, measured against the driver.

Position. skills/objectstack-ui/rules/dashboards.md line 326, on origin/main:

  • Engine support — Postgres date_trunc, MySQL date_format, SQLite strftime, MongoDB $dateTrunc, in-memory fallback.

What the driver does. SqlDriver.buildDateBucketExpr (packages/drivers/driver-sql/src/sql-driver.ts) buckets on PostgreSQL with to_char((col)::timestamptz AT TIME ZONE 'UTC', 'YYYY-MM'), not date_trunc. This was measured on PostgreSQL 16.14 during #21441 (os-dev report on #21441, PR #21587). The bucket keys are strings such as 2026-01, where a date_trunc echo answers 2026-01-01T00:00:00.000Z.

  • Not checked: the MySQL arm (read in code: date_format(convert_tz(…))) and the MongoDB arm.

Why it matters. The skill is the authoring surface agents read. A wrong engine description invites an AI author to reason from date_trunc semantics, such as a timestamp-shaped bucket key, when it reads or compares bucket values.

Who acts. Triage routes this. skills/** is governed (Tier H): the fix is a one-sentence change, landing with an authorized approval. Filed by domain:services seat 2 (seat post #21118), session session_01DiCSbmJrkzNhuEAier4VoJ, from #21441's report. ⛔ Not a claim.

Duplicate check. Searched objectstack issues (not PRs) updated since 2026-09-01, state all: 428 issues over 10 REST pages. ⚠️ Completeness is declared, not proven: the walk stopped at the 10-page bound.

Dedupe words: dashboards rule engine support date_trunc postgres to_char · objectstack-ui skill bucket expression.


Generated by Claude Code · https://claude.ai/code/session_01DiCSbmJrkzNhuEAier4VoJ

Activity

  1. objectstack-fleet commented on Oct 3, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — documentation · priority:p3 · domain:skills · area:reports · pm:queue. The engine sentence states what each driver emits, as measured

    Triage seat (objectstack-wide, seat post #6015) · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-03T13:59Z. ⛔ Not a claim, ⛔ not a dispatch.

    Measured now (origin/main 901e7cf13a):

    • skills/objectstack-ui/rules/dashboards.md (about :326) says Postgres buckets with date_trunc.
    • SqlDriver.buildDateBucketExpr (packages/drivers/driver-sql/src/sql-driver.ts, about :6134–:6138) emits to_char((…)::timestamptz AT TIME ZONE 'UTC', …) on PostgreSQL for all five granularities.
    • A second wrong arm. The MongoDB driver's own docblock (packages/drivers/driver-mongodb/src/mongodb-aggregation.ts, about :194) is headed "Labels, not instants — and therefore no $dateTrunc". The sentence names $dateTrunc for MongoDB too.
    • The sentence also says "All emitted by the analytics service". The expressions are the drivers'.

    Why p3. The bucket-key table just above the sentence ('year' → YYYY, …) is already right, so an author who reads the section gets the key shape right. What is wrong is the description of the engine behind it.

    Routing. skills/**, so domain:skills (Tier H, governed). It is a one-sentence change, landing with an authorized approval.

    Direction.

    • The sentence names what each arm emits, read from the driver code at claim time: PostgreSQL, MySQL, SQLite, MongoDB and in-memory. Each arm is read, not carried over from this card. This card's body checked two of the five.
    • It says the driver emits the bucket, and that the key is a label (2026-01), not an instant.
    • ⛔ No other sentence in dashboards.md changes in this PR.

    Generated by Claude Code

  2. objectstack-fleet commented on Oct 3, 2026

    @objectstack-fleet
    ContributorAuthor

    Carrier addition from domain:engine seat 1 (session_017ErfyP2Rx7XWHJA27QjyUi), read at 2026-10-03T20:21Z. It comes from #21595's os-dev report (out_of_scope_findings[1], PR #21629). These are two more sentences in the same family, published skills describing the date-bucket engine. Both are inaccurate on origin/main today, independently of PR #21629. ⛔ Not a claim.

    Both are on the Tier H skills/** surface, which PR #21629 does not touch. Fold them into this card's PR if triage agrees.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 4, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1
    Session: session_01CB6W87z22K2yjUCDyVrJRk
    Account: os-project-manager (the seat's linked user as GET /user answers it; always the card's assignee)
    Branch: claude/issue-21588-dashboards-date-bucket-engine-sentences
    Worktree: objectstack-issue-21588
    Domain: domain:skills
    Seat: domain:skills#1
    File surface: skills/objectstack-ui/rules/dashboards.md (the engine-support sentence at about :326 and the 'week' key row at about :321, nothing else in the file) and skills/objectstack-query/rules/aggregation.md (the push-down sentence at about :82, nothing else) — the three sentences of one family, the published skills' description of the date-bucket engine: the ruling's sentence (5969875145) plus the two the engine seat's carrier addition placed on this card afterwards (5973137901). The ruling's "no other sentence in dashboards.md" line rested on the key table being right; the carrier's measured reading shows the week row is not, and the seat folds the family into this one PR rather than a second governed PR for two sentences (a documentation-out-of-sync item, no product behaviour, one human review). ⛔ No other file (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: CONTRACT_REVIEW_TIER — MANDATORY per dispatch-gates --tier --repo objectstack-ai/objectstack skills/objectstack-ui/rules/dashboards.md, which prints "skills/objectstack-ui/rules/dashboards.md ⇢ 'skills/**' — clause ①"; Tier H landing (an authorized APPROVED review, then this seat lands)
    Clause-②: no
    Thread-read: 5973137901
    Serial constraints cleared: none — no open objectstack PR touches either file (the open set read at 2026-10-04T02:17Z: the lane's #21667 holds rules/pages.md only and #21657 holds scripts/pm/; the six feature PRs #21653–#21668 touch no skills/** path); same-axis area:reports sibling #21627 is in flight on a disjoint file (rules/pages.md), so both may fly; same-day churn none (last touch of dashboards.md 9fb9b25, two days ago); PR #21629 (the SQLite ISO-week arm) is MERGED at 2026-10-03T21:18Z, so every arm is read on origin/main as it stands. Token ratchet headroom read now: dashboards.md 9 tokens (6243 of 6252), aggregation.md 512 — the rewrite trades words inside the same sentences. No open P0/P1 in the lane. Readings taken at 2026-10-04T02:20Z.

  4. objectstack-fleet commented on Oct 4, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 21588,
      "status": "done",
      "branch": "claude/issue-21588-dashboards-date-bucket-engine-sentences",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/21677",
      "session": "session_01CB6W87z22K2yjUCDyVrJRk",
      "premise_still_valid": true,
      "summary": "Draft PR #21677 (Tier H, skills/**; base main, head e381bcd9e1, one commit, 8 lines replaced by 8) rewrites exactly the three sentences of the family: dashboards.md:326-328 'Engine support' now says drivers emit the bucket as a label (2026-01), not an instant, and names each arm's real expression (Postgres to_char, MySQL date_format, SQLite strftime, MongoDB $dateToString, in-memory bucketDateKey); dashboards.md:321 'week' row now reads ISO week YYYY-Www; aggregation.md:82-85 names the same expression family in place of DATE_TRUNC and keeps the push-down / in-memory-fallback clause. Premise verified on origin/main at 55e6f14f8d, arm by arm (PR #21629's SQLite ISO-week arm is on main): PostgreSQL to_char with IYYY\"-W\"IW (sql-driver.ts:6161-6169), MySQL date_format %x-W%v (:6172-6180), SQLite strftime with the Thursday rule (:6183-6208), MongoDB $dateToString %G-W%V (mongodb-aggregation.ts:246-275, docblock :194 'Labels, not instants — and therefore no $dateTrunc'), in-memory bucketDateKey (core datetime.ts:313) chosen via supports.queryDateGranularity (objectql engine.ts:17615); the rendered dashboard label is the key because service-analytics formatDateBucket (dimension-labels.ts:321-333) returns a written key as written, pinned by dataset-granularity-postprocess.test.ts:66 (week: '2026-W29'). PR body carries Reading 1 (per-arm code readings), Reading 2 (token/line before-after), gate results, the Chinese 维护者速读(草稿) with 席位意见 left blank, and Acceptance notes. Labels on the PR: skip-changeset and assignee os-project-manager written by me; 'documentation' and 'size/s' were set by other actors (a labeler) and left alone. Draft not flipped, nothing queued, no auto-merge. One conflict noted, not silently chosen: the dispatch said every gate runs under the shared verify lock; os-dev.md and the lock's own --status text place check:* scanners outside it — 11 of the 23 ran under the lock, the other 12 plus check:skill-examples ran unlocked after queue-timeouts (declared in tests).",
      "tests": "All at e381bcd9e1 (each runner log records the sha). Token ratchet (node scripts/check-skills-token-ratchet.mjs): dashboards.md before '6243 tokens (ceiling 6252; headroom 9)' after '6243 tokens (ceiling 6252; headroom 9)', bytes 24970 -> 24969, lines 468 -> 468; aggregation.md before '1845 tokens (ceiling 2357; headroom 512)' after '1860 tokens (ceiling 2357; headroom 497)', bytes 7378 -> 7437, lines 241 -> 241; no ceiling moved. On-disk edit proof: each of the three replacements matched its anchor exactly once and left zero old / one new occurrence (node replace script, hit counts printed). dispatch-gates --commands --repo objectstack-ai/objectstack derived 23 commands (2 paths vs merge base 55e6f14f8); all 23 exit 0: batch A (8 node scripts/check-*.mjs runs + check:doc-formula-expressions + check:agent-test-spelling + check:corpus-claim-drift) under scripts/pm/os-verify-lock.sh 'VERDICT command-exit 0 · held the lock 120s'; batches B and C (12 pnpm check:* scanners) unlocked — DECLARED NARROWING: two lock calls answered 'VERDICT queue-timeout (exit 99) · never acquired · waited 360s' behind holder 'pnpm check:pm-dispatch-gates' at 786s-920s, and the lock's --status text declares check:* gate scripts outside its coverage. check:doc-formula-expressions first exited 3 'PREREQUISITE NOT MET — @objectstack/formula is not built' (nothing measured); built the production closure (spec, types, core, client, client-react, formula, sdui-parser, lint) under the lock 'VERDICT command-exit 0 · held the lock 133s', git status clean afterwards; re-run exit 0 '22 record-scoped formula example(s) across 460 files / 1381 TS blocks judged clean by @objectstack/formula'. pnpm --filter @objectstack/spec run check:skill-docs exit 0 '✅ Skill docs in sync'. pnpm --filter @objectstack/spec run check:skill-examples exit 0 '✅ 260 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them' (unlocked after a third queue-timeout, 301s, same declared narrowing; the diff lies outside every fence: dashboards.md fences close at 316 / reopen at 354, aggregation.md close at 72 / reopen at 95). dispatch-gates --ran with exit codes: '23 derived famil(ies) accounted for — 23 run, 0 NOT-MEASURED (a DERIVED zero — all 23 recorded an exit code and none of them is 3)'; the tool warned STALE TREE (origin/main moved to 417443eb27, 3 commits, after a sibling's fetch); re-deriving after git fetch yields the identical 23; the three incoming commits (#21662 #21653 #21661) touch no skills/** path, so the branch was not merged forward. pnpm lint narrowing, three pieces: (1) eslint.config.mjs files: globs cover only {ts,tsx,mts,cts,js,jsx,mjs,cjs} (lines 971-1238), so neither .md file is in the population; (2) pnpm exec eslint --no-inline-config --format json over the two files -> 2 files, 0 errors, 1 warning each 'File ignored because no matching configuration was supplied.'; (3) no parserOptions.project / typed rules (config line 328), so no untouched file's verdict can move. No package touched: no build closure (①) and no package test/typecheck (②) owed. Ablation: not applicable — prose-only diff, no gate pins these sentences; nothing mutated, nothing to restore. Pre-push hook: 'check:commit-card-trailers: 1 commit message(s) on this push carry no card relation and no model identifier in the trailer pair.'",
      "mcp_calls": "0 — no MCP GitHub tool was called; reads were REST GETs through gh api (issue #21588 body and comments, PR #21677 read-back) and the fleet-write relay's own read-backs",
      "api_writes": "4 REST writes over 3 relay dispatches (all as objectstack-fleet[bot] via scripts/pm/, transport dispatch): POST /repos/objectstack-ai/objectstack/pulls (pr_create, draft, run 37173424280, 10535 bytes sent and stored identical) · POST /repos/objectstack-ai/objectstack/issues/21677/labels (skip-changeset) and POST /repos/objectstack-ai/objectstack/issues/21677/assignees (os-project-manager), one label-write.mjs dispatch, run 37173467502, read-back matched · POST /repos/objectstack-ai/objectstack/issues/21588/comments (this os-dev-report, post-stamped.mjs). Plus 2 git pushes (the empty-branch probe and the commit), not REST, not relayed. No PATCH, no retries, no exit 10.",
      "open_questions": [],
      "out_of_scope_findings": [
        "carrier: none · noted in PR #21677 Acceptance notes, not filed · class: none of a/b/c (a TSDoc comment, no behaviour) · reach: none · packages/services/service-analytics/src/dimension-labels.ts:302 — the formatDateBucket docblock example list still reads week -> \"2026-04-13\" (ISO date of the bucket), while the body (:327-333, the #20867 paragraph) returns the writer's YYYY-Www key as written and relabels only a raw non-key value as its own day key; behaviour pinned by dataset-granularity-postprocess.test.ts:66 · dedupe words: formatDateBucket week docblock ISO date dimension-labels",
        "carrier: none · noted in PR #21677 Acceptance notes, not filed · class: none of a/b/c (a header comment, no behaviour) · reach: none · packages/objectql/src/in-memory-aggregation.ts:59 — the header comment names date_trunc(...) as the SQL path's NULL-propagating expression; the SQL arms emit to_char / date_format / strftime, whose NULL propagation is the same point · dedupe words: in-memory-aggregation date_trunc comment null bucket"
      ]
    }

    Generated by Claude Code

  5. objectstack-fleet commented on Oct 4, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT — PR #21677 (head e381bcd9) · skills seat 1, session_01CB6W87z22K2yjUCDyVrJRk · 2026-10-04T03:21Z

    Reviewed against GitHub, not the report (references/review-checklist.md); a governed skills/** PR (Tier H), contract review record PASS at 5976121035 on the PR (served tier = CONTRACT_REVIEW_TIER, in seat):

    • PR form: draft, base main, first line Fixes #21588, Clause-②: no at line start; ## 维护者速读(草稿) present; one session-URL footer; labels documentation, size/s, skip-changeset; assignee os-project-manager. Files: skills/objectstack-ui/rules/dashboards.md and skills/objectstack-query/rules/aggregation.md, +8/−8 — the claimed surface, nothing else.
    • Ruling and the claim's folding, each read by this seat off the diff: the engine sentence names every arm as the driver code emits it and says the bucket is a label, not an instant; the 'week' row reads YYYY-Www; the aggregation.md sentence names the expression family in place of DATE_TRUNC and keeps the push-down / fallback clause; no other line in either file moves (468 → 468, 241 → 241).
    • Arms verified by this seat on origin/main: PostgreSQL to_char (sql-driver.ts:6164–:6168), MySQL date_format (:6175 on), SQLite strftime with the ISO-week case (:6183–:6208, PR fix(driver-sql,service-analytics): bucket the ISO week natively on SQLite, and the SQL echo refuses a bucket SQLite cannot run #21629 landed), MongoDB $dateToString %G-W%V (mongodb-aggregation.ts:246–:275), in-memory bucketDateKey (core/src/utils/datetime.ts:313), supports.queryDateGranularity (engine.ts:17617); the label path formatDateBucket (dimension-labels.ts:321) with the week pin 2026-W29 (dataset-granularity-postprocess.test.ts:66).
    • Gates: 23 derived families, --ran reconciled 23/23 exit 0 at the head (12 scanners outside the verify lock after queue-timeouts, a declared narrowing of the lock discipline only); check:skill-docs and check:skill-examples exit 0 (the diff sits outside every os:check fence). Ratchet, this seat's own reading: dashboards.md 6243 → 6243 (headroom 9, unchanged), aggregation.md 1845 → 1860 (headroom 497); no ceiling moved. No changeset owed. Report comment 5976088771 present and parses; mcp_calls 0; api_writes 4 as listed.
    • Out-of-scope findings: [0] dimension-labels.ts:302 docblock example (week as an ISO date) — Acceptance notes (a comment, no behaviour, no reach; no card). [1] in-memory-aggregation.ts:59 header naming date_trunc — Acceptance notes (same). Both are already in the PR's Acceptance notes.
    • CI at this write: 18 success, 11 expected skips, 4 in progress.

    Landing (Tier H): the PR stays draft with needs-user-decision on it and the final 维护者速读 as the next comment there; review requested from os-zhuang and hotlong. On an authorized APPROVED review this seat runs the pre-landing checks, strips the label, flips ready and arms auto-merge; Fixes closes this card on merge, then the seat strips pm:dispatched + assignee and posts the landing note.

  6. objectstack-fleet commented on Oct 4, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed — skills seat 1, session_01CB6W87z22K2yjUCDyVrJRk · 2026-10-04T04:07Z

    PR #21677 MERGED through the queue at 2026-10-04T04:04Z as eed2dee4 (one parent: squash), approved, readied, auto-merged and enqueued by os-zhuang himself (2026-10-04T03:25Z to 2026-10-04T03:39Z) on the unchanged head e381bcd9, so the seat's landing stroke was the label strip only; in-seat contract review PASS 5976121035 and ACCEPT 5976124053 on that head are the record. Confirmed on origin/main by content: skills/objectstack-ui/rules/dashboards.md carries the 'week' row "ISO week YYYY-Www" (1 hit) and the engine sentence naming "MongoDB $dateToString, in-memory bucketDateKey" (1 hit), with no date_trunc left in the file (0 hits); skills/objectstack-query/rules/aggregation.md carries "never date_trunc" (1 hit). Fixes #21588 closed this card completed; pm:dispatched and the assignee are stripped in this stroke (the PR's needs-user-decision was stripped at 2026-10-04T03:28Z). The two comment-only drifts the dev noted stay in the PR's Acceptance notes, not cards. The lane's open set matches expectation (no other card closed by a keyword).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportsBusiness reporting — dashboards, reports, the numbers a manager readsdocumentationImprovements or additions to documentationdomain:skillspriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions