Skip to content

docs(api): record the os:check decision for client-sdk.mdx, and fence its JSX as tsx - #12045

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-11942-client-sdk-oscheck-markers
Aug 25, 2026
Merged

docs(api): record the os:check decision for client-sdk.mdx, and fence its JSX as tsx#12045
yinlianghui merged 1 commit into
mainfrom
claude/issue-11942-client-sdk-oscheck-markers

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #11942

Why this is not "13 markers"

The card's scope was: opt the page's fences into check:skill-examples, compile, and repair
each red honestly, on the premise that "each red is a real doc-vs-SDK divergence, not a marker
problem."

Measured, that premise does not hold: not one of the 13 reds is a doc-vs-SDK divergence.
All 13 fences were marked, the gate run, and the tree reverted. Result: 128 diagnostics, zero
divergences
, in two structural classes neither of which this page can fix.

Class 1 — the docs surface cannot resolve the SDK (3 fences)

check:skill-examples compiles per surface. content/docs/** belongs to the
skills + docs (@objectstack/spec) surface, whose resolutionDir and paths map derive from
@objectstack/spec alone — and @objectstack/spec does not depend on @objectstack/client
(confirmed: neither packages/spec/node_modules/@objectstack/ nor the root
node_modules/@objectstack/ exists).

Marking the single most self-contained fence on the page — a pure createFilter() builder chain
that is unambiguously correct SDK code — yields:

content/docs/api/client-sdk.mdx:485:30
error TS2307: Cannot find module '@objectstack/client' or its corresponding type declarations.

That is a surface-resolution gap, not drift. The only real fix is adding @objectstack/client to
that surface's selfPackages, i.e. editing the gate — explicitly out of scope for this card.

This is not a new observation: content/docs/kernel/runtime-services/data-service.mdx already
records the identical constraint in prose, for the identical reason, and leaves its own SDK block
deliberately unmarked.

Class 2 — deliberate continuation fragments (10 fences)

Quick Start establishes const client = new ObjectStackClient(...) once; every later fence
continues that implied context. Marking them reds with 93 x TS2304 Cannot find name 'client',
plus TS18004 (conversationId, messages, userId, orderId, recordId), TS18046 (error is
unknown in a catch), TS2591 (process) and TS7006.

Making these compile means hand-declaring the SDK's own types or injecting casts into prose whose
subject is the real API — which pins each example to itself and teaches worse code than the page
teaches now. The card forbids editing a correct example into something that merely compiles.

What this PR does deliver

1. It records the decision. The issue's actual claim is that "nobody has decided, page by
page, which side of that line each block is on."
This PR decides it for this page and writes the
measurement down, as a contributor-facing MDX comment (renders to nothing), following the
data-service.mdx precedent. The next agent reads the answer instead of re-deriving it.

2. It defuses a measured landmine. The React Hooks block is JSX but was fenced as typescript.
The gate writes each block out with its fence's own extension, so a marker on it produced only
TS1xxx syntax errors — and tsc stops at syntax errors and never runs the semantic pass. Measured
consequence, on this page:

fences markedReact Hooks fencesyntax errorssemantic diagnostics
12 (JSX one excluded)typescript0118
13 (all)typescript140
13 (all)tsx0128

One mis-tagged fence suppresses type-checking for every marked block across skills/ and
content/docs/
— 227 blocks — not just this page. Retagging it tsx is correct on its own terms
(the block is JSX) and converts a whole-surface blackout into honest per-block diagnostics.
check:doc-authoring's FENCE_OPEN accepts tsx, so the block stays visible to it.

The marker becomes available here the day the docs surface can resolve @objectstack/client.

Verification

Baseline and final are identical and unchanged, as intended — this PR adds no markers:

256 marked example(s) across 99 file(s), 3 surface(s)
256 prose examples type-check across 3 surface(s)

All 20 gate families derived at the final commit c84df2983 by
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack (no hand-written path list),
plus check:nul-bytes and check:skill-examples22/22 green, each exit code captured before
any pipe. MDX parse confirmed by compiling the page with the workspace's own @mdx-js/mdx@3.1.1.

Docs-only; no published package changes, so skip-changeset rather than a changeset.

Every mutation run above was performed under an EXIT INT TERM restore trap, with the marker count
on disk asserted before each run and the tree confirmed pristine after.


Generated by Claude Code

… its JSX as tsx
The page has 13 TypeScript fences and 0 os:check markers. Marking them was
measured rather than assumed: all 13 marked at once produce 128 diagnostics and
not one is a doc-vs-SDK divergence.
Two structural reasons, neither fixable on this page:
- content/docs/** belongs to check:skill-examples' "skills + docs" surface,
whose paths map derives from @objectstack/spec alone, and spec does not
depend on @objectstack/client. Every fence importing the SDK reds TS2307.
- The remaining fences are deliberate continuation fragments sharing the
Quick Start's `client`, so they red TS2304.
Making either class compile would mean hand-declaring the SDK's own types or
injecting casts into prose whose subject is the real API.
Also retags the React Hooks block tsx (it is JSX). The gate writes each block
out with its fence's extension, so as `typescript` a marker on it produced only
TS1xxx syntax errors -- and tsc never runs the semantic pass after those, which
suppressed type-checking for every marked block across skills/ and content/docs/
(measured: 128 semantic diagnostics collapse to 0). check:doc-authoring accepts
tsx, so the block stays visible to it.
Part of #11942
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjM2ia8Av1v5NqfqQEQmC6
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Aug 25, 2026
@yinlianghuiyinlianghui added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 25, 2026 — with Claude
@yinlianghui
yinlianghui marked this pull request as ready for review August 25, 2026 07:00
@yinlianghui
yinlianghui added this pull request to the merge queueAug 25, 2026
Merged via the queue into main with commit 76ebb6aAug 25, 2026
33 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-11942-client-sdk-oscheck-markers branch August 25, 2026 07:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude