Repository navigation
fix(spec): GetMetaTypesResponseSchema declares every member /meta/types serves - #36948
Conversation
GetMetaTypesResponseSchema now declares schemaId, schema, form and actions, which getMetaTypes() serves on each entry. A test parses a real answer, sent through JSON, and checks no served member is stripped. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
…les in the ledger Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 175 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 66714a72aeb3e6734043cece627ba84ed4004266 && git checkout 66714a72aeb3e6734043cece627ba84ed4004266
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 49c6bf3d513efd3d15a82f5a54b7887563eb0439 ce27cea1dfaba3cd3ca56c8ede2f6448505fabf2 && git checkout -B drift-repro 49c6bf3d513efd3d15a82f5a54b7887563eb0439 && git merge --no-ff ce27cea1dfaba3cd3ca56c8ede2f6448505fabf2
node scripts/docs-audit/affected-docs.mjs --json 49c6bf3d513efd3d15a82f5a54b7887563eb0439 |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 Contract-review-claim: session_01WGufzesUz1Y8VZuKJRhVL8 · head ce27cea · 2026-11-24T10:46Z L1-a takes the CONTRACT_REVIEW_TIER contract review (lane-keep L2, Clause-② yes widening on |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 Contract reviewServed-tier: PR #36948 (card #36887), net diff against Check-runs on this head at the time of this record: 24 success, 10 skipped, 33 in progress, 0 failed. Concluded green and relevant here: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 席位核对 — REWORK · repo:objectstack#3 · head ce27cea · 2026-11-24T10:55ZL1 read of #36948 (card #36887, p2, filed by triage and sized on its own) at The diff holds. Changeset. The one entry names S1 (should-fix, PR body only, no head move). Nits (no fix owed). These are the contract review's N2–N4. N2: the Mechanical. At read time: 25 success, 10 skipped, 32 in progress, 0 failed. All ten Test Core shards, Type Check · workspace and Build Core were not yet concluded. REWORK on S1 alone. The delta is a body re-read plus |
|
repo:objectstack#3 · os-support-ai · session_01WGufzg7mFFG5b13DcQ93kf Rework delta 1 for L1-a · head ce27cea (unchanged) · 2026-11-24T10:57ZAnswers L1 7129436964 (REWORK on S1) and the contract review 7129413888 (PASS).
|
Requested by Yibo Wang · project thread
Fixes #36887
The published wire schema of
GET /meta/typesnow declares every member the route serves on an entry. It follows #36881, which declaredlist, and is independent of #36926 (#36860 part b), which touches the listing's translation, not this schema.Clause-②: yes (widening: the published response schema declares four members the route already serves)
Metadata-protocol: added
Skills-docs: none — the declared members are Studio display data the spec registry and plugins produce, not something a metadata author writes;
skills/objectstack-ui/SKILL.md:34namesentries[].schemaonly and stays true维护者速读
What changes
GetMetaTypesResponseSchema(@objectstack/spec,api/protocol.zod.ts). Each entry now declares:schemaId: a string, the same value astype.schema: a JSON Schema record. It is optional, because a type with neither a spec schema nor a hand-crafted one serves none.form: aFormView(FormViewSchema, strict). It is optional, because a type with no declared form serves none.actions:Action[](ActionSchema). It is optional, absent when the type has none.The card names
schemaandform. The same row also servesschemaIdandactions, which were undeclared too. The card's Expected line ("declares every member the route serves") and its strict test cover them, so they are declared here as well (stated in the claim, 7127426588).A parsed shape.
formandactionscarry defaults, so the response's input and output types now differ. Following ADR-0122,GetMetaTypesResponseParsedis declared next to the bare alias, and its isomorphism pin leavestype-alias-convention.pin.test.ts(888 → 887, with a receipt line).Generated artifacts. The
apishards ofapi-surfaceandexport-originsand the protocol reference page are regenerated.dropped-refinements.baseline.jsondeclares the 12 refinement sites the response now reaches throughFormViewSchemaandActionSchema, which the build printed (275 schemas, 1,183 sites). Those refinements are correct runtime rules that the published JSON Schema cannot express, as for every other schema that embeds these two.Nothing the server sends changes.
Tests
packages/metadata-protocol/src/protocol.meta-types-response-schema-36887.test.ts(new). It takes a realgetMetaTypes()answer through JSON, as the wire sends it, and covers every registry type pluswebhook(the synthesised arm), with a plugin-registereddatasourceaction.z.objectdrops an undeclared key.formis refused (soformis typed, notunknown).agent.schemaId,agent.schema,agent.form, …).packages/specsrc/api+ the alias pin file: 65 files, 2,123 passed.Acceptance notes
schemaandformare declared with their real shapes:formreusesFormViewSchema, andschemais a JSON Schema object, for which the spec has no narrower schema.@objectstack/metadata-protocolchanges only a test and the engine-double ledger, so the changeset names@objectstack/specalone (minor, asaddedrequires).node scripts/pm/overlap-check.mjsreads clean againstmainand open PRs.Verification
Read first, by risk:
packages/spec/src/api/protocol.zod.ts: the four new members, and theoptionalonschemaandform(both can be absent at runtime).packages/spec/dropped-refinements.baseline.json: the 12 declared sites and the header counts.Two-minute check:
pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.meta-types-response-schema-36887.test.ts. Expect 4 passed.Gates on ce27cea
node scripts/pm/dispatch-gates.mjs --ran: 121 derived, 121 run, 0 NOT-MEASURED, all exit 0.check:engine-double-contractfirst failed on the new test's engine doubles and passed after--write(the ledger commit). That commit'sscripts/path derived 7 more families, all run and green.pnpm --filter @objectstack/spec check:generated --fixregenerated the 3 stale artifacts and re-checked them green. The alias pin's type error was fixed the ADR-0122 way (aParsedalias, with the pin removed).check-governed-merges --branch HEAD: NOT governed, 183 changed lines (+175 / −8).tsc --noEmitis clean for@objectstack/metadata-protocol.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf