Skip to content

docs(skills): the automation skill says a record under approval can still be deleted - #37726

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-37713-approval-lock-reach-text
Nov 27, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-37713-approval-lock-reach-text

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37713

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:照技能文档让 AI 助手搭审批流程的应用作者,现在能读到「审批中的记录仍然可以被删除,删除会撤销审批请求并连带删掉主从明细行」;以前只读到「锁定」,容易以为记录被完全冻结。
  • 为什么做:属于「发布前拦住存得进去却不起作用的数据模型」这批工作的评审收尾,替读技能文档的应用作者和 AI 助手纠正对审批锁范围的误解。
  • 出错会怎样:只改说明文字和一条待发布的更新说明,不动产品行为;措辞若有误,读者会判断错审批锁的范围,直接撤回本次合并即可。
  • 要你做什么:这是讲审批锁范围的安全相关文字,需要你亲手合并。

What changes

All wording is taken from the code on main at 80519b5991 (packages/plugins/plugin-approvals/src/lifecycle-hooks.ts), not from the card's paraphrase. PR #37707 has merged, so the serial constraint the claim recorded as "NOT YET" is cleared: this branch is cut from the merge commit.

skills/objectstack-automation/references/state-machines-and-approvals.md:

  • Best practice 2 teaches the delete. New text: "Deleting the pending record still lands, cancelling the request and cascading its master_detail rows; it is refused (409 RECORD_LOCKED) where the cascade lacks one transaction or the child object declares a second cascading relation." The second case is decided on the child object's declared relations (soleCascadeEdgeOf counts every master_detail not declared restrict plus any field declaring deleteBehavior: 'cascade'), not on what a row holds (contract review 7207215155, S1; "whole" dropped per N1, the rows named per N2).
  • The lockRecord config row states its bound again: "Lock the record from edits while pending."
  • Best practice 2 drops "or a parent field group". A group places a lookup child only when the field already declares relatedList: 'primary' (isGroupPlaceableRelationship), so the arm never applied on its own.

.changeset/37529-skills-data-model-publish-checks.md (still pending on main: .changeset/pre.json does not list it) is reworded to what PR #37707 shipped. See the DELIBERATE CORRECTION note below.

.changeset/37713-skills-approval-lock-reach.md: one @objectstack/skills patch changeset for this PR.

Where the code differs from the card

The card says the delete "lands, cancels the request and cascades its master_detail lines". That is the main path (bindRecordDeleteCancelHook, an afterDelete hook, sets the request to cancelled; the detail-row lock yields to the cascade leg). The code also refuses that delete whole, 409 RECORD_LOCKED, in two shapes, and the sentence says so:

  • the cascade has no open unit of work to run in (a datasource that declares supports.transactionsUnsupported, a cascade split across datasources, a handle whose unit already ended);
  • a child row has a second cascade-capable relation (a second master_detail master, or a lookup that declares deleteBehavior: 'cascade'), so the lock cannot tell whose cascade the leg is.

Both are pinned by detail-row-lock.integration.test.ts on main.

DELIBERATE CORRECTION of a pending release note

This PR rewrites a changeset it did not add, on purpose. check-empty-changeset is red by design for that class. The note is .changeset/37529-skills-data-model-publish-checks.md; two sentences change and nothing else in the file does:

  • Corrected: "objectstack-data rules/relationships.md: a roll-up is refused at publish (rollup/child-without-parent-reference) when it omits relationshipField and the child object has no lookup or master_detail field referencing the parent, or when its relationshipField names no field of the child." The old sentence stated the first arm unconditionally.
  • Corrected: "objectstack-automation references/state-machines-and-approvals.md: lockRecord locks the record and its master_detail child rows only; a lookup child shown in the record's details (relatedList: 'primary') stays editable while pending, reported as the warning approval-detail-editable-while-pending." The old sentence said "drawn as a body table", a term the published skills never define.

Token ratchet: no ceiling moved

The file sat at headroom 0; at 831311eeb2 it is at headroom 9. Every added byte is paid for by deletion in the same file (node scripts/check-skills-token-ratchet.mjs, exit 0 at 831311eeb2).

File Lines before / after Bytes before / after Tokens before / after Ceiling Headroom before / after
skills/objectstack-automation/references/state-machines-and-approvals.md 388 / 388 23741 / 23706 5936 / 5927 5936 0 / 9

