Repository navigation
docs(spec): register the user-field deleteBehavior enforcement as an ADR-0087 semantic entry and correct the delete-walk prose, protocol describe included (#29415) - #29712
Conversation
…emantic entry and correct the delete-walk prose (#29415) Item A: semantic migration entry user-field-delete-behavior-enforced; the #29253 changeset's ADR-0087 marker becomes registered and its stored-row paragraph names the entry. Item B: FieldSchema docblocks and the user reference refusal message, the user-field-foreign-reference-refused entry, the hook-context referential markers and the getCascadeDeleteObjects docblock say a user field joins the walk when it declares deleteBehavior. Both metadata forms show deleteBehavior on a user field. The api/protocol.zod.ts cascadeDeleteObjects describe is held for the protocol.ts freeze. Claude-Session: https://claude.ai/code/session_01JQwxbZAexDYPqzEmBW5tH9 Co-authored-by: Claude <noreply@anthropic.com>
…ar describe (#29415) Claude-Session: https://claude.ai/code/session_01JQwxbZAexDYPqzEmBW5tH9 Co-authored-by: Claude <noreply@anthropic.com>
…eBehavior gates respelled as in-lists (#29415) Claude-Session: https://claude.ai/code/session_01JQwxbZAexDYPqzEmBW5tH9 Co-authored-by: Claude <noreply@anthropic.com>
…hat declares cascade, and the deleteBehavior docblock says "declares a deleteBehavior" (#29415) The object read's `cascadeDeleteObjects` description listed the cascading relations as a master_detail by default or a lookup or tree that declares cascade, which left out the user field that #29253 put in the delete walk. It now names it, matching the getCascadeDeleteObjects contract docblock and the hook-context descriptions. The FieldSchema deleteBehavior docblock said a user field "AUTHORS one", which read as authoring a `reference`; it now says the field declares a deleteBehavior. The changeset's spec-text bullet names the protocol description too. Claude-Session: https://claude.ai/code/session_01WGufzgmDWPyn8w47uKA3CW Co-Authored-By: Claude <noreply@anthropic.com>
… cascadeDeleteObjects description (#29415) Claude-Session: https://claude.ai/code/session_01WGufzgmDWPyn8w47uKA3CW Co-Authored-By: Claude <noreply@anthropic.com>
… list now includes a user field that declares cascade (#29415) The pending #28001 note lists the cascading relations as a master_detail by default, or a lookup or tree that declares cascade, the same sentence the protocol describe carried. A Supersedes paragraph in this PR's own changeset adds the user field, leaving the #28001 file untouched. Claude-Session: https://claude.ai/code/session_01WGufzgmDWPyn8w47uKA3CW Co-Authored-By: Claude <noreply@anthropic.com>
…-fbdrz1 # Conflicts: # packages/spec/src/data/field.form.ts
📓 Docs Drift CheckThis PR changes 1 package(s): 18 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 6 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. 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 12b2d7416b067f7a5b2ff6269acffce02eb8b91b && git checkout 12b2d7416b067f7a5b2ff6269acffce02eb8b91b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0b2b309cb4ce737888f7280b896f7bcece9315bd abde58e1ebeeb1d9b90285689286c2f3ed755b0f && git checkout -B drift-repro 0b2b309cb4ce737888f7280b896f7bcece9315bd && git merge --no-ff abde58e1ebeeb1d9b90285689286c2f3ed755b0f
node scripts/docs-audit/affected-docs.mjs --json 0b2b309cb4ce737888f7280b896f7bcece9315bd
|
|
domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz Contract-review-handoff: triage — CONTRACT_REVIEW_TIER unavailable (account at-tier budget spent, maintainer 2026-10-28; 2026-11-03T02:32Z) · head 72a8bff Scope for the review: the delta over triage PASS 6588315424 (head |
|
domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz Contract reviewServed-tier: Inputs read: card #29415, body and all 8 comments; PR #29553's 5 comments (triage record 6588315424, PASS on ① Derived judgments
② Semver level
③ Boundary flagsDev report 6593885723:
Inherited from #29553's report 6585093974, Triage's should-fix on ④ Design judgmentEach
Must-fix: none. Should-fix:
Landing condition: the two Implemented-by: VERDICT: PASS |
…eld that declares cascade, replacing the #29415 supersedes bullet (#29415) Contract review should-fix: correct the one sentence in the unreleased #28001 note that lists the cascading relations, so it matches the corrected describe, and drop the "Supersedes, in the same release" bullet from the #29415 changeset that carried the same correction. Claude-Session: https://claude.ai/code/session_01WGufzgmDWPyn8w47uKA3CW Co-Authored-By: Claude <noreply@anthropic.com>
|
domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz Contract reviewServed-tier: Delta record over record 6594347454 (PASS on ① Derived judgments
② Semver levelUnchanged from 6594347454: ③ Boundary flags
④ Design judgmentEvery Must-fix: none. Should-fix: none new. Should-fix 2 of 6594347454 stands as filed there. Landing condition: both Implemented-by: VERDICT: PASS |
|
domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz 维护者速读
席位意见:文字与迁移条目对照引擎逐句成立,changeset 更正后发版当天为真,同意落地。 席位核对 — ACCEPT · domain:spec#2 · head
|
domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz
Requested by Yibo Wang · project thread
Fixes #29415
Supersedes #29553 (same commits, resumed on a new branch; #29553 is closed)
Clause-②: no
Metadata-protocol: none
维护者速读
59709cbb续做,两次合入 main),补上冻结期间欠下的两处文字:对象元数据读取的cascadeDeleteObjects说明现在把「声明了deleteBehavior: 'cascade'的 user 字段」列入会级联删除的关系;FieldSchema的 deleteBehavior 注释把容易误读的「AUTHORS one」改成「declares adeleteBehavior」。其余内容(语义迁移条目、hook/contract 文字、两个表单的可见性规则)与 docs(spec): register the user-field deleteBehavior enforcement as an ADR-0087 semantic entry and correct the delete-walk prose (#29415) #29553 相同。referenceNameVisible行相邻冲突,已手工合并、两边都保留。objectql:deleteBehavioron auserfield parses but the delete walk never reads it, sorestrict/cascadeon a user field are not enforced #29253 的未发布 changeset 仍是有意更正,check-empty-changeset按设计保持红灯(与 docs(spec): register the user-field deleteBehavior enforcement as an ADR-0087 semantic entry and correct the delete-walk prose (#29415) #29553 相同)。回滚即 revert。referenceNameVisible行与其下的deleteBehavior行);packages/spec/src/api/protocol.zod.ts(GetMetaItemResponseSchema.cascadeDeleteObjects);.changeset/29415-user-delete-behavior-entry.md(新增的同版更正段)。grep -c "or .user. field that declares" content/docs/references/api/protocol.mdx,预期输出 1(cascadeDeleteObjects那一行)。deleteBehavioron auserfield parses but the delete walk never reads it, sorestrict/cascadeon a user field are not enforced #29253 未发布 changeset 的这次更正(check-empty-changeset 的人工确认路径,与 docs(spec): register the user-field deleteBehavior enforcement as an ADR-0087 semantic entry and correct the delete-walk prose (#29415) #29553 相同)。What changes
This PR carries the three commits of #29553 (
44bec0e9,21cd9672,59709cbb) unchanged, mergesorigin/maintwice (744211fc, then1c1a5d40), and adds the delta that theprotocol.tsfreeze held back. #29553's body describes the inherited part: the semantic entryuser-field-delete-behavior-enforced, the correction of the unreleased #29253 changeset, the prose infield.zod.ts,hook.zod.ts,objectql-engine.tsand theuser-field-foreign-reference-refusedentry, and thedeleteBehaviorvisibility rule in both forms.The delta:
packages/spec/src/api/protocol.zod.ts,GetMetaItemResponseSchema.cascadeDeleteObjects. The describe listed the cascading relations as "amaster_detailby default, alookuportreethat declaresdeleteBehavior: 'cascade'". It now reads "amaster_detailby default, alookup,treeoruserfield that declaresdeleteBehavior: 'cascade'", the wording of thegetCascadeDeleteObjectscontract docblock. The engine side already holds:getCascadeDeleteObjectswalkscascadeRelationBehavior, whose family test isstatesDeleteSemantics, which admits auserfield that declares adeleteBehavior(packages/objectql/src/engine.ts, on744211fc).GetMetaItemCachedResponseSchema.cascadeDeleteObjectspoints at "the item read'scascadeDeleteObjects" and lists no relation kinds; the two[#28001]docblocks (aboveGetMetaItemResponseSchemaandGetMetaItemCachedResponseSchema) speak of "the rule its delete walk runs" and list none either. None of the three says or implies that auserfield stays out of the walk, so none is edited.packages/spec/src/data/field.zod.ts, thedeleteBehaviordocblock (FieldSchema.deleteBehaviordefaultsset_nullonto EVERY field type, so built artifacts ship the key ontext/datetime/numberfields #9784 paragraph). "and on auserfield that AUTHORS one" read as auserfield authoring areference, which the same schema refuses. It now reads "and on auserfield that declares adeleteBehavior"; the rest of the parenthetical is re-wrapped, unchanged.content/docs/references/api/protocol.mdx(1 row) andcontent/docs/references/api/app-bundle.mdx(5 rows), both bygen:docs. No other artifact moved (check:generated: all 14 up to date)..changeset/29415-user-delete-behavior-entry.mdstays a@objectstack/specpatch. Its spec-text bullet now names thecascadeDeleteObjectsdescription on the metadataobjectread beside the other corrected texts..changeset/28001-cascade-delete-objects-beside-item.md, patch round 1 atabde58e1, the contract review's should-fix 1): its one sentence listing the cascading relations now reads "alookup,treeoruserfield that declaresdeleteBehavior: 'cascade'", word for word the corrected describe, so the note is true on the day it ships.check-empty-changesetreds on this file and on.changeset/29253-user-field-delete-behavior.md, both corrections by design.Why
Release 6591556737 on #29415 names exactly this delta as owed before landing; the freeze that held
protocol.zod.tswas lifted at 6588593530 on #28677. Triage's at-tier record 6588315424 (PASS on59709cbb) covers the inherited commits; contract-review-hold 6588339023 covers the old head until this edit lands.Tests
No test added: the delta is describe and comment text, and no reader parses it. Text only, so no accept set moves:
Clause-②: no,Metadata-protocol: none.pnpm --filter @objectstack/spec testandtypecheck, head72a8bffdpnpm --filter @objectstack/spec test: Test Files 803 passed (803), Tests 23790 passed and 1 todo.pnpm --filter @objectstack/spec typecheck:tsc --noEmit,check:scripts-typecheckandcheck:test-typecheckexit 0 (52 files / 240 errors / 131 pinned signatures held in the debt ledger, unchanged).pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-predicate-path-refs.test.ts: 62 passed (62), with main's predicate count 91 and this branch's literal-comparison count 63 side by side after the merge.VERDICT command-exit 0.89540569(before the secondorigin/mainmerge): Test Files 802 passed (802), Tests 23736 passed and 1 todo, typecheck exit 0.Verification
Build, generated artifacts and derived gates, head
72a8bffdorigin/main:83189767(onto744211fc, clean) and72a8bffd(onto1c1a5d40). The second hit one conflict inpackages/spec/src/data/field.form.ts: feat(fields, spec): show a referenceNameVisible lookup's served name as plain text, and offer its field-form row #29639 put itsreferenceNameVisiblerow directly above thedeleteBehaviorrow this branch respells. Resolved by hand, keeping both: main's comment and row, and this branch'sdata.type in ['lookup','user']gate ondeleteBehavior.scripts/pm/os-regen-merge.shran after each merge. Forapp-bundle.mdx,protocol.mdxandhook.mdxit kept the branch's bytes, because main did not touch them.turbo run build --filter=!@objectstack/docs --concurrency=2, under the verify lock): 117/117 tasks,VERDICT command-exit 0. Thenpnpm --filter @objectstack/spec check:generated: all 14 generated artifacts up to date.node scripts/pm/dispatch-gates.mjs --commands, 105 commands on72a8bffd), run one after another withCMD :: exit Nrecorded: 104 exit 0, and 1 exits 1 by design,check-empty-changeset --base origin/mainon.changeset/29253-user-field-delete-behavior.md(see Acceptance notes).dispatch-gates --ran: 105 derived, 105 run, 0 NOT-MEASURED, 0 UNRUN, exit 0.check:dual-build-cjs-loads,check:lean-entry-closure,check:i18n,check:docs-transcript-drift,spec check:skill-examples,lint check:doc-formula-expressions,lint check:doc-security-posture) ran on a full build and exit 0.check:dual-build-cjs-loadswas NOT MEASURED on docs(spec): register the user-field deleteBehavior enforcement as an ADR-0087 semantic entry and correct the delete-walk prose (#29415) #29553.pnpm check:dev-prereqsandpnpm check:skill-frame-freshnessexit 0.Acceptance notes
check-empty-changesetstays red by design, as on docs(spec): register the user-field deleteBehavior enforcement as an ADR-0087 semantic entry and correct the delete-walk prose (#29415) #29553: this PR rewrites the pending objectql:deleteBehavioron auserfield parses but the delete walk never reads it, sorestrict/cascadeon a user field are not enforced #29253 release note it did not add (the DELIBERATE CORRECTION class). The remedy is a confirmation on the PR, not a restore.#7010 corpuscensus pin inpackages/lint/src/validate-predicate-path-refs.test.ts(63) is inherited from59709cbb.origin/mainmoved novisibleWhenordata.typepredicate underpackages/spec/srcbetween the fork point399df5bband744211fc(git diff -Gover that range: zero files), so the count still holds. The test file passes on the final head (62/62). The second merge brought feat(fields, spec): show a referenceNameVisible lookup's served name as plain text, and offer its field-form row #29639'sreferenceNameVisiblerow, which is an in-list too: it moves main's predicate count to 91 and leaves the literal-comparison count at 63.treecontrol, the form's missing empty option, skills(objectstack-data): auserfield's declareddeleteBehaviornow takes effect when the user is deleted (#29253) — the field-type and relationship rules should say so #29400).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (No formatter ran.pnpm lintwas not run locally: it is CI's run.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code