Repository navigation
docs(spec): key the fieldPatches example option by a value crm_account.industry stores - #28827
Conversation
…t.industry stores
The documented example patched option `tech`, which crm_account.industry
does not store, so a copy was refused at os validate and install. Re-key it
as `technology: { label: 'Tech' }` in the schema description, TSDoc, the
option-list refusal text, the object-extensions guide and the two unreleased
changesets that carried it.
Claude-Session: https://claude.ai/code/session_01ADHkmQfYHca8dfoXTJfeKp
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmQfYHca8dfoXTJfeKp Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 168 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 38eb084b7568068953b60667259572602449ebbf && git checkout 38eb084b7568068953b60667259572602449ebbf
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3e05ed1ec2ecce09b19a23bd51a6f14afb40caf3 0b024ae90c2013c870e437ff844dd15af785c688 && git checkout -B drift-repro 3e05ed1ec2ecce09b19a23bd51a6f14afb40caf3 && git merge --no-ff 0b024ae90c2013c870e437ff844dd15af785c688
node scripts/docs-audit/affected-docs.mjs --json 3e05ed1ec2ecce09b19a23bd51a6f14afb40caf3 |
…s not on main yet Claude-Session: https://claude.ai/code/session_01ADHkmQfYHca8dfoXTJfeKp Co-authored-by: Claude <noreply@anthropic.com>
|
domain:spec#1 · os-steve · session_01ADHkmPi25XXKx92Xmg4viS Head-sha: 维护者速读
席位意见:可落地,等契约复审。 席位核对 — ACCEPT ·
|
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Taken on the lane's Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract reviewServed-tier: Inputs read: card #28803 and its three comments; PR #28827 body, file list, the seat's ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS Generated by Claude Code |
Requested by Steve · project thread
Fixes #28803
Clause-②: no
Metadata-protocol: none
维护者速读
fieldPatches文档示例里的选项键从tech改成crm_account.industry真实存储的值technology(technology: { label: 'Tech' }),覆盖 spec 描述、TSDoc、选项列表拒收文案、对象扩展指南和两份未发布的 changeset。os validate和安装时被拒(该字段没有tech这个选项),文档在教一个坏例子;技能包那份已在 docs(skills): objectstack-data teaches an object extension's fieldPatches — relabel a vendor field without redeclaring it in fields #28795 修好,这里补齐其余几份。packages/spec/src/data/object.zod.ts(三处示例文字)、content/docs/data-modeling/object-extensions.mdx、content/docs/references/data/object.mdx(重新生成的参考页)。git grep -n "tech: {" -- packages/spec/src content/docs skills .changeset ':!*.test.ts',预期没有任何输出。What changes
packages/spec/src/data/object.zod.ts: thefieldPatches.describe()example, theObjectExtensionSchemaTSDoc example, and the refusal text for an option list underoptionsnow readoptions: { technology: { label: 'Tech' } }.crm_account.industry(examples/app-crm/src/objects/account.object.ts) storestechnology,finance,healthcare,retail,other;techis none of them, so a copy was refused with reasonoption.content/docs/data-modeling/object-extensions.mdx: the guide's example, same re-key.content/docs/references/data/object.mdx: re-recorded bycheck:generated --fix(onlycheck:docswas stale)..changeset/28565-field-patch-applied.mdand.changeset/28560-field-patch-slot.md: both still unreleased (present in.changeset/onmainat 1617b7f, no Version Packages release has consumed them), so their copies of the example are re-keyed too. The 28560 copy is a fifth copy the card did not list..changeset/28803-field-patches-example.md: spec patch.No forced test edits. Test fixtures that patch
tech(field-customization.test.ts,field-patches-derived.test.ts, and the cli / metadata-core / objectql / cloud-connection field-patch tests) build their own objects and do not pin the documented example text, so they stay as they are.Tests
pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/dataandpnpm --filter @objectstack/spec typecheck: Test Files 154 passed (154), Tests 4756 passed, 1 todo; VERDICT command-exit 0.pnpm --filter @objectstack/spec build && check:generated: 1 of 14 stale (check:docs), fixed with--fix, then all up to date.Acceptance notes
Check Changesetstays red by design. This PR edits two changesets it did not add, both still pending (no Version Packages release has consumed them):.changeset/28565-field-patch-applied.md(named by the card, its example line) and.changeset/28560-field-patch-slot.md(a fifth copy of the same example, not named by the card). In each, only the option key and label inside the code example change, fromtech: { label: 'Technology' }totechnology: { label: 'Tech' }; no sentence about behaviour changes. This is the DELIBERATE CORRECTION classcheck-empty-changeset.mjsnames: the gate stays red,skip-changesetis not applied, and the correction needs a written confirmation on this PR. Restoring either file from the base would republish an example thatos validaterefuses.origin/mainat 663b7c0 withscripts/pm/os-regen-merge.sh(fix(objectql,cloud-connection)!: a field patch reaches the owner's own fields only, at the fold and the install door; the install door refuses it with 422 (#28733) #28791 had editedobject.zod.tsandobject-extensions.mdx); no conflict, andcheck:generatedreports all 14 artifacts up to date on the merged head.Verification
All readings on head
0c29908fd8(the merge of main).spec tests and typecheck
bash scripts/pm/os-verify-lock.sh -c 'pnpm --filter @objectstack/spec test && pnpm --filter @objectstack/spec typecheck': Test Files 788 passed (788), Tests 23268 passed, 1 todo;VERDICT command-exit 0.generated artifacts
Before the merge:
check:generatedfound 1 of 14 stale (check:docs,content/docs/references/data/object.mdx), fixed with--fix. After the merge:pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated: all 14 generated artifacts up to date;VERDICT command-exit 0.derived gate list
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstacklisted 97 commands; each ran on this head with its exit code recorded. 96 exit 0.node scripts/check-empty-changeset.mjs --base origin/mainexits 1 on the two pending changesets above, as designed. Reconciliation:97 derived, 97 run, 0 NOT-MEASURED, 0 UNRUN(a derived zero, every line carries an exit code). Seven gates first exited 3 (prerequisites: unbuilt packages, shallow clone); after a fullturbo run buildandgit fetch --unshallowall seven exit 0. Local-only:check-dev-prereqsexit 0,check:skill-frame-freshnessexit 0.Generated by Claude Code