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

fix(plugin-gantt): key the record fetch on values, not on memo identities - #10100

Merged
os-tesla merged 1 commit into
mainfrom
claude/issue-10036-gantt-reload-identity-dep
Sep 20, 2026
Merged

os-tesla merged 1 commit into
mainfrom
claude/issue-10036-gantt-reload-identity-dep

Conversation

@os-tesla

Copy link
Copy Markdown
Collaborator

Fixes #10036

Clause-②: no — an internal hook dependency array. It moves no exported symbol and no key on a published payload.

The ninth and tenth instances of the class ruled on objectui#8640 (AGENTS.md §5 commandment #10), both sitting on one seam in packages/plugin-gantt/src/ObjectGantt.tsx. ⛔ The direction is not re-argued here; the commandment already decided it.

Premise, re-taken on origin/main before any edit

All three legs held, the card's own control included:

  1. reload's dependency array listed effectiveDataSource, and effectiveDataSource is a useMemo result.
  2. The mount effect listed reload, a useCallback result.
  3. ⭐ The file's first-person record is still there: dataItems was removed from that same array because a discard «was enough to give reload a fresh identity and re-fire the mount effect below (objectui#6592)». One banned identity came off that line and another was left on it — finding the removal and the survivor in the same read is what says the instrument was reading rather than guessing.

Why this is not theoretical on this component

resolveDataSource (@object-ui/core) answers provider: 'object' with the context adapter unchanged, but constructs a new ApiDataSource for 'api' and a new ValueDataSource for 'value'. So on those two providers a discarded memo hands back a fresh adapter for a byte-identical authored config, rebuilds reload, and re-fires the mount effect — one redundant round trip, per discard, on a view nobody touched.

ObjectGantt.discardedConfigMemo.test.tsx already named exactly this gap in its own docblock as a "Known boundary" for the api / value providers. This PR measures it.

⚠️ Fixing leg 1 alone would have been unobservable and would not have closed the defect. A discarded useCallback yields a fresh function whatever its own dependency list says — an empty list included — so the mount effect would still have re-fired. Both sides of the seam, or neither holds.

The repair

  • effectiveDataSourceRef — reload reads the adapter through a ref refreshed on every render, so it is always the adapter the current render resolved, and never a reason to rebuild the callback.
  • adapterInputsKey — reload and the fetch effect key on what resolveDataSource actually reads out of the authored config, per provider arm (read + write for api, items for value, nothing but the fallback otherwise), alongside the host's dataSource and apiFetch. Those three are that memo's own dependency list, with the memoised dataConfig replaced by the values it is derived from.
  • reloadRef — the fetch effect calls through a ref and repeats the same value list instead of naming reload.

⛔ No lint rule was silenced and no eslint-disable was added. The one disable on reload's array is pre-existing and still says what it said ((rest as any).data intentionally untracked). pnpm exec eslint on both changed files exits 0 with no errors; the count of react-hooks findings in ObjectGantt.tsx went down by one against the pre-fix file, measured by linting the pre-fix content beside it in one --format json run. Two new react-hooks/refs warnings appear for the two render-phase ref writes — the rule this repo deliberately downgraded to warn, and the same idiom app-shell's AdapterProvider and MetadataProvider already use for a useMemo result.

⛔ Why the key is the per-arm slice and not the whole config

The first attempt keyed on the whole config's deep value, and the objectui#6592 pin caught it: that pin moves an inert field inside schema.data which "is read by nothing under test", and the fetch must not re-fire. The whole-config key made that authored-but-inert byte a refetch trigger on the object provider — where the adapter is the context DataSource and the config contributes nothing to it at all. That is a widening, so it was withdrawn. The note above dataItems says such an input "cannot be flattened to a fixed primitive list"; true of a fixed list, and the reason it gives is right — the api arm's input is a whole request config. A per-arm value is expressible, and it is the one that neither widens nor narrows.

The forced-discard pin: achievable, and it discriminates

Yes. packages/plugin-gantt/src/ObjectGantt.discardedReloadIdentity-10036.test.tsx follows packages/permissions/src/__tests__/providerCtxIdentity.discarded.test.tsx: it patches useMemo and useCallback at the module level through vi.mock('react', …) — the only patch the component's own import bindings see — and fires a discard on demand by bumping an epoch appended to every armed dependency list. It arms every memo and callback in the tree rather than matching a marker, because a marker on effectiveDataSource alone would leave reload's own useCallback un-discarded, which is the half leg 2 names.

The observable is a request count, not an identity compare: requests are served by a double passed as apiFetch, so nothing reaches happy-dom's origin and is attributed to this file by the network-escape guard. The proxy carries its own self-check (provesTheProxyDiscriminates), and an "armed but not fired" re-render inside the pin proves a green cannot come from the proxy having broken caching outright.

RED before, GREEN after — file state proved in the same command as each run

The ablation restores the pre-fix ObjectGantt.tsx from the branch point while the pin file stays byte-identical, proves the swap by object hash, runs, restores from HEAD, proves the restore by hash and by an empty git status --porcelain, and runs again. ⛔ No leg concludes anything from an exit code.

HEAD blob (fixed)   : c66fbe8111154b0bbe4f63e3cd9df02b53f9ebbc
BASE blob (pre-fix) : 597ed278784343c95241c38452d1d57260ce761d

######## LEG 1 — MUTATION (pre-fix source, pin unchanged) ########
on-disk blob now    : 597ed278784343c95241c38452d1d57260ce761d
marker 'adapterInputsKey' occurrences: 0   (expect 0 on the pre-fix file)
marker 'effectiveDataSourceRef' occurrences: 0   (expect 0 on the pre-fix file)
pin blob            : 1e9d2b1870a54544e446918aff04fa88e610dcf6   (unchanged across both legs)
--- run ---
  [
    "A /api/gantt/tasks",
+   "A /api/gantt/tasks",
+   "A /api/gantt/tasks",
  ]
 Test Files  1 failed (1)
      Tests  1 failed | 5 passed (6)
LEG1 vitest exit: 1

######## LEG 2 — RESTORE (the committed fix) ########
on-disk blob now    : c66fbe8111154b0bbe4f63e3cd9df02b53f9ebbc
git status --porcelain after restore: ''   (expect empty)
marker 'adapterInputsKey' occurrences: 5   (expect > 0)
--- run ---
 Test Files  1 passed (1)
      Tests  6 passed (6)
LEG2 vitest exit: 0

Two readings the numbers carry beyond "it went red":

  • The defect issues one extra request per discard — two discards, three requests — which is the mechanism, not a one-off.
  • The five non-regression pins pass on the pre-fix source too. That is what a non-regression axis must do: they fail on the plausible wrong fix (dropping the dependency and refetching for nothing), not on the bug.

What the non-regression pins hold

A changed api endpoint, a changed authored filter, a swapped apiFetch, and a swapped context adapter each still refetch, and the new double is the one that runs in the last two. resource, dataProvider and hasInlineData are derived from the authored config the first pins move; objectSchema and perms are unchanged members of the same list.

Gates, re-run as the last action before the push

At commit 19d1eebf1, tree equal to the pushed commit, git status --porcelain empty, each run printing that state in the same command. All files tracked at the time of the run, so the populations include this change rather than collapsing around it — the scanned counts moved with it (8120 text files, 5188 source files, 3341 test files).

gate exit
check-changeset-presence 0 — 2 source files of 1 released package changed, 1 changeset declared
check-changeset-no-major / -fixed / -overwrite / -claims 0
check-control-bytes 0
check-new-cross-file-line-citations 0 new citations
check-vi-mock-specifiers / -inherit / -override-shape 0
check-test-path-roots 0
check-unreferenced-sources 0
check-governed-queue-guard --test NOT GOVERNED — 3 paths, none matched
eslint on both changed files 0, no errors
type-check (tsc --noEmit + tsc -p tsconfig.test.json) 0
vitest run packages/plugin-gantt/ 0 — 70 files, 544 tests

The changeset is a real patch on @object-ui/plugin-gantt, decided by running the gate, not from memory: the gate names src/ files of a released package, and a removed redundant round trip is user-visible.

⚠️ The first full-package run failed — the objectui#6592 pin, on the too-wide key described above. It is green now; the sequence is recorded because the pin doing its job is the reason the key was narrowed.

Is a mechanical guard owed? — triage's question, answered

Yes for this shape, and the sweep's own two finds are the argument. Commandment #10 records that a lint rule is feasible for the same-file shape only, eslint-rules/ being where it would live, with the cross-module instances out of reach of any single-file rule. Both instances this sweep produced are same-file: reload and effectiveDataSource are declared in one component here, and objectui#10044's candidateSignature = useMemo(…, [candidates]) sits directly under the candidates memo in useRecordSearch.ts. ⇒ The two that a per-class remediation would have had to catch are exactly the two a feasible rule reaches. ⛔ Filing and writing it is outside this card's file surface; it is reported for the seat to file rather than smuggled in here.

Acceptance notes — noticed, not fixed here

  • A record query fires twice when the context adapter is swapped on provider: 'object'. useSettledSchema re-reads getObjectSchema through the new adapter and settles a fresh definition object for a byte-identical answer; objectSchema is a genuine member of the fetch effect's value list, so the record query runs a second time. That is the seam commandment [WIP] Enhance every detail of the designer #10 spells out in as many words — "a provider that refetches may not republish an equal payload as a new object" — one link upstream, in packages/react/src/hooks/useSettledSchema.ts, outside this card's file surface. It is unchanged by this PR (before and after alike). The new pin deliberately does not pin the exact count for that case, so it will not go red on the day it is repaired; it pins that the new adapter is the one that runs. Reported for filing.
  • The same file still names effectiveDataSource in four write-back / delete callback dependency arrays. Those are handler identities: a discard re-creates a handler, it does not issue a request, so no correctness rests on them and they are out of this card's scope. Noted, not filed.

Generated by Claude Code

…ties

`reload` named `effectiveDataSource` — a `useMemo` result — and the mount
effect named `reload` — a `useCallback` result. Both are dependencies
AGENTS.md §5 commandment #10 bans: React documents both hooks as a
performance hint and may discard the cache and recompute even when the
dependency list compares equal, handing back a new object.

`resolveDataSource` returns the context adapter unchanged for
`provider: 'object'` but constructs a fresh `ApiDataSource` /
`ValueDataSource` for `'api'` and `'value'`, so on those two providers a
discard alone rebuilt `reload` and re-fired the mount effect: one
redundant round trip per discard. A discarded `useCallback` moves
`reload`'s identity whatever its own dependency list says, so both sides
of the seam move together or neither holds.

The fetch now reads the adapter through a ref and keys on the values that
determine it: the config slice `resolveDataSource` actually reads, per
provider arm, plus the host's `dataSource` and `apiFetch`. The pin forces
a discard through the module-level `useMemo`/`useCallback` proxy the
permissions package uses, because React does not discard on its own in
this tree and a pin that does not force one passes identically on defect
and fix.

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

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 2 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/6475-gantt-block-face-declared.md

  • names plugin-gantt/src/ObjectGantt.tsx → packages/plugin-gantt/src/ObjectGantt.tsx — edited by this change

    The gantt nested-block spelling of a gantt config ({ type: 'object-gantt', gantt: { … } }) had no mirror entry at all: it rode through BaseSchema's .passthrough() entirely unvalidated, and the published TypeScript never taught the shape either — an author writing gantt: { … } got no completion, no type checking, no error on a misspelt member. It was the 28th and last of the keys getGanttConfig (plugin-gantt/src/ObjectGantt.tsx) reads off the schema that objectui#6051 (PR feat(types,plugin-gantt): declare the flattened GanttConfig face ObjectGantt reads (#6051) #6472) did not declare — severed into its own card because, unlike the other 27, declaring it changes what a published tool refuses.

.changeset/6939-objectql-record-source-refinement.md

  • names plugin-gantt/src/ObjectGantt.tsx → packages/plugin-gantt/src/ObjectGantt.tsx — edited by this change

    Both renderers resolve their records from one of three keys, in this order — getDataConfig in plugin-map/src/ObjectMap.tsx and plugin-gantt/src/ObjectGantt.tsx: data, then staticData, then objectName. Both mirrors required objectName alone, so a document authored on staticData drew correctly and was refused by safeValidateSchema — six catalog entries, three per component.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 205b97353 (merge-base with origin/main): 2 file(s) changed outside .changeset/, read against 1226 pending declaration(s) that publish a body (1788 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3058.7 KB 3104.5 KB
Main entry chunk (gzip) 146.9 KB 350 KB
Entry file index-TOV-zSp5.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) 545.92KB 130.72KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 221.99KB 61.72KB
fields (index.js) 251.67KB 63.42KB
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.90KB 10.97KB
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) 5.52KB 2.10KB
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) 50.26KB 14.36KB
plugin-charts (index.js) 71.73KB 20.08KB
plugin-chatbot (index.js) 198.20KB 47.14KB
plugin-dashboard (index.js) 132.96KB 35.17KB
plugin-designer (index.js) 215.94KB 44.33KB
plugin-detail (index.js) 255.18KB 66.49KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 139.56KB 35.40KB
plugin-gantt (index.js) 167.99KB 41.37KB
plugin-grid (index.js) 213.44KB 58.21KB
plugin-kanban (index.js) 48.71KB 15.17KB
plugin-list (index.js) 113.53KB 27.99KB
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.68KB 8.95KB
plugin-tree (index.js) 10.58KB 3.72KB
plugin-view (index.js) 85.18KB 21.05KB
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) 109.04KB 36.08KB
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 (body-dialect.js) 4.38KB 1.98KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.74KB 2.54KB
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) 15.71KB 5.30KB
types (ai.js) 4.11KB 2.06KB
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) 5.00KB 2.39KB
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

@os-tesla
os-tesla marked this pull request as ready for review September 20, 2026 12:45
@os-tesla
os-tesla enabled auto-merge September 20, 2026 12:45
@os-tesla
os-tesla added this pull request to the merge queue Sep 20, 2026
Merged via the queue into main with commit 75b0d0b Sep 20, 2026
38 checks passed
@os-tesla
os-tesla deleted the claude/issue-10036-gantt-reload-identity-dep branch September 20, 2026 14:09
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…objectui#10106) (objectstack-ai#10149)

Fixes objectstack-ai#10106

Clause-②: no — a provider's republish identity. No exported symbol and
no key on a published payload moves. Re-declared from the actual diff:
the diff adds a module-private `isEqualPayload` and a `settle` closure
inside `useSettledSchema`'s effect; the hook's exported signature, its
`SettledSchema` interface and every key on the value it publishes are
byte-unchanged.

## The re-take — it REPRODUCES

The card was wholly second-hand (filed from objectui#10036's hand-back,
re-run by nobody), so the first deliverable was the measurement, not a
diff. Taken first-hand on the REAL consumer, `ObjectGantt`, with an
instrumented adapter, swapping the adapter on provider `object`, three
cases in ONE command so that "two" is a discrimination and not a
counting artefact of the harness:

| swap | `find` on the new adapter | expand sets |
|---|---|---|
| byte-identical answer, as a FRESH object (SUBJECT) | **2** |
`[['owner'], ['owner']]` |
| the SAME def object from both adapters (CONTROL) | **1** |
`[['owner']]` |
| a genuinely DIFFERENT def (CONTROL) | **2** | `[['owner'],
['owner','account']]` |

The middle row is what makes the top row a finding: the same harness
counts ONE the moment the producer keeps the payload's identity, so the
extra query is the republish and nothing else. The bottom row is where
two queries are WARRANTED — the second carries an expand set the first
could not have — which is why the repair may never be "fetch less".

After the repair, re-measured in the same harness: SUBJECT **2 → 1**
(`[['owner']]`), and both controls unchanged (**1** and **2**, the
latter still widening to `['owner','account']`).

`getObjectSchema` was called exactly once on the new adapter in every
case, before and after: this is not "the refetch was skipped".

## What was repaired, and where

`AGENTS.md` §5 commandment objectstack-ai#10 closes with two halves:

> a provider that refetches may not republish an equal payload as a new
object, and a consumer that needs stability keys on the data, not on a
cache

The consumers are already on the right side of the second half —
`ObjectGantt`, `ObjectCalendar`, `ObjectView`, `ObjectTimeline` and
`ObjectGallery` each key their record fetch on `def`, the payload, not
on a memo identity. The breach was the first half, at the producer:
`useSettledSchema` re-read `getObjectSchema` on an adapter change and
settled a fresh `def` object for a byte-identical answer, re-firing
every one of those fetches.

The fix is at that producer and nowhere else: a settle whose answer is
value-equal to the one already published keeps the object consumers
hold. Nothing moved into a consumer's dependency list, and no cache was
introduced — commandment objectstack-ai#10 names both as the wrong cure in the same
sentence.

Why `ready` does not save anyone here, since it is easy to misread:
`ready` is `resolution.key === key`, and an adapter swap does not move
the key. `ready` stays TRUE right through the swap, so a consumer's gate
holds nothing back — the first query goes out at once on the definition
already in hand, and the republish adds the second. That is now pinned
too.

## Evidence

**RED-before** — the pin run against the hook byte-identical to
`origin/main`, with the file state proved in the SAME command (`git
hash-object` on the hook equal to its `HEAD` blob, both printed as
`bb550f98d`): `2 failed | 3 passed`. The two subject assertions failed;
all three controls passed.

**GREEN-after** — same pin with the repair on disk (blob `f287de8b6`,
printed in the same command): `5 passed`.

**Ablation from the committed state** — the `settle` bail-out replaced
by the pre-repair unconditional republish. The mutation was proved by
content and by hash, never by an exit code: injected marker count `1`,
removed-guard count `0`, blob `f287de8b6 → ae320ff3b`. The pin went `2
failed | 3 passed` — the same two, with all three controls still green.
Restore proved the same way: blob back to `f287de8b6`, `git diff HEAD`
empty.

**Suites** — `packages/react` in full plus every `useSettledSchema`
consumer pin (`ObjectGantt` fetch gate, `ObjectCalendar`, `ObjectKanban`
x2, `ObjectGallery`, `ObjectTimeline`, `ObjectTree`, `ObjectView`) and
the two doc-example reader gate suites: **115 files / 1353 tests
passed**, at `fe23217e9` with a clean tree (printed in the same
command).

**Type-check** — `@object-ui/react`: `tsc --noEmit` and `tsc -p
tsconfig.test.json`, both clean. The test project SELECTS the new pin
(`--listFiles` finds it).

**Gates, re-run last, at `fe23217e9` with nothing unstaged** —
`check:control-bytes`, `check:new-line-citations`, `check:doc-examples`,
`check:doc-example-ids`, `check:doc-example-readers`,
`check:doc-snippets`, `check:doc-types`, `check:readme-exports`,
`check:test-path-roots`, `check:vi-mock-specifiers`,
`check:unreferenced-sources`, `check:pending-changeset-literals`,
`check-changeset-presence`, `check-changeset-fixed`,
`check-changeset-no-major`, and `eslint` on both changed files: all exit
0.

⚠️ `check:doc-examples` and `check:readme-exports` first answered
PRECONDITION NOT MET / population COLLAPSED (no `dist` on disk —
`readme-exports` reported `typesResolved: 0` against a floor of 2).
Those runs are recorded as not-a-verdict, not as passes. Both were then
re-run properly after `turbo run build` over the filter the gate itself
prints, and the green above is from those runs, with a healthy
population (`readme-exports`: 3384 export symbols from 36 of 40
packages, 58 keys compared).

**Changeset** — decided by running the gate, not from memory:
`check-changeset-presence` exited 1 and named `@object-ui/react`; a
`patch` changeset was added and it now exits 0.

## Acceptance notes

Noted while in the file, ⛔ not filed and ⛔ not fixed here:

- `useSettledSchema.test.ts`'s case "re-fetches when dataSource identity
changes even if the key does not" carries a comment stating "Ready flips
false the instant the source changes, same mechanism as a key change".
That is not what the code does: `ready` is `resolution.key === key` and
an adapter swap leaves the key alone, so `ready` stays true — which is
exactly the mechanism this card rests on. The assertions in that case
are correct and still pass; only the sentence is wrong. Left alone
because it is a different class from this card's defect, and correcting
someone else's prose is not this card's business; the correct statement
is now written and pinned in the new file next to it.

## Not in scope, deliberately

- The count is pinned at the hook's own boundary, through the consumer
recipe the hook's `@example` publishes, because this card's file surface
is `useSettledSchema.ts` and its tests. The `ObjectGantt` reading above
was taken with a throwaway probe, reported here and removed — it is not
part of the diff.
- PR objectstack-ai#10100 (objectui#10036) neither caused nor fixes this; it is still
open and touches `packages/plugin-gantt` only, so there is no overlap
with this branch.

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

https://claude.ai/code/session_018HrVaotisyhgmot9o2MLRq

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

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

1 participant