Skip to content

docs(adr): ADR-0162 revised on two rulings of 2026-11-27: a closing outcome is written when the approval is over, and the document is held for the whole approval - #37829

Merged
os-zhuang merged 4 commits into
mainfrom
claude/project-thread-u5conv
Nov 27, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/project-thread-u5conv

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37817

Clause-②: no
Metadata-protocol: none
Tier: H

维护者速读

  • 用户能看到什么变化:用户无感,这次只改设计文档,把 11 月 27 日的两条裁定按原话写了进去:凡是声明了关闭状态的对象,每一次审批从提交到结束别人都改不了单据(退回修改期间、以及作者特意不上锁的步骤在等人审批时照旧可以改),而在审批结果会关闭单据的状态字段上,每一步的结果都等审批全部走完才显示,中途一直是「审批中」。
  • 为什么做:属于「关闭状态锁」专题,后面的施工和测试要按新裁定做,所以设计文档先改;第一稿把「全程锁」写窄了,复核指出后已按裁定原话放宽。
  • 出错会怎样:文档写错会让后面的施工按错的约定做,最坏是使用者看到单据在审批没走完时就显示「已批准」,或者单据在审批途中被人改动而审批人没看到;按原话放宽也有代价,声明了关闭状态的对象上连同关闭无关的审批在两步之间也不能再改单据,而且这类对象的审批要求服务器装有后台任务服务,否则审批开不了;这次只动文档,撤回这一次合并就恢复原文。
  • 要你做什么:这是受管的架构记录修订,需要你审阅批准后才能合并。

What changes

One file: docs/adr/0162-an-object-declares-its-closed-states-the-record-and-its-lines-are-closed-to-change.md, +220 / −61. No code, no generated file, no changeset. The record's row in docs/adr/README.md does not change, because the status line keeps its opening words.

The revision writes the maintainer's two rulings of 2026-11-27 into ADR-0162 (ruling record 7210179412 on the design card), in place, with the seat's rulings on the design note where the record speaks to them. After the contract review of the first draft, the seat read both rulings by the words that were ruled (seat rulings 7211509661 and 7211531658 on the card), and this head carries that reading.

  • Status line and header. The status keyword stays Proposed. The line gains "Revised 2026-11-27 …" after the text it had. The header gains one bullet, "Ruled twice more on 2026-11-27", which quotes both rulings with the date, quotes the option the maintainer read for the second, names the four statements they replace, and names the seat's two rulings on how the words are read.
  • D5, first ruling: 「全部走完才显示已批准」. A new block, "On a field the object closes on, a step's decision is written when the approval is over for the record". On a mirror field the object closes on at approved or rejected, every step's decision is held back, whichever of the two the object closes on, and the field keeps pending. The outcome is written when the approval is over for the record and has finished. Every other status is written as it is on main. A second paragraph, "How the plugin learns that an approval is over", gives the door's reading of the run, the mark on the request, the reconciler and the host it needs.
  • D5, second ruling: 「随新能力一起全程锁」. A new block, "On an object that declares closedStates, a document under approval is held for the whole of the approval". The pending lock holds on through every passage, from each decision until the next request opens, the approval is over or it is abandoned. The hold covers every approval on such an object, whatever field it mirrors onto, and does not follow a node's lockRecord. It keeps three things of the pending lock: the revise window, a caller's delete of the record, and the passes for a system context and for a write of the mirror field alone. It ships with the key.
  • D5, the conditions. Six become five. The condition that no user-run flow writes the record between two steps is withdrawn, in a paragraph of its own. The condition on a pause is kept and its reason restated. A host with no job service is a new ground of refusal at the first request, for every approval on an object that declares the key.
  • D5, what the conditions do not reach. A refused write of the mirror is reported and not swallowed. An approval whose run ends between two steps is abandoned at once. A failure the flow routes to its end with the next step never asked counts as not finished.
  • D9. The one lock read answers approval in a passage. The approvals-family read stays as published and does not answer for a passage.
  • Execution. Item 7 records the carrying run and stamps the between-set on every approval on an object that declares the key, and its check no longer reads which nodes write the record. Item 8 is restated whole: the refused write, the outcome when the approval is over, the reconciler, the hold, the docs.
  • Consequences, Alternatives, Points the ruling does not settle, D10, TL;DR, Provenance, Readings, Refs follow, so that no section still states the merged timing as the rule.

Rework after the contract review

The contract review of the first draft (7211480053, on head 906da0f2) found one must-fix, two should-fix and five nits. The seat then ruled how the two rulings are read. This head answers each finding:

Finding What the record says now
M1 (a): the hold did not reach an approval that closes on nothing The hold covers every approval on an object that declares closedStates, in every passage (D5, "It covers every approval on an object that declares closedStates"). Every such approval carries the mark, is reconciled, and is refused on a host with no job service. The narrow reading is in Alternatives as not chosen, with what the wide one costs.
M1 (b): the passage after a decision that was not held back On a field the object closes on at approved or rejected, every step's decision is held back, whichever value the object closes on (D5, "A decision the object does not close on is held back with the rest"). The three sentences the review found untrue of that case are true of it now. The by-value reading is in Alternatives, with why the record departs from the design note's sentence.
M1: the option the maintainer read Quoted beside the ruling record's sentence, in the header bullet and at the head of the hold block.
S1: the hold followed lockRecord, on a reason that did not hold The hold does not follow lockRecord. A node that declares lockRecord: false leaves the record open while its own request waits, as the key's published words say, and the passage after its decision is held. D5 and Alternatives give the corrected reason, and the sentence the review quoted is gone.
S2: the approvals-family read was widened while said to stay as published It stays as published and does not answer for a passage. D9 quotes the contract's words. The header, items 2, 6 and 8 and ▲4 agree with it. What that costs a client is in Consequences.
N1: two summary sentences promised more than the rule Both are rewritten and say where the hold lets go: the Consequences bullet under "What gets better", and D9's bullet on the two producers.
N2: who the revise window is open to Every caller who may edit, as ADR-0044 D6 has it: in D5, in the "Returned" row, in Consequences, and in a new Readings row.
N3: two Alternatives argued from the merged timing Both are reworded: "Judge each request as it opens" and "Let the mirror answer for an earlier step's field".
N4: indirect writes in a passage D5 and Consequences say that an indirect write which carries no run of the approval is refused, that the node's failure abandons the approval, and that such a flow is abandoned on every submission. Item 8's hold part pins which indirect writes carry the run. See the note under this table.
N5: the mark of a record deleted in a passage Item 8: the approval is marked abandoned, its marks are cleared, nothing is written, and the reconciler neither tries again nor notifies.

One point for the delta review, on N4. The seat asked for the sentence that indirect writes in a passage are refused. The record says it of an indirect write that carries no run of the approval, and leaves to the build which indirect writes carry one. The reason is a reading of main, taken and not run. The lock reads a writer's run from the write's provenance (packages/objectql/src/engine-execution-plumbing.ts#buildProvenance), and the contexts a hook's api derives are spread from the context of the write that fired the hook (packages/objectql/src/engine-scoped-context.ts#withRunAs). So a hook's write-back inside a node's own write may carry that node's run, and pass the hold as it passes the pending lock today. An unqualified "refused" could be untrue of that case. The reading is one of the new Readings rows.

Every statement the design note's section 5 names

All are revised. None is kept as it stood.

The note names What the revision does
D5: "The mirror writes each request's outcome as it is decided." Revised. The mirror paragraph now says it writes each status as the request takes it, "with the one exception the ruling of 2026-11-27 makes": on a field the object closes on at approved or rejected, a step's decision is written when the approval is over. The rule is the new block that follows.
D5: "A record is on a closed value of its approval field in four situations only", whose second situation goes Revised to three. The second situation, an approval passing from one step's decision to the next step's opening, is gone. The last now names the one case that is left: an approval that was not judged.
D5: "Two passes of the pending lock do not carry over", for a node after the last step Revised. The nodes between two steps and after the last one read pending and meet no closed record. This lock refuses what comes after the outcome: a node that runs on after a pause that follows the last step, and any other flow or hook that acts as the caller.
D5: the reason given for condition 5 (no user-run flow writes the record between two steps) The condition is withdrawn, in the paragraph "The condition that is withdrawn". With the outcome held back the record is not closed between two steps, and the hold passes the approval's own runs. The note proposes the same.
D5: the reason given for condition 6 (no pause between two steps) Kept, reason restated: during such a pause the document would read pending, held, with no request open, and nobody would have a verb to end it. The note proposes the same.
D5: the premise of the first three bullets of "What the conditions do not reach" Revised. None of the three now leaves a document closed on an unfinished approval. The bullets say what each leaves: a reported refusal and a held document that reads pending; an approval abandoned at once; a decision whose run cannot be resumed, which the reconciler ends.
D5: "Approved again … its request opens and the field holds pending once more" Revised and split in two: "Approved, where another step follows" (nothing is written, the hold keeps the record) and "Approved at the approval's last step" (the field keeps pending, held, until the approval is over).
Consequences: the sentence that includes the steps after an approval decision among refused writers Revised to its opposite: "That does not include the nodes that run straight after an approval decision (ruled 2026-11-27)". It then says what is still refused, an indirect write that carries no run of the approval among it, and what a flow that reacts to the field sees.
Consequences: the sentence that a record is open again while the next step is pending Revised. The mirror writes pending as the approval's first request opens, and the document reads pending until the approval is over, "between two steps too, where nothing is written (ruled 2026-11-27)". The same bullet says where it is held meanwhile.
Consequences: two bullets under what it costs Revised. The six-condition bullet now gives five. The bullet on a user-run write between two steps is replaced by the costs of the new rules: every approval on an object that declares the key needs a host with a job service; a fault between two steps costs a resubmission; a document reads pending for longer, also for a decision the object does not close on; the hold keeps callers out of every approval on such an object; a pause the conditions do not refuse holds the document; the request gains the mark and the plugin a reconciler.
Alternatives: "Hold a step's outcome back until the approval is over" Moved to chosen, for a field the object closes on, with why the record first turned it down and what changed.
Alternatives: the narrow form of "Set the object's validation rules aside" Decided against (ruled 2026-11-27), with the reasons the note gives.
Execution: item 7's "Between two steps is after one step's closed outcome" Revised: after a step is decided, whichever way, and before the next step opens.
Execution: item 8 Restated whole for the two rulings and the seat's rulings.

Statements revised beyond that list, so that the record agrees with itself

  • The heading of the rule under the third ruling of 2026-11-26 loses two words: "would stop or hold it between two steps" becomes "would hold it". The condition that concerned a stop is the one withdrawn. The ruling's own words, 「平台拒绝这种配置」, stand. The seat kept this change.
  • D5: the intro to the conditions; the reasons of the conditions on readonlyWhen and on the one mirror field; what "between two steps" means; the paragraphs "Otherwise the node refuses" and "What the conditions keep out"; the rows "While the request is pending", "Rejected", "Returned" and "Abandoned" of what a decided document shows; the abandoned rule, which now also covers an approval abandoned because its run ended between two steps.
  • D5, one sentence under the second ruling of 2026-11-26. The record's own account of when an approval may have let a record be edited said "for as long as it ran, under a node that does not lock". It now says "while a request was pending under a node that does not lock", because the passages are held. The ruling's words and the option's text stand.
  • D9: who produces a lock, what the approvals-family read answers in a passage, and one sentence on the record page's approvals part, which keeps its lock as the approvals-family read answers it. Two rows of the D10 table.
  • "Points the ruling does not settle": the eighth of the fourteen points is marked withdrawn, and four new lists separate what the seat read from the rulings' words, the seat's rulings on the design note, the design note's own, and this record's own readings.
  • TL;DR, Provenance, the Readings table (21 new rows, read at ff9ee21084) and Refs.
  • Alternatives gains the narrower timing as considered and not taken, the options the two rulings turned down, and the readings the first draft took and the seat did not: a hold only where decisions are held back, a hold that follows lockRecord, a decision written at once where the object does not close on it, and an answer for a passage on the approvals-family read.

Readings that are this record's own

Neither the rulings nor the seat's rulings speak to these. Each is listed as this record's own in "Points the ruling does not settle". They are for the delta review to confirm or send back.

  1. The five conditions are not widened. A pause between two steps of an approval they do not concern is not refused, and the hold keeps the document through it. Consequences states the cost, and Alternatives has the other reading.
  2. An approval the node did not read when it opened is not held between its steps: one that opened before the object declared the key, or whose requests the plugin could not place.
  3. Where the run of an approval that holds nothing back ends between two steps, the hold ends and the mirror writes nothing, as on main.
  4. An indirect write in a passage that carries no run of the approval is refused, and the build pins which indirect writes carry one (the note on N4 above).
  5. The approval of a record deleted in a passage is ended as abandoned, with nothing written and its marks cleared.
  6. The condition on a write between two steps is withdrawn and the condition on a pause is kept. The design note proposes both, and the card leaves the choice to the revision.
  7. The reasons of the conditions on readonlyWhen and on the one mirror field are restated for the new timing. The conditions themselves stand.
  8. "Between two steps" is counted from every decision of a step, since every decision is held back or begins a passage.
  9. Item 7's check no longer reads which nodes write the record, since the condition that needed it is withdrawn.

Why

ADR-0162 was merged on 2026-11-26 with the mirror writing each step's outcome as it is decided. The design of its Execution item 8 showed what that timing costs: a fault in the instant between two steps, or a rule of the app that refuses the put-back, leaves a document closed on an approval that did not finish. The maintainer ruled on 2026-11-27 to write the closing outcome only when the approval is over, and to hold the document for the whole approval, shipped with the key. The build cards cut from the record pin its statements in tests, so the record is revised first.

The first draft of the revision read the second ruling narrowly: a hold only where an outcome is held back, and only under a node that locks. The contract review found that narrower than the words that were ruled, and the seat ruled that the words stand. Widening the hold after the key is released would change shipped behaviour, which is what shipping the hold with the key avoids.

Tests

None: the diff is one Markdown file under docs/adr/. Every code reading the revision adds was read at ff9ee21084 and not run, and the record says so above the new Readings table. All 21 new rows are symbol anchors, file anchors or a link to ADR-0044, and pnpm check:adr-symbol-anchors resolves the anchors.

Acceptance notes

Against the card's "Done when":

  • One PR revises ADR-0162, Tier H. This one. docs/adr/** is governed, so it stays a draft and lands by the maintainer's hand.
  • Every statement the note's section 5 names is revised or kept with a reason. The table above.
  • The status line stays Proposed. It does, and the README row is byte-identical.
  • The two rulings are quoted with their dates. In the header bullet, in D5 at the head of each of the two blocks, in the TL;DR and in "Points the ruling does not settle". The fuller sentences of the ruling record are quoted once each in D5, and the option the maintainer read for the second ruling is quoted beside it.
  • No sentence in the words of an earlier maintainer ruling changes. Measured again on this head: the seven distinct 「…」 quotations in the record at the merge base all stand in the revised text, each as many times as before, and every blockquote is unchanged. The paragraphs that carry them changed only in this record's own sentences.

Not done here, on purpose:

  • No amended status keyword and no new ADR. The record is Proposed, implements nothing, and the revision is in place, as the card orders.
  • docs/adr/README.md is not regenerated. pnpm adr:index rewrites one row, ADR-0160's, whose status text changed on main without the index. That is outside this card. pnpm check:adr-index reports it as a warning and exits 0 by design.
  • The two things the design note found beside the card are not decided here. The record cites one of them only as a reading of main, the stranded-request reader's bound of 500 rows read in no order, because the reconciler takes that reader's place for an approval on an object that declares the key.

Verification

Read first (by risk):

  1. D5, "On an object that declares closedStates, a document under approval is held for the whole of the approval": the second ruling as the seat read it. The bullets on its scope, on lockRecord and on what it keeps of the pending lock are where the first draft failed review.
  2. D5, "On a field the object closes on, a step's decision is written when the approval is over for the record", with "How the plugin learns that an approval is over" under it: the first ruling as a rule, the decision held back by field and not by value, and the definitions of over, finished and ended between two steps that every later statement uses.
  3. D9, "The approvals-family read stays exactly as published", with Execution item 8's hold part: a published read that does not answer for a passage, and what the hold card pins.

Two-minute verification: pnpm check:adr-symbol-anchors on this head. Expected: ✅ check-adr-symbol-anchors: 4452 anchors across 164 records resolve, which covers every symbol the 21 new Readings rows name.

Gates on head dbea5500. The list is node scripts/pm/dispatch-gates.mjs --commands: 21 commands. Each ran on that head with its exit code captured before any pipe.

  • All 21 exited 0.
  • --ran reconciliation: ✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED (a DERIVED zero — all 21 recorded an exit code and none of them is 3).
  • node scripts/check-issue-citations.mjs (outside that derivation): exit 0.
  • dispatch-gates --tier: docs/adr/** is the mandatory contract tier; changed lines 281 (+220 / −61) against the human-merge threshold 3000: under.
  • overlap-check --branch=claude/project-thread-u5conv: VERDICT clean exit 0 at dbea55003b against origin/main at f19ae3a8eb and 0 PR heads; it merges cleanly. origin/main was not merged in, since AGENTS.md merges main into an open PR only on a conflict, a main-caused red or a queue removal. The 24 code symbols the record cites in files that changed on main since the merge base were looked up on origin/main, and each is still declared there.
  • The derivation printed a stale-tree warning: this tree is 12 commits behind origin/main, and one file the derivation reads, scripts/check-route-envelope.mjs, changed in that range. None of the 21 commands is that family's, and CI derives from the merge ref.
  • CI-owned families are this PR's check-runs. On the first draft's head 906da0f2 every one concluded success or skipped. They had not reported on this head when this body was written.
Local gates (21 commands on dbea550, exit code beside each)
exit 0 · node scripts/check-adr-links.mjs
exit 0 · node scripts/check-adr-links.mjs --self-test
exit 0 · node scripts/check-closing-keyword-parity.mjs
exit 0 · node scripts/check-closing-keyword-parity.mjs --self-test
exit 0 · node scripts/check-comment-mask-corpus.mjs
exit 0 · node scripts/ci/plan-test-core-shards.mjs --self-test
exit 0 · pnpm --filter @objectstack/lint run check:doc-formula-expressions
exit 0 · pnpm check:adr-anchors
exit 0 · pnpm check:adr-index
exit 0 · pnpm check:adr-symbol-anchors
exit 0 · pnpm check:ci-filter-parity
exit 0 · pnpm check:closed-ceremony-text
exit 0 · pnpm check:cross-package-test-inputs
exit 0 · pnpm check:doc-authoring
exit 0 · pnpm check:driver-memory-census
exit 0 · pnpm check:gitlink-declared
exit 0 · pnpm check:nul-bytes
exit 0 · pnpm check:pm-governed-merges
exit 0 · pnpm check:pm-prior-rulings
exit 0 · pnpm check:refd-timer-probe
exit 0 · pnpm check:watch-hint-literal

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No schema and no code in this diff.)
  • 2. Every name I added uses the casing for its kind. (No name added.)
  • 3. No formatter ran; pnpm lint passes. (No formatter ran. The diff holds no file pnpm lint reads; CI runs it.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (Nothing publishes: docs/adr/** ships in no package, so the PR carries skip-changeset. Both lines are filled in above.)
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (Not touched.)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English. (The maintainer's rulings are quoted in their own words, and the summary for the maintainer is in Chinese.)
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…al is over and hold the document for the whole approval (WIP)

Card 37817. The maintainer's two rulings of 2026-11-27 on the design of
Execution item 8, as the seat recorded them on the item's card.

Claude-Session: https://claude.ai/code/session_01L6bhgWNWREXH1yVf2KhmeT
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 27, 2026
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation 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: 906da0f21b4bb324f1d0bb1bbc308c4aaba60289
Local-runs: none
Scope: docs/adr/0162-an-object-declares-its-closed-states-the-record-and-its-lines-are-closed-to-change.md + none
Security-touching: yes

Read: card #37817 with its three comments, the PR body and its one-file diff against main (merge base ff9ee21084, where the file equals main's), the check-runs on the head (every one concluded success or skipped, none failed), the ruling record 7210179412 with the design note it carries, and the rulings 7200732942, 7202242844, 7201405662 and 7205949718. The code the revision cites was read on main; nothing was built or run.

① Derived judgments

The diff publishes nothing: one Markdown file under docs/adr/, no schema, route, package or generated file. What the revised record commits the build to:

  • One new field on the approval request, the mark, which the store filters on. Right; the record says Clause-②: yes for the card that adds it.
  • Each request also records the run that carries its record, and the set of nodes between two steps (item 7). Right; both are the seat's rulings in the ruling record.
  • The set of approvals that may open. Narrower by one ground: a host with no job service. Right, the seat's ruling. Wider by one: the condition on a user-run write between two steps is withdrawn. Right: its reason was the closed record between two steps, which the first ruling removes, and it was in no ruling's words.
  • The mirror's timing on a closing field. Right, and the key is unreleased, so nothing shipped changes.
  • The pending lock kept on through the passages, same unit, same 409 RECORD_LOCKED. The mechanism is right. Its reach is M1 and S1 below.
  • The data-layer read of D9 answers approval in a passage. Right. The approvals-family read doing the same is wrong as worded: S2.
  • A fourth way an approval is abandoned, held to the rule of 7201405662. Right: that rule is extended and none of its words change.
  • An error log line, a timeline line with no actor and a notice to administrators. Additive. Right.

② Semver level

skip-changeset is right: docs/adr/** ships in no package, and Check Changeset concluded success. Clause-②: no and Metadata-protocol: none match the diff.

③ Boundary flags

What the card asked to be confirmed.

  • Every statement the design note's section 5 names is revised in the tree, none left as it stood: the mirror's timing; four situations become three; the two passes of the pending lock; the reasons of conditions 5 and 6 (one withdrawn, one kept and restated); the premise of the first three bullets of "What the conditions do not reach"; "Approved again", now two rows; the three Consequences statements and the cost bullets; the two Alternatives that move, with the narrower timing kept as considered and not taken; item 7's "between two steps"; item 8, restated whole. The seat's four rulings are recorded where D5 and Execution speak to them.
  • The status keyword is still Proposed, and the line keeps its opening words.
  • No earlier ruling's wording changed. The seven distinct quoted rulings of the base text all stand, each as many times as before, and the paragraphs that carry them changed only in the record's own sentences. One earlier ruling is touched in substance, not in words: S2.

The five readings.

  1. The hold follows lockRecord (open question 1). Not the seat's to settle as written. The seat may take the other side, a hold through every passage whatever lockRecord says, because that side takes nothing from the ruling's words; the reading as written goes to the maintainer. See S1.
  2. The revise window stays open (open question 2). The seat may settle it, and as written is right. ADR-0044 is not reopened by the ruling, the two passages the maintainer was asked about are the ones the new timing opens, and a returned step is decided again on the revised document. N2 is about who the window is open to.
  3. A caller's delete lands in a passage (open question 3). The seat may settle it, and as written is right. A document in a passage is pending and not closed, and ▲2, which the maintainer adopted as written, keeps a pending document deletable; the approvals read's published delete rule says the same. Leaving the fate of the approval to item 8 is acceptable: N5.
  4. The hold reaches only an approval whose outcome is held back. Not the seat's to settle. It is narrower than the words that were ruled, and it goes to the maintainer. See M1.
  5. The heading loses "stop or". The seat may settle it, and it is right. The heading is this record's own sentence, 「平台拒绝这种配置」 and the option text stand untouched, and the only condition that concerned a stop is the one withdrawn.

The record's other readings. Withdrawing the condition on a write and keeping the one on a pause, restating the reasons of the conditions on readonlyWhen and on the one mirror field, counting "between two steps" from a held-back decision, and dropping the write analysis from item 7's check are the seat's, and each is right: the design note proposes the first two, and the card leaves the choice to the revision.

Out-of-scope note in the dev report (the stale ADR-0160 row in docs/adr/README.md): rightly left out; it is not this card's.

SQL push-down. No finding. The mark is a field the store filters on, the reconciler scans it oldest first, and the hold and the mirror ask the request table in single probes by a recorded run.

Security. yes is meant: the hunks say which callers a held document refuses, which contexts pass the hold, that a user-run node now writes a record it was refused, and that a background reconciler writes in a decider's name.

Escalated to the maintainer: reading 4 (M1), and reading 1 unless the seat takes the wider hold (S1). The PR body's summary for the maintainer states the hold without either limit; that is the seat's to put right at hand-off.

④ Design judgment

The first ruling is carried faithfully. The rule, "over" judged for each record, the decision of the latest request, the door's four answers, the mark and the reconciler, the abandonment at once and option c′ all agree with the design note and with the code they cite on main: the three reads of the pending lock ask for a pending request, the mirror's write is caught and logged, the sweeps are scheduled only where a job service exists, the stranded reader is capped and unordered, and a server context has no switch that sets aside a validation rule other than state_machine. Three findings concern the second ruling.

M1 (must-fix) — the hold as written is narrower than the words that were ruled, and the record files that as a choice inside the ruling. D5 quotes the ruling record: 「只对声明了 closedStates 的对象,从提交到审批结束都锁住,随键一起发布。」 The option the maintainer read says of such an object that from submission to the end of the approval nobody else can change it. D5 then holds less, in two places:

  • (a) A declaring object whose approval closes on nothing, for instance one that closes on paid alone. Between two steps a caller edits it as on main. The record states this and gives its reasons.
  • (b) Inside an approval the hold does reach, the passage after a decision that is not held back. Take an object that closes on rejected and not on approved: rejected is final, approved moves on to fulfilment. The first step's approved is written at once ("Every other status is written as it is today"), it leaves no mark, and the hold starts "from a decision that is held back". The document reads approved after step one and is open to callers until the next request opens. The record does not state this case, and three of its sentences are untrue of it: "held for the whole of it", "from then until the approval is over or abandoned the field holds pending or returned", and "the document reads pending until the approval is over".

The narrow reading may be the right design. The note keys the hold to the closing field and to the mark, a hold where nothing is held back protects nothing, and in (b) the later step's approvers see the edit. But it gives a user less than the ruled words say, and widening it after release is the change to shipped behaviour the ruling chose to avoid. The header says the list holds what was chosen "inside the two rulings", "Points the ruling does not settle" says none of it is in the rulings' words, and the status line still tells the maintainer that five points go past a ruling's words. Fix: mark the reading ▲ where it stands, with the other reading and what a user sees, as the record does for every reading a ruling leaves open; state case (b); quote the option the maintainer read beside the ruling record's sentence; and have the maintainer's answer before hand-off. Or hold as the words say.

S1 (should-fix) — the reason given for following lockRecord does not hold, and what the reading costs is not stated. D5 says that after a non-locking node's decision "none follows", and Alternatives gives the reason: a lock that began at the decision "would protect nothing the author had not already given up". Under the timing this record was merged with, the outcome closed the record at the decision, under a non-locking node too: the closed-state lock is the engine's and does not read lockRecord. So an author who declared lockRecord: false on a closing field kept one thing: nothing changes after the decision. With the outcome held back and no hold, a caller's edit lands after the last decision for as long as the flow behind it runs, and is closed under approved with no approver able to have seen it. That is the outcome this block gives as the reason for the hold. Two more points. The key's published words stop at the request: "Stop anyone editing the record while it waits for this approval" (packages/spec/src/automation/approval.zod.ts#lockRecord), so they say nothing of a passage, where the ruling's words do. And the plugin cannot tell the last decision from an earlier one, so the choice is between the reading as written and a hold after every held-back decision. Fix: correct the reason, state the consequence in D5 and in Consequences, and either take the wider hold or mark the reading ▲ and put it to the maintainer with M1. Item 8's test "after whose decision nothing is held" follows the answer.

S2 (should-fix) — the approvals-family read is said to stay exactly as published while its answer is widened. D9 adds that the two routes and getRecordLock / getRecordLocks answer locked in a passage "and what the answer means does not change". The published contract words the answer otherwise: locked is true "when a pending request on the record comes from a node whose lockRecord is not false", and "A record held by its own request may still be deleted, which cancels the request" (packages/spec/src/contracts/approval-service.ts#getRecordLock). In a passage no request is pending and a delete cancels none. The same bullet says that widening a published answer on this read "is not made here in passing"; the header still lists that read's published answer under "Leaves unchanged"; item 2 says its routes and contract members are not touched and item 6 that they stay as published; and ▲4, adopted as written, is "the approvals-family read stays as published". Fix, one of two. Keep that read as published, so that it answers for pending requests only and a client that asks only it meets the server's refusal in a passage, which is what the bullet already says of closed states. Or state the widening as a change to a published contract's words, carry it in the header, in items 2, 6 and 8 and in the hold card's Clause-② line, and put it to the maintainer as a change under ▲4.

Nits:

  • N1 — Two summary sentences promise more than D5's rule. Consequences: "nobody changes it but the approval's own flow, the platform, and its submitter in a revise window". D9: "from its submission to the end of its approval". Under D5 a caller also writes under a non-locking node, deletes the record, and writes the mirror field alone, and the read answers unlocked in a revise window.
  • N2 — "stays open to its submitter as ADR-0044 has it". ADR-0044 D6 has the record unlocked there, for every caller who may edit it. The record should say which it means, since item 8 pins "a revise window ... which is open".
  • N3 — Two Alternatives still argue from the merged timing: "Judge each request as it opens" ("would stop the run on the earlier step's outcome"; D5's own sentence was revised) and "Let the mirror answer for an earlier step's field" ("the field the earlier step closed").
  • N4 — A node of the approval can still fail in a passage on a write that is not its own run's: a hook that writes back to the record as the caller, or a cascade from another object. The sentence that named this was removed with the closed record between two steps, but the hold refuses the same writes. Such a flow is abandoned on every submission; the hold's part of item 8 should say whether those writes pass.
  • N5 — For a record deleted in a passage, item 8 should also say that the mark does not stand for good: as written the reconciler retries a refused outcome, and notifies, for as long as it does.

Delta review owed on M1, S1 and S2.

Implemented-by: claude/project-thread-u5conv
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Seat label · 2026-11-27T06:23Z

The contract review 7211480053 records Security-touching: yes: the revision decides who a held document refuses, which contexts pass the hold, and in whose name the reconciler writes. The security label goes on for that reason. Nothing here widens a permission.

…ct and hold back every decision on a closing field (WIP)

Rework after the contract review of the revision (7211480053) and the
seat's rulings on card 37817 (7211509661, 7211531658):

- the hold covers every approval on an object that declares
  closedStates, in every passage, and does not follow a node's
  lockRecord;
- on a field the object closes on at approved or rejected, every
  step's decision is held back, whichever value the object closes on;
- the approvals-family lock read stays as published and does not
  answer for a passage;
- every approval on such an object carries the mark, is reconciled,
  and is refused on a host with no job service;
- the review's five nits: two summary sentences, the revise window's
  callers, two alternatives that argued from the merged timing,
  indirect writes in a passage, and the mark of a deleted record.

Claude-Session: https://claude.ai/code/session_01L6bhgWNWREXH1yVf2KhmeT
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: dbea55003b30a158915c461749a68cda989f82db
Local-runs: none
Scope: docs/adr/0162-an-object-declares-its-closed-states-the-record-and-its-lines-are-closed-to-change.md + none
Security-touching: yes

Delta round on record 7211480053 (head 906da0f2). Read: the one commit between the two heads, the whole file at this head against main, the seat rulings 7211509661 and 7211531658 and the rework report 7212071610 on card #37817, the PR body as rewritten, and the check-runs on this head (26 success, 22 skipped, none failed). The code the new readings cite was read on main; nothing was built or run.

① Derived judgments

The diff still publishes nothing: one Markdown file under docs/adr/. What changed in what the record commits the build to:

  • The hold now reaches every approval on an object that declares closedStates, in every passage, whatever field the approval mirrors onto and whatever a node's lockRecord says. Right: it is the ruled words as they stand.
  • On a field the object closes on at approved or rejected, every step's decision is held back, not only the value the object closes on. Right, by 「全部走完才显示已批准」 and the seat's addendum.
  • The mark, the reconciler, the stamped set and the refusal on a host with no job service now reach every approval on a declaring object. Right: the hold is read off the mark, and the reconciler is what ends a hold nobody is at the door for.
  • The approvals-family read keeps its published answer and does not answer for a passage; the one read of D9 does. Right, and ▲4 stands as adopted.
  • An object that declares no closedStates still behaves as on main. Right.

② Semver level

Unchanged: skip-changeset, Clause-②: no and Metadata-protocol: none match a diff that ships in no package, and Check Changeset concluded success on this head.

③ Boundary flags

Is each seat ruling inside the words the maintainer tapped? Yes, each one, so nothing goes back to the maintainer.

  • The hold covers every approval on a declaring object, in every passage. This is the option's own sentence, 「只对声明了关闭状态的对象,从提交到审批结束别人都改不了」, read as it stands.
  • The hold does not follow lockRecord. Inside the words: every passage is held. The one place a document is not held from its submission is while a request waits under a node whose author declared lockRecord: false. That is a published key whose words cover exactly that wait, the ruling did not name it, and the PR's summary for the maintainer says it in plain words.
  • Held back by field, not by value. Inside 「全部走完才显示已批准」 and the ruling record's "until then the field reads in approval". It departs from a sentence of the design note, which was the note's and not a ruling, and Alternatives says why.
  • Every such approval needs the job service. The line the maintainer was shown for information already said "on objects that declare closed states".
  • The approvals-family read stays as published. This is ▲4 kept, not changed.
  • The revise window and the delete in a passage, kept. As judged in the first record: ADR-0044 and ▲2 already speak to both, and the maintainer's summary names the revise window.

The rework report's open question, N4. Accepted as the seat accepted it, and the qualified sentence is truthful. On main the lock passes a write by the run id its provenance carries, and withRunAs builds a hook's context by spreading the context of the write that fired it, run id included. So a hook's write-back inside a node's own write can carry that node's run and pass. An unqualified "refused" would be untrue of that case. The record says "refused" only of an indirect write that carries no run of the approval, names the hold's part of item 8 as where each case is pinned, and adds the reading to the Readings table.

The five readings of this round that are the record's own. Each is the record's to settle, and each is right.

  1. The five conditions are not widened; a pause between two steps of an approval they do not concern holds the document. It takes nothing from the ruled words: the hold holds, and a pause the author wrote is part of the approval. It refuses nothing new. The cost is stated in D5, twice in Consequences, in Alternatives and in the docs part of item 8, including the screen whose save is refused. N8 is a suggestion on it.
  2. An approval the node did not read when it opened is not held between its steps. A transitional bound, the same one the conditions already have: without the mark and the stamped set there is nothing to hold by or to end the hold against.
  3. Where the run of an approval that holds nothing back ends between two steps, the hold ends and nothing is written. Nothing was held back, so there is nothing to void; the field is left as main leaves it.
  4. An indirect write that carries no run of the approval is refused. See N4 above.
  5. The approval of a record deleted in a passage ends as abandoned, with its marks cleared. It is what the first record's N5 asked.

The four carried over from the first head stand as judged there. "Between two steps" is now counted from every decision, which follows from the two seat rulings.

Confirmed again on this head. Every statement the design note's section 5 names is still revised. The status keyword is Proposed. The seven quoted earlier rulings stand, each as many times as before. In the paragraph under 7201405662 one of the record's own sentences changed ("for as long as it ran" became "while a request was pending"); the ruling's words did not.

SQL push-down. No finding: the hold is still read off a field the store filters on, in the lock's existing probes.

Security. yes stands, for the reason the first record gave; the label is on.

④ Design judgment

M1: closed
S1: closed
S2: closed

N1, N2, N3, N4 and N5 of the first record are each done in the tree.

  • M1. The hold covers every approval on a declaring object; the passage after any decision is held; every decision on a closing field is held back, so the three sentences that were untrue of an object closing on rejected alone are now true. The option the maintainer read is quoted in the header and at the head of the hold block. Both first-draft readings are in Alternatives as not chosen, with their cost in Consequences.
  • S1. The sentence that did not hold is gone. D5 and Alternatives give the corrected reason, and item 8's test now pins a caller's write that lands while a non-locking node's request waits and is refused after its decision.
  • S2. D9 quotes the published contract, says the approvals-family read does not answer for a passage, and the header, items 2, 6 and 8, the D10 row and Consequences agree.

Tried against the new, wider rule: a pause in an approval the conditions do not concern (held, stated); a non-locking later step (open while it waits, held after, stated); a rejection on an object that closes on approved alone (held back, written when the approval is over, pinned by a test); an approval in flight when the object declares the key (not held, stated). None breaks a ruling or a statement of the record.

No must-fix, no should-fix.

Nits, none of which changes the contract; each can go into a build card:

  • N6 — Execution item 3 lists "every outcome that changes by design" in the showcase. The wide hold adds one it does not list. showcase_invoice_signoff is a one-step approval on the invoice, with lockRecord: false and no mirror field. Once the invoice declares the key, that approval carries the mark, is reconciled, is held from its decision to the end of its run, and is refused on a host with no job service. Item 3's card should record it, and check that every host that boots the showcase runs that service.
  • N7 — Item 7's test list still says an object that closes on the field only on values of its own "is never refused". On a host with no job service it now is; the words want "on none of the five conditions".
  • N8 — The check reads and stamps every approval on a declaring object, so the early notice at authoring could also name a pause between two steps of an approval the conditions do not concern, and a screen there that saves the object's form. A follow-up, not this revision's.

Implemented-by: claude/project-thread-u5conv
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head dbea550 · card #37817 · area s2-data · 2026-11-27T07:23Z

L1 checklist

  • Shape and checks. l1-face.mjs --pr 37829: CLEAN, 13 items read, none flagged. pr-state.mjs: 26 success, 22 expected skips, 0 failed, 0 pending, mergeable_state clean. One file, docs/adr/0162-…md, +220 / −61. No code, no generated file, no changeset.
  • Contract review at CONTRACT_REVIEW_TIER. The delta round 7212402866 at this head: PASS. M1, S1 and S2 of round 1 (7211480053) are closed, and N1–N5 are done in the tree. No must-fix or should-fix is open. The seat adopts it.
    • Each seat ruling on the card (7211509661, addendum 7211531658) sits inside the words the maintainer tapped, so nothing goes back to the maintainer.
    • The N4 qualifier is accepted: a hook's write-back inside a node's own write can carry the approval's run, so the record says "refused" only of an indirect write that carries none, and leaves the cases to item 8.
    • The five readings that are the record's own are the record's to settle and are right.
    • Every statement the design note's section 5 names is revised. The status keyword stays Proposed. The seven earlier quoted rulings stand.
  • Fixes #37817 is right. The card asks for the ADR revision only; the build goes to its own cards.
  • Governance. check-governed-merges.mjs: GOVERNED (docs/adr/**), Tier H. The low-risk arm does not apply (the PR carries the security label). The maintainer's approval lands it.
  • Follow-ups, carried to the build cards of ADR-0162 (not this revision's):
    • N6: execution item 3's card records what the wide hold does to the showcase invoice sign-off flow and checks that every host booting the showcase runs the job service.
    • N7: item 7's test list drops "is never refused" for an own-values-only object on a host with no job service.
    • N8: the authoring-time early notice may also name a pause between two steps of an approval the conditions do not concern.
    • The docs/adr/README.md row of ADR-0160 is stale; a card follows.
  • The delta commit's title ends in "(WIP)". The squash title is the PR title, so nothing ships with it.

Tier: H. Landing: hand-off to the maintainer follows this record.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-27T07:24Z · head dbea550 · approver os-zhuang

维护者速读

  • 改了什么: 只改一份设计文档 ADR-0162(关闭状态锁),把你 11 月 27 日在 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 上点的两条裁定按原话写进去:
    • 「全部走完才显示已批准」:审批结果会关闭单据的那个状态字段,每一步的结果都等整个审批走完才写,中途一直显示「审批中」。
    • 「随新能力一起全程锁」:声明了关闭状态的对象,每一次审批从提交到结束,别人都改不了单据。退回修改期间照旧可改,作者特意设成不上锁的步骤在等人审批时照旧可改。
  • 影响: 用户和开发者现在看不到任何变化,这次没有代码。后面的施工卡按这份文档做。
  • 请你留意(代价,已写进文档的 Consequences):
    • 声明了关闭状态的对象上,和关闭无关的审批在两步之间也不能改单据。
    • 这类对象的审批需要服务器装有后台任务服务,没有就开不了审批。
    • 示例应用里的发票签核流程会因此被全程锁,施工卡要核对每个启动示例应用的环境都装了这个服务。
  • 审核: 契约审核(最高档)两轮,第一轮 FAIL 后按座位对裁定原话的读法返工,第二轮 PASS(7212402866),没有必须改或建议改的项。席位 L1 ACCEPT 在本评论前一条。
  • 要你做什么: 架构记录是受管面,且带 security 标签,需要你批准后才能合并。撤回这一次合并即恢复原文。

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/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADR-0162 revision: write a closing outcome only when the approval is over, and hold the document for the whole approval (item 8 rulings)

3 participants