Whole bundle: ratcheted (authored) 199632 tokens before and after, against a 204473 total ceiling; shipped tree 300242 tokens before and after; all SKILL.md files together 4961 lines before and after; whole skills/ tree 23279 lines before and after.

Tests

  • Skill evals: NOT MEASURED, reason: no model runner in this container. No eval fixture is touched.
  • No package source is touched, so no package test or typecheck is owed. No ablation: prose only.
  • At 831311eeb2 (delta: the delete sentence, its changeset line, two glosses in the Node Config table): node scripts/check-skills-token-ratchet.mjs exit 0; pnpm check:skill-links exit 0; pnpm check:skill-identifier-liveness exit 0; pnpm check:skill-frame-sync exit 0.

Acceptance notes

  • Security-touching: yes. Best practice 2 and the lockRecord config row teach how far the approval lock reaches, the boundary of a write-refusal control.
  • skills/** is a governed surface and this text is security-touching, so the PR is Tier H: it stays a draft and waits for the maintainer.
  • What was deleted to pay for the new text, all in the same file, no rule removed:
    • "Since ADR-0020 there is" becomes "There is" (the heading above still cites ADR-0020); "Since ADR-0019 there is no standalone approval-process type." becomes "There is no standalone approval-process type (ADR-0019)."
    • The label line "Notes:" above the state-machine bullet list, and the lead-in "Three pieces:" above the send-back list.
    • Send-back item 1: "a third branch label alongside approve / reject, targeting" becomes "targets" (the paragraph above already names the revise out-edge beside reject); "The node takes no config — there is no signal to wait on." keeps only its first half.
    • Send-back intro: "Send-back is a flow movement" becomes "It is a flow movement"; item 2: "Only this legalizes the cycle" becomes "This legalizes the cycle".
    • Recording a decision: "you never resume the flow by hand, and you cannot" becomes "you cannot resume the flow by hand".
    • Best practice 4: the illustration "("when the invoice is approved, do X")" is gone; the rule it illustrated is unchanged.
    • Best practice 2: "or a parent field group" (work item 3).
    • Node Config table, behavior row (delta, to pay for the S1 wording): the glosses "— M-of-N collective sign-off" after quorum and "— one-from-each-group sign-off" after per_group are gone; each mode's rule (minApprovals of N; each group reaches minApprovals) is unchanged.
  • No fenced code block moved, so the example gates read on main still describe this head.
  • Draft PR docs(skills): objectstack-data and objectstack-automation SKILL.md become routers #36158 edits the same skill file. node scripts/pm/overlap-check.mjs reports it merges cleanly against this branch (exit 0); it is frozen and was cleared on the earlier claim. No other PR is named.
  • The dispatch offered two places for the delete sentence; it sits in best practice 2, beside the sentence that states the lock's reach. "Reading the lock" is unchanged.

Verification

Derived gates at 270a105: 49 derived, 44 run, 5 NOT MEASURED

node scripts/pm/dispatch-gates.mjs --ran: "49 derived famil(ies) accounted for — 44 run, 5 NOT-MEASURED (5 DERIVED from a recorded exit 3)", exit 0.

  • Exit 1, red by design: node scripts/check-empty-changeset.mjs --base origin/main. It names .changeset/37529-skills-data-model-publish-checks.md as "present on the merge base and CHANGED by this PR"; that is the DELIBERATE CORRECTION declared above. Its first line is green: "No empty-frontmatter changeset introduced by this diff (2 declaring changeset(s) added)."
  • NOT MEASURED, exit 3 (PREREQUISITE NOT MET, the workspace is not built; the diff touches no package, so no build closure is owed locally and CI builds the whole tree): pnpm --filter @objectstack/lint run check:doc-formula-expressions, pnpm check:dts-closure, pnpm check:dual-build-cjs-loads, pnpm check:lean-entry-closure, pnpm check:sourcemap-no-sources-content.
  • Exit 0, the other 43, among them: node scripts/check-skills-token-ratchet.mjs and its --self-test, pnpm check:skill-links, pnpm check:skill-identifier-liveness, pnpm check:skill-compatibility, pnpm check:skill-frame-sync, pnpm --filter @objectstack/spec run check:skill-refs, pnpm --filter @objectstack/spec run check:skill-served-sections, pnpm check:doc-authoring, pnpm check:nul-bytes, pnpm check:published-files, node scripts/check-adr-0087-registration.mjs --base origin/main, node scripts/check-changeset-no-major.mjs --base origin/main.

Read first, by risk:

  1. skills/objectstack-automation/references/state-machines-and-approvals.md, best practice 2 (the hunk under "Approval Best Practices"): the delete sentence and its two refusal shapes are the security-touching text.
  2. The same file, the lockRecord row of the Node Config table: "from edits" is back.
  3. .changeset/37529-skills-data-model-publish-checks.md: two reworded sentences of a pending release note.

Two-minute check: run node scripts/check-skills-token-ratchet.mjs and read the line for state-machines-and-approvals.md; expect "is 5927 tokens (ceiling 5936; headroom 9)" and exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96

…till be deleted

Best practice 2 of the approvals reference now says a delete of a pending
record lands, cancels the request and cascades its master_detail rows, and
where it is refused instead. The lockRecord config row states its edit bound
again, and the redundant field-group arm is dropped. The pending changeset
of the earlier data-model wording is reworded to match what shipped.

Every added token is paid for by deletion in the same file.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 270a1050b694081c2177b1696304b4bfd29cb972
Local-runs: none
Scope: skills/objectstack-automation/references/state-machines-and-approvals.md + none
Security-touching: yes

FIRST ROUND on PR #37726 for card #37713. Read: the card and its two comments (the claim and the dev report), the PR body, its three-file list, the net diff against main (36 lines added, 18 removed), and the 44 check-runs on this head. The PR thread carries no comment and no earlier record. Cited code was read on main and is not reviewed: packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, approval-service.ts and detail-row-lock.integration.test.ts beside it, packages/objectql/src/engine-delete-and-aggregate.ts, engine-cascade-planning.ts and summary-errors.ts, packages/lint/src/data-model-rules.ts, packages/lint/src/validate-approval-approvers.ts, packages/spec/src/data/related-list-body-table.ts. main has moved neither the scoped file nor any of that code since the branch point 80519b5991.

Findings, judged in ④:

  • S1 (should-fix) — the second refusal case is narrower in the text than in the code. The skill says the delete is refused where "a row has a second cascading parent". The code decides it on the child OBJECT's declared relations, not on the row.
  • N1 (nit) — "refused whole" promises more than the no-transaction case can keep.
  • N2 (nit) — "those rows" stands two clauses away from the rows it means.

① Derived judgments

  • Accept set: unchanged, and that is right. The diff holds one skill reference and two changeset files; no schema, lint rule or runtime file.
  • Public surface: the text of one file of the @objectstack/skills catalog. No path is added, removed or renamed. Right.
  • No token ceiling moves. The ceilings live in scripts/check-skills-token-ratchet.mjs, which is not in the diff; the gate is a step of the lint workflow, and every lint job on this head is green.
  • No fenced block changes: every hunk of the skill file is prose, a list item or one table cell. The example gates read on main still describe this head.
  • Check-runs on the head: 44, all concluded. 27 success, 16 skipped, 1 failure. The failure is Check Changeset, and its log shows one failing step, check-empty-changeset.mjs --base, naming .changeset/37529-skills-data-model-publish-checks.md as "present on the merge base and CHANGED by this PR". That is the DELIBERATE CORRECTION class, red by design (② below). The steps after it in the same job ran green: the ADR-0087 registration check, the no-major guard and its level axis.

② Semver level

One new changeset, .changeset/37713-skills-approval-lock-reach.md, '@objectstack/skills': patch. It matches a wording change to a published package. Clause-②: no and Metadata-protocol: none stand on the PR body and on both changeset bodies, and both are correct: nothing an author can write changes. The level axis of Check Changeset reads the same and is green.

The new changeset repeats the skill sentence S1 is about ("a child row has a second cascading parent"). The fix for S1 carries over to it.

DELIBERATE CORRECTION of a pending release note. The note is .changeset/37529-skills-data-model-publish-checks.md, added by PR #37707 and not consumed by any release: it is still a file on main. The PR body declares the correction and names the note. Two sentences change; the front matter (patch), the title, both declaration lines and the other bullet are byte-identical. Each rewritten sentence, judged:

  1. The roll-up sentence.
    • Before: "objectstack-data rules/relationships.md: a roll-up whose child object has no lookup or master_detail field referencing the parent, or whose relationshipField is no field of the child, is refused at publish (rollup/child-without-parent-reference)."
    • After: "objectstack-data rules/relationships.md: a roll-up is refused at publish (rollup/child-without-parent-reference) when it omits relationshipField and the child object has no lookup or master_detail field referencing the parent, or when its relationshipField names no field of the child."
    • Verdict: the "after" is what docs(skills): data and automation skills teach three data-model publish checks #37707 shipped. relationships.md on main reads "Refused at publish when omitted and the child has neither, or naming no child field", and summaryRollupFindings has the same two arms: the back-reference scan runs only when relationshipField is absent or empty, and a written one is refused only when it names no field of the child. The "before" stated the first arm unconditionally, which was false for a roll-up that writes relationshipField. Confirmed.
  2. The lockRecord sentence.
    • Before: "objectstack-automation references/state-machines-and-approvals.md: lockRecord locks the record and its master_detail child rows only; a lookup child drawn as a body table stays editable while pending, reported as the warning approval-detail-editable-while-pending."
    • After: "objectstack-automation references/state-machines-and-approvals.md: lockRecord locks the record and its master_detail child rows only; a lookup child shown in the record's details (relatedList: 'primary') stays editable while pending, reported as the warning approval-detail-editable-while-pending."
    • Verdict: the "after" is the rule docs(skills): data and automation skills teach three data-model publish checks #37707 shipped, in the words the skill uses. It is not word for word docs(skills): data and automation skills teach three data-model publish checks #37707's text: best practice 2 on main reads "(relatedList: 'primary', or a parent field group)". The arm the note leaves out is the one this PR removes from the skill, and it never applied on its own to a lookup child (④). Both notes are pending for the same release, so the note describes the text that release publishes. The "before" used "drawn as a body table", a term the automation skill does not define. Confirmed.

This confirms the correction for these two sentences on this head. The fix for S1 moves the head, so the delta record restates the confirmation there; if the note's bytes do not change, by reference to this one.

③ Boundary flags

  • open_questions: none in the dev report.
  • "Serial constraints cleared: NOT YET" on the claim: cleared. PR docs(skills): data and automation skills teach three data-model publish checks #37707 is commit 80519b5991 on main, and this branch is cut from it.
  • "The delete sentence follows the code beyond the card": judged in ④. The main path and the first refusal case hold; S1 is the second.
  • "check-empty-changeset is red by design, no skip-changeset label": true on both counts, see ① and ②.
  • "Five derived gates not measured locally": accepted. The diff touches no package source, and every check-run on the head except Check Changeset concluded success or skipped.
  • "Paid for by deleting wording, no rule removed": true, cut by cut in ④.
  • Skill evals not measured, no fixture touched: stands. The card names no eval prompt. No reference answer in the four skills/objectstack-automation/evals files quotes a phrase this diff removes. Case 3 of flows-triggers-approvals.json is the one case over the changed passages (the send-back shape and the lock's reach), and its reference answer still agrees with the head text. No case asks whether a pending record can be deleted; the card does not ask for one.
  • Draft PR docs(skills): objectstack-data and objectstack-automation SKILL.md become routers #36158 sharing the file, the PR-body comments and the commit trailers: landing matters for the seat, outside this record's inputs.
  • Author: the PR was opened by the fleet relay identity; there is no other login to name.
  • SQL push-down: the diff holds no query, no id materialisation and no join.
  • The security line reads yes, and yes is meant. Best practice 2 and the lockRecord config row teach how far the approval lock reaches and what it lets through, the boundary of a write-refusal control. The seat adopting this record adds the security label.
  • Reported to the seat, not graded: a delete cancels the request but neither resumes nor cancels the parked run (cancelForDeletedRecord), so neither the approve nor the reject branch runs. The skill does not say so on main or on this head, and the card did not ask for it.

④ Design judgment

skills/objectstack-automation/references/state-machines-and-approvals.md

Best practice 2, the delete sentence: "Deleting the pending record still lands, cancelling the request and cascading those rows; it is refused whole (409 RECORD_LOCKED) where the cascade lacks one transaction or a row has a second cascading parent."

  • "still lands": holds. The record's own lock is bindApprovalLockHook, a beforeUpdate hook. The plugin registers one beforeDelete hook, the detail-row guard, and it judges a row only against the masters it stands under.
  • "cancelling the request": holds. bindRecordDeleteCancelHook runs afterDelete and cancelForDeletedRecord writes status: 'cancelled' on each pending request of the record.
  • "cascading those rows": holds for the default. A master_detail cascades unless it declares deleteBehavior: 'restrict'; there the engine's own restrict refusal answers, with or without an approval, so it is not a lock case.
  • "409 RECORD_LOCKED": holds. lockedError sets that code and status, the test pins both, and the engine's cascade wrapper (cascadeStoppedRefusal) converts only a roll-up recompute refusal, so this one reaches the caller unchanged.
  • First case, "the cascade lacks one transaction": holds, and it is the code's whole first condition. The cascade leg yields only when inOpenUnit is true. It is false for a datasource that declares supports.transactionsUnsupported, for a cascade the engine plans as split across datasources (no transaction is opened), and for a handle whose unit already closed. "One transaction" covers all three. A record with no master_detail rows has no leg and deletes on any datasource, which the wording allows.
  • S1 (should-fix) — second case, "a row has a second cascading parent". soleCascadeEdgeOf counts the cascade-capable fields DECLARED on the child object: every master_detail not declared restrict, plus any other field that declares deleteBehavior: 'cascade'. With more than one, the yield is withheld for every row of that object, whatever the row holds. So a line whose optional cascading lookup is empty has no second parent, and its master's delete is still refused; read as written, the sentence says that delete lands. The counted field also need not be a parent: a user or tree field that declares cascade counts. The error is on the safe side (a refusal the text does not predict, never a delete it wrongly promises to refuse), and the common shapes are right, so it is not a must-fix. It is the security-touching sentence of this PR and the card's main item, and it should say what the code decides: the row's object declares a second cascading relation. Dropping "whole" (N1) pays for most of that at a zero-headroom ceiling.
  • N1 (nit) — "refused whole". In the code's own words this means the record, its lines and its request all stay, and that is true in both cases. Read as "nothing was written", it fails in the no-transaction case: the walk goes relation by relation, so a set_null or cascade on another relation walked before the lines has already landed when the leg refuses. That is the engine's declared outcome for any refusal outside a transaction, not a property of the lock. Left as is it stands as an accepted deviation; the S1 fix can absorb it.
  • N2 (nit) — "those rows" means the master_detail child rows, named two clauses back with a lookup child in between. A lookup child is cleared by default, not cascaded. "Rows" has one antecedent, so the reading holds; an accepted deviation unless the S1 fix happens to name them.
  • Read and accepted, no finding: two refusals the sentence does not list are another record's lock, which the reach sentence before it already teaches. A pending record that is itself a master_detail row of a second locked record refuses its own delete, and so does one whose line also stands under a second locked record through a restrict master_detail. Nothing in the sentence is invented: each named case refuses in the code, and the test file pins both with the record, its lines and its request left in place.

The lockRecord config row: "Lock the record from edits while pending." Holds. It is the exact reach of the record's own lock, a beforeUpdate hook, and it closes N5 of record 7204862503.

Best practice 2, "or a parent field group" removed: holds, no rule lost. isGroupPlaceableRelationship lets a group place a lookup only when the field already declares relatedList: 'primary', and the warning's own predicate (unlockedDetailTablesOf) reads lookup fields through it. This closes N4 of the same record.

The cuts that pay for the new text, each against main:

  • "Since ADR-0020 there is" to "There is": the heading above still cites ADR-0020. No rule.
  • "Since ADR-0019 there is no standalone approval-process type." to "There is no standalone approval-process type (ADR-0019).": same statement, citation kept.
  • The labels "Notes:" and "Three pieces:": no rule. Each list still follows a blank line.
  • "Send-back is a flow movement" to "It is": the subject of the sentence before is "Send back for revision".
  • Send-back item 1, "a third branch label alongside approve / reject, targeting" to "targets": this was the one prose statement that revise is an edge label. The fact is still taught: the fenced example under the list writes label: 'revise', and the paragraph above names the revise out-edge. No rule lost.
  • "The node takes no config — there is no signal to wait on.": the rule stays, the reason goes.
  • "Only this legalizes the cycle" to "This legalizes the cycle": "MUST be typed 'back'" and "an unmarked cycle is rejected" still carry the exclusivity.
  • "you never resume the flow by hand, and you cannot" to "you cannot resume the flow by hand": the stronger half stays, with the 403 that proves it.
  • Best practice 4, the invoice illustration: the rule it illustrated is unchanged.

No must-fix. S1 is a should-fix and earns a delta review of its fix. N1 and N2 are nits.

Implemented-by: claude/issue-37713-approval-lock-reach-text
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 831311eeb2cde9487863c9a8470a3a010b1e080b
Local-runs: none
Scope: skills/objectstack-automation/references/state-machines-and-approvals.md + none
Security-touching: yes

DELTA review from 270a1050b694081c2177b1696304b4bfd29cb972 (record 7207215155: PASS, should-fix S1, nits N1 and N2) to this head, PR #37726 for card #37713. Read: the card and its two comments (no new one), the PR body as it now stands, the three-file list, the full diff between the two heads (one commit, two files, 5 lines added, 5 removed), the net diff against main, and the check-runs on this head. .changeset/37529-skills-data-model-publish-checks.md is byte-identical to the head record 7207215155 judged (the same blob, 127be26887). main has moved neither the scoped file nor any cited code since the branch point 80519b5991. Cited code was read on main and is not reviewed: packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, packages/objectql/src/engine-cascade-planning.ts, packages/spec/src/automation/approval.zod.ts.

  • S1: closed. The second case now reads "the child object declares a second cascading relation". That is soleCascadeEdgeOf as written: it counts the cascade-capable fields declared on the child object and withholds the yield when there is more than one. Checked on each case record 7207215155 named, in ④.
  • N1: closed. "whole" is gone from the skill sentence and from the new changeset.
  • N2: closed. The sentence now says "cascading its master_detail rows".

① Derived judgments

  • Accept set: unchanged, and that is right. The delta moves one skill reference and one changeset file; no schema, lint rule or runtime file.
  • Public surface: the text of the same one file of the @objectstack/skills catalog. Right.
  • No token ceiling moves. scripts/check-skills-token-ratchet.mjs, which holds the ceilings, is not in the diff; the file shrinks (the PR body reads 5927 tokens against a ceiling of 5936), and the gate is a step of the lint workflow, green on this head.
  • No fenced block changes: the delta's hunks are one table cell and one list item.
  • Check-runs on the head: 48, all concluded; this record was written after the last one. 28 success, 18 skipped, 2 not green. Both of those are Check Changeset, which ran twice on this head, and each log shows the same one failing step, check-empty-changeset.mjs --base, naming .changeset/37529-skills-data-model-publish-checks.md as "present on the merge base and CHANGED by this PR". That is the DELIBERATE CORRECTION class, red by design (② below). The later steps of both jobs ran green: the ADR-0087 registration check, the no-major guard and its level axis. Every other check is green, the ten lint jobs among them.

② Semver level

.changeset/37713-skills-approval-lock-reach.md stays '@objectstack/skills': patch, with Clause-②: no and Metadata-protocol: none on the PR body and both changeset bodies. All three are still correct for a wording change. One sentence of that changeset moves with the skill: it now says "refused with 409 RECORD_LOCKED only where that cascade has no single transaction to run in, or the child object declares a second cascading relation (another master_detail, or any field declaring deleteBehavior: 'cascade')". That agrees with the skill sentence and with the code; the bracket is the code's own count, with "another master_detail" read under "cascading", so one declared restrict is not meant.

DELIBERATE CORRECTION of a pending release note, restated for this head. The note is .changeset/37529-skills-data-model-publish-checks.md, added by PR #37707 and still a file on main, so no release has consumed it. The delta does not touch it: its bytes on this head are the bytes record 7207215155 judged. That record quotes both rewritten sentences before and after and judges each, and both judgements stand here unchanged:

  1. The roll-up sentence: the "after" is what docs(skills): data and automation skills teach three data-model publish checks #37707 shipped, arm for arm with relationships.md on main and with summaryRollupFindings. Confirmed.
  2. The lockRecord sentence: the "after" is the rule docs(skills): data and automation skills teach three data-model publish checks #37707 shipped, in the skill's words, without the "or a parent field group" arm that this PR removes and that never applied on its own to a lookup child. Confirmed.

The correction is confirmed on this head.

③ Boundary flags

  • open_questions: none. The delta has no dev report of its own on the card; its flags are the PR body's acceptance notes, answered here.
  • "The glosses are gone, each mode's rule is unchanged": true, judged in ④.
  • Headroom 0 to 9 with no ceiling lowered: accepted. Lowering a ceiling is a PR's option, not its duty.
  • Evals not measured, no fixture touched: stands. No reference answer in the four skills/objectstack-automation/evals files names quorum, per_group or either cut gloss, and none quotes the delete sentence.
  • Author: the PR was opened by the fleet relay identity; there is no other login to name.
  • SQL push-down: the diff holds no query, no id materialisation and no join.
  • The security line reads yes, and yes is meant: the delta rewords the sentence that teaches what the approval lock lets through. The PR now carries the security label.
  • Reported to the seat in record 7207215155 and unchanged: a delete cancels the request but neither resumes nor cancels the parked run. Not graded.

④ Design judgment

skills/objectstack-automation/references/state-machines-and-approvals.md holds, on both delta hunks.

Best practice 2: "Deleting the pending record still lands, cancelling the request and cascading its master_detail rows; it is refused (409 RECORD_LOCKED) where the cascade lacks one transaction or the child object declares a second cascading relation."

Everything before "or" is the text record 7207215155 judged, less "whole" and with the rows named; those judgements stand. The second case, against soleCascadeEdgeOf:

  • A line whose optional cascading lookup is empty: the child object still declares the second relation, so the text now predicts the refusal the code gives. This was the gap.
  • A second master_detail (a junction): declared, counted, refused. Covered.
  • A lookup that declares deleteBehavior: 'cascade': covered.
  • A user or tree field that declares cascade: the code counts any non-master_detail field with that key. Both are relation fields, so "a second cascading relation" covers them, and "parent" no longer excludes them.
  • A second master_detail declared restrict: not cascade-capable, not counted, and not "cascading" in the text. The delete lands unless that other master is itself locked, which is that record's own lock, as record 7207215155 said.
  • Nothing invented: every shape the wording names has more than one cascade-capable field on the child object, and the code withholds the yield for each. "The child object" is the object of the rows the clause before names; a record with no such rows has no cascade leg, and the wording allows that, as it does in the first case.

The Node Config behavior row, the cut that pays for it: "quorum (minApprovals of N — M-of-N collective sign-off)" became "quorum (minApprovals of N)", and "per_group (EACH approver group must reach minApprovals — one-from-each-group sign-off)" lost its gloss the same way. No rule is lost. Each gloss restated the clause it followed. The rule of each mode is still in the cell, the minApprovals row still gives the totals and the defaults ("total for quorum, per group for per_group", "1 per group"), and the approvers row still says how groups form. The second gloss was also only the default case: with minApprovals above 1, per_group takes more than one from each group, which the remaining words say and the gloss did not. The cell agrees with ApprovalNodeConfigSchema on main. Neither phrase occurs anywhere else in skills/.

No must-fix. No should-fix. No new nit.

Implemented-by: claude/issue-37713-approval-lock-reach-text
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head 831311e · card #37713 · area s2-ai · 2026-11-27T01:42Z

L1 checklist

Tier: H. Landing: hand-off to the approver by the next stroke; ⛔ the seat does not merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-27T01:43Z · head 831311e · approver os-zhuang

维护者速读

  • 改了什么: 自动化技能里讲审批锁的那一页,补上 docs(skills): data and automation skills teach three data-model publish checks #37707 审核后留下的四处跟进。最重要的一条是:审批中的单据仍然可以删除,删除会取消审批,并连带删掉 master_detail 明细行。但有两种情况整笔会被拒(409 已锁定):连带删除没法放进同一个事务时;明细对象上声明了第二个可级联的关系时。另外改回了一句被改窄的话,删掉一个多余的分支,并把 docs(skills): data and automation skills teach three data-model publish checks #37707 那条还没发版的 changeset 改成它实际上线的内容。
  • 影响: 产品行为不变。写应用的人和代理按这页去写,就不会以为审批中的单据删不掉,也能预见到哪些删除会被拒。
  • 请你留意:
  • 审核: 契约审核两轮,增量 7207498375 PASS,没有必须改或建议改的项。席位 L1 已 ACCEPT(本评论前一条)。
  • 要你做什么: 技能文件是受管面,需要你批准后才能合并。撤回这一次合并即可恢复原样。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 27, 2026 01:45
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit 0778315 Nov 27, 2026
51 of 54 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-37713-approval-lock-reach-text branch November 27, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue security size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants