Repository navigation
docs(approvals): approvals on an object that declares closedStates - #38563
os-project-manager merged 2 commits into
Conversation
What the check at an approval's first request asks of the mirror field and the flow, what a refused opening is for the submitter, what an abandoned approval leaves, and how an approval that does not mirror onto the closing field and an approval per map item behave. Read against the trunk's approvals plugin and ADR-0162 as revised. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5phEgfPTCgvPqh4ER2
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5phEgfPTCgvPqh4ER2
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5phEgfPTCgvPqh4ER2 Final green head · 2026-11-29T10:17Z —
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB 席位核对 — REWORK · L1-b · area o5-data · Head-sha
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB 席位核对 — ACCEPT · L1-b · area o5-data · Head-sha
|
97f9f1f
into
claude/o5-data-approvals-trunk
Requested by Leehom · project thread
Part of #37766 (slice D, the approvals guide, and carried note N43; the card stays open for N45)
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
One new section in
content/docs/automation/approvals.mdx, "Approvals on an object that declaresclosedStates" (anchorclosed-states), placed before "Why", plus ADR-0044 and ADR-0162 in "See also". Docs only; no code, no changeset (no published package shipscontent/docs/**), labelskip-changeset.Every sentence was read against the code on the trunk
claude/o5-data-approvals-trunk, not the card text:packages/plugins/plugin-approvals/src/approval-opening-check.ts,approval-opening-refusal.ts,approval-service.ts(judgeOpening,mirrorStatusField,abandonedValueOnClosingField,approvalWroteHeldValue,voidRefusedOpening,reportRefusedMirror,recall,abandonForDeadRun,notifyDecisionOutcome),translations/messages.ts,packages/objectql/src/closed-state-lock.tsandclosed-state-values.ts,packages/services/service-automation/src/root-run.ts, and ADR-0162 D5 as revised.The opening refusal's lead was read on PR #38546's head (
claude/issue-37766-opening-lead, 2668361) and then on the trunk, which merged it at d313098 before this branch was pushed: where the only gaps are the host's or an unreadable flow, the lead is the closedStates lead, not the "closes on its approval field" lead. The guide describes that behaviour and quotes no message text.Not described: any author-time (validate, build or publish) refusal. That is N45, ruled separately (ruling record 7253749311), and lands in its own PR; the guide describes the refusal at an approval's first request only.
Card bullet to guide sentence
recalled; otherwise the value at submit, the default, empty, a closed value passed over at each step).pendingand the object closes on neitherpendingnorreturned;pendingamong the moves out of a closedapprovedorrejected; noreadonlyWhenand novisibleWhenon a request status option. Plus the paragraph on rules and hooks that cannot be read ahead and how a refused mirror write is handled.mapof approvals on the parent's record; readable whole; and the host's ground (ajobservice).VALIDATION_FAILEDerror, and that failed run is what the person who submitted sees. Its message names the record ..., and then, for each gap, the flow, the step, the object, the field and what is missing."mapruns as an approval of its ownmapis an approval of its own record": "each item's request is filed on that item ... and what follows is judged for that record alone" (see the acceptance notes for how far that holds on the trunk).start/endare notstartandendhave no executor and never pause, so theendof amapbody or of asubflowbody refuses nothing." (canPauseandSTRUCTURAL_TYPESinapproval-opening-check.ts.)Tests
Docs only: no test pins prose, and none was added. The local evidence is the derived docs gate list, run at head dc3081f (all 45 derived commands, each exit 0; detail below).
Acceptance notes
mapitem bullet holds only for the parts keyed by record on the trunk. An item request is filed on the item; the submitter's outcome notice is judged per record run (notifyDecisionOutcome); the put-back of an abandoned item request counts only requests on that item's record (approvalWroteHeldValue). The opening judgement is not per item: it reads the whole approval once, keyed by the root run, so a later item's first request on its own record is not judged again. The guide says the item object is judged "with the rest of the approval, at the approval's first request" and claims nothing more. ADR-0162's per-item outcome timing ("an item's outcome does not wait for the items after it", the held-back decision) belongs to item 8, which reached the trunk at978bb2b1(feat(approvals): on a closing field, an approval's decision is written when the approval is over (ADR-0162 item 8, slice 3) #38540) after this head was cut and is not written here (next bullet).978bb2b1, not written here: the held-back decision and the hold through each passage (ADR-0162 D5, ruling 7210179412, item 8); an approval whose run ends between two steps being abandoned at once; the mirror writing nothing for an abandoned request while another approval's request on the record mirrors onto the same field. They came with feat(approvals): on a closing field, an approval's decision is written when the approval is over (ADR-0162 item 8, slice 3) #38540 (Approval status mirror: a write that does not land, a run that ends between two steps, and a decision whose run cannot resume must not leave a document closed on an unfinished approval (ADR-0162 item 8) #37767 slice 3), merged into the trunk after this head was cut; this file does not overlap it. The guide's text stays literally true: item 8's door marks the approval abandoned on its latest request and records norecalled, so "Three writers abandon a request … Each recordsrecalled" still describes item 7's request-level abandonment. Carrier: Approval status mirror: a write that does not land, a run that ends between two steps, and a decision whose run cannot resume must not leave a document closed on an unfinished approval (ADR-0162 item 8) #37767's item 8 guide text, written after slice 5 lands. It adds the paragraph on the hold, and it revisits this section's heading "What an abandoned approval leaves" and its "Three writers" enumeration, which then sit beside a second way an approval is abandoned.approval-opening-check.tsdoes not check it.content/docs/references/data/object.mdx. That page is AUTO-GEN (AGENTS.md, Documentation Guardrails), regenerated from the spec's.describe(). A line there needs a spec edit, which is outside this docs-only slice. The guide links to the reference page instead.Verification
Read first, by risk:
content/docs/automation/approvals.mdx, "What the flow owes": the condition list againstapproval-opening-check.ts.abandonedValueOnClosingField.judgeOpeningandopeningRefusalText.Two-minute check:
pnpm check:doc-anchors && pnpm check:doc-authoringfrom the repository root. Expected: both exit 0.Local docs gates at dc3081f (derived by dispatch-gates --commands for content/docs/automation/approvals.mdx)
Every derived command exited 0:
node scripts/check-adr-links.mjsand--self-test,check-closing-keyword-parity.mjsand--self-test,check-comment-mask-corpus.mjs,check-doc-route-spelling.mjs --advisoryand--self-test,check-docs-section-name.mjsand--self-test,check-section-landing-index.mjsand--self-test,scripts/ci/plan-test-core-shards.mjs --self-testpnpm check:adr-anchors, ci-filter-parity, closed-ceremony-text, corpus-claim-drift, cross-package-test-inputs, doc-anchors, doc-authoring, doc-frontmatter, docs-audit-scope, docs-redirects, docs-single-h1, docs-spec-enumerations, docs-transcript-drift, driver-memory-census, gitlink-declared, nul-bytes, pm-expected-skips, published-readme-links, react-page-adapter-contract, refd-timer-probe, role-word, skill-identifier-liveness, vendor-version-stamps, watch-hint-literalpnpm --filter @objectstack/lint runcheck:doc-formula-expressions, check:doc-security-posturepnpm --filter @objectstack/spec runcheck:docs, check:empty-state, check:liveness, check:skill-examples, check:strictness-ledger, check:variant-docs, check:yaml-examplescheck:docs-transcript-driftandcheck:skill-examplesfirst answered PREREQUISITE NOT MET (exit 3, unbuilt lint and client packages). They were rerun afterpnpm --filter '@objectstack/lint...' buildandpnpm --filter '@objectstack/client-react...' --filter '@objectstack/client...' buildunder the verify lock (VERDICT command-exit 0 both) and exited 0. Reconciliation:dispatch-gates --ran: 45 derived, 45 run, 0 NOT-MEASURED (a derived zero: every row records an exit code).overlap-check --base=origin/claude/o5-data-approvals-trunk: VERDICT clean.Generated by Claude Code