Skip to content

docs(utilities): teach the real ObjectStack adapter, not a phantom provider - #5460

Merged
os-support-ai merged 1 commit into
mainfrom
claude/issue-5360-phantom-objectstackprovider
Aug 21, 2026
Merged

docs(utilities): teach the real ObjectStack adapter, not a phantom provider#5460
os-support-ai merged 1 commit into
mainfrom
claude/issue-5360-phantom-objectstackprovider

Conversation

@os-support-ai

Copy link
Copy Markdown
Collaborator

Fixes#5360

Docs + gate ledger only. Rewrites the "Data Integration" section of
content/docs/utilities/index.md against the surface @object-ui/data-objectstack
actually exports, and takes the page off check-doc-snippet-types.mjs's UNGATED_DOCS
ledger because it now compiles clean.

Premise re-verified on the branch tip

The phantom is genuinely absent from the built package, and the real names are present —
each grep counter-probed with a term known to be there, so a zero is a measured zero and
not a mistyped path:

probe over packages/data-objectstack/dist/index.d.tscount
ObjectStackProvider0 (grep exit 1)
ObjectStackAdapter (counter-probe, known present)16

createObjectStackAdapter is declared at dist/index.d.ts:2418 and named in the export
list at :2431. SchemaRendererProvider is declared in
packages/react/dist/context/SchemaRendererContext.d.ts:18 and re-exported through
packages/react/dist/index.d.ts. ObjectGridSchema is declared in
packages/types/dist/objectql.d.ts:484 (type: 'object-grid', objectName: string) and
exported from that package's index.

Before / after, compiled — not eyeballed

Both readings come from the SAME harness the gate uses: analyze() + compileSnippets()
imported from scripts/check-doc-snippet-types.mjs, with every other document declared
ungated so the program compiles exactly this page's blocks. Its three controls were green
on every run below — resolution landed on
/home/user/objectui-issue-5360/packages/types/dist/index.d.ts (a built artifact, never a
package's src/), the planted sentinel produced its TS2305, the positive control produced
zero, and zero source files under any packages/*/src/ entered the program.

Before (origin/main content, against the built dist/*.d.ts):

[semantic] content/docs/utilities/index.md:163:10 TS2724: '"@object-ui/data-objectstack"' has no exported member named 'ObjectStackProvider'. Did you mean 'ObjectStackError'?
[semantic] content/docs/utilities/index.md:171:8 TS2304: Cannot find name 'SchemaRenderer'.
[semantic] content/docs/utilities/index.md:171:31 TS2304: Cannot find name 'schema'.
Semantic phase: 1 of 1 block(s) judged, 1 failed.
Total diagnostics on content/docs/utilities/index.md: 3

That is exactly the mix the ledger entry recorded by hand — TS2724x1 plus
"2 undefined-name diagnostic(s)".

After:

Blocks: 1 to compile, 0 declared fragment(s).
Syntax phase: 0 block(s) failed to parse.
Semantic phase: 1 of 1 block(s) judged, 0 failed.
Total diagnostics on content/docs/utilities/index.md: 0

Counter-probe on that zero. A green run whose harness silently stopped reading the
page looks identical to a green run whose page is correct, so the zero was probed rather
than trusted: re-planting ObjectStackProvider beside the real import turned BOTH the
targeted probe and the full gate red, on this file, by name —

[semantic] content/docs/utilities/index.md:166:36 TS2724: '"@object-ui/data-objectstack"' has no exported member named 'ObjectStackProvider'. Did you mean 'ObjectStackError'?
Semantic phase: 88 of 88 block(s) judged, 1 failed.

— and reverting it restored the green. The mutation was made and reverted on top of the
commit, so the restored file is byte-identical to what is pushed (git status clean, and
ObjectStackProvider greps 0 while createObjectStackAdapter greps 3).

The PR #4129 precedent this follows

#4124 established the finding and PR #4129 fixed it — on
content/docs/utilities/data-objectstack.mdx only. Reading that PR rather than inventing
a shape, its precedent was:

  1. Delete the phantom React API; do not add the export.@object-ui/data-objectstack
    is headless — no react in any dependency field, no React import in src/ — so
    ObjectStackProvider has no home there. PR docs(data-objectstack): document the real headless surface, not a phantom React API #4129's reverse verification recorded the
    same TS2724 / TS2305 pair this card's TS2724 is one half of.
  2. Teach createObjectStackAdapter returning a plain DataSource, with
    new ObjectStackAdapter(config) named as the class form of the same thing.
  3. Inject it at the renderer boundary through @object-ui/react's
    SchemaRendererProvider
    , since React wiring lives in @object-ui/react, not in the
    adapter package — and note that SchemaRenderer also takes an explicit dataSource
    prop for per-render injection.
  4. Drop the invented props with it.apiUrl / apiKey became baseUrl / token,
    which is what createObjectStackAdapter's config declares.
  5. Keep the schema node's own dataSource key distinct from the adapter — the former
    is the spec's per-element binding (what to query), the latter is how to reach the
    backend. The rewritten section says so and links to the sibling page for the full table.

The rewritten snippet is also self-contained: it imports every name it uses and types
its schema literal as the real ObjectGridSchema, so it is judged exactly as a reader who
copies that one block experiences it. That is what retires the two TS2304 undefined-name
diagnostics the same ledger entry carried — the sibling page still carries 16 of them and
stays ungated for that reason.

The page LEAVES the ledger, with the measurement

content/docs/utilities/index.md holds exactly ONE ts/tsx fenced block (verified
against the fence scan: one typescript fence at `:162`, now tsx, and six ```bash
fences). With that block at zero diagnostics the page needs no entry, so the entry is
removed rather than re-measured — the ledger's own rule is that it can only shrink.

Full gate, whole corpus, real exit code captured (not read through a pipe):

Scanned 222 document(s): 159 covered (22 of them hold a ts/tsx block), 63 ungated
Covered blocks: 98 — 88 to compile, 10 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 88 of 88 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
GATE_EXIT=0

Covered went 158 -> 159, ungated 64 -> 63. Two header claims in the same script
were true only while the entry existed and are corrected in the same commit: the
"20 of these entries are .md pages" count is now 19, and "Exactly one entry still names a
missing export" — that one — now records what became of it. No entry on the ledger names a
missing export any more.

Verification

All of the below on 7b289c91b, the branch head and the final commit. Heavy runs were
serialised through the shared /tmp/os-heavy-verify.lock.

gateresult
pnpm turbo run build $(node scripts/check-doc-snippet-types.mjs --build-filter) --concurrency=232 successful, 32 total
node scripts/check-doc-snippet-types.mjsexit 0 — 88/88 judged, 0 failed
the same gate with the phantom re-planted (counter-probe)red, naming this file
npx vitest run scripts/__tests__/check-doc-snippet-types.test.ts1 passed (1), 20 passed (20), exit 0
node scripts/check-doc-component-types.mjsEvery documented component type is registered. (object-grid is a registered key)
node scripts/check-doc-links.mjsLinks are valid across 13 scan roots.
node scripts/check-control-bytes.mjsOK (scanned 4520 tracked text file(s); skipped 85 binary)
node scripts/check-changeset-presence.mjs1 changeset(s) added, exit 0
node scripts/check-changeset-fixed.mjs / check-changeset-no-major.mjsboth exit 0
pnpm type-check:scriptsexit 0
npx eslint scripts/check-doc-snippet-types.mjsexit 0
control-byte self-scan over the three changed filesno matches (grep exit 1)

Changeset: .changeset/utilities-index-phantom-provider-5360.md, empty frontmatter
this publishes nothing, declared explicitly rather than left undeclared. No package src/
is touched.

File surface

Exactly three files, origin/main...HEAD (three-dot, against merge base 77f846a8b):

 .changeset/utilities-index-phantom-provider-5360.md | 27 +++++++++++++
content/docs/utilities/index.md | 45 ++++++++++++++------
scripts/check-doc-snippet-types.mjs | 20 +++++-----

content/docs/guide/react-pages.md is not addressed here — sibling card #5413 is in
flight on that page and it is deliberately untouched.


Generated by Claude Code

…ovider
`content/docs/utilities/index.md`'s "Data Integration" section imported
`ObjectStackProvider` from `@object-ui/data-objectstack`, a React context
provider on a headless package that exports no such thing. Against the built
`dist/index.d.ts` the block read TS2724 — a reader who copied it got a compile
error, not a runtime bug.
Rewritten on the shape PR #4129 established for the sibling page
`content/docs/utilities/data-objectstack.mdx`: `createObjectStackAdapter`
returning a plain `DataSource`, injected through `@object-ui/react`'s
`SchemaRendererProvider`. The block is self-contained and types its schema
literal as the real `ObjectGridSchema`, so it compiles as a reader who copies
that one block experiences it.
That was the page's only ts/tsx block, so it now produces zero diagnostics and
the page LEAVES `check-doc-snippet-types.mjs`'s `UNGATED_DOCS` ledger: no entry
on that ledger names a missing export any more.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
@os-support-ai
os-support-ai marked this pull request as ready for review August 21, 2026 00:37
@os-support-ai
os-support-ai added this pull request to the merge queueAug 21, 2026
Merged via the queue into main with commit 9bd7536Aug 21, 2026
22 checks passed
@os-support-ai
os-support-ai deleted the claude/issue-5360-phantom-objectstackprovider branch August 21, 2026 00:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

content/docs/utilities/index.md still documents the ObjectStackProvider phantom API that #4124 removed from the page one file over

2 participants

@os-support-ai@claude