Repository navigation
refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts - #37366
Conversation
…aForm and its modules to *.metadata-form.ts ADR-0159 question 1 (ruled A): the name defineForm and the *.form.ts suffix go to the new `form` metadata type. This commit is the rename and the suffix move alone (the card's PR A): 18 modules renamed, import specifiers swept by both spellings, the i18n surface constant, the gate self-test and fixtures, comments and path citations re-pointed, lint text re-worded, the generated spec artifacts regenerated, and the semantic ADR-0087 entry registered. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…e-points Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
📓 Docs Drift CheckThis PR changes 10 package(s): 158 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 25 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 192 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 97b70cca0f971b4e478f07ef9077069b189c1288 && git checkout 97b70cca0f971b4e478f07ef9077069b189c1288
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1028438748dfbb6a76a981a25310fe39c481fb2c ebd9872fcdbfdece26f4e27969669bbd02f9c42a && git checkout -B drift-repro 1028438748dfbb6a76a981a25310fe39c481fb2c && git merge --no-ff ebd9872fcdbfdece26f4e27969669bbd02f9c42a
node scripts/docs-audit/affected-docs.mjs --json 1028438748dfbb6a76a981a25310fe39c481fb2c
|
…three SchemaForm tests the rename edits check:test-source-alias judges the test files a change edits: the three SchemaForm tests reach celAuthoring's dynamic imports of @objectstack/lint and @objectstack/formula, so each now loads them at module top. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…ead a form over both types ADR-0159 card ②, everything past the rename (PR B of the card's cut): FormSchema derived from FormViewSchema by reference with defineForm and *.form.ts; the registry row, the stack's forms collection and the forms translation family; one projection of the three old view shapes; the effective form read resolved over both types; the form write's removal of the old-shape row; the address clash refusal (FORM_ADDRESS_TAKEN); the package-less list-at-a-form's-name refusal on save, publish and restore; the anonymous doors' two-type withdrawal layer with rule 7's closed links; the lint rules, the liveness ledger and the showcase form. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…gation, cli i18n bucket, provenance row, checklist waiver, transcript counts Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…les, showcase feedback form zh-CN, walk-parity fixture member; typed form-body refinement params Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…ocol serving no form item, one registry heal for old-shape removals, the by-name form read keeps the generic answer unless resolved across types, census and enumeration pins Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
The owner-stamp fixture tables, the meta list/item census, the CLI schema-gate classification and the metadata-form catalog ratchets each gain the form type (ADR-0159 card ②, #37086). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…label Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…object translateForm reads a form item's section headings at objects.<object>._sections.<name>, so translation-target-unknown must accept those keys. The showcase feedback form's zh-CN section heading tripped it in the dogfood build. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
… the authorable surface after merging main Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM Contract reviewServed-tier: Delta round on PR #37366, base What moved. No authored line of this PR. Against ① Derived judgmentsNothing in the delta changes an accept set, an answer's shape or the public surface this PR declares. The judgments of both earlier records stand as judged there. What
② Semver levelUnchanged by the delta: the three changesets are untouched. The PR body's ③ Boundary flags
④ Design judgmentAgainst ADR-0159 D1, D3, D5 and D8, ruled question 1 (A), and the card's Done-when. The tree was read, not the PR body's account. Earlier findings, by id (ids are those of record 7203725192 unless marked).
On S5: comment 7205846098 exists on #37422, posted under the seat's header, and records the maintainer's choice to leave the finding to #37709; #37709 is open and names the residual. The code is unchanged since the finding was raised. Files that hold. Every file of both earlier records carries the same net change against No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM Landing · 2026-11-27T04:30Z Maintainer approval: Alice (os-alice), 「37366 我也批准了,你合并后可以直接落地」, seat 7's project chat, 2026-11-27T03:24Z; os-zhuang APPROVED (#37366 and #37422). #37422 merged into this branch; this head adds one main merge (one docblock conflict, comment-only) and its regeneration. Reviews of record: merge-delta PASS 7209560540 at this head (S5 closed as the maintainer's accepted deviation 7205846098, residual #37709); dev report with this head's dogfood battery 7209851420 (exit 0, 490 files, 4144 tests). The first |
# Conflicts: # packages/spec/src/system/i18n-resolver.ts
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM CI note · 2026-11-27T05:45Z
Generated by Claude Code |
…ng main Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
Requested by Alice · project thread
Fixes #37086 — now carries the card's whole cut: PR A (item 3's rename and suffix move) and PR B #37422 (the
formtype, its factorydefineForm, everything else), which merged into this branch on the maintainer's approval (2026-11-27T03:24Z). Reviews of record: this PR's ACCEPT 7204174977 and merge delta 7203719013; #37422's ACCEPT 7204181264 and merge delta 7203725192 on20a80b19d1, the head #37422 merged at.Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37105
维护者速读
What changes
defineForm(the Studio schema-bound metadata-form helper,packages/spec/src/ui/view.zod.ts) is renameddefineMetadataForm, with the same argument and result;packages/spec/src/index.tsand the@objectstack/spec/uibarrel export the new name, andpackages/spec/tsup.config.ts's pure-constructor set names it.defineFormis absent between this PR and PR B, never dual-meaning (ADR-0159 question 1, ruled A, ruling record 7131569242).*.form.tsto*.metadata-form.ts(the card counted 17 at689e5695b98; 18 at this head,email-templatebeing the newer one), plus their one dedicated test (ai-context.metadata-form.test.ts). Import specifiers swept by both spellings: 32 files underpackages/spec/src(the seven domain barrels,system/metadata-form-registry.ts, the tests, andkernel/repeater-item-titles.test.ts's 15../DIR/NAME.formimports).scripts/i18n-bundle-surface.mjs:METADATA_FORM_MODULE_SUFFIXbecomes.metadata-form.ts, its module note re-worded.scripts/pm/dispatch-gates.self-test.mjsre-spells its suffix cases (the live-walk assertion included) and gains one case: aformitem source (examples/app-crm/src/forms/lead.form.ts) is not a metadata-form module.scripts/pm/dispatch-gates.data.mjskind text,scripts/pm/landing-k.mjsfixture path,scripts/check-i18n-bundles.mjscomments.scripts/pm/dispatch-gates.mjsis not edited (it spells no suffix).packages/lint/src/rule-explanations.ts(thevisibility-root-mislayeredexplanation), thedataarm of the field-rule message inpackages/lint/src/validate-expressions.ts, the docblock ofvalidate-visibility-predicates.tswith its twotoContainpins and theMOVEDtoken pin, and the row ofcontent/docs/protocol/objectui/layout-dsl.mdx. The test's file-name detector reads both spellings (/[.-](form|view|page)\.ts/).packages/lint/src,packages/cli/src,packages/cli/test,packages/platform-objects/src,packages/metadata-protocol/src,packages/spec/src,packages/spec/liveness/,ui/packages/app-shell/src/views/metadata-admin/, and two live citations indocs/qa/platform-checklist/areas/studio-authoring.json.packages/spec/api-surface*,packages/spec/export-origins/(7 files),content/docs/references/ui/view.mdx, regenerated bycheck:generated --fix.define-form-studio-helper-renamed-define-metadata-form(theruntime-export-retiredcategory is closed: the helper is declared in a*.zod.ts, a metadata surface by the gate's reading).Outside-use reading (question 1), recorded before the rename's first commit
defineFormoutside this repository (seat record 7177011389 on form metadata type: define, register and serveformitems (ADR-0159, card ②) #37086, each repository's head listed there; objectui's one hit is a comment).objectstack-ai/cloudat03769766a92: 0 hits (repo:cloud seat record 7177053511).Count at this head (
80da0864base)git grep -lw defineFormnamed 61 files at the base. After this PR the word survives only in released or historical text, which is not rewritten: 8CHANGELOG.md,content/docs/releases/v17/17-0.mdx,docs/audits/2026-06-handwritten-docs-accuracy-followups.md, ADR-0159 itself, the new migration entry and changeset (which name the old spelling as the FROM side), and the historical sentence added todefineMetadataForm's docblock.Tests
Local runs at this head
pnpm --filter @objectstack/spec build: VERDICT command-exit 0.pnpm --filter @objectstack/spec check:generated: 3 of 14 stale before--fix(api-surface, export-origins, docs), 14 of 14 green after.pnpm --filter @objectstack/spec test: Test Files 894 passed, 1 skipped (895); Tests 28417 passed.pnpm --filter @objectstack/lint exec vitest run: Test Files 235 passed (235); Tests 9629 passed.pnpm check:pm-dispatch-gates(the self-test this PR edits): 2314 cases pass, fast tier.check-adr-0087-registration --base origin/main0,check-changeset-no-major0,check-empty-changeset0;check:commit-card-trailers0,check:nul-bytes0,check:ratchet-remedy-authority0,check-skills-token-ratchet0 (and--self-test0),check:i18n-stale-fill0,check:adr-anchors0,check:spec-docblock-symbol-anchors0,check:scripts-symbol-anchors0,check-platform-checklist --changed-from origin/main0,landing-k --self-test0,check:i18n-walk-parity0.check:i18n-coverageNOT MEASURED locally (exit 3, example build closure absent): cited from CI.pnpm check:i18n: OK, 10 packages in sync;node scripts/check-i18n-bundles.mjs --writechanged no bundle (git statusclean after it).Acceptance notes
.claude/skills/spec-property-retirement/SKILL.mdlines 264 and 318 spell*.form.tsanddefineForm(a governed path);ui/docs/adr/0056-permission-editing-studio.mdline 349 namessecurity/permission.form.ts(an ADR);docs/adr/0159is the record itself. Two pending changesets (35926-field-inline-edit-boolean-retired.md,36425-retire-internal-forms.md) and two released migration entries (18.field-max-length-…,18.field-min-length-…) andregistry.ts.templatename the old spelling as history; not rewritten.pnpm check:platform-checklistis red at this head onareas/automation.json(FlowItemMoreMenu.tsx#FlowItemMoreMenu), a file this PR does not touch: red at the base80da0864too. The scoped run--changed-from origin/mainis green.narrowed: since feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 merged into this branch, this PR carries the card's narrowing (item 5's refusal), which feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 declared asMetadata-protocol: narrowed. A's own commits change no metadata an author writes.Verification
Two minutes:
git grep -nw defineForm -- packages ui scriptsreturns only the docblock's history sentence and the migration entry;pnpm --filter @objectstack/spec exec vitest run src/system/metadata-form-registry(or any metadata-form test) is green.🤖 Generated with Claude Code
https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
Generated by Claude Code