Repository navigation
Description
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Filing gate: ③ maintainer-directed · Source: ADR-0162 Execution item 8 (accepted by merge 972114d)
维护者速读
- 做什么:补上发起审批时检查不出来的三种情况:应用自己的规则拒绝了审批状态的写入、流程在两步审批之间出错或被取消、审批决定已记录但流程无法继续。三种情况下都不能让单据停在「已批准并锁住」而后面的审批其实没走完。
- 用户会看到什么:出现这三种情况时,单据不会假装已批准;状态写入被拒不再悄悄吞掉,管理员能看到哪张单据卡住了、为什么。
- 不做会怎样:这三种情况虽少见,但一旦发生,单据会带着一个没走完的审批结果被锁死,用户改不了,只能靠管理员手工处理。
- 顺序:「声明与执行」那张卡要等这张卡;这张卡开工前有几处做法需要先定。
What happens
ADR-0162 D5 refuses, when an approval opens, every configuration it can read ahead that would leave a document on an earlier step's outcome (item 7). Three things cannot be read ahead, and each can leave a record closed on a value its own approval wrote and did not finish:
- A write of the mirror that does not land. A validation rule or a hook of the app refuses it, or a
visibleWhenon an option the mirror puts back does. Onmaina failed write of the mirror is logged and swallowed, on every transition (packages/plugins/plugin-approvals/src/approval-service.ts#mirrorStatusField). - A run that ends between two steps. A node fails, or the run is cancelled. The next step itself can fail to open, by the policy its own configuration declares for an empty slate (
packages/spec/src/automation/approval.zod.ts#onEmptyApprovers), or because another request is pending on the record (approval-service.ts#openNodeRequest). A node can also fail on the closed-state lock through a write the check cannot read: a hook that writes back to the record, or a delete on another object whose cascade reaches it. No request is open then, so none of the three writers that abandon a request acts, and the sweep of dead runs reads pending requests only (approval-service.ts#releaseDeadRunRequests). - A decision that is recorded while its run cannot be resumed, so that the next step is never asked.
mainhas a reader of such requests that reports them and changes nothing (approval-service.ts#inspectStrandedRequests).
On main the same events leave the same status on the record. What the key adds is that the status may now be a closed one.
The recommendations the maintainer adopted on 2026-11-26, 「全部按推荐」 (ruling record 7200732942 on #36253, text on 7202242844), give the mirror's failed write a child card. The seat's rulings on the eighth and ninth contract reviews of ADR-0162 added the other two to it. ADR-0162 fixes what the card delivers and leaves it the means.
Expected
What must hold (fixed by ADR-0162 D5). On a field the object closes on, none of the three leaves a record closed on a value its own approval wrote and did not finish. A refused write of the mirror is no longer swallowed. An end after the last step is another case: there the approval is finished and its decision stands.
What this card settles (left to it by the record).
- How a refused write of the mirror is shown, and to whom.
- How the plugin learns that an approval's run has ended, or will not go on.
- How it tells a stop between two steps from one after the last step.
- Where the decision of the earlier step stands afterwards.
- What the platform then does with the record.
The record names two starting points. For the refused write, the first candidate is to set the object's rules aside for that one write (ADR-0162 "Alternatives considered"). For a run that will not go on, the reader of stranded requests on main is the starting point. Either may change what an app's own rules can refuse, so the choices are written up for the seat before the build starts, and the seat decides which of them go to the maintainer.
Carried from the contract reviews of ADR-0162
- A failed mirror write on any transition (N24). The swallow is the same on every transition, not only on an abandoned request. The card covers each transition that writes the mirror.
- A failure the flow routes (N46). A flow can route a node's failure and go on, and a run can then complete without the next step having been asked. The card says on which side of its bound that falls: the author's own routing, as a branch that skips a step is, or an end between two steps. A test pins it.
Done when
- The five questions above are answered in a design note on this card, and the seat has ruled it or taken the open ones to the maintainer.
- A refused write of the mirror on a closing field: not swallowed, shown as the note says, and the record is not left closed on the value its approval wrote. Tested for a validation rule, a hook, and a
visibleWhenon a value the mirror puts back. - A run that ends between two steps: tested for a node that fails, a cancelled run, a next step that fails to open on an empty slate and on a request already pending on the record, and a node that fails on the closed-state lock through a hook's write-back and through another object's cascade.
- A decision whose run cannot be resumed: the record is not left closed on that decision, and the case is visible to an administrator.
- An end after the last step leaves the decision standing, with a test.
- The routed-failure case (N46) is on the side the note names, with a test.
- Each test records the value the field keeps.
- The approvals guide (item 7, slice D) says what an author and an administrator see in each case.
- The release rule holds: the key (item 1) is not published before this card is built.
Category ③: maintainer-directed. A build card of ADR-0162, child of #36253.
Grade: area:data · Feature · n/a (not a defect on main; it becomes one the day the key ships without it) · reach: an approval of several steps on an object that closes on its outcome, when one of the three events happens · evidence: read (ADR-0162 D5 "What the conditions do not reach" and its Readings)
Suggested-grade: p2 · it gates the release of #36253's key, so it takes the grade of the card it blocks
Size: L (it needs design rulings before it is built). The design note is S; the build is M once the note is ruled.
Business reason: carried from #36253 and the ruling 「平台拒绝这种配置」 (7205949718): a document must not pretend to be approved. These are the cases the opening check cannot see.
Reader: seat 2 (repo:objectstack#2). First a design note by a card thread at the ADR tier, then the build at effort high.
Release-order: the root run of item 7 (slice A), which is how the plugin places a request in its approval. Like item 7's slices B and C it needs item 1's key on the same trunk branch.
Clause-②: not judged before the design note. No if the means stay inside the plugin; yes if the plugin gains a published member or a platform object gains a field.
Metadata-protocol: none expected. If the note chooses to set an object's rules aside for the mirror's write, the seat judges whether that is semantic for the rules concerned.
Dedupe: searched mirrorStatusField (open issues): 0 hits. Searched closedStates (all issues): 1 hit, #36253 itself.
Related: #36253, PR #37606 (ADR-0162), the card for item 7.
Dispatch note: the card thread also reads the seat's private memo for this card before it starts.
Activity
objectstack-fleet commentedon Nov 27, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:data · domain:server · Feature · priority:p2 ·
pm:queue· size M; rationale: closedStates (ADR-0162). The approval status mirror handles a write that does not land, a run that ends between steps, and a late decision. It ships with the key (#37768). p2.objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Claim: PM loop round 1 · 2026-11-27T03:40Z
Session:
session_01L6bhgV6i8jfWwSXjpWJrjAThread session:
session_01L6bhgUVBTmJLAWKkUBAzZeAccount:
os-salesBranch:
none — design note round, no codeDomain:
domain:serverSeat:
repo:objectstack#2Area:
s2-dataFile surface: none in the repository this round; the thread writes a design note answering the card's five questions, and the seat posts its public part on this card. The build (M) is a later dispatch after the seat rules the note.
Container & model:
S,mode:thread,model: CONTRACT_REVIEW_TIER (reason: the card's Reader line asks for the ADR tier, a design analysis that may go to the maintainer; decision analyses at the ceiling tier, standing order 10-29),effort: high (reason: five design questions across the approval plugin and automation service, read against live code)Clause-②: no
Metadata-protocol: none
Responsibility:
n/a — not a defect cardThread-read: 7208024204
Premise: holds — ADR-0162 merged (PR #37606)
Serial constraints cleared:
none — no code this roundobjectstack-fleet commentedon Nov 27, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
设计说明(第 2 版)与裁定 · #37767 · 2026-11-27T04:53Z
维护者裁定(2026-11-27T04:50Z)
closedStates的对象,从提交到审批结束都锁住,随键一起发布。座位就说明给出的裁定(这些属于座位可定的做法,列出供知情)
job服务的宿主:在关闭字段上发起审批时,第一张申请就拒绝,并说明缺什么。record_run_id);「两步之间」的集合在审批开启时盖到申请上,归第 7 项 B 片的开启检查。三、座位可以自己定的做法(列出供知情)
接下来
Design note: #37767 (ADR-0162 Execution item 8), revision 2
The approval status mirror: a write that does not land, a run that ends between two steps, a decision whose run cannot resume.
mainat6e8f6637. Everything below is read, not run. No test was executed for this note.Changes in revision 2, after the independent review. Each was checked against the code before it was taken.
Clause-②for shape P is yes. The ADR cost is about ten statements. N46 is option c′. The hold through the passage is recommended to ship with the key.维护者速读
1. What
maindoes todayEach reading names the file and symbol it was taken from.
packages/plugins/plugin-approvals/src/approval-service.ts#mirrorStatusFieldwraps the value choice and theengine.updatein onetry, and itscatchlogs atwarnand returns. The callers are: a request opening (pending, in#openNodeRequest, which a resubmitted step also passes through), a finalising decision (approvedorrejected, in#decideNode), a send-back (returned, in#sendBack), the revision-limit auto-reject (rejected, same method), a recall or an administrator's override (recalledor the put-back, in#recall), and the dead-run sweep (the same, in#abandonForDeadRun).sys_approval_request, syncs the approver index, and only then calls the mirror. The service opens no transaction anywhere.#decideAndResumecalls#resumeRecordedOutcome, which calls the engine'sresumeand returns when the request's own run has paused again, ended or failed. A child that completes bubbles into its parent inside the same call, butpackages/services/service-automation/src/engine.ts#bubbleToParentreturns nothing and never throws. It records the parent's failure for the door only where the parent's resume answeredstranded(#takeSubflowParentStrand). A parent that was cancelled (RUN_NOT_FOUND), a store that could not be read, a replica already advancing the parent (RESUME_IN_PROGRESS) and a bubble that threw are each awarnline, and the door is told the resume succeeded. So a clean answer fromresumedoes not mean the approval went on. One door already measures after the resume whether a decision ended the process (#notifyDecisionOutcome), and it asks for a pending request on the decided request's own run only.failed, and the engine saysstranded. The engine consumes the pause before it runs the nodes after it, journals a snapshot when one of them throws, cascade-fails the ancestors, and answersstatus: 'stranded'(packages/services/service-automation/src/run-resume.ts#resumeInternal). The decision door throwsRESUME_FAILEDwithrepairable. An operator can put the pause back (restoreConsumedSuspension, served by the automation domain's admin route). Re-issuing the continuation is#continueRestoredRun, a contract member that no REST route serves today.#openNodeRequestthrowsNO_APPROVERSunderonEmptyApprovers: 'fail'(the default isadmin_rescue, andauto_approveis the declared way to pass over an empty step) andDUPLICATE_REQUESTwhen another request is pending on the record. The approval node returnssuccess: false(approval-node.ts). A runtime failure is routed in one of two ways, after which the run goes on and can complete: down the node'sfaultedge (packages/services/service-automation/src/dag-traversal.ts#followFaultEdge), or by atry_catchregion around it. A guard refusal is never routed. Each failure arm writes afailurestep to the run's log before it routes.cancelRuncancels one suspended run and touches no child (run-resume.ts#cancelRun). Between two steps a run is suspended in three cases. An ancestor run parked at asubflowormapnode is suspended for as long as its child's request is pending, and the operator's cancel route reaches it. The decision on the child is then still admitted, because#assertRunResumableasks about the request's own run only; the child completes, the bubble finds no parent, nobody is told (reading 3), and the parent's next step is never asked. The second case is a pause, which item 7 refuses when the approval opens. The third is a stranded run whose pause an operator restored and then cancels.#inspectStrandedRequestslists requests that areapproved,rejectedorreturned, with a limit of 500 and no order: that is every decided request the deployment ever had, so past 500 rows it reads an arbitrary 500. It reports a run that ismissingorfailed, and skipscompleted,cancelledandpaused. Its result goes to a log line; no route, notification or page shows it. It changes nothing, by an earlier ruling: a decision a person made is not rewritten. The sweep that calls it is scheduled inapprovals-plugin.tsonly where the host has ajobservice, every five minutes by default; with no such service nothing runs, at boot or later.#releaseDeadRunRequests). A terminal run abandons its pending request, whether or not the run is repairable.visibleWhenand the app's hooks all run against the mirror's write.packages/spec/src/kernel/execution-context.zod.tsdeclares four server-set switches:skipTriggers,skipAutomations(hooks bound from metadata and record-change dispatch; hooks registered in code still run), andseedReplayandskipStateMachine(thestate_machinerule alone). None sets aside the other validation rules or option visibility. They are used by curated loads an administrator opted into (import, seed), under the rule that docblock states: only the system principal may take an app's declared controls off a write.status: 'pending'in its three reads (lifecycle-hooks.ts). Onmaina caller's write can land in that passage on every multi-step approval.getRunanswers the run's step log, each entry with its node id andsuccess,failureorskipped(packages/spec/src/automation/execution.zod.ts#ExecutionStepLogSchema).approval-service.ts#ranArmedBodyanswers "not known" after an edit of the flow, and after the registration every restart makes.2. One choice sits under all five questions
ADR-0162 D5 has the mirror write each step's outcome as it is decided. On a field the object closes on, that write closes the record in the middle of its approval, and the next step's
pendinghas to open it again. All three cases of this card are ways that second write, or the step behind it, never comes. So the five questions depend on one earlier choice: when a closing outcome is written.Shape P: write a closing outcome when the approval is over for the record (recommended)
On a field the object closes on, the mirror does not write a step's
approvedorrejectedat the decision where the object closes on that value. It is written once the approval is over for that record. Until then the field keepspending. An outcome the object does not close on is written at once, as today.pendingof the first request of a new approval on a decided document, and at a first request the approval can simply be refused.pendingwith no request open, which no person has a verb to end. Each fails open with a stale status, where D5 as merged fails closed on a decision nobody finished. That is the right side for this bound. The price is that the reconciler of question 2 carries correctness and is no longer a report.mainit reads "approved" for a moment after each step.pending. A record-change flow that fires onapprovedfires once on such an object, after the nodes behind the last decision have run. A node after the last step, in a flow that runs as the user, can write the record, where D5 as merged refuses it. No rule or hook of the app is ever set aside.Clause-②: yes). And from a decision until the outcome is written the record is open to callers unless the approval lock holds it, which D5 as merged did not need: question 5 recommends that the hold ship with the key.maindeclares the key, so no shipped behaviour changes.Shape C: keep D5's timing, and cure
The mirror writes each outcome at its decision, as merged. The plugin detects an approval that will not go on and writes the record off the closed value. Where a rule or a hook of the app refuses that write, the platform sets the app's controls aside for that one write. This is the first candidate the ADR names.
skipAutomationsreaches only hooks bound from metadata. A hook registered in code that throws would still leave the record closed.Clause-②: yes,Metadata-protocol: semanticfor the rules and hooks concerned, a standing special case in the data layer, and the same detection and reconciler as P.Considered and not offered
To report a refused write and leave the record closed until an administrator acts. It does not meet what ADR-0162 fixes ("the record is not left closed on that value") and runs against ruling 7205949718.
A narrower timing of P
Write at the decision where no later step of the approval can follow for that record, as read from the graph when the approval opens, and defer only where one can. A single-step approval and the last step of a linear flow then keep D5's timing exactly, and the reconciler is not on their path. I do not recommend it. A node after the last step would then be allowed to write the record or refused by the path the run took: on a flow whose second step a gateway can skip, the write lands when the step is skipped (the first step's outcome was deferred) and is refused when it is not (the second step's outcome was written at its decision). One rule an author can state is worth more than keeping the commonest path off the reconciler, and with the hold of question 5 a process that dies after the only step's decision leaves a document that is held and reads "in approval", not one that is open. The ADR revision should carry this paragraph either way.
Recommendation
P. Read on long-term soundness alone it is the shape with the fewest special cases: the approvals plugin keeps its own protocol and the data layer gains no exemption. Mainstream platforms model it the same way: a Salesforce approval process sets the outcome in its final approval actions, which run when the last step is decided, and keeps the record locked for the whole process. P takes both halves of that model only with the hold. The other axes do not turn it. Nobody is hit today. On loud against silent, P's failures are open documents with a stale status and a report, where C's residual is a closed document that reads approved.
Self-check: on long-term soundness alone the pick is P. Do pull, error-loudness or surface turn it: no.
3. The five questions
Each is answered for shape P. Where shape C would answer differently, a line says so.
Question 1. How a refused write of the mirror is shown, and to whom
This is N24: the swallow is the same on every transition. The table is for a field the object closes on. "Keeps" is the value each test pins.
pending, from any value, a closed one includedpendingwritten second; on a refusal the row is voided with the status the platform already has for that (cancelled), no lock is taken, and the run fails at its first node with the app's own message, as item 7's refusal does. The other order could leave a decided document onpendingwith no request.pendingontopendingpendingreturnedtopendingreturned, an open valuependingtoapprovedorrejectedpending: decided in the request, and the document reading "in approval"pendingpendingtoreturnedpending; the revise window is open because the pending lock has let gopendingorreturnedtorecalledor the put-backpendingorreturnedpendingthat no person has a verb to end.No row leaves a record closed on a value its unfinished approval wrote. Under shape C the second row is
approvedtopending, and that row, and the put-back after an end between two steps, are where the set-aside would be used.How it is shown:
errorlog line, once for each failed write, with the consequence and the fixwarn.commentrows with no actor.resumeErrorRecommended: a, b and d, all three for closing fields only. Not c: the person at the door cannot act on it, and b already shows it to them on the request.
Question 2. How the plugin learns that an approval's run has ended, or will not go on
Recommended: c, built on four things.
getRunandhasSuspendedRun, and asks its own table for a request of the approval on the record. It has four answers: finished, in progress, ended unfinished, and cannot tell yet. The last is for a run another replica is advancing, or one it cannot read. It then writes nothing and leaves the mark. The doors are every caller of#resumeRecordedOutcome(a decision, the SLA sweep's auto-decision, the revision-limit auto-reject, a send-back, a resubmit,#continueRestoredRun) and#recall, which resumes or cancels the run directly.mapitem run where the item is the record. Without this, an item under amapwould wait for the last item's decision to get its outcome, and one item's failure would abandon the finished approvals of the items before it. Item 7's card pins that arm as allowed. This needs each request to record the run that carries its record, and item 7's first slice hands the root run only. Decide before that slice merges whether it records both.approvedonto a withdrawn document, against ruling 7201405662. A test pins that, and the same for a returned request recalled in its revise window. The mark is the one new field of this card.cancelledrun; a run whose history sayspausedwith the pause gone, which a process that died inside the passage leaves for good; and a run still parked at asubflowormapnode whose child has ended, which nothing will ever resume. The last two need an age bound, which the build chooses and states. It writes as the recorded decider of the request, as the door would have: a write with no actor leaves record-change flows that run as the user without an identity, and the same event would behave differently by the path that wrote it.A host with no job service runs no sweep at all (reading 7). Two answers: refuse an approval on a closing field at its first request on such a host, with an error that says what is missing; or reconcile at boot only and say so in the docs. I recommend the refusal. It is the same kind of answer as item 7's check, and the bound of this card cannot be kept on a host where nothing reconciles.
A decision recorded while its run cannot be resumed is rarer than the card's wording suggests, because
#assertRunResumablerefuses the decision before anything is written when the request's own run is gone or its flow was changed. What remains: the race after that check, a check that could not read and let the decision through, an engine without the liveness member, a host with no engine, a parent run that is gone, and a process that dies after the decision row lands.Question 3. How it tells a stop between two steps from one after the last step
Recommended: T2, from a set stamped when the approval opens, and not from a re-read of the flow.
waitor ascreenafter the last step is allowed. After the last decision the resume returns with the run parked there, and no approvals door will ever see that run again. A run parked on a node outside the stamped set is finished, and the door writes the outcome then.end, is finished, subject to N46 below. The conservative error of T2 costs a resubmission. The other error would close a document on an unfinished approval.Question 4. Where the decision of the earlier step stands afterwards
approved, with who decided and when. A line with no actor follows it: the approval did not go on, why, and the value the document was put back torecalledRecommended: a. The document does not carry the earlier decision. The approval is marked abandoned on the request.
#continueRestoredRunrefuses an approval so marked, and its refusal tells the operator to cancel the restored run: without the refusal a later restore would open the next step on a document that has since been reopened, and perhaps submitted again; without the instruction the restore would leave a paused run that nothing continues.Question 5. What the platform then does with the record
At an end between two steps the field holds
pendingand no request is open.recalledwhere the field declares it and the object does not close on it, otherwise the value at submit, the default, or empty, and never a closed value. The submitter is told and submits again. No administrator is needed.#continueRestoredRun, which has none, and an administrator's verb to abandon. ADR-0162 turned down the same picture for a pause.failedrun as dead without asking whether it is repairable.Recommended: a. It is the rule the platform has: a dead run abandons its approval. The door applies it when it can tell, and the reconciler otherwise.
Two details the build pins:
pending.The hold through the passage. Under P nothing holds the record from a decision until the next request opens or the outcome is written. Under D5 as merged that interval is a few store round trips, because the outcome closes the record at once. Under P it is as long as the nodes behind the decision take: a callout, a script, a child flow. An edit that lands there is then closed under "approved", and no approver saw it. ADR-0162 gives that as the reason for ruling 7201405662. So the window is a price of P, and
main's behaviour today is the wrong baseline for it.Recommended: a. Revision 1 of this note recommended b on the ground that nobody is hit today. That does not stand: the field is needed anyway, and after release the hold is harder to add. The hold's card answers two things. What releases it when the process dies: the reconciler, when it judges the mark. And which runs pass it: the pending lock passes the run that opened the request by its run id, and a parent run's nodes carry another, so the pass has to be by the approval's root run.
N46. A failure the flow routes
A flow can route a node's failure and complete without the next step having been asked. On which side of the bound does that fall?
faultedge leads to an end, and the document closes as approved with a step never asked. What remains is a note to authors.Recommended: c′. It refuses more than b and loosens nothing. On this card's parent the maintainer has twice chosen "the platform blocks it" over a note to authors (7201405662, 7205949718), and b's residual is a note to authors. An author who means "handled, go on without the later step" still has a way to say it: handle the failure inside a
try_catchregion and branch on a gateway. A later step that could not open is detected at the plugin's own door, by a durable note on the approval's latest request, so that detection does not depend on how the failure was routed. Four tests pin it: a later step that fails to open with afaultedge to anend(abandoned; the field keeps the put-back value); the same with afaultedge to a second step that opens (in progress;pending); another node that fails between two steps with afaultedge to anend(abandoned); and that node's failure handled in atry_catchregion, after which a gateway ends the flow (finished; the outcome is written).4. What each answer touches
pending#continueRestoredRunTo the maintainer: the choice between P and C, because C loosens an app's rules and P revises a merged record and changes what a user sees during an approval; and the hold, because without it P ships the key with a window D5 as merged did not have. The rest are means the seat can rule. Question 5's answer a is the seat's, and the maintainer should see it beside the cards, because it is the most visible consequence for users. If the seat prefers N46 option b to c′, that choice goes to the maintainer.
Seven things stay keyed to "the object closes on this value of this field", so that an object with no
closedStatesbehaves as it does today: the deferral, the refused first opening, theerrorline and the timeline note, the reconciler's new arms, the host refusal, the refusal in#continueRestoredRun, and the hold.os-decision-facetsapproval-service.tsthat a recorded decision is not rolled back and that the stranded reader reports and never rewrites.5. What shape P changes in ADR-0162
About ten statements, across four sections. None is in the words of a maintainer ruling.
pendingonce more".The revision should also say what becomes of the two conditions. Condition 5's reason is gone under P: a node between two steps is no longer refused by this lock, and keeping the condition tells authors to elevate a flow for no reason, so I would drop it. Condition 6 still has a reason: a pause between two steps would hold a document "in approval" with nobody asked and no verb to end it, so I would keep it and restate why.
It is one Tier H revision, and it comes before the build, as a revision of its own: the build's tests pin the revised statements.
6. Build outline, once ruled
For shape P with the recommended answers. Sizes are estimates. No landed PR of this kind exists to measure against.
pendingat an approval's first request refuses the opening.approvedfires once on such an object, and that a node after a decision readspending.Needs first: item 7's first slice, and item 1's key on the same trunk branch. Tests are the card's "Done when" list, each recording the value the field keeps as question 1's table gives it, plus the pins named in questions 2, 3 and N46.
7. What this note did not establish
map: read from the node's docblock ("sequential and fail-fast"), not run.8. Found beside this card
Two things on
main, both read and not run. Each is a card of its own if the seat confirms it.#notifyDecisionOutcomeasks for a pending request on the decided request's own run. A step decided in asubflowchild, whose parent then opens the next step under another run id, finds none, so the submitter is probably told "approved" while a further step is open.#inspectStrandedRequestsreads 500 unordered rows of every decided request, so on a deployment with more than 500 it stops seeing new strands.objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Released · 2026-11-27T21:21Z — answering triage 7228343677 on the seat mailbox.
This card's design round is done: design note 2 and the maintainer's two rulings are 7210179412 (2026-11-27T04:53Z), and ADR-0162's revision landed (#37817, PR #37829). The build is not in flight: no thread, branch or PR. The maintainer closed the seat's data area for new work at 2026-11-27T15:43Z, so the card goes back to
pm:queue, unassigned.Resume-from: 7210179412. The two side findings in its §8 are already cards and landed (#37806 via PR #37925, #37808 via PR #37952). The build's first step is the note's own: pin readings 3–6 with tests.
64 remaining items
objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z
Maintainer decision · the hour of ruling 7257388557, as built · 2026-11-30T09:46Z
The maintainer (Steve), on the seat's decision card in this seat's project thread at 2026-11-30T09:44:46Z, question 「审批「最多显示审批中一小时」,接受实际最晚约一小时十分吗?」, option picked: 「接受,照现在的实现合并」 (not taken: 「一小时必须是硬上限」).
What is accepted: once the hour has passed, the outcome is written by the next reconciler pass (default every five minutes). If a check read the approval within the hour, that is at most about 1 h 05 min; if none did, one more pass, so at most about 1 h 10 min. This holds for every marked approval, including one that holds a decision back. The rare cases ADR-0162 item 8 names take longer, and nothing is ever written early. This is the reading of seat note 7270603869 with its correction 7272498941 and of PR #38601's hand-off 7273723445. ADR-0162 as merged into the approvals trunk (
45b2fac043) and the build on the trunk (99a6524361) stand as they are. D5's "the hour and one pass of the reconciler more" and the matching Consequences bullet are loose by one sweep against item 8, which is exact. They may be aligned to item 8's wording in a later ADR touch; no rule changes.objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#3 · os-steve · session_01ADHkmPpwJymVUdp5AnRPBq
os-dev-report
{ "issue": 37767, "status": "done", "branch": "claude/project-thread-nmutvp", "pr": "https://github.com/objectstack-ai/objectstack/pull/38746", "head": "dc12b076f5701a043fd2dce4d2e60d2af1acbdac", "gates": [ "dispatch-gates --commands (base 99a6524361): 9 commands, each exit 0; --ran reconciliation: 9 derived, 9 run, 0 NOT-MEASURED", "check-adr-0087-registration --base 99a6524361: 1 declared-breaking changeset, disposition not-required (no-migration-prescription)", "check-tenant-audit-census: exit 0 after --write (plugin-approvals 50 -> 51 write call sites)", "spec check:generated: 14/14 up to date (gen:schema + gen:docs regenerated)", "tests (os-verify-lock, VERDICT command-exit 0 per package run): plugin-approvals 142/142 files 2238 tests; core 166/3927; spec 1009/30550; service-automation 300 files 4451 tests, 1 forced change, that file 21/21 after; runtime 656 files 12400 passed (1 file red on unbuilt @objectstack/embedder-openai, 84/84 after closure build); objectql 643/14554", "typecheck green: plugin-approvals, service-automation, core, runtime, objectql, spec", "dogfood_battery: dc12b076f5 · VERDICT command-exit 0 · Test Files 500 passed | 3 skipped (503) · Tests 4291 passed | 68 skipped (4359) · no failures" ], "line_budget": " 22 files changed, 887 insertions(+), 36 deletions(-) (vs trunk 99a6524361)", "deviations": [ "forced test change outside the named files: packages/services/service-automation/src/runas-user-posture-rung.integration.test.ts (exact toEqual of a root run's data context gains flowRootRunId == flowRunId); subject is resolveRunDataContext (amendment 2)", "spec changeset declared Metadata-protocol: none, patch (flowRootRunId is server-set, per the claim's note); PR body carries semantic (the plugin's changeset)", "generated outputs touched: content/docs/references/data/{data-engine,hook}.mdx, packages/spec/authorable-surface/kernel.json, packages/spec/docs/references/kernel/execution-context.md, docs/audits/.../plugin-approvals.md (census)" ], "files_changed": [ ".changeset/37767-hold-root-run-spec.md", ".changeset/37767-hold-root-run.md", ".changeset/37767-hold.md", "content/docs/automation/approvals.mdx", "content/docs/references/data/data-engine.mdx", "content/docs/references/data/hook.mdx", "docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-approvals.md", "packages/core/src/security/assemble-execution-context.test.ts", "packages/core/src/security/assemble-execution-context.ts", "packages/objectql/src/engine-execution-plumbing.ts", "packages/objectql/src/engine-scoped-context.ts", "packages/plugins/plugin-approvals/src/approval-hold-37767.integration.test.ts", "packages/plugins/plugin-approvals/src/approval-service.ts", "packages/plugins/plugin-approvals/src/lifecycle-hooks.ts", "packages/runtime/src/sandbox/body-runner.ts", "packages/runtime/src/sandbox/script-runner.ts", "packages/services/service-automation/src/runas-user-posture-rung.integration.test.ts", "packages/services/service-automation/src/runtime-identity.ts", "packages/spec/authorable-surface/kernel.json", "packages/spec/docs/references/kernel/execution-context.md", "packages/spec/src/data/hook.zod.ts", "packages/spec/src/kernel/execution-context.zod.ts" ] }objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#3 · os-steve · session_01ADHkmPpwJymVUdp5AnRPBq
Claim: PM loop round (seat card thread) · handover from
repo:objectstack#2(release 7272899889) · amendment 4: two tests the new provenance key forces (seat ruling (5), relayed to the card thread)Provenance: the maintainer (Warren,
os-warren), verbatim 「审批专题第 5 块 以及后续让 3号座位接手」, os-warren's fleet project timeline, 2026-11-30T08:23Z; released to this seat in 7272899889 and knocked on #38600 (7272938727). Picked-up work is UNVERIFIED until this seat's card thread re-reads it at its head.Session:
session_01ADHkmSAjFEZHRpRq3WCj6zThread session:
session_01ADHkmPpwJymVUdp5AnRPBqAccount:
os-steveBranch:
claude/project-thread-nmutvp(cut from the trunkclaude/o5-data-approvals-trunkat99a6524361; base is that trunk;Part of #37767)Worktree:
objectstack(the card thread's own container)Domain:
domain:serverSeat:
repo:objectstack#3Area:
o3-DFile surface: piece 5, the hold (design note 7210179412 §5 option a, §6 step 5):
packages/plugins/plugin-approvals/src/(approval-service.ts,approvals-plugin.ts, the approval lock and its release by the reconciler,translations/**if a sentence is added, new test files named for 37767), the record-write guard the lock is read by if it is outside the plugin (named by the thread before code, by claim amendment),content/docs/automation/approvals.mdx(§6 step 6, as far as piece 4's guide text has not covered it),docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-approvals.mdif the count moves,.changeset/37767-hold*.md. Stop on breach; explain in the report. Not in this round: #38601 (seat 2's dev thread pushes its S2 fix; this seat owes the delta review, ACCEPT and hand-off), the trunk →mainPR #38497 (claimed by amendment after piece 5 and #38601), #38691 and #38708 (pm:blocked). Plus, by amendment 2 (the thread's R1, 08:43Z: the ADR's "the approval's own root run passes" needs a write to carry its root run, which today onlyprovenance.flowRunIddoes):packages/spec/src/kernel/execution-context.zod.tsandpackages/spec/src/data/hook.zod.ts(one new optional server-set provenance key,flowRootRunId, provenance only, the same meaning asflowRunId),packages/core/src/security/assemble-execution-context.ts(its non-entry field list),packages/objectql/src/engine-execution-plumbing.ts(buildProvenance),packages/objectql/src/engine-scoped-context.ts(stripped whereflowRunIdis),packages/services/service-automation/src/runtime-identity.ts(both arms copy$rootRun.runId),packages/runtime/src/sandbox/body-runner.ts(the sandbox's provenance projection),packages/runtime/src/sandbox/script-runner.ts(amendment 3:ScriptContext.provenancedeclaresflowRootRunId?: string, and the comment naming the members projected; type and comment only), their tests, the generated outputs and baselines they move, and a changeset per touched package under.changeset/37767-hold*.md. Plus, by amendment 4:packages/services/service-automation/src/runas-user-posture-rung.integration.test.ts(an exacttoEqualof a root run's data context now carriesflowRootRunId; seat ruling (5) accepted the edit) andpackages/cli/test/lowered-body-face-enumeration.test.ts(its pin of the provenance members on the in-process and the body face gainsflowRootRunId, the member the spec adds; same class, read on CI atdc12b076f5). Seat's name ruling:flowRootRunId(notrootFlowRunId/flowRunRootId): it sorts besideflowRunIdand names the column the plugin already keeps (root_run_id).Container & model: L, mode:thread, model: default, effort: high
Clause-②: yes (narrowing), expected for the hold (a write of the closing field during an approval that the record took before is refused); the new provenance key is a widening on
@objectstack/spec. The thread confirms both on its measured face and the seat rules on the report.Metadata-protocol: to be declared by the thread (the new key is server-set, not authorable).
Responsibility:
the approvals plugin (packages/plugins/plugin-approvals), so a platform card carries it | no platform path covers it: a closing field can be written between submission and the end of the approval | any app that declares closedStates and an approval step that writes the closing fieldThread-read: 7275825509
Also read: 7272899889 (release, full state), 7272787691 (trunk note), 7272498941 (seat note correction), 7210179412 (design note rev. 2).
Premise: holds as handed over; the thread re-measures the trunk at its head before code and reports a moved fact rather than building over it.
Prior rulings read: design note 7210179412 as ruled (shape P, §5 option a); 7257388557 (pending at most an hour) with seat readings 7257555103, 7258590209, 7269166540; 7268216330 (stated limit); 7257604888 (split). No conflict.
Pre-claim lane:
domain:server(the plugin).Pre-claim deps: pieces 2, 3, 4 on the trunk (#38443, #38540, #38618 at
99a6524361).Check-handover:
--inflighton the seven added paths reads one overlap, #37909's claim 7271244572, whose line sayspackages/services/service-automation"is not touched"; same seat, no real overlap (#37909 PR 2 names no service-automation file).objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#3 · os-steve · session_01ADHkmPpwJymVUdp5AnRPBq
Claim: PM loop round (seat card thread) · handover from
repo:objectstack#2(release 7272899889) · amendment 5: the hook-body docs row for the new provenance key (seat ruling, relayed to the card thread)Provenance: the maintainer (Warren,
os-warren), verbatim 「审批专题第 5 块 以及后续让 3号座位接手」, os-warren's fleet project timeline, 2026-11-30T08:23Z; released to this seat in 7272899889 and knocked on #38600 (7272938727). Picked-up work is UNVERIFIED until this seat's card thread re-reads it at its head.Session:
session_01ADHkmSAjFEZHRpRq3WCj6zThread session:
session_01ADHkmPpwJymVUdp5AnRPBqAccount:
os-steveBranch:
claude/project-thread-nmutvp(cut from the trunkclaude/o5-data-approvals-trunkat99a6524361; base is that trunk;Part of #37767)Worktree:
objectstack(the card thread's own container)Domain:
domain:serverSeat:
repo:objectstack#3Area:
o3-DFile surface: piece 5, the hold (design note 7210179412 §5 option a, §6 step 5):
packages/plugins/plugin-approvals/src/(approval-service.ts,approvals-plugin.ts, the approval lock and its release by the reconciler,translations/**if a sentence is added, new test files named for 37767), the record-write guard the lock is read by if it is outside the plugin (named by the thread before code, by claim amendment),content/docs/automation/approvals.mdx(§6 step 6, as far as piece 4's guide text has not covered it),docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-approvals.mdif the count moves,.changeset/37767-hold*.md. Stop on breach; explain in the report. Not in this round: #38601 (seat 2's dev thread pushes its S2 fix; this seat owes the delta review, ACCEPT and hand-off), the trunk →mainPR #38497 (claimed by amendment after piece 5 and #38601), #38691 and #38708 (pm:blocked). Plus, by amendment 2 (the thread's R1, 08:43Z: the ADR's "the approval's own root run passes" needs a write to carry its root run, which today onlyprovenance.flowRunIddoes):packages/spec/src/kernel/execution-context.zod.tsandpackages/spec/src/data/hook.zod.ts(one new optional server-set provenance key,flowRootRunId, provenance only, the same meaning asflowRunId),packages/core/src/security/assemble-execution-context.ts(its non-entry field list),packages/objectql/src/engine-execution-plumbing.ts(buildProvenance),packages/objectql/src/engine-scoped-context.ts(stripped whereflowRunIdis),packages/services/service-automation/src/runtime-identity.ts(both arms copy$rootRun.runId),packages/runtime/src/sandbox/body-runner.ts(the sandbox's provenance projection),packages/runtime/src/sandbox/script-runner.ts(amendment 3:ScriptContext.provenancedeclaresflowRootRunId?: string, and the comment naming the members projected; type and comment only), their tests, the generated outputs and baselines they move, and a changeset per touched package under.changeset/37767-hold*.md. Plus, by amendment 4:packages/services/service-automation/src/runas-user-posture-rung.integration.test.ts(an exacttoEqualof a root run's data context now carriesflowRootRunId; seat ruling (5) accepted the edit) andpackages/cli/test/lowered-body-face-enumeration.test.ts(its pin of the provenance members on the in-process and the body face gainsflowRootRunId, the member the spec adds; same class, read on CI atdc12b076f5). Plus, by amendment 5:content/docs/automation/hook-bodies.mdx(itsctx.provenancemember table gains theflowRootRunIdrow; the seat ruled the docs for a key this PR adds land with it). Seat's name ruling:flowRootRunId(notrootFlowRunId/flowRunRootId): it sorts besideflowRunIdand names the column the plugin already keeps (root_run_id).Container & model: L, mode:thread, model: default, effort: high
Clause-②: yes (narrowing), expected for the hold (a write of the closing field during an approval that the record took before is refused); the new provenance key is a widening on
@objectstack/spec. The thread confirms both on its measured face and the seat rules on the report.Metadata-protocol: to be declared by the thread (the new key is server-set, not authorable).
Responsibility:
the approvals plugin (packages/plugins/plugin-approvals), so a platform card carries it | no platform path covers it: a closing field can be written between submission and the end of the approval | any app that declares closedStates and an approval step that writes the closing fieldThread-read: 7276035950
Also read: 7272899889 (release, full state), 7272787691 (trunk note), 7272498941 (seat note correction), 7210179412 (design note rev. 2).
Premise: holds as handed over; the thread re-measures the trunk at its head before code and reports a moved fact rather than building over it.
Prior rulings read: design note 7210179412 as ruled (shape P, §5 option a); 7257388557 (pending at most an hour) with seat readings 7257555103, 7258590209, 7269166540; 7268216330 (stated limit); 7257604888 (split). No conflict.
Pre-claim lane:
domain:server(the plugin).Pre-claim deps: pieces 2, 3, 4 on the trunk (#38443, #38540, #38618 at
99a6524361).Check-handover:
--inflighton the seven added paths reads one overlap, #37909's claim 7271244572, whose line sayspackages/services/service-automation"is not touched"; same seat, no real overlap (#37909 PR 2 names no service-automation file).feat(approvals)!: on an object that declares closedStates, the docume…
objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z
Claim: PM loop round (seat card thread) · amendment 6: the trunk →
mainstep (#38497), after piece 5 (#38746) merged into the trunkSession:
session_01ADHkmSAjFEZHRpRq3WCj6zThread session:
session_01ADHkmPpwJymVUdp5AnRPBqAccount:
os-steveBranch: a new branch in the card thread's container, cut from the trunk
claude/o5-data-approvals-trunkat6e17a6a8e6, carrying one merge oforigin/main(95a49adb80or later); its PR's base is the trunk;Part of #37767. The trunk itself is written only through that PR.Worktree:
objectstack(the card thread's own container)Domain:
domain:serverSeat:
repo:objectstack#3Area:
o3-DFile surface:
content/docs/permissions/system-context.mdx,packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts,packages/objectql/src/engine-delete-and-aggregate.ts,packages/objectql/src/engine-update.ts,packages/platform-objects/src/apps/translations/object-collapsed-sections-echo-decisions.test.ts,packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts,packages/spec/liveness/state-counts/object.md(the seven filesgit merge-treereports in conflict between95a49adb80and6e17a6a8e6; each conflict is resolved keeping both sides' meaning, no new behaviour), plus the generated outputs and baselines the merged tree moves (regenerated, not hand-edited). Any other hand edit ⇒ stop and report (stop on breach; explain in the report).Plan: (1) merge
origin/maininto the new branch, resolve, regenerate, full local gates; (2) PR into the trunk; L1-b reviews the conflict resolutions; the trunk PR lands like piece 5 (the maintainer's hand on a narrowing trunk); (3) on #38497 at the refreshed head: labelneeds:dogfood-battery, CI and the battery green, the seat's CONTRACT_REVIEW_TIER review from a session that implemented no slice (seat 5's gate 7254288859: "the seat names the reviewer"), then the seat flips #38497 out of draft and hands it off to os-zhuang (Tier H). #38425 (skills follow-up, p3,pm:blocked) stays after.Container & model: L, mode:thread, model: default, effort: high
Clause-②: yes (narrowing), the trunk's own declaration on #38497; the merge commit adds none.
Metadata-protocol: unchanged from #38497's body (added).
Responsibility: unchanged from amendment 5.
Premise: everything seat 5's gate 7254288859 required onto the trunk before hand-off is merged: piece 4 (#38618), piece 5 (#38746), #37766 slice D (#38563), N45 (#38562); #38425 is the post-merge follow-up its gate allows.
Prior rulings read: as amendment 5; seat 5 gate 7254288859. No conflict.
objectstack-fleet commentedon Dec 1, 2026
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z
2026-12-01T02:36Z · Seat
repo:objectstack#3closes this card as completed. Every step of design note 7210179412 is onmain, released in PR #38810 (merged,440574f62c):content/docs/automation/approvals.mdxsays what the author and the admin see in each case, that anapprovedflow fires once on such an object, and that a node after a decision readspending(fix(approvals): a refused status-mirror write on a closing field is reported, and refuses an approval's first opening (ADR-0162 item 8) #38443, feat(approvals): on a closing field, an approval's decision is written when the approval is over (ADR-0162 item 8, slice 3) #38540, feat(approvals): piece 4 — a step records the child runs it started, and the reconciler finishes an approval whose flow stopped (ADR-0162 item 8) #38618, fix(approvals): the reconciler keeps a run as ended only with every child read, and reaches a decision in a child run (ADR-0162 item 8) #38634, feat(approvals)!: on an object that declares closedStates, the document is held for the whole approval (ADR-0162 D5, #37767 piece 5) #38746).Follow-ups stay on their own cards: 37767 后续:审批读取的 fan-out 判断与引擎注释收尾(N14–N17、N23、stopOf) #38691 and 37767 后续:引擎标出正在推进的运行,让审批清理不把恢复中的运行当成已停 #38708.
docs(adr): ADR-0162 revised on two rulings of 2026-11-27: a closing o…
fix(approvals): a step decided in a subflow child no longer tells the…
fix(approvals): the stranded-request inspection keeps finding new str…
feat(pm): round-open.mjs and check-handover --inflight read the round…
feat(objectql)!: a record in a closed state, and its lines, are close…