Repository navigation
docs(skills): data and automation skills teach three data-model publish checks - #37707
Conversation
…sh checks Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: First round, PR #37707 for card #37529. Read: the card and its three comments, the PR body and its six-file list, the net diff against ① Derived judgments
② Semver levelOne changeset, ③ Boundary flags
④ Design judgment
N1 (nit) — "A child with neither … is refused" reads as unconditional. The code refuses that arm only when
The removed clause does not change what item 2 teaches. The item stays advice with its reason under "Approval Best Practices"; the Node Config row above it still documents N2 (nit) — "drawn as a body table" uses a spec-internal term the published skills never define. The data skill calls the same thing a full-width table in the record's details (
Case 12 holds. The added prompt sentence makes the missing foreign key part of the task, and an answer that leaves N3 (nit) — case 12's new token assumes the parent's machine name and the literal form. The prompt names S1 (should-fix) — data case 29 does not grade the rule it was added for.
No must-fix. S1 is open on this head and I read its fix as a delta. N1 to N3 may ride that same commit, which the delta then covers, or stand as accepted deviations. Implemented-by: VERDICT: PASS |
Data case 29 requires the refusal's rule id; case 12's prompt names the parent object. The roll-up refusal sentence says it applies only when relationshipField is omitted; the approval lock sentence names the record-details table the data skill teaches. Paid down in the same files. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: DELTA review from
① Derived judgments
② Semver levelOne changeset, ③ Boundary flags
④ Design judgment
Best practice 2.
Best practice 1, the first cut. "to mirror status onto the row" is gone from the item. The fact is still taught twice in the file: the The
Neither cut changes what the skill teaches about the lock's reach: the record and its No must-fix, no should-fix. N4 and N5 are nits and end the round; a fix to either moves the head and this record would no longer cover it. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 4695c42 · card #37529 · area s2-ai · 2026-11-26T22:40ZL1 checklist
Tier: H. Landing: hand-off to the approver by the next stroke; ⛔ the seat does not merge. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Tier H hand-off · 2026-11-26T22:41Z · head 4695c42 · approver 维护者速读
|
…till be deleted (objectstack-ai#37726) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu3zQ2AqeghSGpv6Q7VEPDyQ)_ Fixes objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 <details><summary>Derived gates at 270a105: 49 derived, 44 run, 5 NOT MEASURED</summary> `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`. </details> 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.com/claude-code) https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96 <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgVUz5oS8fMgmncxU96 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Sales · project thread
Fixes #37529
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
One sentence per rule, each worded from the code on
mainatfbcfdfbb58(the lint rules PR #37513 landed), not from the card's paraphrase:skills/objectstack-data/rules/relationships.md(Roll-up Summaries): a roll-up is refused at publish whenrelationshipFieldis omitted and the child has nolookup/master_detailreferencing the parent, or whenrelationshipFieldnames no field of the child (rollup/child-without-parent-reference). Both arms are in the rule (summaryRollupFindings, severityerror).skills/objectstack-data/rules/field-types.md(Relational): onlylookup,master_detail,userandtreereadreference; on any other type butsummary, publish refuses it (field/reference-on-non-reference-type, severityerror). The card sayssummaryreads it; the code says the four types read it andsummaryis exempt from the refusal, so the sentence says that.skills/objectstack-automation/references/state-machines-and-approvals.md(Approval Best Practices, item 2):lockRecordlocks the record and itsmaster_detailchild rows only; alookupchild shown in the record's details (relatedList: 'primary', or a parent field group, as the data skill names it) stays editable, reported as the warningapproval-detail-editable-while-pending. It is taught as a warning, not a refusal.project, named in the prompt) and expectsreference: 'project'; a new data case 29 asks aboutreferenceon atextfield and requires the rule idfield/reference-on-non-reference-type; automation case 3 (budget approval) now carries a lookup body table and expectsmaster_detail.@objectstack/skillspatch changeset.Token ratchet: no ceiling moved
Every addition is paid for by shorter wording in the same file (
node scripts/check-skills-token-ratchet.mjs, exit 0 at4695c42cc6).skills/objectstack-data/rules/relationships.mdskills/objectstack-data/rules/field-types.mdskills/objectstack-automation/references/state-machines-and-approvals.mdskills/objectstack-data/evals/objects-fields-relationships.json(not ratcheted)skills/objectstack-automation/evals/flows-triggers-approvals.json(not ratcheted)Whole bundle: ratcheted (authored) 199619 to 199632 tokens against a 204473 total ceiling; shipped tree 299752 to 300145 tokens; all
SKILL.mdfiles together 4961 lines before and after; wholeskills/tree 23255 to 23276 lines.Tests
node ui/scripts/check-skill-eval-tokens.mjsexits 0 but walksskills/objectuionly, so it says nothing about these fixtures (contract review 7204561928). On4695c42cc6everymust_containtoken of each data case is in its own reference answer and nomust_not_containtoken is (29 cases, 0 violations).pnpm --filter @objectstack/spec run check:skill-examples: exit 0, "352 prose examples type-check across 3 surface(s)".node ui/scripts/check-skill-examples.mjs: exit 0, "Every marked skill example holds up against the built types."The two example gates were read at
ad8cf055c2; the delta at4695c42cc6changes no code example. At4695c42cc6: token ratchet exit 0,pnpm check:skill-linksexit 0,check:skill-identifier-livenessexit 0,check:skill-frame-syncexit 0;check:doc-authoringNOT MEASURED locally (exit 3, notypescriptin the worktree), CI's.Acceptance notes
summary" becomes "Viasummary" (two table cells); the recompute sentence drops "so it's consistent". field-types.md: nine table cells and two prose phrases lose filler words ("built-in format validation" to "format validated", "Video files" to "Video", and the like). state-machines-and-approvals.md: a code comment, the send-back opening sentence and two lead-ins are shorter.relationshipFieldis omitted; the approval sentence uses the data skill's words for the table; data case 29 requires the rule id; case 12's prompt namesproject. Paid down in the same files: best practice 1 is shorter, and thelockRecordconfig row reads "Lock the record while pending" (best practice 2 says what the lock covers). state-machines-and-approvals.md now sits at zero headroom, relationships.md at 2.node scripts/pm/overlap-check.mjsreports it merges cleanly against this branch (exit 0); the claim on the card cleared it.referencerule fit no existing case and got a new one.Verification
Derived gates at ad8cf05: 49 derived, 48 run, 1 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --ran: "49 derived famil(ies) accounted for — 48 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)", exit 0.pnpm check:dual-build-cjs-loads, exit 3, reason: it reads every package's built output and only the closures the skill gates need were built here. CI builds the whole tree.node scripts/check-skills-token-ratchet.mjsand 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 --filter @objectstack/lint run check:doc-formula-expressions,pnpm check:doc-authoring,pnpm check:nul-bytes,pnpm check:published-files,node scripts/check-empty-changeset.mjs --base origin/main,node scripts/check-changeset-no-major.mjs --base origin/main,node scripts/check-adr-0087-registration.mjs --base origin/main.Read first, by risk:
skills/objectstack-data/rules/field-types.md, the new sentence under the Relational table: it sayssummaryis exempt, which differs from the card's wording.skills/objectstack-automation/references/state-machines-and-approvals.md, best practice 2: the rewritten item and the dropped clause.skills/objectstack-data/evals/objects-fields-relationships.json, case 12: an existing prompt gained a sentence.Two-minute check: run
node scripts/check-skills-token-ratchet.mjsand expect exit 0 with the three files at headroom 2, 1 and 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96