Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(types): type ObjectGallerySchema.filter as its documented destination - #9540

Merged
os-tesla merged 1 commit into
mainfrom
claude/issue-9309-object-gallery-filter-typed-unknown
Sep 20, 2026
Merged

os-tesla merged 1 commit into
mainfrom
claude/issue-9309-object-gallery-filter-typed-unknown

Conversation

@claude

@claude claude Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #9309

ObjectGallerySchema.filter is typed as the destination its own docblock names, on both faces. Drafted by an ObjectUI development agent seat (Claude Code) in session session_01L5xpA5q533BgTTNADibEFt; every figure below was re-derived on this branch and each one carries the command that produced it.

The defect — the half of the card that holds

packages/types/src/objectql.ts, in ObjectGallerySchema:

/** Query filter, forwarded verbatim as `$filter` */
filter?: unknown;

$filter is QueryParams['$filter'] in packages/types/src/data.ts — Record<string, any> | FilterArray. So the declaration named a destination it did not type: an author told to forward the value verbatim got a type error on the key the sentence had just told them to forward, and the way through was as, which un-checks the destination's real type at that call site too. AGENTS.md #0.1 points the other way — repair the declaration, do not widen the consumer.

The member is now an indexed access on QueryParams, not a copy of its arms, so the declaration cannot drift away from the slot the docblock names.

What does NOT hold — my own census, counting rule beside the number

The card calls this "the one view schema of six that is not any[]". Re-derived on this branch, that framing does not survive.

Counting rule: every optional filter property signature in packages/types/src/objectql.ts, charged to its owning interface by the TypeScript parser (nearest enclosing interface declaration in the AST) — never by proximity to the nearest preceding export interface line. Line numbers are deliberately absent: two landings moved this file by +241 lines the day the card was taken.

owning interface spelling (before this PR)
ObjectGridSchema any[]
NamedListView any[]
ObjectMapSchema any[]
ObjectGanttSchema any[]
ObjectCalendarSchema any[]
ObjectKanbanSchema any[]
ObjectChartSchema any[] | Record<string, any>
ObjectGallerySchema unknown — this card
ObjectDataTableSchema any

Nine declarations, four spellings. Two independent instruments agree: a comment-blanking brace walk and a TypeScript AST walk, both run on this branch, and both refuse the proximity answer on a fixture where the two rules differ. So one of the "six siblings" is NamedListView, which is not a view schema at all, and the population is nine rather than seven.

That kills a justification, not the finding. It specifically kills the card's first repair option as argued — "any[] (match the six siblings, one vocabulary)" — because there is no one vocabulary to match.

The disposition, and the ground it was chosen on

Chosen: filter?: QueryParams['$filter'], on the destination-typing ground — the type the docblock itself names, reached by indexed access so the two cannot drift. ⛔ Not on "the siblings all say any[]", which is false.

Two grounds were rejected, and both for measured reasons:

  • any[] (array-only). QueryParams['$filter'] accepts the ObjectQL field-keyed record too, and data.ts's own docblock names both forms as normal. Declaring only the array arm would refuse the record form that the destination accepts — over-narrowing against the sentence being honoured.
  • Leaving the zod mirror at z.unknown(). Measured, not assumed: with the TS face narrowed and the mirror reverted, zod-mirror-parity stays green at 32/32 and tsc -p tsconfig.test.json exits 0, because that file's Unconstrained predicate excludes an unknown mirror slot from its wider-than-declared comparison by definition. The split would have been real and unreported. Both faces move together for that reason.

The census this PR removes from prose is re-derived instead by packages/types/src/__tests__/object-gallery-filter-9309.test.ts, which walks the AST on every run (AGENTS.md #9 — point at the instrument, never write down its answer).

Accept-set change, stated plainly

NARROWS, both faces. unknown is the widest type there is, so every value the new declaration refuses used to compile: filter: 'stage=won' and filter: 42 are type errors now, and the mirror refuses them at parse time. Both object arms are unchanged and no runtime behaviour moves — the value still travels to $filter byte-for-byte.

The consumer count, measured

The card asserts nothing in this repository could read the key without asserting it first. Measured on this branch:

  • ObjectGallerySchema is imported by exactly one non-test source outside @object-ui/types: packages/plugin-list/src/ObjectGallery.tsx. ObjectQLComponentSchema, the union arm through which the type could otherwise be reached, is imported by packages/cli and by tests only.
  • Three sites build { type: 'object-gallery', ... } nodes — plugin-list/src/ListView.tsx, plugin-view/src/ObjectView.tsx, plugin-detail/src/RelatedList.tsx. None of the three literals is annotated with this interface.
    • ⚠️ CORRECTION, written in by the domain:ui#2 execution seat. The sentence that stood here also said 「None of them sets filter on the gallery node」, and that half is FALSE. It was falsified by the at-tier contract review on this PR and then re-derived by this seat on origin/main: plugin-list/src/ListView.tsx builds const baseProps = { carrying filter: schema.filter,, and spreads ...baseProps into the type: 'object-gallery' literal — so that node DOES carry filter.
    • ⭐ The zero-breakage conclusion survives, on grounds measured rather than assumed: that file never names ObjectGallerySchema at all (0 occurrences; control, same command, ListViewSchema 22), so the literal is never checked against this member — and ListViewSchema.filter is z.array(z.any()), which is assignable to the new type either way. ⇒ the claim was wrong and the conclusion it supported is right for a different reason, which is exactly why it is corrected here rather than left to be discovered as a contradiction later.
  • @object-ui/plugin-list type-checks clean against the rebuilt declaration (exit 0), and @object-ui/cli likewise.

⚠️ That in-repo zero is not a claim about downstream consumers. The change is breaking for any TypeScript consumer that assigned a non-object value to this key.

Evidence

Reverse validation, both legs mutated on disk and restored byte-identically (git hash-object compared before and after; trap-restored):

  • Reverting the TS member to unknown turns four independent things red: the census test (2 assertions), the Equal pin and its unknown control (TS2344 twice), both @ts-expect-error directives (TS2578 twice), and zod-mirror-parity.test.ts itself (TS2322 at the gallery pair) — the ledger sees the mismatch once the mirror is narrowed, which it could not before.
  • Reverting the zod mirror to z.unknown() turns the runtime refusal red on filter: 'stage=won' while the parity suite stays green — the blind-spot measurement quoted above.
  • A cross-package leg: a temporary literal assigning a string to this key inside plugin-list makes that package's type-check red with TS2322 ... not assignable to type 'Record<string, any> | FilterArray | undefined', which is what proves the green above was read off the rebuilt .d.ts and not a cache. Probe removed; file restored byte-identically.

Runs (all foreground, heavy ones serialised through the shared verify lock):

run result
pnpm exec vitest run packages/types/ packages/plugin-list/ 269 files / 5346 tests passed
pnpm --filter @object-ui/types run type-check exit 0
pnpm --filter @object-ui/plugin-list run type-check exit 0 (after building its dependency closure)
pnpm --filter @object-ui/cli run type-check exit 0
pnpm --filter @object-ui/types build exit 0; narrowing verified present in dist/objectql.d.ts
node scripts/check-changeset-presence.mjs exit 0 — 1 changeset declared
pnpm run check:control-bytes exit 0
node scripts/check-governed-queue-guard.mjs --test NOT GOVERNED — 4 paths, none matched

Baseline before any edit, same command, same tree: packages/types/ 190 files / 4372 tests passed.

Acceptance notes

Residuals named, ⛔ none of them done here. This card's scope is ObjectGallerySchema.filter and nothing else.

  1. ObjectDataTableSchema.filter is any — the widest of the nine spellings, and the one that defeats the checker outright rather than merely under-describing. Worth its own card.
  2. ObjectChartSchema.filter is any[] | Record<string, any> — a hand-spelled near-copy of the same destination, and its own docblock says narrowing to the spec's array-only FilterArray is now a deprecation rather than a defect (objectui#8944 removed the blocker). Worth its own card.
  3. NamedListView.filter is counted as a sibling view schema in at least three places — the card, ObjectChartSchema's docblock (repaired here, see below) and packages/plugin-dashboard/src/ObjectPivotTable.tsx. It is the named-view interface, not a view schema. Category error.
  4. ObjectPivotTable.tsx names an interface that declares no filter at all. Its comment lists ObjectViewSchema among six array-only owners; measured, ObjectViewSchema declares none, and the sixth owner is NamedListView. So that comment is wrong in both directions at once. Untouched — outside this PR's declared file surface.
  5. packages/plugin-list/src/ObjectGallery.tsx still carries schema.filter as QueryParams['$filter'] plus a comment describing the key as "declared unknown — the one view schema in @object-ui/types whose filter is not any[]". After this PR the assertion is a redundant identity cast and the comment is false. ⚠️ Falsified by this change, and NOT repaired here: plugin-list is outside the file surface this round declared, and the declared handling for a breach is to stop and report it rather than widen the PR. It wants a follow-up.
  6. packages/types/src/zod/objectql.zod.ts's ObjectChartSchema comment still says narrowing is "blocked on the drill-down spread", which its TS twin says objectui#8944 already repaired. Pre-existing, untouched.
  7. .changeset/objectchart-schema-anchor-7946.md carries the same "six sibling object-* widgets ... are already array-only" sentence. It is a release note for work already done; not edited.

One in-file repair beyond the gallery key, declared rather than smuggled. ObjectChartSchema's docblock called that key "the only object-* filter with a record arm". This PR's own change makes that false — the gallery now has a record arm — so the sentence is repaired in the same commit, in the same file, and it now points at the census test instead of carrying a count. Nothing about ObjectChartSchema's type moves.

Attribution

Generated by Claude Code, session session_01L5xpA5q533BgTTNADibEFt. Landing is the seat's: this PR stays draft, is not enqueued, and carries no auto-merge.


Generated by Claude Code


Generated by Claude Code

…tion

The declaration read `filter?: unknown` under the docblock "Query filter,
forwarded verbatim as `$filter`". `$filter` is `QueryParams['$filter']`
(`Record<string, any> | FilterArray`, declared in `data.ts`), so the
declaration named a destination it did not type: the documented forward
did not compile, and the only way through was an assertion, which
un-checks the destination's real type at that call site too. AGENTS.md
0.1 points the other way -- fix the declaration, do not widen the
consumer.

Both faces move together. The TS member is now an indexed access on
`QueryParams` rather than a copy of its arms, so it cannot drift from
the slot the docblock names. The zod mirror narrows in the same change
because `zod-mirror-parity`'s `Unconstrained< T >` excludes an `unknown`
mirror slot from its `WiderThanDeclared` comparison by definition --
measured, not assumed: with the mirror reverted to `z.unknown()` and the
TS face narrowed, that suite stays green at 32/32.

NARROWING of a published accept set, both faces: `filter: 'stage=won'`
and `filter: 42` used to compile and to parse, and now do neither. Both
object arms are unchanged and no runtime behaviour moves.

Also drops the sibling census that `ObjectChartSchema.filter`'s docblock
stated in prose, which this change falsified in the same file: it called
that key the only `object-*` `filter` with a record arm, and the gallery
now has one. The docblock points at the new census test instead of
carrying a number (AGENTS.md 9).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5xpA5q533BgTTNADibEFt
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3062.8 KB 3104.5 KB
Main entry chunk (gzip) 145.7 KB 350 KB
Entry file index-CMgmdN_U.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.69KB 6.21KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 544.93KB 130.50KB
core (index.js) 8.52KB 3.41KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 215.98KB 59.97KB
fields (index.js) 249.20KB 62.88KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.22KB 2.26KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 32.15KB 10.49KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.83KB 10.95KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 14.81KB 3.63KB
plugin-calendar (index.js) 49.99KB 14.24KB
plugin-charts (index.js) 71.33KB 19.90KB
plugin-chatbot (index.js) 195.34KB 46.51KB
plugin-dashboard (index.js) 131.44KB 34.65KB
plugin-designer (index.js) 215.94KB 44.33KB
plugin-detail (index.js) 252.48KB 65.61KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 136.71KB 34.16KB
plugin-gantt (index.js) 167.62KB 41.26KB
plugin-grid (index.js) 212.83KB 57.97KB
plugin-kanban (index.js) 46.63KB 14.53KB
plugin-list (index.js) 112.67KB 27.68KB
plugin-map (index.js) 21.48KB 6.99KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.41KB 11.93KB
plugin-timeline (index.js) 30.07KB 8.74KB
plugin-tree (index.js) 10.58KB 3.72KB
plugin-view (index.js) 84.89KB 20.96KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 99.04KB 32.62KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.66KB 2.50KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 14.82KB 4.99KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 14.04KB 5.36KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

⛔ Landing gate ② is blocked by a FALSE POSITIVE, and I am not clearing it the way the script says would clear it

Read at 2026-09-15T00:26Z. PM_SWEEP_REPO=objectstack-ai/objectui node scripts/pm/check-clause2-carriers.mjs --pair 9540 → exit 4:

✗ C5 — card #9309 (delivering open PR #9540 (draft)) declares Clause-②: no while its diff carries 1 widening tell(s) … packages/types/src/zod/objectql.zod.ts:1811 (T1)
T1 … — a new key on a Zod object schema — the accept set gains a spelling an author may now write — + filter: z.union([

The tell's premise is false here, and the diff says so in the same hunk. git diff 4f0fbce38f 3e60765fb4a8 -- packages/types/src/zod/objectql.zod.ts:

 export const ObjectGallerySchema = BaseSchema.extend({
   type: z.literal('object-gallery'),
   objectName: z.string().optional().describe('ObjectQL object name'),
-  filter: z.unknown().optional().describe('Query filter, forwarded verbatim as $filter'),
+  … comment block …
+  filter: z.union([

⇒ filter is replaced, ⛔ not added. The matcher reads the + line without checking whether the same key left on a - line in the same hunk, so a replacement is scored as an addition.

And the direction is inverted. The removed spelling is z.unknown() — zod's universal acceptor. Every value the new union accepts was already accepted; some values accepted before ('stage=won', 42, per the dev's measurement, which the review seat is verifying independently) are now refused. ⇒ the accept set shrinks. The published TS face moves the same way, unknown → QueryParams['$filter']. Neither limb of SKILL.md:476's disjunction fires — nothing is relaxed and nothing is widened — so Clause-②: no stands as declared.

⛔ I am not re-declaring yes, and the script itself is why. Its C5 docblock states the price of doing that, in its own words:

⚠️ A TELL, never a proof, in BOTH directions: a false negative is the cost the ruling accepted when it took the directional reading, and a false POSITIVE is repaired in the matcher — ⛔ not paid for by the author. This file priced it at "one word in the claim comment" until #16822 measured the price: the exit-0 condition is "no tell, OR the declaration is not no", so the only word that clears a false tell is Clause-②: no → yes — a widening recorded in a governance ledger that did not happen, and afterwards indistinguishable from one that did.

⇒ flipping the declaration would buy a green exit by writing a widening into the governance record that did not occur. The same docblock closes the other door too: "⛔ Nothing about this row is relaxed by saying so: the exit stays non-zero and stays a hard block."

So the honest state of this PR is: the change looks right and the review is running, but gate ② cannot pass on my authority, and I will not enqueue without it. This is not a defect in the diff and ⛔ nothing here is asked of the dev.

What happens next

  1. A card is filed against the matcher in objectstack — the repair is that a + key whose same key appears on a - line in the same hunk is a replacement, and a replacement out of z.unknown() or z.any() cannot widen by construction. Linked from this PR once it exists.
  2. Round-1 contract review is already running at this head; ① is independent of this and proceeds.
  3. When the matcher is repaired, --pair 9540 is re-run as the landing reading. If it still refuses, that is a real disagreement and goes to the maintainer, ⛔ not around the gate.

⚠️ For whoever reads this later: the --pair exit stayed 4. ⛔ Nothing in this comment clears it, and a green exit is not implied by anything above. The script is right to block; its matcher is what needs the fix.


Generated by Claude Code

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

The matcher card is filed, and the false positive is now measured rather than argued

objectstack#18234 — filed bare and unassigned; routing and grading are triage's.

What changed since the comment above: I stopped arguing the direction and measured the matcher. Running wideningTells(…, { repo: 'objectstack-ai/objectui' }) from scripts/pm/check-widening-tells.mjs on this diff and on four controls:

case result
this PR — - filter: z.unknown()… → + filter: z.union([ FIRES T1
the same removal → + filter: z.array(z.any()).optional()… declines
a genuinely new key, nothing removed FIRES ✅
z.enum(['a','b']) → z.enum(['a','b','c']) FIRES ✅
z.enum(['a','b','c']) → z.enum(['a','b']) declines ✅

⭐ Row 2 is the whole finding: the same semantic change declines when the new value is spelled z.array(z.any()) and fires when it is spelled z.union([…]). Direction identical, spelling different. ⛔ That is not a reason to re-spell this PR to dodge the gate — the union is the right shape for a two-arm destination type, and re-spelling to please a matcher is the kind of thing that makes the next reader believe the matcher was right.

Root cause, read in the source: #16943's replacement budget is earned here (the removed filter: line is T1-shaped and buys a T1 unit) and then refused at the spend, because the added line opens z.union(. #17618 lets a closed-set-valued key spend only on "a removed line naming the SAME key, both member lists readable on their own line, and the added list a SUBSET of the removed one" — and the removed value z.unknown() has no member list, because it is not a closed set. It accepted the universe, so every replacement is a subset by construction; the three-fact test has no way to say that.

⚠️ Disclosed because it is the kind of thing this lane fails on: my first run of that probe was void — I called wideningTells without { repo }, so every case declined including the two that must fire. An objectui path is off-surface when the repo defaults to objectstack. The table above is the re-run in which the controls fire.

State of this PR is unchanged and stated plainly: --pair 9540 still exits 4, gate ② still does not pass, and this PR is not enqueued. Round-1 contract review is running at this head and is independent of all of the above.


Generated by Claude Code

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Contract review

Independent review seat for objectui#9540 at head 3e60765fb4a80c3ee5c098b8133a26533de39842 (card objectui#9309). Every figure below was re-derived on this seat's own instruments in a fresh clone; the card, the claim comment 5672443215 and the dev report 5672743091 were read as claims to test, not as findings to adopt. ⛔ No label hung, added or removed; no review submitted; nothing approved, merged, enqueued, undrafted, pushed or re-run.

Merge-base derived here, not adopted. The shared checkout's origin/main is stale at 1cca4415e, so main was fetched from GitHub (75fca9669a3df84b065c1e9ded0946d67112000d) before measuring: git merge-base 3e60765fb4 gh/main → 4f0fbce38f6f19fa0fb6e776afa0f1091d6dab9a. It happens to equal the API's base.sha; that is a result, not an input. Against it: 4 files, +334/−8, 1 commit — confirmed by git diff --numstat.

Claims tested: 26, enumerated twice and agreeing (wc -l over the ledger → 26; distinct claim ids via awk | sort -u → 26). 22 confirmed, 1 refuted, 1 split, 1 sound-but-unmeasured, 1 confirmed-correct-against-policy. The population those claims range over — the filter declarations in packages/types/src/objectql.ts — is proved at 9 below by two independent enumerations that agree.


1. The census — 9 declarations, 4 spellings, counting rule beside the number

⭐ Counting rule: every filter property signature in packages/types/src/objectql.ts, charged to its owning interface by the nearest enclosing InterfaceDeclaration, ⛔ never by proximity to the nearest preceding export interface line. Optionality is recorded rather than assumed — and, measured, all 9 carry a ?, so the "optional" qualifier in the dev's rule is currently vacuous and does not do any of the work. ⛔ No line numbers pinned in prose.

Two instruments, written independently of the PR's committed test and of each other:

  • A — TypeScript AST, owner resolved by walking PARENT POINTERS upward from each filter property signature. Deliberately not the descent-carry algorithm the PR's test uses.
  • B — no TypeScript library at all: blank out comment bodies and string/template literals preserving offsets, then brace-walk a stack of interface <Name> blocks.

Both print the same 9 rows, in the same order, with the same owners and spellings, at the merge-base and at head:

owning interface before after
ObjectGridSchema any[] any[]
NamedListView any[] any[]
ObjectMapSchema any[] any[]
ObjectGanttSchema any[] any[]
ObjectCalendarSchema any[] any[]
ObjectKanbanSchema any[] any[]
ObjectChartSchema any[] | Record<string, any> unchanged
ObjectGallerySchema unknown QueryParams['$filter']
ObjectDataTableSchema any any

A third, cruder enumeration agrees: grep -oE '^[[:space:]]*filter[[:space:]]*\??[[:space:]]*:' | wc -l → 9 at both revisions (firing control on the same regex family: objectName → 11). Occurrence counts, ⛔ never grep -c: filter?: any[]; → 6/6 · filter?: unknown; → 1 before / 0 after · filter?: any; → 1/1 · filter?: QueryParams['$filter']; → 0 before / 1 after. Base file length 4244 lines — the seat's figure, reproduced.

Firing control for the ownership rule. A fixture where proximity and the parser disagree (export interface Alpha { … } closed, its name repeated in prose, then export type Beta = { filter?: number }, a member nested one object deep inside Gamma, a filter?: inside a block comment, and one inside a string literal). The proximity rule returns 5 rows and charges Beta's member to Alpha; both of my instruments return 3 rows with that owner undefined, and both ignore the commented and the stringified one. The control fires, so the 9 is a reading.

⚠️ A blind spot I found in my own instruments, and in the PR's: all three resolve the key by identifier, so a quoted 'filter'?: member would be missed. Closed separately — grep -oE "['\"]filter['\"]\s*\??\s*:" → 0, with a same-file firing control (6 quoted keys of other names exist). So the zero is a reading, not a silence.

2. The card's comparative claim — the refutation is CONFIRMED, and is stronger than stated

The card's raw counts both reproduce (6 × any[], 1 × unknown). The framing around them does not:

  • The population of filter declarations is 9, not the seven the card's "six siblings plus this one" implies. ObjectChartSchema (any[] | Record<string, any>) and ObjectDataTableSchema (any) are also not any[], so ObjectGallerySchema was never "the one … that is not any[]".
  • ⚠️ NamedListView is confirmed not a view schema, on evidence rather than on assertion: it is the only one of the 9 owners with no extends BaseSchema and no type: 'object-*' literal discriminant — its type? is 'grid' | 'kanban' | 'gallery' | … and its own docblock says "Used in ObjectViewSchema.listViews". It is a nested named-view definition, not a widget node.
  • ⇒ Restricted to actual view schemas, the true shape is: 8 of the 9 owners are view schemas, and only 5 of those 8 are any[] (grid, map, gantt, calendar, kanban). So the card's "six" over-counts the array-only view schemas by one and under-counts the non-any[] ones by two, at the same time.

The defect itself survives untouched: unknown still promised a destination it did not type, and it was still the only one of the nine an author could not forward without asserting.

3. Direction — narrowing on both faces, measured with a control that fires

TS face. unknown is the top type, so any replacement narrows — but measured rather than asserted. A scratch probe under tsconfig.test.json asserted seven expected-accepted and four expected-refused assignments, plus one deliberate unsuppressed control. tsc exited 2 with exactly one diagnostic — the control:

error TS2322: Type '"this line must be TS2322"' is not assignable to type 'Record<string, any> | FilterArray | undefined'.

So the four @ts-expect-error silences (string, 42, null, unknown) were used, and the seven acceptances (any[], Record<string, any>, ListViewSchema['filter'], undefined, [['status','=','active']], { age: { $gt: 18 } }) are readings. Probe deleted; git status --porcelain empty afterwards.

Zod face. ⛔ Not assumed from "z.unknown() is the universal acceptor" — measured on the pinned zod 4.4.3 over 11 samples. z.unknown().optional() accepted all 11, functions and Date included (that is the control for the acceptor claim, and it fired). The new union accepts undefined, [], [['status','=','active']], {}, { age: { $gt: 18 } } and refuses null, 'stage=won', 42, true, Date, function. A second control (z.never()) refused everything. ⇒ strictly fewer values accepted at runtime, on both faces. The dev's filter: 'stage=won' / filter: 42 claim holds in both directions — see §5 for the proof that they used to compile.

Arm order. The comment's factual half is true: ObjectChartSchema.filter above is spelled with the identical two arms in the identical order. The reasoning — "a z.record arm placed first would have to be trusted to refuse an array" — is a claim about what you would be relying on, not a claim that z.record fails, and read that way it is sound: array-first removes a dependency on another schema's internals. ⚠️ For the record, the dependency would have held: measured on zod 4.4.3, the bare z.record(z.string(), z.any()) arm refuses an array, and a record-first union is observationally identical to the shipped one on all 11 samples. On an array input the shipped union accepts and returns the array unchanged (Array.isArray(out) === true, value byte-identical), which is what the "forwarded verbatim" sentence needs.

4. The declared deviation — (a) genuinely falsified, (b) correctly repaired, (c) in scope

  • (a) Falsified — yes, by this diff specifically. Before: gallery was unknown, so ObjectChartSchema.filter was indeed the only object-* filter spelled with a record arm. After: gallery is Record<string, any> | FilterArray, which has one. The sentence flipped from true to false in this commit; it is not a pre-existing error waved through.
  • (b) Correctly repaired. The replacement carries no count, points at __tests__/object-gallery-filter-9309.test.ts, and cites AGENTS.md 完善设计器的每一个细节 #9 — which I checked verbatim: commandment 完善设计器的每一个细节 #9 (AGENTS.md:109) says "point at the instrument that re-derives it … and never write down its answer". That is the house convention, not a convenient reading (24 citations across 20 files in-repo). ObjectChartSchema's type does not move — my census shows its spelling identical before and after.
  • (c) In scope. The edit is inside packages/types/src/objectql.ts, which the claim named as the file surface. Leaving it would have shipped a statement this same commit made false, in the same file. ⇒ Not waved through because it was declared; it holds on its own.

⚠️ One asymmetry worth a follow-up, not a block. The same claim survives one file over in this PR's other changed file: packages/types/src/zod/objectql.zod.ts, ObjectChartSchema's comment still says "the six sibling object-* widgets are already array-only", ~85 lines above the line this PR changes. Strictly the dev is right that this diff does not falsify it — on the zod face the array-only object-* filter owners were ObjectGrid/Map/Gantt/Calendar/Kanban before and after, and the gallery was never among them. But that count is five, not six, so the sentence was already wrong on its own face, and its TS twin was repaired in this very commit. The dev's residual list names only the "blocked on the drill-down spread" clause of that comment, not this one.

5. The claimed blind spot — CONFIRMED by reading the predicate AND by reversing the mirror

Read, not taken on report. zod-mirror-parity.test.ts defines

export type Unconstrained< T > =
  [unknown] extends [T] ? true : … ;

export type WiderThanDeclaredKeys< M, D > = {
  [K in MirroredKeys< M > & DeclaredKeys< D >]:
    Unconstrained< InputOf< ShapeOf< M >[K] > > extends true
      ? never          // ← the key leaves the comparison
      : …
}[…];

Unconstrained<unknown> is true, so a z.unknown() mirror slot yields never and the key is dropped from the wider-than-declared comparison by construction — however narrow the declaration beside it. The file even pins the behaviour itself (assertionUnconstrainedFaceIsExcludedButNotAWaiver: a z.ZodUnknown slot reports nothing while a concrete widening on the same synthetic still reports).

Reversed on disk to confirm it is live, not just documented (own clone; mutation proved by occurrence counts, restored and verified byte-identically by git hash-object):

  • Mirror reverted to z.unknown(), TS face left narrowed → tsc -p tsconfig.test.json exit 0, and zod-mirror-parity.test.ts stays green, 32/32. The split is real and nothing in the existing suite reports it. ⇒ dev claim CONFIRMED.
  • Does the PR's new test close it? Yes, for this key: in that same run the only failure in the whole 42 was
    AssertionError: filter: "stage=won" should be refused: expected true to be false.
    ⚠️ It closes it for this key only — Unconstrained still excludes every other z.unknown() mirror slot by definition, and the PR does not claim otherwise.
  • The zero above has a firing control, because a zero needs one: the same tsc -p tsconfig.test.json invocation, with the TS member reverted to unknown instead, exits 2 with five diagnostics — so the invocation is live.

And the narrowed mirror does more than the dev claimed. That same reversal shows the existing gate now covers this pair on its own:

object-gallery-filter-9309.test.ts(84,10): error TS2344   ← the Equal pin
object-gallery-filter-9309.test.ts(96,10): error TS2344   ← the `unknown` control
object-gallery-filter-9309.test.ts(107,1): error TS2578   ← @ts-expect-error unused
object-gallery-filter-9309.test.ts(109,1): error TS2578   ← @ts-expect-error unused
zod-mirror-parity.test.ts(2814,14):        error TS2322   ← the gallery pair, in the ledger

Four independent reds exactly as reported, and the two TS2578s are the proof the direction claim needs from the other side: filter: 'stage=won' and filter: 42 are not errors when the member is unknown, i.e. they compiled before this PR. The census assertions go red too (2 of 42 in the vitest leg).

6. Breakage — re-derived, and one dev premise does not hold

  • In-repo consumers of the key: 1. git grep -l '\bObjectGallerySchema\b' → 19 files (controls: ObjectKanbanSchema → 84 files; ObjectGalleryzzSchema → 0). Of those, exactly one non-test source outside @object-ui/types imports the type: packages/plugin-list/src/ObjectGallery.tsx:14. packages/plugin-dashboard/src/ObjectPivotTable.tsx:67 only mentions it in a comment. The union route ObjectQLComponentSchema reaches non-test code only through packages/cli/src/utils/union-arm-diagnostics.ts outside types. ⇒ CONFIRMED.
  • Producers: 3 — plugin-list/src/ListView.tsx:2784, plugin-view/src/ObjectView.tsx:1528, plugin-detail/src/RelatedList.tsx:1585. ⇒ count CONFIRMED.
  • ⛔ "None of them sets filter on the gallery node" is REFUTED. ListView.tsx's gallery literal is { type: 'object-gallery', ...baseProps, … }, and baseProps (ListView.tsx:2604) is built with filter: schema.filter under a comment that says so explicitly ("Every child view — ObjectGrid, ObjectGallery, … — reads schema.filter"). Following the spread, one of the three producers does set filter on the gallery node. The other two do not, as far as I measured: ObjectView's baseProps (lines 1276–1316) contains the token filter zero times and RelatedList's literal has none — ⚠️ I did not enumerate the members of the ...(viewOptions.gallery || {}) spread on the ObjectView branch, so that one is unmeasured rather than shown empty.
  • ⭐ The conclusion survives anyway, on two grounds I measured rather than on the one that failed. (i) None of the three literals is annotated with ObjectGallerySchema — none of the three files even imports the symbol — so tsc never checks them against the narrowed member. (ii) Even if one were, ListViewSchema['filter'] is assignable to QueryParams['$filter'] (one of the seven silent legs of the probe in §3, alongside the control that fired). ⇒ zero in-repo breakage stands; the premise offered for it does not.

What this breaks downstream, plainly. For a TypeScript consumer of @object-ui/types outside this repository, ObjectGallerySchema['filter'] goes from unknown — which accepts every value — to Record<string, any> | FilterArray | undefined. Any consumer that assigned a string, a number, a boolean, null, a Date, a function, or any non-object value to that key now fails to compile, and any consumer that read the key and relied on narrowing unknown themselves may find their narrowing dead code. The zod mirror refuses the same values at parse time, so a consumer that was safeParse-ing an authored gallery node with filter: 'stage=won' moves from green to a parse failure — a runtime-visible break, not only a compile-time one. The in-repo zero is a statement about this repository and nothing else, and both the PR body and the changeset say so.

7. The follow-up the dev refused — reading CONFIRMED, and stopping was right

packages/plugin-list/src/ObjectGallery.tsx:466 still carries $filter: schema.filter as QueryParams['$filter'], under a comment (:458–460) calling the key "declared unknown — the one view schema in @object-ui/types whose filter is not any[]". After this PR both halves are false: the member is no longer unknown, and it never was the only non-any[] one (§2). The assertion is now a redundant identity cast — git diff --name-only confirms the file is untouched by this commit.

Stopping was right: plugin-list is outside the declared file surface, and the declared handling for a breach is to stop and report. It is also harmless to leave for now, measured: @typescript-eslint/no-unnecessary-type-assertion is type-aware and type-aware linting is not enabled — eslint.config.js:84 extends tseslint.configs.recommended, not recommendedTypeChecked, with no projectService / project / parserOptions anywhere in the file (firing control on the same file: rules|plugins → 20 matches). So nothing goes red; what is left behind is false prose, which is exactly what a follow-up is for.

⚠️ Two more sites this diff falsifies that the residual list under-names: ObjectPivotTable.tsx:67 now also mis-states the gallery as unknown (the dev named that file only for its ObjectViewSchema/NamedListView category error — which I confirm: ObjectViewSchema declares no filter, and NamedListView does), and .changeset/objectchart-schema-anchor-7946.md:42 carries the "six sibling … already array-only" sentence.

8. Ancillary

  • Changeset. .changeset/9309-object-gallery-filter-destination-typed.md declares '@object-ui/types': minor for a breaking change. ⭐ That is correct here, not a miss: AGENTS.md:262 rules that objectui's own breaking changes are labelled minor with the breaking semantics written in the body, and scripts/check-changeset-no-major.mjs enforces it mechanically. The body does state it. node scripts/check-changeset-presence.mjs → exit 0.
  • Type-check, full script. tsc --noEmit && tsc -p tsconfig.examples.json && tsc -p tsconfig.test.json in packages/types → exit 0 (VERDICT line, not a bare $?). Serialised through /home/user/objectstack/scripts/pm/os-verify-lock.sh.
  • Tests. vitest run over the new file + zod-mirror-parity.test.ts → 2 files / 42 tests passed (the new file contributes 10, the parity file 32).
  • The new test itself is non-vacuous: it carries its own reader control (census.length > 0), a bare-node control, the objectui#7927 index-signature ceiling pinned rather than claimed away, and an ownership control on a fixture where the two rules disagree. Its typescript import is a declared devDependency of @object-ui/types and lives under src/__tests__, which the build tsconfig.json excludes — no runtime dependency reaches the published package.

③ Landing reading — polled to settlement

GET /repos/objectstack-ai/objectui/commits/3e60765fb4a80c3ee5c098b8133a26533de39842/check-runs?per_page=100 (⛔ no check_suite aggregate accepted; no Link header, so a single page):

  • total_count = 36; returned array length = 36; EQUAL ✅
  • conclusion tally: 33 success · 3 skipped · 0 anything else
  • not green: 0 · still running: 0
  • legacy combined status, reported separately: state: success, 1 context (Vercel) — ⛔ not folded into the 36.

⚠️ Test (shard 1/4): success. Started 00:16:05Z, completed 00:27:06Z — 661s against the 20-minute ceiling, a margin of 539s. The objectui#9499 cancellation did not fire on this head, so there is nothing to attribute to it and nothing was re-run. The tightest shard this run was Test (shard 2/4) at 1019s (margin 181s), still clear.


Verdict: PASS

The change does what it says on both faces, it is a strict narrowing measured rather than asserted, the mirror moves for a blind spot I reproduced rather than took on report, the census is re-derived by an instrument instead of written into prose, the one edit beyond the card's key is genuinely forced by this diff and correctly repaired, the scope stop at plugin-list was the right call, and CI is settled fully green with total_count equal to the returned array length.

Two corrections that do not change the disposition and are recorded rather than held against it: the dev's "none of the three producers sets filter on the gallery node" is false for ListView.tsx (§6) — the zero it supported survives on two other grounds I measured — and the zod-face twin of the docblock sentence repaired on the TS face is left standing in a file this PR edits (§4). Both belong in the follow-up alongside plugin-list.

This seat's own errors, disclosed

  1. I first read the AGENTS.md #9 citation as section 9 ("Operational Rules") and was ready to call the citation false; 完善设计器的每一个细节 #9 is a commandment in section 5, at AGENTS.md:109, and says verbatim what the PR quotes. My error, corrected before it reached a verdict.
  2. My first two census instruments — and the PR's committed one — are blind to a quoted 'filter'?: key, which my own control fixture exposed. I closed it with a separate grep carrying its own firing control (§1) rather than reporting the 9 from instruments I had just found a hole in.
  3. My first lock invocation exited 126 (the shared script is not executable and I must not chmod it); that 126 was not a measurement and is not reported as one — every figure above comes from a re-run via bash <path> that printed a VERDICT line.
  4. node scripts/check-changeset-presence.mjs ran in my clone against its stale local base and reported over a 1950-file window. I record only its exit code; ⛔ its 451-changeset figure is not a reading about this diff, and the authoritative signal is the green Changeset Declaration check at head.

Implemented-by: claude/issue-9309-object-gallery-filter-typed-unknown
Reviewed-by: session_01L5xpA5q533BgTTNADibEFt


Generated by Claude Code

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Two gates met, one blocked — this PR is HELD, not stalled, and the blocker is named

Read at 2026-09-15T00:46Z.

gate reading
① Round-1 independent review returned PASS in comment 5672932421 (fetched, claude[bot], 00:44:12Z), declaring head 3e60765fb4a80c3ee5c098b8133a26533de39842. GET /pulls/9540 → head.sha is the same 40-character string, compared in full. MET.
③ total_count 36 == 36 returned; {success: 33, skipped: 3}; 0 not-green, 0 still running; legacy combined success (1 context, reported separately); mergeable_state clean. MET (draft check set; a 37th check would start on undraft).
② --pair 9540 → exit 4, re-run at 00:46Z. NOT MET, on the C5 false positive analysed above and filed as objectstack#18234.

⇒ not enqueued, and not enqueueable by me. ⛔ Two of three is not the bar; the bar is three of three.

What the review found, since it bears on how long this should wait. It reproduced the census on two instruments written independently of the PR's own test and of each other, and confirmed the refutation is stronger than the card stated: restricted to actual view schemas, 8 of the 9 owners are view schemas and only 5 of those are any[], so the card's "six" over-counted the array-only ones and under-counted the non-any[] ones at the same time. It measured the narrowing on both faces with controls that fire (zod 4.4.3, 11 samples; tsc with one deliberate unsuppressed control that produced exactly one diagnostic). It reversed the mirror on disk and reproduced the zod-mirror-parity blind spot rather than taking it on report, and found the narrowed mirror does more than the dev claimed — the existing ledger now covers this pair on its own.

It also corrected the dev on a premise: "none of the three producers sets filter on the gallery node" is false for ListView.tsx, whose baseProps carries filter: schema.filter through a spread. The zero-breakage conclusion survives on two other grounds the reviewer measured, and it says so plainly rather than letting the failed premise stand.

Why I will not clear ② myself. The only mechanical clear is flipping Clause-②: no → yes, which the script's own docblock describes as "a widening recorded in a governance ledger that did not happen, and afterwards indistinguishable from one that did." Re-spelling the union to please the matcher is the same evasion wearing a nicer hat. Both are available and both are refused.

This is now a maintainer item, and it is stated as one. A reviewed, green, correct PR is held out of the queue by a matcher defect of a class that has been fixed twice before (objectstack#16822, objectstack#16943) and has recurred in the one shape the successor's three-fact test cannot express. #17618's own docblock describes the identical situation in its own history — "it exited 4 against a correct Clause-②: no and held a reviewed, green retirement PR out of the queue."

The seat's position, offered with the measurement attached: fix-first — land objectstack#18234, then re-run --pair 9540 as the landing reading. ⛔ No exception, no override, no re-spelling. If the wait is judged too long, that is a maintainer call and not mine to make.

⚠️ Until then this PR stays draft, unqueued, and watched. Its head does not move, so ① and ③ stay valid; ⛔ if anything pushes to this branch, all three readings are void and the round restarts.


Generated by Claude Code

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Patrol input — a cross-lane same-file fence, recorded here because it lives nowhere else

Half-state sweep run by this seat at 2026-09-15T08:43Z (PM_SWEEP_REPO=objectstack-ai/objectui, exit 0, 387 rows, untrimmed plain format):

H36 #8941 open and ready AND armed, sharing 1 changed file(s) with open PR #9540 (packages/types/src/objectql.ts) — a cross-lane same-file hold made visible: the fence otherwise lives only in one lane's claim comment, and mergeable_state volunteers nothing (unknown is not a reading).

⇒ #8941 (chore(deps): lucide-react …) is ready and armed and touches the same file this PR does. ⛔ This PR is pm:blocked behind objectstack#18234 and is not moving today, so there is nothing to do about it now — but whoever un-blocks it should expect packages/types/src/objectql.ts to have moved underneath, and re-take the file-面 intersection before pushing rather than assuming this branch's base still holds.

⛔ Report-only, ⛔ not a gate verdict, and ⛔ no action is being taken on #8941 by this seat (chore(deps) is outside this seat's follow-through面).


Generated by Claude Code

akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…aces (objectstack-ai#8801) (objectstack-ai#9621)

Fixes objectstack-ai#8801

Retires `ObjectKanbanSchema.allowCollapse` on the `object-kanban` arm,
on both
published faces, under ADR-0049 enforce-or-remove. Executes the director
seat's
class-1 self-adjudication of 2026-09-16 (letter A — retire; B, wiring a
reader,
was refused as a capability nobody asked for).

## What the key was

Declared on the TypeScript face (`allowCollapse?: boolean`) and on the
zod
mirror (`z.boolean().optional()`), and read by **no registered board**.
An
author who wrote `allowCollapse: true` type-checked green, parsed green,
and got
a board that never collapsed anything off it — a published entry point
with
nothing behind it.

## What landed

| face | before | after |
| --- | --- | --- |
| `packages/types/src/objectql.ts` | `allowCollapse?: boolean` |
`allowCollapse?: never` (tombstone) |
| `packages/types/src/zod/objectql.zod.ts` |
`z.boolean().optional().describe(...)` | `retirementTombstone(...)` |

An **ADR-0087 D2 tombstone, not a deletion**, and that is load-bearing:
`BaseSchema` carries an index signature and its mirror ends
`.passthrough()`, so
a dropped member would be **kept, not refused** — one silent no-op
traded for
another. The member stays declared and unwritable, so the value is
refused BY
NAME with a prescription attached.

## Premises, re-measured on this branch rather than inherited

Every one of the four the card rests on was re-taken here, each with a
control
firing on the same instrument in the same run.

1. **Upstream does not declare it.** Re-taken against the **installed**
`@objectstack/spec` (17.4.0) in this worktree, not the shared checkout.
`ObjectKanbanPropsSchema` — `ComponentPropsMap['object-kanban']` —
declares
`objectName groupBy columns filter limit data cardTitle titleField
cardFields
swimlaneField grouping quickAdd coverImageField conditionalFormatting`,
and
   no `allowCollapse`. Token counts over the published package:
`allowCollapse` **0** in `src` / `dist` / `json-schema`; controls
`groupBy`
**12 / 52 / 37** and `coverImageField` **1 / 4 / 2**; a minted absent
token
scored **0 / 0 / 0**. ⚠️ One correction to the ruling's prose, which
does not
move the verdict: `groupField` appears in that schema as an **alias**
entry
(`groupField` to `groupBy`), not as a declared member. ⭐ And the schema
is a
   `strictObject`, so the platform was **already** refusing an authored
   `allowCollapse` by name at publish while this face said yes.
2. **objectui declared it on both faces.** Re-derived by symbol, not by
the line
   address the ruling quoted: one declaration inside `interface
ObjectKanbanSchema` and one inside `export const ObjectKanbanSchema` on
the
   mirror. CONFIRMED.
3. **No registered board reads it.** Zero files under
`packages/plugin-kanban`
name the token, against firing controls in the same pass — `groupBy`
**45
files**, `conditionalFormatting` **8**, `quickAdd` **6**,
`coverImageField`
**3** — and a freshly minted absent token at **0**. Repo-wide, no file
under
   any `packages/*/src` names it at all.
4. **Batch objectstack-ai#70's retirement did not reach here, and still does not.**
What
survives of it is an explanatory block on the `kanban` mirror recording
that
its refusals were arm-scoped by construction and that an `object-kanban`
document "is judged exactly as it always was". The tombstone landed here
agrees with that rather than contradicting it: this is a separate ruling
on
   this arm's own protocol row.

### ⭐ The grep is not the reading — both unnamed channels were traced to
their ends

A renderer can consume a key it never names, so a source grep alone
cannot
answer the inertness question. Both channels terminate before any sink:

- **PROP channel.** `SchemaRenderer` spreads every non-metadata key as a
React
prop; `ObjectKanbanRenderer` destructures `schema` and forwards its rest
into
  `ObjectKanban`, whose first statement after its own destructure is
  `void _props;`. The rest is discarded, never spread onward.
- **SCHEMA channel.** The key **does** ride `ObjectKanban`'s `{
...schema }`
  spread into `effectiveSchema`, and reaches `KanbanRenderer` — which
destructures `schema` / `objectFields` / `onCardMove` and **names every
key**
  it hands to the lazy board. An unnamed key stops there.

Both terminators are pinned as source text in the new test, so the
reading is
re-derived on every run rather than remembered.

## Evidence on the BUILT artifact

The BREAKING banner is earned on `dist` — the bytes a consumer installs
— not on
`src`. `dist/objectql.d.ts` carries `allowCollapse?: never;` and
`dist/zod/objectql.zod.d.ts` carries an OPTIONAL of `z.ZodNever`; the
previous
spelling survives nowhere under `dist`. Parsed through the built entry:

```
{ allowCollapse: true } | { allowCollapse: false } | { allowCollapse: 'yes' }
                                                  RED  invalid_type at `allowCollapse`
{ groupField: 'status' }                          RED  invalid_type at `groupField`   <- OTHER TOMBSTONE
{ quickAdd: true } · { coverImageField: 'cover' } · { limit: 50 }
                                                  GREEN                               <- LIVE CONTROLS
{ allowCollapsing: true }                         GREEN                               <- NEAR-MISS CONTROL
```

Live members parse green, so the arm is not refusing everything. ⭐ The
near miss
parsing **green** is the discriminator that makes the tombstone
load-bearing:
this arm is not strict, so a never-declared neighbour is kept rather
than
refused — which is exactly what deleting the member would have shipped.

## Pins, in both directions

New:
`packages/types/src/__tests__/object-kanban-allow-collapse-retired-8801.test.ts`.

- **Refused by name** — an issue at the key's OWN path, code
`invalid_type`, for
`true` / `false` / a string alike; the message asserted for the ruling's
own
required content (that lane collapse is `KanbanColumn.collapsed`'s and
**not a
  board-level authored toggle**), not frozen as a whole paragraph.
- **The declared members still parse** — nine live members each
accepted, plus
  the bare node as the firing control, plus this arm's OTHER tombstone
  (`groupField`) still refusing, so the narrowing did not sweep the arm.
- **One string, both channels** — the `.describe()` metadata is asserted
to be
  the parse message, the invariant `retirementTombstone()` exists for.
- **Type-level** — the member evaluates to exactly `undefined` and is
not `any`
(deleting it instead would fall through the index signature to `any`,
and
that pin would go red), with a live member as the non-vacuity control
and an
unused-directive `@ts-expect-error` literal that goes red with TS2578 if
the
  tombstone is ever widened back.
- **Tree-scoped absence** — no property read of the key anywhere under
`packages/` or `apps/`, with a firing control in the same walk.
Tree-scoped on
  purpose: a file-scoped pin sees only the files its author thought of.

Moved, not deleted: `bare-kanban-node-key-retired-8802.test.ts` suite 3
asserted
that this arm still **accepted** the key. That row is now a refusal
assertion
with its reason stated at the site; its three sibling rows stay
accepting,
because the claim that suite makes — batch objectstack-ai#70's refusals were
arm-scoped and
cannot cross an arm — is still true, and this retirement is not that
claim.

## Region fence

The claim released this lane at **region** granularity, not file
granularity:
`packages/types/src/objectql.ts` and
`packages/types/src/zod/objectql.zod.ts`
are both held by open PR objectstack-ai#9540, frozen head, whose region is
`ObjectGallerySchema.filter`. **The fence held.** Both hunks fall inside
the
`ObjectKanbanSchema` region of their file and carry that symbol as their
hunk
context header; `ObjectGallerySchema` sits several hundred lines further
down in
the declaration file and is untouched, as is that PR and its branch.
Nothing
here required stepping outside the region.

## Gates

Hand-derived from this repo's own `check:*` scripts and workflows —
`dispatch-gates.mjs` refuses cross-repo and cannot answer for this
repository,
so `--ran` reconciliation is unavailable here and is stated as such
rather than
faked. Exit codes captured to disk as each ran, before any pipe.

## Acceptance notes

- **Owed follow-up, deliberately not taken here.**
`content/docs/api/schema-reference.md`
carries a note that reads, in part, that `@object-ui/types` "still
declares
both on its mirror of this face, so a reader will find them there; that
half
is objectui#8801, not this table." This pull request lands that half, so
the
sentence is now stale. The file is **outside the file surface this lane
was
released on**, and the claim's instruction on a breach is to stop and
report
  rather than widen — so it is reported instead of edited. It is a prose
staleness, not a gate failure: no gate reads it, and the note fails
loudly
rather than silently for anyone who acts on it (the key is now refused
by
name). Dedupe words: schema-reference, allowCollapse, object-kanban,
mirror,
  stale.
- **Recorded, not filed.** The doc note's sibling subject `quickAdd` —
retired
by objectui#8285 on the strict authoring face while this mirror still
declares
it live — is the other half of that same paragraph and is **not** this
card.
No action taken, named here only so the next reader of that note knows
which
  half moved.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01VCpmqvacV4BypY48QdoxcE)_

Co-authored-by: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3e60765fb4a80c3ee5c098b8133a26533de39842

① Derived judgments

Identity and scope, derived here. GET /pulls/9540 reports head 3e60765fb4a80c3ee5c098b8133a26533de39842, head ref claude/issue-9309-object-gallery-filter-typed-unknown, base main, draft, mergeable_state: clean, +334 −8, 4 files. I fetched objectui main and refs/pull/9540/head into refs I own (refs/review/9540/main = 0c2eb5eee, refs/review/9540/head = 3e60765fb); git merge-base → 4f0fbce38f6f19fa0fb6e776afa0f1091d6dab9a, one commit on top. git diff --numstat 4f0fbce38f refs/review/9540/head → .changeset/9309-object-gallery-filter-destination-typed.md 35/0 · packages/types/src/__tests__/object-gallery-filter-9309.test.ts 241/0 · packages/types/src/objectql.ts 40/7 · packages/types/src/zod/objectql.zod.ts 18/1 — sums to +334/−8, so every line is accounted for: 35 changeset, 241 test (excluded from the build by packages/types/tsconfig.json exclude: ['**/__tests__/**', …], typescript is a devDependency), 33 lines of docblock/comment, and exactly two type-bearing edits (one TS member, one zod key). @object-ui/types is published (publishConfig.access: public, v17.6.0, in the .changeset/config.json fixed group) and both faces reach a published entry: ObjectGallerySchema at index.ts:451 inside the export type { block opened at :424 (the . entry; control ObjectKanbanSchema 2) and at zod/index.zod.ts:324 inside export { at :306 (the ./zod entry; control 1).

TS face — NARROWED. filter?: unknown → filter?: QueryParams['$filter'], an indexed access on ./data.ts:108 $filter?: Record of string to any | FilterArray, where FilterArray is imported at data.ts:34 from @objectstack/spec/data (contract of record: packages/spec/src/data/filter.zod.ts:2513, a strict tuple grammar, not any[]). Measured with a self-contained tsc --strict probe (typescript 5.9.3): the old member accepted all 12 sample rows; the new member refused string, number, boolean, null, bigint and symbol (six @ts-expect-error directives all consumed) and accepted a tuple array, a record, undefined, any[], a function and a Date (the record arm admits the last two); the one deliberately unsuppressed control produced the run's only diagnostic — probe.ts(46,24): error TS2322: Type 'string' is not assignable to type 'FA | Record… | undefined', tsc_exit=2. So the refusal set is exactly the non-object primitives plus null; nothing that compiled before is admitted by anything new.

Zod face — NARROWED. z.unknown().optional() → z.union([z.array(z.any()), z.record(z.string(), z.any())]).optional(). Measured on zod 4.4.3 with the diff's exact spelling: old accepted 11/11 samples, new 5/11 (undefined, [], [['status','=','active']], {}, { age: { $gt: 18 } }), z.never().optional() control 1/11; rows flipped to refused: null, string, number, boolean, Date, function — zero rows flipped to accepted, so there is no widening on this face either; an array input parses through byte-identical (Array.isArray true, JSON equal). Note for the record: the mirror refuses Date and function values the TS record arm admits, i.e. the mirror is slightly narrower than the declaration at runtime — the direction zod-mirror-parity does not flag, and identical to the sibling ObjectChartSchema.filter union at objectql.zod.ts:1726–1729.

Nothing widened, nothing else moved. My own AST census (parent-pointer owner resolution, catches quoted keys and type aliases too) over objectql.ts at base and head: 9 filter property signatures at both revisions — ObjectGridSchema any[] · NamedListView any[] · ObjectMapSchema any[] · ObjectGanttSchema any[] · ObjectCalendarSchema any[] · ObjectKanbanSchema any[] · ObjectChartSchema any[] | Record of string to any · ObjectGallerySchema unknown → QueryParams['$filter'] · ObjectDataTableSchema any — only the gallery row's spelling changes; controls: objectName 11 rows, zzzNoSuchKey 0. Raw occurrence counts (grep -oF | wc -l) base/head: filter?: any[]; 6/6, filter?: unknown; 1/0, filter?: any; 1/1, filter?: QueryParams['$filter']; 0/1, the chart spelling 1/1. ObjectChartSchema's type is byte-identical; only its docblock moved. No file in the diff is an index/barrel, so no export is added or removed; no new key on any schema. The PR body's census — "nine declarations, four spellings", counting rule "every optional filter property signature charged to its owning interface by the parser" — HOLDS exactly (all nine are optional, so the qualifier is vacuous but harmless).

Clause-② declaration, what exists. PR body: 0 occurrences of Clause-② / Clause- / line-start Clause (control NARROWS 1). Changeset body: 0 (controls NARROWS 1, minor 1). Carrier label: needs:contract-review exists in the repo but was never hung on either carrier — PR label events are only bot package: types and tests; card events are pm:queue→pm:dispatched→pm:blocked. Prior record: card Claim comment 5672443215 carries line-start Clause-②: no, which is the carrier the gate reads (pm-dispatch/SKILL.md:474–477: the enqueue gate reads only the claim comment, line-start keys, exactly the two spellings yes | no, criterion "does this card relax the accept set or widen the public surface"; :515 pulling back to the declared contract does not trigger it). Judged against the diff: neither limb fires — both faces shrink and the surface is unchanged — and the docblock "forwarded verbatim as $filter" is the declared contract the type is pulled back to, so Clause-②: no is the correct declaration. The path limb (SKILL.md:636, a *.zod.ts contract schema touched) is hit, which is why a tiered record is owed before enqueue; this is that record. Gate reading, my own run from /home/user/objectstack (working tree 0b31d90fb, which already carries the objectstack#18234 fix — declaresUniversalAcceptorKey 20 occurrences in check-widening-tells.mjs; 24 at origin/main 596090efb): PM_SWEEP_REPO=objectstack-ai/objectui node scripts/pm/check-clause2-carriers.mjs --pair 9540 → exit 4 on C7 only — the C5 widening tell no longer fires; the sole remaining row is that the only ## Contract review comment on this head (5672932421) carries no Served-tier: line. The input record states mechanically pair.1.claim.clause2-line: DECLARED no and pair.1.pr-body.clause2-line: no line in this body reaches the reader. objectui's own tree has no reader of that line at all (git grep Clause at main over scripts .github → 83 hits, all importClause/heritageClauses/segmentClauses; control changeset 1310).

PR-body claims falsified or confirmed. (a) Census — CONFIRMED above. (b) "Three producers … none of them sets filter on the gallery node" — REFUTED: plugin-list/src/ListView.tsx:2604 const baseProps = { carries filter: schema.filter at :2613 and is spread (...baseProps, :2785) into the type: 'object-gallery' literal at :2784. The zero-breakage conclusion survives on grounds I measured: the file never names ObjectGallerySchema (0; control ListViewSchema 22), so the literal is not checked against the member, and ListViewSchema.filter is z.array(z.any()) (objectql.zod.ts:1163), assignable to the new type. (c) "Exactly one non-test importer outside @object-ui/types" — CONFIRMED: git grep -l ObjectGallerySchema refs/review/9540/head → 19 files (controls ObjectKanbanSchema 84, ObjectGalleryzzSchema 0); outside packages/types and tests the hits are three changesets (prose), scripts/check-handler-key-read-sites.mjs:186–187 (a string ledger for onCardClick/onRowClick, not filter), plugin-dashboard/src/ObjectPivotTable.tsx:67 (comment only, 0 imports) and plugin-list/src/ObjectGallery.tsx:466 $filter: schema.filter as QueryParams['$filter'] — the one real consumer, whose cast is now an identity cast under a comment (:460) that this PR makes false. (d) "No runtime behaviour changes" — TRUE of the value forward, but qualified: the mirror is reachable from a shipped command line — packages/cli/src/commands/validate.ts:13 and check.ts:14 import safeValidateSchema (zod/index.zod.ts:537), which parses through AnyComponentSchema (:461) → ObjectQLComponentSchema (:471) → ObjectGallerySchema (objectql.zod.ts:1920) — so object-ui validate on a gallery node with filter: 'stage=won' moves from pass to refusal. The changeset's next bullet says "the mirror refuses them at parse time", so this is declared, just not under the "runtime" heading.

Who breaks, plainly. No consumer in this repository: the sole importer casts to the identical type. Out of repo: any TypeScript consumer of @object-ui/types that assigns a string, number, boolean, null, bigint or symbol to ObjectGallerySchema.filter, or that narrows unknown itself and now holds dead code; any zod consumer of @object-ui/types/zod that parses gallery nodes carrying those values or a Date/function. That break is stated in the changeset body and the PR body. The indexed-access coupling: the member now moves whenever QueryParams['$filter'] moves. It is declared where a consumer sees it — the member docblock (ships in dist/objectql.d.ts) names the indexed access and says the slot is stated once in ./data.ts; the changeset names QueryParams and FilterArray twice but never names @objectstack/spec as FilterArray's origin (0 occurrences). @objectstack/spec ^17.4.0 is a declared dependency, so the emitted .d.ts resolves; and because the record arm structurally subsumes every array, an upstream tightening of FilterArray moves this member's accept set not at all — the only silent move would be objectui itself dropping the record arm from $filter, which is flagged below.

② Semver level

The change is a breaking narrowing of two published faces. Under objectui's enforced convention — AGENTS.md at main line 265 (objectui's own breaking changes are labelled minor with the break spelled out in the body; major moves only with @objectstack's major) mechanically enforced by scripts/check-changeset-no-major.mjs (164 lines, exit 1 on any major) via the Changeset Bump Policy check — the level this change requires is minor with the breaking semantics in the body. The changeset in the diff declares exactly that: frontmatter '@object-ui/types': minor; body "NARROWS, both faces … filter: 'stage=won' and filter: 42 are type errors now, and the mirror refuses them at parse time … Breaking for any TypeScript consumer that assigned a non-object value to this key" (Breaking 1 occurrence). Declaration and level match. Changeset Declaration, Changeset Bump Policy, Changeset Fixed Group Check and Changeset Claim Re-read are all success at head. The objectstack-side requirements — a Clause-② line inside the changeset body and an ADR-0087 disposition marker (0 occurrences) — govern packages/spec retirements in that repo; objectui has no reader for either, no authorable spec key is removed here, and the clause-② carrier for this board is the card's Claim comment, so their absence is not a defect of this changeset.

③ Boundary flags

  • Security / permission boundary: none touched. The four changed paths are a type declaration, its zod mirror, a test and a changeset; no auth, permission, RLS or FLS path is in the diff or reached by it.
  • Already-published protocol semantic: aligned, not redefined. The member is typed to the protocol's own filter grammar (FilterArray, filter.zod.ts:2513 in the contract of record) plus the ObjectQL record form, via QueryParams — the direction AGENTS.md #0.1/Prime Directive 12 prescribe. Flag to carry forward, not a block: the sibling ObjectChartSchema docblock already calls dropping the record arm a deprecation; if QueryParams['$filter'] ever loses that arm, ObjectGallerySchema.filter narrows in the same publish with no edit to objectql.ts — the member docblock says so, but whoever moves data.ts:108 owes this member's changeset line.
  • Gate strength: nothing weakened, two things strengthened. The pair objectql.zod.ts#ObjectGallerySchema is listed in zod-mirror-parity.test.ts (:1220, :1385) and, with the mirror no longer z.unknown(), is now inside that ledger's live comparison instead of excluded by its Unconstrained predicate; the new census/pin test re-derives the population on every run. The clause-② gate itself: the C5 false positive that held this PR is repaired upstream (objectstack#18234 closed 2026-09-17 via #18626, merged 00115a844); the remaining C7 is cured by a Served-tier:-bearing record, i.e. this one — nothing about the gate is relaxed to land this.
  • Product capability trade-off: a shipped validator now refuses what it waved through. object-ui validate/check reject gallery nodes whose filter is a non-object (and Date/function values the TS face still admits). That is the contract's declared direction (reject off-spec metadata at authoring) and is stated in the changeset; recorded here so nobody reads "no runtime behaviour changes" as covering the CLI verdict.
  • Dev flags and open questions. open_questions: []. Seven residuals declared, all outside the diff, each checked: ObjectGallery.tsx:460–466 now carries a redundant identity cast under false prose; ObjectPivotTable.tsx:67 now mis-states the gallery as unknown and mis-lists ObjectViewSchema (which declares no filter — census confirms) while omitting NamedListView; the zod ObjectChartSchema comment and .changeset/objectchart-schema-anchor-7946.md keep a "six siblings … array-only" sentence (the zod-face array-only object-* owners number five). All are prose, none changes a published shape, none blocks; they belong in the follow-up the PR names. The one edit beyond the gallery key — ObjectChartSchema's docblock — is forced by this diff (the gallery now has a record arm, so "the only object-* filter with a record arm" flipped to false in this commit) and leaves the type unchanged.
  • Prior rulings read: objectgalleryschema.filter,objectgalleryschema,filter,unknown,types,typed,docblock,says,forwarded,verbatim,view,schema → 66 hits; ADR-0029 D8, ADR-0106 D4, ADR-0131 D13, ADR-0020 D2, ADR-0021 D2, ADR-0021 D3, ADR-0029 D6, ADR-0029 D9.7, ADR-0044 D4 — check-prior-rulings.mjs --card 9309 under PM_SWEEP_REPO=objectstack-ai/objectui, corpus read at origin/main 596090efbe, governing-text: absent, exit 0. Read: every named decision hits on the generic terms filter/view/schema; none rules on an objectui type member's accept set, so no accepted ruling is contradicted.
  • CI at head: GET /commits/3e60765f…/check-runs → total_count 36 = 36 returned, 33 success · 3 skipped · 0 anything else; combined status success (1 context, Vercel), reported separately.
  • Disclosures. My git fetch in /home/user/objectstack opportunistically advanced the shared origin/main forward (cdedfb348 → 596090efb); I read only the owned ref. No typescript or zod is installed in either checkout; the 5.9.3 tsc/typescript.js and zod 4.4.3 used above were found under another round's scratch tree and used as interpreters only — nothing else was read from there. The earlier ## Contract review comment on this PR was read as a claim set and re-derived, not adopted; where it and I disagree with the PR body (the ListView producer), my own trace above is the reading.

Implemented-by: claude/issue-9309-object-gallery-filter-typed-unknown
Reviewed-by: session_018HrVaotisyhgmot9o2MLRq

VERDICT: PASS


Generated by Claude Code

@os-tesla
os-tesla marked this pull request as ready for review September 20, 2026 11:37
@os-tesla
os-tesla added this pull request to the merge queue Sep 20, 2026
Merged via the queue into main with commit 7cbefa5 Sep 20, 2026
38 checks passed
@os-tesla
os-tesla deleted the claude/issue-9309-object-gallery-filter-typed-unknown branch September 20, 2026 11:56
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…ey, and hand the direction back (objectui#9729) (objectstack-ai#9735)

Fixes objectstack-ai#9729

Clause-②: no — and the declaration is about THIS PR's diff, which is
test-only and moves no published accept set. ⚠️ The REMEDY the card asks
about is `Clause-②: yes`, per key, and is deliberately **not** taken
here: this branch measures, proposes, and hands back for the at-tier
contract review.

## What this PR is

The card carries two LOCAL entries of the `MirroredUndeclared` ledger —
a key the published zod mirror states and the published TypeScript twin
does not. Either remedy moves a face `@object-ui/types` already ships,
so the dispatch forbade picking one. What was missing for the review was
the per-key evidence, so that is what landed: four readings, each with a
lit control on the same instrument, plus the pins that keep them honest.

## The four readings the card asked for

### 1. Who reads each key at runtime

⛔ A source grep cannot answer this in this tree — `SchemaRenderer` hands
a node's leftover keys to the component as props, so a renderer can
consume a key it never names. Both readings below are therefore
**rendered**, and both landed as tests rather than being pasted here.

- **`dueLike` is READ.** `DetailSection` spreads the authored field into
the enriched bag (`enrichDetailField` opens with a spread of the view
field) and hands that bag to the resolved cell renderer, where
`resolveDueLike` reads it. Measured on a field named `end_date`, which
deliberately does **not** match the due/deadline field-NAME convention
that read falls back to, so the authored key is the only thing that can
move the output: with the key the cell draws the overdue wording,
without it the neutral relative wording. The control leg renders BY
VALUE — it asserts the neutral wording is present, not merely that the
overdue wording is absent, which would also be true of a document that
drew nothing. Pinned by
`DetailSection.dueLikeReachesTheCell-9729.test.tsx`.
- **`operators` changes NOTHING drawn.** Measured with a byte ruler: the
same `object-grid` document drawn twice and compared as markup. The
ruler is pinned stable first (identical documents, identical bytes),
then a LIT CONTROL on a key the renderer demonstrably does read
(`label`, which moves the bytes and appears in them), and only then the
measurement — taken twice, once on a plain grid and once with the filter
surface on, since `operators` is a filtering word and a grid with no
filter affordance would be the wrong corpus to ask. Both come back
byte-identical. ⚠️ The claim is bounded by the ruler: this is what the
RENDERED output does with the key. Pinned by
`ObjectGrid.operatorsInert-9729.test.tsx`.

### 2. What `@objectstack/spec` says on the corresponding surface

Probed against the installed spec by parsing documents through it, not
by grepping it — with a declared-key control and a nonsense-key control
on the same schema:

- **`operators` on the grid: the protocol REFUSES it by name.**
`ObjectGridPropsSchema` for `object-grid` is a strict object, and a
document carrying `operators` comes back RED with `unrecognized_keys` —
and the refusal message itself proposes the rename to `operations`.
Controls: the bare document and one carrying `operations` both parse
GREEN. ⇒ the mirror admits a key the protocol rejects, and the protocol
has already classified that spelling as a misspelling of a key both this
block's authoring vocabulary and the twin declare.
- **`dueLike` on the detail-view field: the spec has no such surface to
declare it on.** `RecordDetailsProps` types its `fields` (and
`sections[].fields`) as field NAMES — a string array. Every
object-shaped field entry is refused there, carrying `dueLike` or not
(control: a string entry parses GREEN, an object entry is RED whatever
keys it carries). The whole object-shaped `DetailViewField` is
objectui's own contract, so for this key there is no "toward the
protocol" pull in either direction.

### 3. Who AUTHORS either key in-tree

- **`dueLike` is authored** — in `content/docs/fields/date.mdx` and
`content/docs/fields/datetime.mdx`, where the published docs tell an
author to write it. ⚠️ Read the (interface, name) carefully: those
examples author it on `DateFieldMetadata` / `DateTimeFieldMetadata`, the
object-field metadata faces, ⛔ not on a detail-view field entry. So
narrowing the mirror would falsify no in-tree document by itself — while
leaving the docs teaching a key the detail-view face would then reject.
- **`operators` is authored NOWHERE** in the doc, example, app or e2e
corpora on a grid node. Lit control on the same instrument and the same
corpora: `operations` lights up in them.

### 4. The ledger, and its floor

Both keys are already recorded, as the two LOCAL single-key entries the
card describes: `objectql.zod.ts#ObjectGridSchema` names `operators`,
`views.zod.ts#DetailViewFieldSchema` names `dueLike`. ⛔ The seeded entry
and key totals are deliberately not repeated here: they live in exactly
one place — the `MirroredUndeclared` docstring — and are re-derived from
that ledger's own AST by the census at the bottom of
`zod-mirror-parity.test.ts` ("the fourth direction is enumerated and
sized at test time"). That ledger is a FLOOR that can only shrink, and
the ratchet reddens on growth, on fresh drift and on a stale entry
alike.

## ⭐ The third option the measurement produced: these are TWO decisions,
not one

The card allowed for a third option if the measurement showed one, and
it does — the two keys are not the same defect wearing two names:

| | `dueLike` on `views.zod.ts#DetailViewFieldSchema` | `operators` on
`objectql.zod.ts#ObjectGridSchema` |
|---|---|---|
| mirror | judges the key and KEEPS it | judges the key and keeps it |
| twin | `DetailViewField` has **no index signature**, so TypeScript
REFUSES the key (`TS2353`) | `ObjectGridSchema` extends `BaseSchema`,
whose index signature ABSORBS it as `any` — neither declared nor refused
|
| runtime | READ, and the read changes what is drawn | inert on the
rendered path, by a ruler with a lit control |
| `@objectstack/spec` | no counterpart surface — the field entry is a
string there | REFUSES it by name, and names the rename to `operations`
|
| authored in-tree | yes, on the sibling metadata faces, taught by the
published docs | no |
| twin's neighbour | — | the twin already declares `operations`, the key
everything else spells |

⇒ what the two faces DO differs in kind. For `dueLike` the two published
faces actively CONTRADICT each other — the validator keeps the key, the
compiler rejects the same document — and the runtime honours it. For
`operators` they do not contradict; one is simply silent, nothing reads
it, the protocol refuses it, and the key sits one letter away from the
word the whole stack uses.

⭐ There is also a precedent in the tree for the `dueLike` direction, and
it is worth the reviewer's attention: `DateTimeFieldMetadata.dueLike`
was declared by objectui#8958, and its docblock gives the reason in the
reviewer's own words — leaving it off "would keep the mismatch alive
with the sign flipped — a key the renderer honours but the authoring
type rejects."

⛔ Recommending is not deciding, and this PR decides nothing. Both
remedies remain open on both keys.

## ⚠️ The third key the card names is NOT this defect — re-derived, not
inherited

`complex.zod.ts#DashboardConfigSchema`'s `aria` was re-derived on this
branch rather than taken from the hand-back: it is `z.never(...)` with
an `error` message beginning "RETIRED (objectui#5852)" and an
`.optional()`, and a document carrying the key comes back RED at path
`aria` with that remedy. A LIT CONTROL on the same schema shows an
unrecognised key is NOT refused, so the rejection is BY NAME and not a
strictness the whole object has; a document that omits the key stays
green. ⇒ its consequence is the OPPOSITE of the other two — they admit
silently, it rejects loudly — and a sweep treating the three alike would
ask a maintainer to repair something already doing its job. ⛔ It is
untouched here, and it is pinned as the CONTRAST so the grouping cannot
come back by accident.

## What landed

- `packages/types/src/__tests__/mirror-only-published-keys-9729.test.ts`
— the per-key consequence pins. Each key's pin is paired with an
unrecognised-key control through the same schema, because a green parse
proves nothing on its own: one mirror strips unknown keys, the other
passes them through unexamined, so what distinguishes a MIRRORED key is
that the mirror JUDGES it. The TypeScript side carries a
`ts-expect-error` directive on the `DetailViewField` literal — that
directive IS the assertion, and it fails in BOTH directions, since it
also reddens as unused if the key ever becomes declared.
-
`packages/plugin-detail/src/__tests__/DetailSection.dueLikeReachesTheCell-9729.test.tsx`
and
`packages/plugin-grid/src/__tests__/ObjectGrid.operatorsInert-9729.test.tsx`
— the two runtime readings, landed as tests beside the renderers that
own the read paths rather than pasted into this body.
- `packages/types/src/__tests__/zod-mirror-parity.test.ts` — two ledger
docstrings corrected. The `dueLike` entry justified itself with "a `git
grep` finds it in the mirror and nowhere in this package's TypeScript
declarations", and that sentence is FALSE as written: `field-types.ts`
declares that name on `DateFieldMetadata` and on
`DateTimeFieldMetadata`, both in this package. ⭐ A NAME is not a KEY — a
key is (interface, name) — and a package-wide grep for the name answers
a question the ledger is not asking. The MEASUREMENT was right and
stays; only its stated reason was wrong, and it is corrected rather than
repeated. The `operators` entry gains the neighbouring-name reading.
- `.changeset/9729-mirror-only-published-keys-measured.md` — empty
frontmatter, the explicit "releases nothing" declaration.

## Gates

Each exit code was captured to disk before any pipe.

| gate | verdict |
|---|---|
| `pnpm --filter @object-ui/types type-check` | exit 0 — all three legs,
including `tsconfig.test.json`, which is the leg that reads the
directives above |
| `pnpm --filter @object-ui/types test` | exit 0 — 204 files, 4769 tests
|
| `pnpm --filter @object-ui/plugin-detail --filter
@object-ui/plugin-grid type-check` | exit 0, after building the
dependency closure — the first attempt failed with TS2307 on every
workspace import, which is a missing prerequisite and ⛔ not a reading |
| the three new test files | exit 0 — 6 + 7 assertions across the three
|
| `node scripts/check-changeset-presence.mjs` | exit 0 — "4 source
file(s) of 3 released package(s) changed … Every one of them has an
EMPTY frontmatter" |
| `pnpm check:control-bytes` | exit 0 — "check-control-bytes: OK"; also
swept the changed files directly with a control-character grep, which
found none |
| `pnpm check:new-line-citations` | exit 0 — "0 new citation(s),
enforcement report-only" |
| `pnpm check:changeset-claims` | exit 0, report-only — 10 pending
changesets name `zod-mirror-parity.test.ts`. Read, as the gate asks:
every one of them describes `EXCLUSIONS`, `RuntimeOnlyDeclared`,
`KnownDrift` or `UnmirroredDeclared`, and none mentions the fourth
ledger or either key this branch touched. ⇒ nothing went false, so
nothing is corrected |
| `node scripts/check-governed-queue-guard.mjs --test` (5 paths) | exit
0 — "NOT GOVERNED — 5 path(s) checked against 5 governed surface(s);
none matched" ⚠️ the dispatch spelled this script under `scripts/pm/`;
it lives at `scripts/check-governed-queue-guard.mjs`, and the first
invocation was a MODULE_NOT_FOUND, ⛔ not a red gate |
| targeted `eslint` over the changed files | exit 0. ⚠️ Repo-wide `pnpm
lint` is CI's run and is ⛔ not measured here |

## Reverse validation — both pins were made to fail, then restored

Run from the committed state, each leg with an on-disk anchor count
before and after the edit, and each restore proven by an empty `git diff
HEAD` plus a blob hash identical to the HEAD blob:

1. **Delete the mirrored `dueLike` member from `views.zod.ts`** — anchor
count 1 to 0, then the new pin goes RED: 2 of its 7 assertions fail. ⇒
the pin measures the mirror, not itself.
2. **Delete the `ts-expect-error` directive from the pin** — anchor
count 1 to 0, then `tsc -p tsconfig.test.json` exits 2 with `TS2353: …
'dueLike' does not exist in type 'DetailViewField'`. ⇒ the refusal is
real and the directive is load-bearing.

Both mutations are gone; nothing from them is in this branch.

## Serial constraint — re-taken against the LIVE pull requests

Re-taken at 2026-09-17T22:16Z, after the sibling appeared: objectui#9637
is now PR objectstack-ai#9734, and its file list is two changesets, one new changeset
and
`packages/plugin-detail/src/__tests__/recordDetailsInputs.spec-parity.test.ts`
— it does **not** touch `zod-mirror-parity.test.ts`, so the warning's
stop condition did not trigger. PR objectstack-ai#9732 (plugin-grid) lists
`ObjectGrid.tsx`, `hooks/useBulkExecutor.ts`, one test and a changeset;
the file added here is a different file. PR objectstack-ai#9540 does list
`packages/types/src/objectql.ts` and
`packages/types/src/zod/objectql.zod.ts` — ⛔ neither is edited here,
since no accept set moves on this branch.

⚠️ **Surface delta, declared:** the claim named
`packages/types/src/{views,objectql}.ts` and their zod twins. None of
those four is edited — the measurement outcome is that nothing on a
published face should move without the review. Two test files outside
the declared surface were added instead, in the packages that own the
two runtime read paths, because the card's first question cannot be
answered from `packages/types`, which has no renderer.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01UanLVj6xvbS6puBCewLr8L)_

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
… pronoun blindness (objectui#9727) (objectstack-ai#9752)

Fixes objectstack-ai#9727

Clause-②: no

The first step on this card is not repairing 53 changeset entries. It is
rebuilding the instrument, because both tables the card carries are
transcribed and the filing seat marked them NOT MEASURED: the producing
script was cleaned up with its author's worktree, so no number on that
card is re-derivable. **This pull request edits no changeset body.** It
adds a measurement instrument, its pins, and one adjudication.

## The rebuilt instrument

`pnpm census:changeset-polarity`
(`scripts/changeset-polarity-census.mjs`), report-only, wired into no
workflow — `census:*` is this tree's spelling for runnable, reported,
not blocking.

**P, the population.** Every sentence of every pending `.changeset/*.md`
except `README.md`, matched when the sentence names a schema symbol and
carries a present-tense declaration verb. Bare past `declared` is
excluded on purpose: a historical sentence cannot rot, which is the
distinction objectui#9713 turns on. Present-tense passive (`is
declared`) is included, because it is a live claim and rots like the
active voice.

**V, the verdict.** For each (schema, key) pair a matched assertion
predicates, membership is resolved against that schema's member set and
compared with the sentence's polarity. A positive claim is contradicted
when the key is absent; a negative claim when it is present.

Four properties the rebuild has that the transcribed instrument did not:

1. **Whole-file, whitespace-tolerant read.** This corpus wraps near
eighty columns, so a line-anchored probe is structurally blind to any
claim that wraps — and a claim naming a schema *and* a key is long
enough that most of them do. Lines are joined per paragraph,
continuation prefixes (blockquote markers, list bullets, table pipes)
stripped first, all whitespace runs collapsed before a sentence is cut.
Backticked spans are masked during the cut so `foo.md` never splits a
sentence.
2. **Assertion position distinguished from quoted position.** A count
over prose is *not* invariant under quotation, and treating it as
invariant is how a repaired site gets re-flagged forever.
objectui#9713's repair quotes, in guillemets, the very sentence it
retires. A sentence reached through a fence, a blockquote or quotation
marks is counted, reported, and never flagged. Measured on this tree:
that repaired 8802 sentence is the corpus's **one** quoted match, and it
draws **zero** flags.
3. **A name is not a key — a key is (interface, name).** Membership is
built with the TypeScript parser over `packages/types/src`, across both
published faces (the `interface` and its zod mirror), with `extends`
resolved transitively. The zod walk is **structural**: only the literal
passed to `z.object()` / `.extend()`, the arms of a union, and the base
of a `.merge()` / `.and()` count. A schema named in a member's *value*
(`columns: z.array(ObjectKanbanLaneSchema)`) is a different object —
walking into it read a lane's `cards` as a member of the *board*, which
is the over-approximation this rule forbids, and fixing it is what
removed those flags. An inherited index signature (`[key: string]: any`)
is deliberately **not** membership: a key riding it is admitted and
never examined, which is the condition the whole family of cards is
about.
4. **The cross-sentence pronoun** — below.

## The blindness closed, and its pin

The transcribed instrument missed **the site that motivated the card**.
The claim in
`.changeset/8802-8257-8008-kanban-gantt-family-retirement.md` reads,
across a sentence boundary:

> ... the only one that refused `allowCollapse` / `cardTemplates` /
`columnWidths` / `titleField` / `draggable` / `onColumnAdd` /
`onCardAdd` by name, and — through `columns: KanbanColumn[]` — the only
one that judged a lane's `cards`. **The surviving `ObjectKanbanSchema`
face declares none of them.**

The object is `them`. A matcher that reads only the sentence carrying
the verb finds a schema, finds no key of its own, and reports nothing.
An instrument blind to the shape that produced it reports a **floor**,
not a census.

The rebuild resolves a pronoun object (`them`, `these`, `those`, `none
of them`, `either`, `both`) from the nearest preceding sentence in the
same paragraph that names any key. The pin lives in
`scripts/__tests__/changeset-polarity-census.test.ts` and carries the
**pre-repair** text of that site as a fixture, so it survives a shallow
clone where `adf581278` is unreachable.

⭐ **The pin is stronger than "found".** Run against that pre-repair
text, the rebuilt instrument returns exactly `columns`, `cardTitle`,
`titleField`, `allowCollapse` — the four keys objectui#9713 adjudicated,
and no others. The other keys that sentence names are genuinely absent
from the surviving face, so a negative claim about them is *true* and is
correctly not flagged. Reproducing a known-good human adjudication from
a fixture is the strongest available evidence that the rebuild reads
correctly. Both halves are asserted: the flags are found, and every one
of them is reached `viaPronoun`.

## The re-derived count, against the card's 154

Read these from a run, not from this paragraph (commandment objectstack-ai#9). At
`1cfdff814` plus this branch, `pnpm census:changeset-polarity` prints:

| | card (transcribed, `dea17b469`) | this rebuild |
|---|---|---|
| entries scanned | 1642 | 1654 |
| matched, assertion position | 199 across 169 | 218 across 176 |
| matched, quoted position | not distinguished | 1 (reported, never
flagged) |
| object resolved across a sentence boundary | 0 — the blindness | 9 |
| **candidate contradictions** | **154 across 53** | **134 across 58** |
| claims naming a schema this tree does not declare | not reported | 61
|

Controls, same corpus and same instrument, on every run — the run exits
2 and voids its own numbers if either fails:

| control | probe | reading | expected |
|---|---|---|---|
| corpus lit | present-tense declaration verb | 931 | > 0 |
| corpus absent | `zzqqNoSuchMemberZZ` | 0 | 0 |
| member lit | `BaseSchema.type` | 1 | 1 |
| member absent | `BaseSchema.zzqqNoSuchMemberZZ` | 0 | 0 |

**It differs from 154, and it differs in both directions.** Flags are
**down** (154 → 134) while entries are **up** (53 → 58), which is not a
contradiction — they move for different reasons:

- **Down**, from precision. A backticked PascalCase token is a *type*
name (`ObjectGridComponentProps`, `GanttConfig`), never a key, and
reading one as a key inflated the count. The structural zod walk stopped
a referenced schema's keys counting as the referrer's. And a sentence in
quoted position is no longer flagged at all.
- **Up**, from sensitivity. The whole-file whitespace-tolerant read and
the pronoun resolution both find sites a line-anchored, sentence-local
matcher could not see — nine flags on this tree are reached across a
sentence boundary alone. The corpus also grew by 12 entries between the
two readings.

⛔ 154 was never reproduced by construction, and the rebuild was not
tuned toward it. The two numbers are readings of different instruments
over different trees, and the card's own statement stands: its number
was a floor.

## The ten adjudications

Sample rule, fixed before looking: **the first ten distinct flagged
entries in sorted filename order**. No cherry-picking. Seventeen flags
across those ten entries.

For each, the first question is whether the flag is a **true positive**
at all. Only a true positive can be ROTTED or BORN FALSE — a sentence
that is *true today* is neither, and saying otherwise would be a false
record of its own. Write-time refs are given for all ten so any reader
can re-derive; all ten lie inside this clone's shallow window (boundary
`c35fed098`, 2026-08-07), and every reading here is an affirmative one,
so no negative leg needs a control.

| # | entry | flags | verdict | established at |
|---|---|---|---|---|
| 1 | `5632-svg-host-dom-passthrough.md` | `SpinnerSchema.icon`,
`SpinnerSchema.color` | **TRUE POSITIVE → BORN FALSE** | write-time ref
`e304a4ef7` |
| 2 | `6011-tosortitems-order-spelling.md` | `SortUISchema.toSortItems`,
`.direction` | false positive ×2 | `c5fbe0b99`; true at `1cfdff814` |
| 3 | `6051-gantt-flat-config-declared-keys.md` |
`ObjectGanttSchema.startDateField`, `.endDateField`, `.titleField` |
false positive ×3 | `75bd83d6d`; true at `1cfdff814` |
| 4 | `6067-component-meta-derive-from-canonical.md` |
`ComponentMetaSchema.tier`, `.namespace`, `.skipFallback`, `.labelling`
| false positive ×4 | `44d075ba0`; true at `1cfdff814` |
| 5 | `6121-retire-report-data-source.md` | `ReportComponentSchema.data`
| false positive | `6414dfd45`; true at `1cfdff814` |
| 6 | `6132-undeclared-action-props.md` |
`DropdownMenuSchema.onOpenChange` | false positive | `e28fbf92f`; true
at `1cfdff814` |
| 7 | `6150-undeclared-but-consumed-keys.md` | `TreeViewSchema.value` |
false positive | `2c45966ff`; true at `1cfdff814` |
| 8 | `6169-chatbot-authoring-face-type.md` | `ChatbotSchema.chatbot` |
false positive | `52a43ded8`; true at `1cfdff814` |
| 9 | `6235-mergedsort-wrap.md` | `ObjectGridSchema.sort` | false
positive | `9caa7d474`; true at `1cfdff814` |
| 10 | `6247-option-visiblewhen-metadata-admin.md` |
`SelectOptionSchema.unrecognized_keys` | false positive | `0ea559e7c`;
true at `1cfdff814` |

**Entry 1, the one true positive, in full.** The sentence is:

> `IconSchema` and `SpinnerSchema` declare only `icon` / `size` /
`color`, and both renderers already consume all three by name, so the
SDUI pass-through list withholds nothing they need.

On `main` at `1cfdff814`, `SpinnerSchema` declares `type` and `size`,
plus `body` / `children` as retirement tombstones. It declares neither
`icon` nor `color` — those are `IconSchema`'s. The sentence is false of
`SpinnerSchema`.

**The verdict is BORN FALSE, and it is established at the write-time
ref, not today.** At `e304a4ef7` (2026-09-03), the commit that added
this entry, `SpinnerSchema` was exactly `{ type, size }`. Nothing later
falsified the sentence; it was false the day it was written. Re-derived
mechanically by running the rebuilt census with `--corpus` and `--types`
both taken from that ref — two flags, `SpinnerSchema.icon` and
`SpinnerSchema.color`, with all four controls passing at that ref.

⚠️ That historical run is also what found a defect **in this
instrument**, and it is recorded because it is this card's own class
wearing the instrument's clothes. The member lit control was first
spelled `ObjectKanbanSchema.groupBy` — a member objectui#7322 added. At
any ref older than that card the control read 0, the run exited 2, and
every historical reading voided itself — and a historical reading is
*exactly* what establishing BORN FALSE requires. **A control pinned to a
fact a later card moves is the defect this card is about.** It is now
`BaseSchema.type`, the protocol's own recursion point, and the choice is
pinned with its reason.

**The nine false positives, and the three limits they name.** All are
recorded in the script header so the next reader does not re-derive
them:

- **Window pairing** (entries 3, 4, 7, 8, 9, 10). The sentence names
schema S and key K and predicates K of something else: a registry-local
type (`ComponentMeta` in `Registry.ts`, objectstack-ai#4), another node's schema
(`TextSchema.value`, objectstack-ai#7; the `list-view` node's `sort`, objectstack-ai#9), a spec
schema (`GanttConfigSchema`, objectstack-ai#3), a registration name rather than a key
(`chatbot`, objectstack-ai#8), or a zod issue code rather than a key at all
(`unrecognized_keys`, objectstack-ai#10). This is the limit the card's own author
stated first and it is still the largest source.
- **Polarity by keyword** (entries 3, 5, 6, 9). Polarity is read from
negation words anywhere in the sentence, so an unrelated clause inverts
the verdict. Entry 6 is the clearest: *"None of the three menu schemas
declares any event slot (`DropdownMenuSchema` declares `onOpenChange`
and nothing else)"* — the parenthetical asserts exactly what the member
set says, and `None` flipped it.
- **Top-level membership only** (entry 2). `SortUISchema` declares
`sort?: Array<{ field; direction }>`, so `direction` is a member of the
inline sort *item*, not of the schema — and *"`direction` is the key
`SortUISchema` legitimately declares"* is true in context. Descending
into inline member objects would re-create the "a name is not a key"
failure one level down, so the narrow reading is deliberate and the cost
is named rather than paid silently.

⛔ None of the three is a reason to stop reporting a flag. They are the
reason a flag is a **candidate**: each is resolved by a human reading
the sentence, and none is resolvable by reading the count.

## Recommendation on the grade condition

Triage's checkable condition was: true-positive rate materially non-zero
⇒ defect list, p2 confirmed, splittable; ≈ 0 ⇒ re-shape the card into
"fix the instrument".

**Measured: 1 of 10 entries, 2 of 17 flags.** That is not zero — there
is a real, previously unrecorded BORN FALSE claim in the sample, and it
is a *second* instance of a class objectui#9713 had already established
twice. So the existence question stays answered and `priority:p2` is
right.

But it is nowhere near a defect list, and **⛔ the number must stop being
carried as one**. At the measured yield, splitting the 58 flagged
entries into dispatchable items would dispatch roughly fifty no-ops,
each costing a history read — which is the same measurement error in a
new coat.

⇒ **Re-shape the card to "fix the instrument, then triage its output".**
Concretely: the instrument now exists, is re-derivable from a clean
checkout, and its three false-positive sources are named and
individually attackable — polarity-by-keyword is the cheapest and would
clear four of the nine. The 154 (now 134) should be carried as
*"whatever `pnpm census:changeset-polarity` prints"*, never as a figure
in prose, which is commandment objectstack-ai#9 applied to this card. The one true
positive found here is a candidate for its own small card; ⛔ it is
**not** repaired in this pull request, because the fence on this
dispatch is absolute.

## Boundaries honoured

- ⛔ **No changeset body was edited** — not one of the 53, not any other.
The only `.changeset/` file this branch touches is the one it adds.
- ⚠️ `.changeset/6051-gantt-flat-config-declared-keys.md` is in the
candidate set and is adjudicated above as a **reading only**. It is
being repaired right now by objectui#9743 on another branch, and nothing
here touches it. (`.changeset/5903-objectgantt-declared-keys.md` left
the candidate set entirely once PascalCase tokens stopped reading as
keys.)
- ⛔ No published face, mirror, declaration or accept set moved. No
issues created. No labels written.
- Open-PR intersection re-taken on this branch rather than inherited:
nine open pull requests, of which four touch `scripts/` (objectui#9748,
objectstack-ai#9584, objectstack-ai#9488, objectstack-ai#8941) and four touch `.changeset/` (objectstack-ai#9540, objectstack-ai#9391, objectstack-ai#8941,
and the release PR objectstack-ai#5400). None touches any path this branch adds or
modifies. The one shared file is `scripts/markdown-test-inputs.mjs`,
which this branch adds one ledger row to and no open pull request edits.

## The changeset grade — measured, not assumed

`.changeset/9727-changeset-polarity-instrument-rebuild.md` carries
**empty frontmatter**, which is the explicit claim that nothing
published moved. That claim is a gate reading:

- **absent control / the real diff** — `node
scripts/check-changeset-presence.mjs` on this branch: *"10 file(s)
changed, 0 of them published source of a package the release covers, 0
of them a manifest whose published contract moved"*, exit **0**.
- **lit control, same tree, same gate** — appending one comment line to
a file under `packages/types/src` flips the same gate to exit **1** and
demands an entry. Reverted in the same run and proven byte-identical by
`git hash-object` before and after (`bcebba9b9` both sides), with `git
diff HEAD` empty.

Two zeros on one instrument would mean a broken instrument. This is one
zero against a firing control.

## Gates

Exit codes captured to disk before any pipe.

| gate | exit |
|---|---|
| `node scripts/check-changeset-presence.mjs` | 0 |
| `node scripts/check-changeset-overwrite.mjs` | 0 |
| `pnpm changeset:check` | 0 |
| `pnpm check:changeset-claims` | 0 |
| `pnpm check:pending-changeset-literals` | 0 |
| `pnpm check:control-bytes` | 0 |
| `pnpm check:governed-queue-guard` | 0 |
| `pnpm check:new-line-citations` | 0 |
| `pnpm check:test-path-roots` | 0 |
| `pnpm check:required-check-set` | 0 |
| `pnpm lint:coverage` | 0 |
| `pnpm check:lint-rule-coverage` | 0 |
| `pnpm check:esm-specifiers` | 0 |
| `pnpm check:node-esm-load` | 0 |
| `pnpm type-check:scripts` | 0 |
| `pnpm exec eslint` on the three added source files | 0, three files
linted |
| `pnpm exec vitest run` — the new suite plus `markdown-test-inputs`,
`check-changeset-presence`, `check-changeset-claims` | 0 |

The governed-surface guard was run at
`scripts/check-governed-queue-guard.mjs`, not under `scripts/pm/`.

## The declared file surface, and the two increments beyond it

The dispatch declared "a script under `scripts/` plus its test, and a
new `.changeset/9727-*.md`". Two files land outside that, both required,
both named here rather than left unexplained:

- **`package.json` (+1 line)** — the `census:changeset-polarity` entry.
Without it the instrument has no invocation the tree knows about, and
`census:*` is the spelling that carries "runnable, reported, not
blocking". It is a `scripts` key: not one of the eight publish-contract
fields, and the root manifest is private, which is part of why the
changeset grade measures as nothing-published.
- **`scripts/markdown-test-inputs.mjs` (+10 lines)** — one ledger row.
That ledger asserts every tracked markdown document is an input to some
test, and the six fixture documents this change adds would otherwise be
uncovered and red it. The row declares what the new test reads and that
it walks a markdown tree; the scanner re-derives the same answer from
the source, which is why the test spells its fixture paths as literal
segment runs.

Both are additive and neither is touched by any open pull request.

## The fixture names ARE the trap list

They encode the failure modes this lane actually hit, not a happy path:

| fixture | the trap it holds open |
|---|---|
| `01-pronoun-pre-repair.md` | the proven false negative — a claim whose
object is a cross-sentence pronoun, carried at its pre-repair text |
| `02-quotation-position.md` | a count is **not** invariant under
quotation; a repaired sentence quoted in its own retirement note must
never be re-flagged |
| `03-wrapped-assertion.md` | prose wraps near eighty columns, and it
carries its own **dark leg**: the pin asserts a line-anchored probe
reads nothing on that exact file, so the lit reading proves the
tolerance rather than assuming it |
| `04-past-tense-only.md` | a historical sentence cannot rot and stays
out of the population |
| `05-referenced-schema-scoping.md` | a name is not a key — a referenced
schema's members are its own |
| `06-index-signature-is-not-membership.md` | a key riding `[key:
string]: any` is admitted and never examined; counting it as declared
erases the finding |

## ⭐ A hand-typed entry guard, caught by CI and fixed — the same defect,
in this instrument

The first push carried a hand-typed `process.argv[1]` entry guard, and
`check:entry-guard` failed the Lint job on it. **It is this script's own
defect class.** Node resolves symlinks for the module graph but leaves
`process.argv[1]` as the caller typed it, so a census reached through a
symlink compares two different paths, answers false, does nothing, and
exits **0 with no output** — a clean-looking zero from an instrument
that never ran, inside an instrument whose entire purpose is to stop
false zeros being reported as measurements. A wrapper holding only
`result.status` cannot tell that apart from a pass.

It now routes through the one predicate, `isEntrypoint` from
`scripts/invoked-as.mjs`, with the reason recorded at the guard. ⛔
`KNOWN_HAND_TYPED_GUARDS` was not touched — it is shrink-only, and
adding a baseline line would have been the false record rather than the
fix.

| | exit |
|---|---|
| `node scripts/check-entry-guard.mjs` **before** | **1**, naming
`scripts/changeset-polarity-census.mjs` |
| `node scripts/check-entry-guard.mjs` **after** | **0** — 103 scripts,
0 hand-typed guards |
| `node scripts/check-entry-guard.mjs --self-test` | 0 — 63 cases |
| `node scripts/invoked-as.mjs --self-test` | 0 — 12 cases, real
symlinks |
| census re-run after the fix | 0, controls PASS, reading unchanged |
| the instrument's own suite re-run | 0 — 47 pins |

The remaining Lint-job guard steps were run locally rather than eslint
alone: `check-lint-coverage`, `check-entry-guard`,
`check-upstream-port-parity`, `check-bash32-floor`,
`check-vi-mock-override-shape`, `check-test-path-roots`,
`check-cross-repo-closer-outcome` — all exit 0.

⚠️ One gate is **NOT MEASURED** here and is not this change's: `pnpm
check:node-esm-load` (its own workflow, not Lint) exits 1 in this
container because turbo shares one cache across every worktree of a
checkout and two entries — `@object-ui/auth`, `@object-ui/react-runtime`
— were replayed from a sibling agent's worktree. The gate refuses to
grade artifacts this tree did not produce, which is correct behaviour;
the refusal is about the shared cache, not about this diff, which
touches no package source.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01UanLVj6xvbS6puBCewLr8L


---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants