Skip to content

skills/objectstack-query aggregation.md: a zoned date bucket no longer always stays in memory once PostgreSQL buckets it in the database (#33697) #34597

Closed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate ①: class a, the Skills-docs: debt S2 from the contract-review delta PASS 6936523534 on PR #34530 (card #33697), passed on by area o2-F. Dedupe: aggregation.md timezone, zonedDateBucketing; no open card besides #33697 itself.

reach (read from the file on main): skills/objectstack-query/rules/aggregation.md, section "Filtered Aggregation (FILTER WHERE)", about lines 122–126, says that a date bucket under a non-UTC timezone keeps the whole call in memory. Once PR #34530 merges, a driver declaring supports.zonedDateBucketing (PostgreSQL through driver-sql) pushes a zoned date bucket down to the database, so the sentence becomes false on PostgreSQL. An author or agent reading the skill would expect an in-memory call and the aggregationFilter behaviour that goes with it.

Suggested-grade: p2 · domain:skills · pm:blocked, Blocked-by #33697

维护者速读

Change

Rewrite that note: a driver declaring supports.zonedDateBucketing (today PostgreSQL via driver-sql) buckets a zoned date in the database; on every other driver a zoned date bucket still keeps the whole call in memory. Keep the eval case, or add one, that exercises the sentence.

Done when

The section matches the driver capability the code reads, and the skill eval for it passes.

Blocked-by: #33697

Activity

  1. added
    documentation
    finding
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p2 · domain:skills · pm:blocked · 2026-11-17T02:55Z

    ⛔ Not a claim.

  3. added
    domain:skills
    pm:blocked
    priority:p2
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: unlock → pm:queue · 2026-11-17T05:48Z

    ⛔ Not a claim.

    Blocker #33697 closed today at 04:59Z. Back to the queue at its grade (p2).

  5. added
    pm:queue
    and removed
    pm:blocked
    on Nov 17, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa

    Claim: PM loop round 7 · 2026-11-17T22:38Z
    Session: session_01WGufzfrh8TiPJf1i2kMSoa
    Account: os-support-ai
    Branch: claude/issue-34597-aggregation-zoned-bucket
    Worktree: objectstack-issue-34597
    Domain: domain:skills
    Seat: repo:objectstack#3
    File surface: skills/objectstack-query/rules/aggregation.md (the "Filtered Aggregation (FILTER WHERE)" note and any other sentence in this file that says a zoned date bucket always stays in memory), skills/objectstack-query/evals/** (keep or add the eval case for that sentence), and whatever skills line-budget, eval-index or built-artefact files the skills gates require for exactly those two edits. Root .changeset/ only if the skills changeset rule asks for one. ⛔ No code, no packages/**, and no other skill directory. Seat 4's lease o4-C (#34637 #34552 #34504) works in other skill files; overlap-check runs before the first push.
    Container & model: S, mode:subagent (area o3-H), model: TIER_DEFAULT (no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack: the query skill tells an author or agent that a date bucket under a non-UTC timezone always keeps the whole aggregate call in memory, which is false on PostgreSQL since #33697 | none | every agent or author who reads the query skill to predict aggregate cost and aggregationFilter behaviour on PostgreSQL
    Thread-read: 6939907025
    Premise: holds (area read at origin/main: skills/objectstack-query/rules/aggregation.md:127 still says "a date bucket under a non-UTC timezone … keeps the whole call in memory". packages/objectql/src/engine-delete-and-aggregate.ts:1435-1458 pushes a zoned bucket down when the zone resolves to an area/location AND the driver declares supports.zonedDateBucketing. packages/drivers/driver-sql/src/sql-driver.ts:409 declares it only for PostgreSQL. A zone that resolves to no area/location (+08:00, EST5EDT), or a string that does not resolve, still stays in memory on every driver.)
    Serial constraints cleared: none found; overlap-check before the first push
    Pre-claim lane: domain:skills — skills/objectstack-query/**. Routed to area o3-H by the seat at 22:36Z, after the maintainer released skills p2 at 22:35Z.
    Pre-claim deps: Blocked-by #33697 is closed (04:59Z). Triage unlocked it to pm:queue (6939907025).
    Prior rulings read: zoneddatebucketing,timezone,aggregationfilter → 4 hits: ADR-0053 Decision §6–§9, plus the 2026-11-15 Phase 2 D2 amendment (maintainer ruling 「PG 在库里算,修订 ADR」 on #33697). This card executes that amendment and decides nothing. Thread: triage 6936606127 and 6939907025.

    Lease o3-H (seat post #34584). Route: rewrite the note against the merged wording. A driver that declares supports.zonedDateBucketing (today PostgreSQL via driver-sql) buckets a zoned date in the database when the zone resolves to an area/location. On every other driver, and for a zone that resolves to none, the whole call still runs in memory. Keep the eval case for the sentence, or add one, and it must pass. Not in an epic.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa
    os-dev-report

    {
     "issue": 34597,
     "status": "done",
     "branch": "claude/issue-34597-aggregation-zoned-bucket",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/35012",
     "head_sha": "2555c75f77ac6e6287f4715cbb68ce501d91576e",
     "session": "session_01WGufzfrh8TiPJf1i2kMSoa",
     "premise_still_valid": true,
     "summary": "Rewrote the FILTER WHERE parenthetical in skills/objectstack-query/rules/aggregation.md against the merged engine: a driver declaring supports.zonedDateBucketing (PostgreSQL via driver-sql, sql-driver.ts:409) buckets a zoned date in the database when the zone resolves to an area/location (judgeBucketZone/zoneNative, engine-delete-and-aggregate.ts:1435-1459, gating nativeAggregate at :1488); every other driver, and a zone resolving to none (+08:00, EST5EDT, unresolvable), keeps the whole call in memory. Added eval case 9 (no earlier case exercised the sentence) and an @objectstack/skills patch changeset per the skills-text precedent. No other sentence in the skill makes the same claim.",
     "files_changed": [
      "skills/objectstack-query/rules/aggregation.md",
      "skills/objectstack-query/evals/filters-pagination-search.json",
      ".changeset/34597-skills-zoned-date-bucket.md"
     ],
     "old_sentence": "(a date bucket under a non-UTC `timezone`, or one the driver does not bucket natively, keeps the whole call in memory)",
     "new_sentence": "(a date bucket the driver does not bucket natively keeps the whole call in memory; so does one under a non-UTC `timezone`, unless the driver declares `supports.zonedDateBucketing` — PostgreSQL via `driver-sql` — and the zone resolves to an area/location: `Asia/Taipei` buckets in the database, `+08:00` or `EST5EDT` never)",
     "eval_case": "skills/objectstack-query/evals/filters-pagination-search.json id 9 — script check at 2555c75f7: ids 1-9 distinct, every must_contain in expected_output, no must_not_contain in it, 0 violations (no repo gate grades eval assertions outside ui/)",
     "tests": "Text-only diff, no unit test or ablation owed. Eval script check 0 violations. Token ratchet: aggregation.md 2292 -> 2346 tokens, ceiling 2357, headroom 11, no row moved. Lines: aggregation.md 272 -> 275; eval 85 -> 95 (unpriced); SKILL.md sum 4730 unchanged; skills/**/*.md 18128 -> 18131.",
     "gates": "Local at 2555c75f7: 46 derived (dispatch-gates --commands) + check:skill-examples/skill-docs/skill-refs (spec). 48 exit 0, incl. check-skills-token-ratchet (+--self-test), check:skill-links, check:skill-identifier-liveness, check:skill-compatibility, check:skill-frame-sync, check:doc-authoring, check:nul-bytes, check:published-files, check-empty-changeset, check-changeset-no-major, check-adr-0087-registration, check:lean-entry-closure, check:dts-closure. check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET = NOT MEASURED (full build; CI). dispatch-gates --ran: 46 accounted, 45 run, 1 NOT MEASURED, 0 UNRUN. Builds under verify lock: @objectstack/lint... and @objectstack/client-react... VERDICT command-exit 0. overlap-check: VERDICT clean exit 0 (0 colliding PR heads). PR check-runs: in_progress at report time, not awaited.",
     "dogfood_battery": "n/a — no ! in the PR title and Clause-② no without arm",
     "mcp_calls": "0",
     "api_writes": "3 — git push (branch); relay pr_create -> #35012 (assignees os-support-ai, read back identical); relay/post-stamped os-dev-report comment on #34597",
     "open_questions": [
      {
       "question": "dispatch-gates --tier derives a MANDATORY contract-review authoring tier for skills/** (clause 1, published catalog), but the claim's Container & model line records TIER_DEFAULT and this run was served at the default tier. The PR body therefore carries no Served-tier: CONTRACT_REVIEW_TIER line. How should the seat route this?",
       "options": [
        "A: seat runs the at-tier contract review (it reviews the authored text) before landing",
        "B: re-author at the mandated tier"
       ],
       "recommendation": "A, because the diff is a five-line sentence plus one eval case and an at-tier review covers the derived floor without re-doing the work"
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — content/docs/data-modeling/queries.mdx Date-bucketed grouping callout says the SQL driver ignores a structured groupBy alias, while skills/objectstack-query/rules/aggregation.md says results are correct either way including the column keys; no public-door reach measured, outside the file surface",
      "carrier: none · noted, not filed — the first os-dev empty-branch push (before any commit) was refused by the auto-mode classifier; the push with commits went through"
     ],
     "deviations": "Empty-branch probe push refused by the auto-mode classifier (Destructive or Unwanted Actions); continued and pushed with the first two commits instead. Dispatch order gave a model-free trailer pair; commits use it, not the harness reminder's model-named co-author."
    }
  9. removed
    pm:dispatched
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationdomain:skillsfindingpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions