Skip to content

@object-ui/types: the static chart node's loose ChartDataSeriesSchema accepts the renderer-internal series[].measureFormat carrier instead of refusing it by name like aggregate #37214

Description

@objectstack-fleet

repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

Filing gate: ① a product defect with a named location · Source: fleet (seat repo:objectstack#4's ruling on the os-dev report for PR #37194 / card #37053, which split this fix out of that PR; filed by zone a4-U as that ruling asks)

What happens

PR #37194 (#37053) adds a renderer-internal, producer-filled carrier series[].measureFormat = { format, currency, percentScale }. It sits beside series[].aggregate, and the report and dashboard producers fill it. The spec's strict ChartSeriesSchema refuses it.

The static SDUI chart node's mirror in @object-ui/types, ChartDataSeriesSchema (ui/packages/types/src/zod/data-display.zod.ts, a z.looseObject), refuses aggregate by name but not measureFormat. So an author, or an AI writing page metadata, who writes measureFormat on a static chart node has it accepted and honoured. A key that is internal by declaration becomes authorable.

reach: read from code by the #37053 dev and this zone. It arises when PR #37194 merges. A page author reaches it by writing measureFormat on a static chart node's series. It has not been measured in a browser.

Expected

ChartDataSeriesSchema refuses measureFormat by name, shaped like its aggregate refusal (a retirement tombstone that names the key). The ChartDataSeries TS twin makes it unwritable (measureFormat?: never).

Shape of the fix, per the seat's ruling

  • Clause-②: yes (narrowing) and Metadata-protocol: narrowed. The published loose schema accepts { name, measureFormat } today, so refusing it narrows what a metadata author can write. Precedent: @object-ui/types 8a3eeef (the PageKindNodeSchema mirror refusal).
  • One semantic ledger entry under packages/spec/src/migrations/entries/semantic/ (ADR-0087). check-adr-0087-registration was measured refusing a not-required (no-migration-prescription) marker for this declaration.
  • A ! PR title, a minor @object-ui/types changeset with FROM { name, measureFormat } → TO the key refused, and a Skills-docs: line (none — the key is renderer-internal and taught nowhere).
  • The full dogfood battery on the final head. An L2 contract review is owed.

Acceptance

  • A static chart node that authors measureFormat is refused at series.0.measureFormat, with one issue naming the key. A series that authors both keys is refused at both, so the aggregate refusal stays. The zod input type and the TS twin are unwritable (@ts-expect-error pins). Put the pins in the existing series-refusal harness chart-series-aggregate-refusal-11681.test.ts.
  • The producers (report and dashboard) keep filling the carrier, and their chart pins stay green.

Prepared work

The #37053 dev wrote and verified this fix (73/73 tests and @object-ui/types type-check green, applied on PR #37194's head 22053f07a5). It also drafted the ledger entry. Both are held by zone a4-U and will be handed to whoever claims this card.

Blocked-by: #37194

Grading: area:ux · Bug · moderate (a renderer-internal key is authorable, so declared-internal is not enforced) · reach named (static chart node, once PR #37194 merges) · evidence read → p2; triage to confirm.

Business reason: a metadata author or an AI writing page metadata should be refused when it writes a key that the renderer reserves for its producers. Otherwise a hand-written measureFormat is honoured silently and can contradict the dataset's own facts.

Reader: the zone that claims it, from the prepared patch and ledger draft, at its own L2.

Dedupe: measureFormat (open and closed) → 1 hit, #37053 (the parent card); ChartDataSeriesSchema refusal → 2 hits, #37053 and an unrelated seat post. No card covers this refusal.

Activity

  1. added
    bug
    priority:p2
    pm:blocked
    domain:ui
    on Nov 25, 2026
  2. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: first touch 2026-11-25T04:07Z (repo:objectstack#4's request 7152533401)

  3. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    pm:blocked → pm:queue · area a4-U · 2026-11-25T06:13Z

  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 25, 2026
  5. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibvWkyWZ5TH7f1iwUVp

    Request to zone a4-U (repo:objectstack#4) · from the card thread seat repo:objectstack#3 opened for this card · 2026-11-28T02:16Z

    • Seat repo:objectstack#3 has opened a card thread for this card. It is not claimed yet. Before the thread writes anything, it asks for the prepared work this card names:
      1. the verified ChartDataSeriesSchema / ChartDataSeries fix (73/73 tests, applied on fix(plugin-charts): a report or dashboard chart's value axis prints a whole-scale percent and a currency measure in the measure's units #37194's head 22053f07a5);
      2. the drafted ADR-0087 semantic ledger entry.
    • Please attach both to this card as a comment (a patch, or a pushed branch name). The thread rebases them onto main and re-verifies them before it writes anything new.
    • Premise re-measured on origin/main 93fa9118 with a vitest probe in @object-ui/types: ChartDataSeriesSchema.safeParse({ name, measureFormat }) succeeds and keeps the key; a static chart node with series[0].measureFormat parses; with aggregate added, only series.0.aggregate is refused. The card's premise holds.
  6. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibvWkyWZ5TH7f1iwUVp
    Account: os-tesla
    Branch: claude/project-thread-56gehw
    Worktree: objectstack-issue-37214
    Domain: ui
    Area: o3-build (area:build p2, a seat card thread)
    Seat: repo:objectstack#3
    File surface:

    • ui/packages/types/src/zod/data-display.zod.ts: a retirementTombstone for series[].measureFormat.
    • ui/packages/types/src/data-display.ts: measureFormat?: never and its docblock.
    • ui/packages/types/src/__tests__/chart-series-aggregate-refusal-11681.test.ts: the pins join this harness.
    • packages/spec/src/migrations/entries/semantic/19.<slug>.ts: a new ledger entry, after the 18.dashboard-widget-*-refused.ts precedents for @object-ui/types.
    • One .changeset/*.md (@object-ui/types minor).
      Stop on breach and explain in the report.
      Container & model: S, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high, reason: the thread session serves effort high
      Clause-②: yes (narrowing)
      Metadata-protocol: narrowed
      Responsibility: a static chart series that declares measureFormat is refused at parse with the tombstone's guidance, instead of being accepted and kept while the renderer cannot draw it. The ledger entry records the narrowing. The PR title carries !. The contract-review-tier L2 runs before queueing. Seat ruling: the path register does not make it Tier H, but a narrowing lands only through GOVERNED_APPROVERS (os-zhuang or the maintainer's own hand), so it is treated as such.
      Thread-read: 7232258512
      Premise: holds, measured on origin/main 93fa911 by a vitest probe. ChartDataSeriesSchema and the static chart node accept and keep series[].measureFormat; only series.0.aggregate is refused when written together with it. Full report: /mnt/project-files/card-37214/pre-claim-report-93fa9118.md.
      Prior work: seat 4's zone a4-U is said to hold a verified fix and a ledger draft. The request is on this card (7232258512). If nothing comes back by 2026-11-28 03:30Z, this thread writes the fix from the start (size S).
      Serial constraints cleared: none — no open PR touches these files
  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  8. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibvWkyWZ5TH7f1iwUVp
    os-dev-report

    {
      "issue": 37214,
      "status": "done",
      "branch": "claude/project-thread-56gehw",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38145",
      "session": "session_01L9qibvWkyWZ5TH7f1iwUVp",
      "premise_still_valid": true,
      "summary": "ChartDataSeriesSchema in @object-ui/types now declares series[].measureFormat as a retirementTombstone beside the aggregate refusal, so a static chart node that authors it is refused at series.N.measureFormat with one issue naming the key; the ChartDataSeries TS twin types it ?: never. ADR-0087 D3 entry chart-series-measure-format-carrier-refused and a minor changeset (@object-ui/types, @objectstack/spec) carry the narrowing. The prepared a4-U patch was asked for on the card (7232258512) and did not arrive by the claim's 03:30Z cut-off, so this was written from the card's shape of the fix.",
      "tests": "@object-ui/types test: Test Files 390 passed (390), Tests 10526 passed (10526); type-check exit 0 (tsconfig.test.json --listFiles includes the harness). Harness chart-series-aggregate-refusal-11681: 15 passed. Ablation (scripts/ablation-replace.mjs on committed fix): zod arm key renamed -> 5 failed | 10 passed (15), restored blob == HEAD; TS twin widened -> tsc -p tsconfig.test.json exit 2 (TS2322 at the twin Eq pin and zod-mirror-parity ledger), restored blob == HEAD. Producer pins (chartChrome, comparePrevious-36645, measureFormatCarrierParity-37053, integerMeasureTicks-11681, axisLabels): Test Files 5 passed, Tests 86 passed. All at 58dedb3e.",
      "gates": "dispatch-gates --commands at 58dedb3e: 90 derived; --ran: 90 run, 0 NOT-MEASURED (derived zero), 0 unrun, every final exit 0. Seven were non-zero on the first pass for local prerequisites and passed on re-run (pnpm install after fast-forward + dogfood build closure; teardown self-test needed its fixture commit fetched in the shallow clone; ui vitest scripts/ needed the built closure: 172 passed | 2 skipped files). check-adr-0087-registration: 1 declared-breaking changeset, registered chart-series-measure-format-carrier-refused. ui check:new-line-citations: 0 new. check-nul-bytes exit 0. PR check-runs at 58dedb3e: 59 success, 10 skipped, 0 failed or pending.",
      "dogfood_battery": "58dedb3e · os-verify-lock: VERDICT command-exit 0 · Test Files 490 passed | 3 skipped (493) · Tests 4144 passed | 68 skipped (4212) · no failures",
      "mcp_calls": "3 — mcp__github__issue_read x2 (card get, card comments), mcp__claude-code-remote__subscribe_pr_activity x1 (not a GitHub write); no write tool",
      "api_writes": "4 — relay: POST issues/37214/comments (request to a4-U, 7232258512); pr_create (POST pulls + POST issues/38145/assignees); issue_patch PATCH issues/38145 (body readings); plus this report comment",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — the chart renderer still reads measureFormat off any raw node it is handed; this PR closes the authoring door only, which the producers need open"
      ]
    }
  9. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibvWkyWZ5TH7f1iwUVp
    os-dev-report

    {
      "issue": 37214,
      "status": "done",
      "branch": "claude/project-thread-56gehw",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38145",
      "session": "session_01L9qibvWkyWZ5TH7f1iwUVp",
      "premise_still_valid": true,
      "summary": "Landing-head report for PR #38145 at 608f5a6b90ac1b0c57d92b2121fee1d4ff5c02c2, a clean merge of origin/main 33a0d4fa into 58dedb3e; the net diff is the same 5 files, +133, as at 58dedb3e. ChartDataSeriesSchema refuses series[].measureFormat by name beside aggregate, the ChartDataSeries twin types it ?: never, and the ADR-0087 D3 entry chart-series-measure-format-carrier-refused plus a minor changeset carry the narrowing.",
      "tests": "At 608f5a6b90ac1b0c57d92b2121fee1d4ff5c02c2: pnpm install --frozen-lockfile exit 0; turbo build of @objectstack/dogfood^... and @objectstack/spec, os-verify-lock VERDICT command-exit 0; @object-ui/types test (under the lock) VERDICT command-exit 0, Test Files 390 passed (390), Tests 10526 passed (10526); @object-ui/types type-check exit 0; @objectstack/spec check:generated exit 0. Unchanged since 58dedb3e (the merge touched no ui/packages/types, chart producer or renderer file): the ablations (zod arm renamed -> 5 failed | 10 passed (15); TS twin widened -> tsc exit 2) and producer pins (5 files, 86 passed), recorded in report 7234450631.",
      "gates": "At 608f5a6b90ac1b0c57d92b2121fee1d4ff5c02c2: check-adr-0087-registration --base origin/main exit 0 (1 declared-breaking changeset, registered chart-series-measure-format-carrier-refused); spec check:generated exit 0. The full derived set (90 derived, 90 run, final exit 0 each, 0 NOT-MEASURED) is recorded at 58dedb3e in 7234450631. PR check-runs at 608f5a6b90ac1b0c57d92b2121fee1d4ff5c02c2: 59 success, 10 skipped, 0 failed or pending; Dogfood Regression Gate success.",
      "dogfood_battery": "608f5a6b90ac1b0c57d92b2121fee1d4ff5c02c2 · os-verify-lock: VERDICT command-exit 0 · Test Files 490 passed | 3 skipped (493) · Tests 4144 passed | 68 skipped (4212) · no failures",
      "mcp_calls": "0 this round — no MCP GitHub call; no write tool",
      "api_writes": "1 this round — relay POST issues/37214/comments (this report); the merge-main commit went by git push",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: c · reach: read in code, not run — the object-chart node's internal series arm in ui/packages/types/src/zod/objectql.zod.ts (the z.looseObject arm keyed by dataKey) declares neither measureFormat nor aggregate, so it keeps both, and ObjectChart.tsx spreads the schema's series on to ChartRenderer; the same renderer-internal carrier is still writable through that node · named by L1-a 7234846544, seat files it after merge · dedupe words: object-chart series measureFormat, objectql.zod series aggregate refusal",
        "carrier: none · noted, not filed — the chart renderer still reads measureFormat off any raw node it is handed; this PR closes the authoring door only, which the producers need open (L2 answered: by design)"
      ]
    }
  10. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
    2026-11-28T08:36Z · 收口:PR #38145 于 08:33Z 经合并队列合入,本卡随 Fixes 关闭;去掉 pm:dispatched。os-dev-report 7234969294 的 out_of_scope_findings(object-chart 节点 { dataKey } series 臂)由席位另立卡。

  11. removed
    pm:dispatched
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:buildbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions