docs(skills): type three marked fences' schema as SchemaRendererProps['schema'] (objectui#11543) - #11558
docs(skills): type three marked fences' schema as SchemaRendererProps['schema'] (objectui#11543)#11558objectstack-fleet[bot] wants to merge 1 commit into
Conversation
…['schema'] (objectui#11543) Three `os:check` fences in the objectui skill guides (auth-permissions, data-integration, schema-expressions) declared `schema: BaseSchema` and passed it to `SchemaRenderer`. V1 (objectui#11466) narrows that prop to the declared-node union, which refuses a `BaseSchema` with TS2322, so the Skill Example Check goes red on V1's branch. Each fence now declares the prop's own type, `SchemaRendererProps['schema']`, imported as a type from `@object-ui/react`. It compiles on main today and after V1 lands, and it follows the prop by reference. The `os:check` markers are untouched; the edit is line-neutral. Claude-Session: https://claude.ai/code/session_016tKoy8NJa35Yih1FdzrVmn Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
维护者速读From the director seat, summon #32 ( 改了什么
为什么改
风险与代价
席位意见:建议批准。
你要做的
Generated by Claude Code |
Fixes #11543
Clause-②: no
What
Three marked (
os:check)tsxfences in the published objectui skill guides declaredschema: BaseSchemaand passed it toSchemaRenderer:skills/objectui/guides/auth-permissions.md(theContactsPagefence)skills/objectui/guides/data-integration.md(thePrototypefence)skills/objectui/guides/schema-expressions.md(thePagefence)V1 (objectui#11466, PR #11512) narrows the
schemaprop to the declared-node union, which refuses aBaseSchemawith TS2322. SoSkill Example Checkis red on PR #11512.This PR is the card's route B, exactly. Each fence now declares the prop's own type, imported as a type from
@object-ui/react:It replaces
import type { BaseSchema } from '@object-ui/types'anddeclare const schema: BaseSchema.BaseSchemahad no other use in any of the three fences, so its import goes. The type compiles onmaintoday and after V1 lands, and it follows the prop by reference.os:checkmarker was removed or altered. Per file, the marker count is equal at the base and at the head: 6, 9 and 32.Measured (head
2f2205315, base154075ab1)The skill-example gate is
node scripts/check-skill-examples.mjs(pnpm check:skill-examples, theSkill Example Checkjob inskill-examples.yml). Each leg first built the packages the gate's own--build-filternames (turbo, 29 of 29 tasks), so the fences were judged against the builtdist/*.d.ts. The gate's RESOLUTION control confirmed that.main154075ab1, unchangedSemantic phase: 18 of 18 ts fence(s) judged, 0 failed.mainplus this change (2f2205315)Semantic phase: 18 of 18 ts fence(s) judged, 0 failed.fab635a2d, unchangedSemantic phase: 18 of 18 ts fence(s) judged, 3 failed.These are the three TS2322 failures, one in each of the three guides.fab635a2dplus this changeSemantic phase: 18 of 18 ts fence(s) judged, 0 failed.BaseSchemaread 0 andSchemaRendererProps['schema']read 1 in each file. Afterwards the probe was restored withgit checkout HEAD(git diff HEADread 0 bytes) and removed without--force. Nothing from it was pushed.--self-testonmain: exit 0, 60 cases pass.--listat the head shows all three fences asmarked pass.node scripts/markdown-test-inputs.mjs(all three paths are recorded test inputs), plus two more thatgit grepnames. They ran from the repo root at2f2205315:Test Files 14 passed (14),Tests 394 passed (394).check-skills-pathscheck-control-bytescheck-shell-escape-residuecheck-skill-eval-tokenscheck-new-cross-file-line-citations(0 new)check-doc-fence-languagescheck-doc-linkscheck-changeset-presence("no changeset is owed":skills/**is no released package's source)node scripts/check-governed-queue-guard.mjs --teston the three paths: exit 3,GOVERNED — 3 of 3 path(s) are on a governed surface(skills/**, the published skills catalog). The control pathpackages/react/src/index.tsreadsNOT GOVERNED, exit 0.auth-permissions.md409 → 409,data-integration.md515 → 515,schema-expressions.md639 → 639.skills/**/SKILL.md142 → 142 (one file), and all ofskills/objectui/**5418 → 5418.skills/**. objectstack'scheck-skill-line-ratchet.mjscovers objectstack's own instruction files only.Governed landing
skills/**is a governed surface, so this PR stays a draft until an authorized approval (os-zhuang/hotlong). The claiming seat lands it through the merge queue. The author of this draft does not flip it ready, request reviews, arm auto-merge or merge it.Sequencing, from the card:
schema-expressions.md, at a different bullet. Whichever lands second mergesmain.schemaprop take the declared-node union, V1; the dashboard producers name declared nodes and an envelope's object-metric retires (objectui#11466) #11512 mergesmain, and itsSkill Example Checkshould read 0 failed. The probe row above is that reading, taken ahead of time.维护者速读(草稿)
改了什么
SchemaRenderer的 schema 的类型标注,从BaseSchema换成渲染器自身的入参类型SchemaRendererProps['schema']。为什么改
schemaprop take the declared-node union, V1; the dashboard producers name declared nodes and an envelope's object-metric retires (objectui#11466) #11512)把渲染器的 schema 入参收紧为「已声明节点」的联合类型,这是有意的契约收紧。Skill Example Check)上。main上能编译,V1 落地后也能编译,以后入参再变也会自动跟随。main上改前、改后都是 0 失败;在 V1 分支上套用本改动后,从 3 失败变为 0 失败。风险与代价(含回滚)
SchemaRendererProps['schema']这种索引类型写法,比BaseSchema稍微抽象一些。席位意见
你要做的
os-zhuang或hotlong账号)。Acceptance notes
main(154075ab1) and at PR feat(types,react,core,plugin-dashboard)!: a node slot and SchemaRenderer'sschemaprop take the declared-node union, V1; the dashboard producers name declared nodes and an envelope's object-metric retires (objectui#11466) #11512's head (fab635a2d).Implemented by an os-dev run dispatched from the director seat, session
session_016tKoy8NJa35Yih1FdzrVmn.Generated by Claude Code