Skip to content

docs(skills): correct six wrong shipped-API facts in the published objectui guides - #7677

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-7675-skill-guide-fences-os-check
Sep 5, 2026
Merged

docs(skills): correct six wrong shipped-API facts in the published objectui guides#7677
os-zhuang merged 2 commits into
mainfrom
claude/issue-7675-skill-guide-fences-os-check

Conversation

@claude

@claude claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #7676

Six statements of a shipped-API fact in the published skills/objectui/guides/ bundle contradicted the built dist/*.d.ts. Each is corrected here to what the types declare, one line per fact. ⛔ No fence is rewritten and no os:check marker is added — the fences stay unmarked, and their remaining diagnostics are the prose placeholders they reference by design.

The sites were found by running check-skill-examples.mjs --measure over the whole corpus (that sweep's other result — that the guides' fences are fragments by construction and none is markable — is recorded on the card it came from, which is closed not planned).

改前 → 改后

# guide · site 改前 改后 the shipped fact
1 mobile.md gesture fence const listRef = usePullToRefresh(...) const { ref: listRef } = usePullToRefresh(...) returns an object — ref, isRefreshing, pullDistance — not a bare ref (packages/mobile/dist/usePullToRefresh.d.ts)
2 auth-permissions.md provider fence (and the nesting-order fence, same fact) authClient={authClient} authUrl="/api/v1/auth" client={authClient} the prop is client, and authUrl is required (AuthProviderOptions, packages/auth/dist/types.d.ts:493)
3 auth-permissions.md fetch fence createAuthenticatedFetch(authClient) createAuthenticatedFetch() it takes CreateAuthenticatedFetchOptions (only sameOriginOnly?), never the client; the bearer token comes from storage
4 auth-permissions.md guard fence fallback={ the AccessDenied element } fallback="custom" fallbackContent={ the AccessDenied element } fallback is the closed union 'hide' | 'disable' | 'custom'; custom content goes in fallbackContent
5 i18n.md formatting fence const { formatCurrency, formatDate, formatNumber, formatRelativeTime } = useObjectTranslation(); and formatDate(date, 'YYYY-MM-DD') import { formatCurrency, formatDate, formatNumber, formatRelativeTime } from '@object-ui/i18n'; and formatDate(date, { style: 'short' }) all four are module-level exports (packages/i18n/dist/index.d.ts:49), not members of the hook's return, and each takes an options object, not a positional format string
6 project-setup.md provider fence value={metadata} adapter={myAdapter} app-shell's MetadataProvider takes adapter and optional ttlMs (packages/app-shell/dist/providers/MetadataProvider.d.ts)

Row 5 is two lines because the fact is stated twice in the same fence: where the helpers come from, and how they are called. Correcting only the import would have introduced a fresh error on the positional format string, which is the same wrong fact one line down.

Differential evidence, per row

Method: the named diagnostic is present in a --measure log taken before the edit and absent from one taken after, with the fence's remaining diagnostics being the placeholder class. Nothing else in the corpus moved.

# before after
1 mobile.md:48:35 TS2322 — the pull-to-refresh result object is not assignable to the element ref prop absent; fence keeps only TS2304 CardContent
2 auth-permissions.md:29:19 TS2322 — property authClient does not exist on the provider props absent; the interim TS2741 authUrl is missing this exposed is also absent after the required prop was supplied; fence keeps only TS2304 AppContent
3 auth-permissions.md:110:53 TS2559AuthClient has no properties in common with the options type absent; the fence now has no diagnostics at all
4 auth-permissions.md:242:56 TS2322 — an element is not assignable to the closed union absent; fence keeps only TS2304 AccessDenied, BulkDeleteButton
5 i18n.md:98:11 / :27 / :39 / :53 TS2339 x4 — none of the four helpers exists on the hook's return all four absent, and no new diagnostic replaced them; fence keeps only TS7031 implicit-any on its own untyped example props
6 project-setup.md:280:21 TS2322 — property value does not exist on the provider props absent; fence keeps only TS2304 myAdapter

Corpus-level: semantic failures 81 → 80 over 95 judged fences, and exactly one verdict flipped — auth-permissions.md:105 (row 3) went FAILpass. It is now the first unmarked fence in skills/objectui/guides/ that compiles, so it is the one candidate a follow-up could opt in (floor 13 → 14). ⛔ Deliberately not marked here: this PR corrects facts and moves no marker.

Gate verdicts — union re-run on the final commit a7dfbcc

check:skill-examples        exit 0   Marked: 13 ts fence(s) (floor 13), 70 json fence(s) (floor 70)
                                     Semantic phase: 13 of 13 ts fence(s) judged, 0 failed.
                                     JSON phase:     70 fence(s) parsed, 0 failed.
                                     Bare `any`: 1 finding(s), 1 declared, 0 NOT declared, 0 stale.
                                     Every marked skill example holds up against the built types.
check:skills-paths          exit 0   OK (88/89 stated path(s) resolve across 20 guide file(s); 1 baselined)
check:skill-eval-tokens     exit 0   Every must_contain token is taught by its own skill bundle.
check:doc-fences            exit 0   every TypeScript block in 227 document(s) is fenced ts/tsx/typescript
check:control-bytes         exit 0   OK (scanned 6258 tracked text file(s); skipped 85 binary)
check:governed-queue-guard  exit 0   132 cases pass

The marked population and both floors are unchanged at 13 ts / 70 json — no marker moved, so MARKED_FLOOR is not re-pinned.

Changeset — objectui has no skip-changeset label, so the script decides:

node scripts/check-changeset-presence.mjs   exit 0
Compared the working tree with a472b0716 (merge-base with origin/main): 4 file(s) changed,
0 of them published source of a package the release covers, 0 of them a manifest whose
published contract moved, 0 under a package changesets ignores, 0 changeset(s) added.
✅  No source or published contract of a released package changed in this range, so no changeset is owed.

Ratchets (whole-file lines, before → after): auth-permissions.md 348 → 348; i18n.md 187 → 185; project-setup.md 345 → 345; mobile.md 168 → 168. Published SKILL.md bundle sum 137 lines, untouched. Net −2 lines — no content was purchased.

Review notes

Governed surface skills-catalog. Stays a draft; two approvers; human merge. The packages are untouched — every change is documentation converging on the API that already ships.


🤖 Generated with Claude Code

https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox


Generated by Claude Code

…hipped return shape

`usePullToRefresh` returns `{ ref, isRefreshing, pullDistance }`
(packages/mobile/dist/usePullToRefresh.d.ts), not a bare ref. The gesture
fence bound the whole result object and attached it as a React ref, which
`tsc` rejects (TS2322) and which would not attach at runtime either.

Destructuring the `ref` member at the call site is the one-line correction;
the fence's remaining diagnostics are all TS2304 on deliberate prose
placeholders, so it stays unmarked.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
…uides

Each site stated a member, prop or call shape the built dist/*.d.ts
contradicts, and each is corrected to what the types declare:

- auth-permissions: AuthProvider takes `client`, not `authClient`, and
  `authUrl` is required (AuthProviderOptions). Both usages corrected.
- auth-permissions: createAuthenticatedFetch takes its options object,
  not the auth client; the token comes from storage.
- auth-permissions: PermissionGuard's `fallback` is the closed union
  'hide' | 'disable' | 'custom'; custom content goes in `fallbackContent`.
- i18n: the four format helpers are module-level exports of
  @object-ui/i18n, not members of useObjectTranslation()'s return, and
  they take options objects rather than positional format strings.
- project-setup: app-shell's MetadataProvider takes `adapter`, not `value`.

The fences stay unmarked; their remaining diagnostics are the prose
placeholders they reference by design.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
@claude claude Bot changed the title docs(skills): correct mobile.md usePullToRefresh ref idiom; the guides have no markable fences docs(skills): correct six wrong shipped-API facts in the published objectui guides Sep 4, 2026
@claude
claude Bot requested review from hotlong and os-zhuang September 4, 2026 22:25
@os-zhuang
os-zhuang marked this pull request as ready for review September 5, 2026 06:08
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit ab771d2 Sep 5, 2026
30 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-7675-skill-guide-fences-os-check branch September 5, 2026 06:23
Sign up for free to 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.

finding(skills): five wrong shipped-API facts in the published objectui guides, all in fences no gate reads

2 participants