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.
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Claim: PM loop round 10 · 2026-11-29T01:06Z
Picked from
pm:queueon the maintainer's order in this seat's project, verbatim: 「开一个专区,接手 area:data 并发3」 (area declaration 7247668950).Session:
session_01L6bhgV6i8jfWwSXjpWJrjAThread session:
session_01L6bhgX7z5dcSkTqEAWNMsPAccount:
os-salesBranch:
claude/project-thread-75nte3(fromclaude/project-thread-yxhepsat5d8b45b7, the #37768 trunk; the draft PR's base is that trunk, nevermain)Domain:
domain:serverSeat:
repo:objectstack#2Area:
s2-dataFile surface:
packages/plugins/plugin-approvals(the approval service's mirror write and the open path) and its tests; one changeset. Not the data engine's write path, which slice B of #37768 builds on the trunk.Container & model:
M,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate",effort: high(reason: the thread session serves effort high)Clause-②: no (no published schema or export changes; if the build adds an error code or an export, the thread reports it and the seat amends this line)
Metadata-protocol: none
Responsibility: design note 2 (7210179412) §7 first: tests that pin readings 3–6 as they stand; then §6 piece 2: a refused write of the status mirror on a closing field is no longer swallowed, and an approval whose first request's pending write is refused does not open. Question 3's T2 and N46 c′ need slice B of item 7 (#37766) and are not in this claim.
Thread-read: 7228385149
Serial constraints cleared: no open PR of this seat edits these files (seat read); the thread runs
scripts/pm/overlap-check.mjsbefore its first push.The PR says
Part of #37767.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-sales · session_01L6bhgX7z5dcSkTqEAWNMsP
os-dev-report
{ "issue": 37767, "status": "done", "branch": "claude/project-thread-75nte3", "pr": "https://github.com/objectstack-ai/objectstack/pull/38443", "session": "session_01L6bhgX7z5dcSkTqEAWNMsP", "premise_still_valid": true, "summary": "As claimed (7248563615), head bda8482bf, base claude/project-thread-yxheps at 5d8b45b7 (the #37768 trunk; the PR targets it, never main). Two parts. (1) Design note §7: readings 3-6 pinned as they stand, test-only, on an object with no closed state; all four held as read (node after a decision strands, field keeps approved; NO_APPROVERS and DUPLICATE_REQUEST strand unrouted and complete down a fault edge with the step never asked; a parent cancelled above a pending child leaves the decision admitted, a clean door answer and one warn line, the parent's next step never asked; the dead-run sweep changes nothing after any). (2) Design note §6 piece 2: on a field the object closes on at approved or rejected, mirrorStatusField no longer swallows a refused write. At an approval's first request the pending is written right after the row; a refusal voids the row as cancelled, empties the approver index, notes the timeline and fails the run with the app's own message (no lock taken). Every other refused write is reported: error line, actor-less timeline line with the refusal's message, notice to the organization's administrators under the new topic approval.status_mirror_refused (keyed text in all 11 shipped locales; topic added to service-messaging's PLATFORM_NOTIFICATION_TOPICS). Objects with no closed state keep the old warn. Deviation from the claimed file surface: one line in packages/services/service-messaging (the topic list, which every fixed approval topic is on), plus two regenerated ledgers (tenant-audit census, engine-double ledger). No new error code and no new export: Clause-② no, Metadata-protocol none hold. Small decisions taken by the thread are listed in the PR's Acceptance notes (how 'first request' is read before item 7 slice B exists; a refused first opening logs warn and notifies nobody because the caller is told).", "tests": "plugin-approvals full vitest under the verify lock at 2953b1ba: Test Files 133 passed, Tests 2002 passed, VERDICT command-exit 0 (bda8482bf only regenerates two ledgers). New: approval-mirror-unfinished-readings.test.ts 6 passed; status-mirror-closing-field-refusal.integration.test.ts 8 passed. Reverse verification: approval-service.ts restored to 5d8b45b7 (committed fix first) -> 7 of 8 refusal tests fail, the control and the 6 reading pins pass; restored from HEAD -> 14 passed. service-messaging src/preference-options: 9 passed.", "gates": "pnpm --filter @objectstack/plugin-approvals typecheck exit 0 (check:test-typecheck OK, no new debt). eslint --no-inline-config on the 5 changed source files exit 0. overlap-check --base trunk: clean, 0 PR heads. dispatch-gates --commands fed the branch's own file list (deviation: the shallow checkout had no merge base with origin/main, so the script could not derive it): 71 run; first pass 64 green; check:tenant-audit-census and check:engine-double-contract red on generated ledgers this diff moves -> regenerated with --write, committed bda8482bf, green; check-adr-0087-registration and check-changeset-no-major refused on the shallow clone, green after git fetch --deepen=300; check:query-options-erasure exit 0. NOT MEASURED locally (prerequisite not met, CI runs them): check:i18n (workspace CLI not built), check:dual-build-cjs-loads (packages not built), check-plugin-teardown-shape --self-test (pinned fixture below the shallow graft). PR check-runs: not yet read at report time.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — fleet-write relay pr_create (#38443, with assignee os-sales; body read back identical, 11041 bytes); this report comment via post-stamped. git push x2 (not REST).", "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": ["carrier: none · noted, not filed: the session-context step 'request os-sales's review' was not sent, because the fleet-write header says the seat's own account is never requested on a pull as a reviewer; the seat hands off."] }objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Claim amendment · 2026-11-29T01:57Z · amends claim 7248563615
Writes: File surface, as the build measured it: beside
packages/plugins/plugin-approvals(the approval service, its translations and two test files), one row inpackages/services/service-messaging/src/preference-options.tsfor the new administrator notification topicapproval.status_mirror_refused, and two regenerated ledgers (docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-approvals.md,scripts/engine-double-contract.pinned.json). No error code or export is added, soClause-②: noandMetadata-protocol: nonestand. Every other line of the claim stands.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Landed (part) and handed back · 2026-11-29T03:49Z
PR #38443 (
Part of #37767) merged into #37768's trunkclaude/project-thread-yxhepsat 2026-11-29T03:47Z (trunk headbfe2df88b), on the seat's ACCEPT (7249695759) and the maintainer's choice; it is not onmain.closedStatescloses the status field atapprovedorrejected, a refused write of the status mirror is no longer swallowed. A refused firstpendingvoids the request ascancelledand fails the run with the app's own message, no lock taken; any other refused mirror write logs an error, writes a timeline line with no actor, and notifies the organization's administrators (approval.status_mirror_refused). Objects withoutclosedStatesbehave as before. Contract review 7249166202 PASS.Left on this card: design note pieces 3 and 5 (show
approvedonly once the whole approval is over; hold the lock from submission to the end, per the maintainer's rulings in 7210179412), and question 3's T2 and N46 c′, which need #37766's slice B. Review 7249166202 carries O1 (the trunk must not reachmainbefore piece 3 lands), O2 (afaultedge on the first node routes around the refusal; cover it) and O3 (a throw inside the voiding write replaces the app's message).Release: the maintainer closed this seat's data area after the cards in hand (「当前任务处理完,合并后就下班」, 2026-11-29T01:59Z) and chose to hand back at a clean point (2026-11-29T03:47Z). Resume-from:
claude/project-thread-yxhepsatbfe2df88b; the next piece branches from the trunk and lands into it, as piece 2 did.