You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
review follow-ups of PR #37726: the approvals skill does not say what a deleted pending record leaves of its parked flow run #37763
Filing gate: ① (review follow-ups, one card per PR) · Source: fleet (Contract review records 7207215155 and 7207498375 on PR #37726, an ungraded note adopted at ACCEPT)
What happens
PR #37726 (Fixes #37713) teaches, in skills/objectstack-automation/references/state-machines-and-approvals.md, that deleting a pending record still lands, cancels the approval request and cascades its master_detail rows. The review noted one thing the skill does not say: the delete cancels the request, but it neither resumes nor cancels the flow run parked on that approval. So neither the flow's approve branch nor its reject branch runs, and the run stays parked.
Decide the platform side. Is a run left parked on a request its record's delete cancelled intended (plugin-approvalscancelForDeletedRecord, and the flow run's resume path)? If not, file the fix (cancel or fail the parked run). If it is, say so in the approvals docs.
Teach the outcome. Once the platform side is settled, the skill says in one clause what an author's flow sees after such a delete, within the token ceiling.
Category ①: a behaviour the shipped skill leaves untaught, possibly a platform gap.
Priority: p3 (a delete of a pending record is rare and visible; the run's state does not change any data).
Business reason: an author whose approval flow sends a notification or updates another record on reject will see nothing happen when the record is deleted mid-approval, and no doc says why.
Reader: the automation lane, or the area that next touches plugin-approvals cancellation.
Dedupe: searched open issues for "PR #37726": 0 hits.
Related: #37713, #37529, PR #37726, PR #37707.
Grade
area:ai · Bug · minor · reach: read (the plugin on main) · evidence: read → p3
Triage: lands in area:ai · domain:skills · Task · priority:p2 · pm:queue · size XS; rationale: the approvals skill does not say what a deleted pending record leaves behind. A skill omission is p2 (filed p3), even though the case is rare.
Maintainer ruling · 2026-11-28T10:33Z · #37763 · option A — a record delete cancels the parked flow run
The maintainer picked option A on this seat's decision card at 2026-11-28T10:30Z, after an analysis written at the ceiling tier and reviewed independently at the same tier.
The ruling: when a record delete voids an in-flight approval request (#13568, PR #14061), the flow run parked on that request is cancelled in the same step. Its end state is cancelled, with the reason that the record was deleted. Neither the approve nor the reject branch runs. The delete is never refused for it (#13568 stands), and a failed cancel never fails the delete; it degrades to today's warning. If the run is one item of a batch approval, the parent batch is woken to continue with the next item, as the revision-window withdrawal already does (PR #28228).
Premises the dev verifies before writing, each with a reading: ① cancelling a run parked on an approval node succeeds and leaves no other state; ② for a batch item, the existing wake-the-parent path moves the batch on; ③ when the approval node sits inside a subflow, the parent stays parked after the child is cancelled (read from the code, not run), and cancelling up the subflow chain with the existing cancel alone is possible. ⛔ If ① or ② fails, or ③ needs a new contract surface, report a fork; ⛔ do not force it, do not fall back to docs only, do not resume down the reject branch.
Sub-question 1 (default): an approval node inside a subflow cancels the parent chain too, with the same reason; ⛔ no resume is sent to a subflow parent (it would read as the subflow completing).
Sub-question 2 (ruled with the option): runs already parked by deletes before this lands are not cleaned up automatically. Administrators cancel them by hand; the docs say how to find them (the approval request is cancelled with the record-deleted reason and names its run).
Landing: one services PR (the approval delete hook, the existing "must not cancel" test rewritten, a batch-item case), then one sentence each in the approvals skill (the page is at its ceiling: pay for it with a cut on the same page) and the approvals guide. This unlocks the card's second checkbox.
Claim: PM loop round 7 · 2026-11-28T10:39Z
Picked out of the decision box on the maintainer's ruling, option A, recorded on this card. The maintainer in this seat's project, verbatim: 「ai 并发10」.
Ruling-ref: 7237973760
Session: session_01L6bhgV6i8jfWwSXjpWJrjA
Thread session: session_01L6bhgUpmvWke9Z2P4VKvaD
Account: os-sales
Branch: claude/project-thread-sz9xxz (from main)
Domain: domain:server
Seat: repo:objectstack#2
Area: s2-ai
File surface: packages/plugins/plugin-approvals/src/lifecycle-hooks.ts (the record-delete hook that voids an in-flight request) and the service call it makes to cancel the parked run; the existing "must not cancel" test rewritten, a batch-item case and a subflow case; packages/services/service-automation/src/run-resume.ts only if cancelling up the subflow chain needs it; then one sentence in skills/objectstack-automation/references/state-machines-and-approvals.md (paid for by a cut on the same page) and one in the approvals guide; changesets.
Container & model: M, mode:thread, model: fable — dispatch-gates.mjs --tier: MANDATORY skills/** (clause ①, no one-line exit); the thread session serves opus, so per 定档 「不达档起隔离达档子代理」 the write under skills/** is made by an isolated fable sub-agent the thread starts, its served model read with verify-review-tier.mjs before push; no fable ⇒ the thread waits (等档). The services code is built at the default tier. effort: high
Clause-②: no
Metadata-protocol: none
Responsibility: a record delete that voids an in-flight approval request ends the flow run parked on it as cancelled, with the reason, instead of leaving it paused forever.
Thread-read: none
Premise: the ruling's three premises are read before any write, each with a reading: ① cancelling a run parked on an approval node succeeds and leaves no other state; ② a batch item's parent moves on through the existing wake-the-parent path (PR #28228); ③ inside a subflow the parent stays parked after the child is cancelled, and cancelling up the chain needs only the existing cancel. ⛔ ① or ② failing, or ③ needing a new contract surface ⇒ a fork to this seat; no forcing, no docs-only fallback, no resume down the reject branch. Runs parked before this lands are not cleaned up (ruled).
Serial constraints cleared: open PR #38001 edits run-resume.ts; this card edits it only if premise ③ needs it, and then rebases on whichever lands first. No other open PR edits these files (seat read).
skills/** is Tier H: L2 at the contract-review tier, then the maintainer. The PR says Fixes #37763.
Writes: Clause-②: yes (widening) for the services PR #38293. ApprovalService, exported from @objectstack/plugin-approvals' root, answers cancelForDeletedRecord with one more member, cancelledRuns; suspendedRuns keeps its documented meaning (the suspended runs left behind). patch and Metadata-protocol: none stand. The skills and guide PR #38295 stays Clause-②: no. The second PR's branch is claude/project-thread-sz9xxz-skills. Every other line of the claim stands.
Reason: the declaration review on PR #38293 (7238672789, FAIL, must-fix on the Clause-②: line) found the widening; the claim's no was the seat's misreading.
{
"issue": 37763,
"status": "done",
"round": "2 - code PR #38293 head e103c2e0 answers contract review 7238672789 (M1, S1, N1, N2), delta PASS 7238779008; docs PR #38295 head 4fdcc1aa (Tier H) answers 7238666618 observation and 7238784724 S1",
"branch": "claude/project-thread-sz9xxz (code, Refs) + claude/project-thread-sz9xxz-skills (skills + guide, Fixes)",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38293 ; https://github.com/objectstack-ai/objectstack/pull/38295",
"session": "session_01L6bhgUpmvWke9Z2P4VKvaD",
"premise_still_valid": true,
"summary": "Ruling A (7237973760) implemented in plugin-approvals only. cancelForDeletedRecord voids every pending request of the deleted record as before, then cancels the run each request gated through the engine's existing cancelRun with the reason 'approval request ID was cancelled because the record it is about was deleted'; neither approve nor reject runs. A subflow chain on the same record is found with existing reads (the request row's record_run_id is the top, then suspensionOf correlations subflow:/map: down to flow_run_id) and cancelled deepest first, never resumed; a map item's batch is read before the cancel (batchAboveItem) and woken after it (resumeBatchOfRecalledItem, now with a cause). A failed cancel never fails the delete: the run stays parked, logged at error and named in the summary warn and suspendedRuns. The answer gains cancelledRuns, so Clause-② yes (widening), patch. Round 2: no record_run_id stays silent per the seat's S1 ruling (texts and test aligned, no-log pinned); the docblock describes a false cancelRun answer exactly; with no cancelRun the delete path logs in its own words (pinned). Premises measured before writing on main f19350b4 with a probe kept at /mnt/project-files/37763/ (5/5). No change in service-automation, run-resume.ts or packages/spec. The skill sentence and guide sentences are in #38295 (fable-written, verify-review-tier PASS), which merges after #38293.",
"tests": "New describe in batch-item-recall-resumes-batch.test.ts (real AutomationEngine + ApprovalService), 7 cases: flat run, batch item, three-level subflow chain, batch item whose sign-off is in a subflow, no record_run_id (no log), suspensionOf throws, cancelRun throws. record-delete-cancel.integration.test.ts (real ObjectQL + SQLite, real delete hook): the old must-not-cancel pin rewritten to the ruling; new cases for a rejecting cancelRun and for an engine with no cancelRun. Reverse check at 948f4494: approval-service.ts at main gives 8 failed / 21 passed in the two files, head 29/29. At e103c2e0: the two files 30/30; whole package under the verify lock 131 files, 1988 tests passed; typecheck exit 0; eslint on the four changed files exit 0.",
"gates": "dispatch-gates.mjs --ran at 948f4494: 72 derived, 69 run each exit 0, 3 NOT-MEASURED exit 3 (check-plugin-teardown-shape --self-test: fixture commit outside the shallow clone; check:dual-build-cjs-loads and check:i18n: dists of packages not built here), 0 UNRUN; round 2 touches the same four files and re-ran the package suite, typecheck and eslint. #38295 at 8001d106: 62 families, 58 exit 0, 4 NOT-MEASURED exit 3 (whole-repo dist readers); skills token ratchet 5927/5927 exit 0; the later two commits touch only content/docs/automation/approvals.mdx. CI at #38293 e103c2e0: 57 check-runs, 38 success, 18 skipped, 0 failed, 0 pending; the one cancelled run is a superseded PR-body guards run whose rerun is success. CI at #38295 4fdcc1aa when this was written: 31 success, 17 skipped, 0 failed, Test Core (1/10) in progress, one superseded PR-body guards run cancelled.",
"dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0 writes",
"api_writes": "fleet-write relay: pr_create #38293, pr_create #38295, issue_patch #38293 x2 (r2, r3), issue_patch #38295 x3 (r2, r3, r4); this os-dev-report comment (POST issues/37763/comments)",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"none filed - runs parked by deletes before this release are not cleaned up (ruling), the changeset and the guide say how an administrator finds them (request cancel_reason record_deleted, flow_run_id, run still paused)"
]
}
Both PRs of this card merged at 2026-11-28T12:59Z through the merge queue: #38293 (behaviour, on the seat's ACCEPT 7239048902) and #38295 (skill and guide, Tier H, on the maintainer's approval after the seat's ACCEPT 7239085736), whose Fixes line closed this card. What changed, per the maintainer's ruling A (7237973760):
Deleting a record whose approval request is in flight now also ends the flow run parked on it as cancelled, with the reason that the record was deleted, deepest subflow run first; a batch item's batch moves on through the existing wake path. A failed cancel leaves those runs named in the log and the delete still goes through.
The automation skill and the approvals guide teach it, and the guide says how to find runs parked before the fix (still paused) and cancel them by hand.
Neither was ejected. pm:dispatched is cleared on this card, and pm:awaiting-merge on #38295.
Activity
objectstack-fleet commentedon Nov 27, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ai · domain:skills · Task · priority:p2 ·
pm:queue· size XS; rationale: the approvals skill does not say what a deleted pending record leaves behind. A skill omission is p2 (filed p3), even though the case is rare.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Maintainer ruling · 2026-11-28T10:33Z · #37763 · option A — a record delete cancels the parked flow run
The maintainer picked option A on this seat's decision card at 2026-11-28T10:30Z, after an analysis written at the ceiling tier and reviewed independently at the same tier.
The ruling: when a record delete voids an in-flight approval request (#13568, PR #14061), the flow run parked on that request is cancelled in the same step. Its end state is cancelled, with the reason that the record was deleted. Neither the approve nor the reject branch runs. The delete is never refused for it (#13568 stands), and a failed cancel never fails the delete; it degrades to today's warning. If the run is one item of a batch approval, the parent batch is woken to continue with the next item, as the revision-window withdrawal already does (PR #28228).
Premises the dev verifies before writing, each with a reading: ① cancelling a run parked on an approval node succeeds and leaves no other state; ② for a batch item, the existing wake-the-parent path moves the batch on; ③ when the approval node sits inside a subflow, the parent stays parked after the child is cancelled (read from the code, not run), and cancelling up the subflow chain with the existing cancel alone is possible. ⛔ If ① or ② fails, or ③ needs a new contract surface, report a fork; ⛔ do not force it, do not fall back to docs only, do not resume down the reject branch.
Sub-question 1 (default): an approval node inside a subflow cancels the parent chain too, with the same reason; ⛔ no resume is sent to a subflow parent (it would read as the subflow completing).
Sub-question 2 (ruled with the option): runs already parked by deletes before this lands are not cleaned up automatically. Administrators cancel them by hand; the docs say how to find them (the approval request is cancelled with the record-deleted reason and names its run).
Landing: one services PR (the approval delete hook, the existing "must not cancel" test rewritten, a batch-item case), then one sentence each in the approvals skill (the page is at its ceiling: pay for it with a cut on the same page) and the approvals guide. This unlocks the card's second checkbox.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Claim: PM loop round 7 · 2026-11-28T10:39Z
Picked out of the decision box on the maintainer's ruling, option A, recorded on this card. The maintainer in this seat's project, verbatim: 「ai 并发10」.
Ruling-ref: 7237973760
Session:
session_01L6bhgV6i8jfWwSXjpWJrjAThread session:
session_01L6bhgUpmvWke9Z2P4VKvaDAccount:
os-salesBranch:
claude/project-thread-sz9xxz(frommain)Domain:
domain:serverSeat:
repo:objectstack#2Area:
s2-aiFile surface:
packages/plugins/plugin-approvals/src/lifecycle-hooks.ts(the record-delete hook that voids an in-flight request) and the service call it makes to cancel the parked run; the existing "must not cancel" test rewritten, a batch-item case and a subflow case;packages/services/service-automation/src/run-resume.tsonly if cancelling up the subflow chain needs it; then one sentence inskills/objectstack-automation/references/state-machines-and-approvals.md(paid for by a cut on the same page) and one in the approvals guide; changesets.Container & model:
M,mode:thread,model: fable — dispatch-gates.mjs --tier: MANDATORY skills/** (clause ①, no one-line exit); the thread session serves opus, so per 定档 「不达档起隔离达档子代理」 the write underskills/**is made by an isolated fable sub-agent the thread starts, its served model read withverify-review-tier.mjsbefore push; no fable ⇒ the thread waits (等档). The services code is built at the default tier.effort: highClause-②: no
Metadata-protocol: none
Responsibility: a record delete that voids an in-flight approval request ends the flow run parked on it as cancelled, with the reason, instead of leaving it paused forever.
Thread-read: none
Premise: the ruling's three premises are read before any write, each with a reading: ① cancelling a run parked on an approval node succeeds and leaves no other state; ② a batch item's parent moves on through the existing wake-the-parent path (PR #28228); ③ inside a subflow the parent stays parked after the child is cancelled, and cancelling up the chain needs only the existing cancel. ⛔ ① or ② failing, or ③ needing a new contract surface ⇒ a fork to this seat; no forcing, no docs-only fallback, no resume down the reject branch. Runs parked before this lands are not cleaned up (ruled).
Serial constraints cleared: open PR #38001 edits
run-resume.ts; this card edits it only if premise ③ needs it, and then rebases on whichever lands first. No other open PR edits these files (seat read).skills/**is Tier H: L2 at the contract-review tier, then the maintainer. The PR saysFixes #37763.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Claim amendment · 2026-11-28T11:38Z · amends claim 7238037976
Writes:
Clause-②: yes (widening)for the services PR #38293.ApprovalService, exported from@objectstack/plugin-approvals' root, answerscancelForDeletedRecordwith one more member,cancelledRuns;suspendedRunskeeps its documented meaning (the suspended runs left behind).patchandMetadata-protocol: nonestand. The skills and guide PR #38295 staysClause-②: no. The second PR's branch isclaude/project-thread-sz9xxz-skills. Every other line of the claim stands.Reason: the declaration review on PR #38293 (7238672789, FAIL, must-fix on the
Clause-②:line) found the widening; the claim'snowas the seat's misreading.fix(approvals): declare the delete-cancel answer a widening; align th…
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#2 · os-sales · session_01L6bhgUpmvWke9Z2P4VKvaD
os-dev-report
{ "issue": 37763, "status": "done", "round": "2 - code PR #38293 head e103c2e0 answers contract review 7238672789 (M1, S1, N1, N2), delta PASS 7238779008; docs PR #38295 head 4fdcc1aa (Tier H) answers 7238666618 observation and 7238784724 S1", "branch": "claude/project-thread-sz9xxz (code, Refs) + claude/project-thread-sz9xxz-skills (skills + guide, Fixes)", "pr": "https://github.com/objectstack-ai/objectstack/pull/38293 ; https://github.com/objectstack-ai/objectstack/pull/38295", "session": "session_01L6bhgUpmvWke9Z2P4VKvaD", "premise_still_valid": true, "summary": "Ruling A (7237973760) implemented in plugin-approvals only. cancelForDeletedRecord voids every pending request of the deleted record as before, then cancels the run each request gated through the engine's existing cancelRun with the reason 'approval request ID was cancelled because the record it is about was deleted'; neither approve nor reject runs. A subflow chain on the same record is found with existing reads (the request row's record_run_id is the top, then suspensionOf correlations subflow:/map: down to flow_run_id) and cancelled deepest first, never resumed; a map item's batch is read before the cancel (batchAboveItem) and woken after it (resumeBatchOfRecalledItem, now with a cause). A failed cancel never fails the delete: the run stays parked, logged at error and named in the summary warn and suspendedRuns. The answer gains cancelledRuns, so Clause-② yes (widening), patch. Round 2: no record_run_id stays silent per the seat's S1 ruling (texts and test aligned, no-log pinned); the docblock describes a false cancelRun answer exactly; with no cancelRun the delete path logs in its own words (pinned). Premises measured before writing on main f19350b4 with a probe kept at /mnt/project-files/37763/ (5/5). No change in service-automation, run-resume.ts or packages/spec. The skill sentence and guide sentences are in #38295 (fable-written, verify-review-tier PASS), which merges after #38293.", "tests": "New describe in batch-item-recall-resumes-batch.test.ts (real AutomationEngine + ApprovalService), 7 cases: flat run, batch item, three-level subflow chain, batch item whose sign-off is in a subflow, no record_run_id (no log), suspensionOf throws, cancelRun throws. record-delete-cancel.integration.test.ts (real ObjectQL + SQLite, real delete hook): the old must-not-cancel pin rewritten to the ruling; new cases for a rejecting cancelRun and for an engine with no cancelRun. Reverse check at 948f4494: approval-service.ts at main gives 8 failed / 21 passed in the two files, head 29/29. At e103c2e0: the two files 30/30; whole package under the verify lock 131 files, 1988 tests passed; typecheck exit 0; eslint on the four changed files exit 0.", "gates": "dispatch-gates.mjs --ran at 948f4494: 72 derived, 69 run each exit 0, 3 NOT-MEASURED exit 3 (check-plugin-teardown-shape --self-test: fixture commit outside the shallow clone; check:dual-build-cjs-loads and check:i18n: dists of packages not built here), 0 UNRUN; round 2 touches the same four files and re-ran the package suite, typecheck and eslint. #38295 at 8001d106: 62 families, 58 exit 0, 4 NOT-MEASURED exit 3 (whole-repo dist readers); skills token ratchet 5927/5927 exit 0; the later two commits touch only content/docs/automation/approvals.mdx. CI at #38293 e103c2e0: 57 check-runs, 38 success, 18 skipped, 0 failed, 0 pending; the one cancelled run is a superseded PR-body guards run whose rerun is success. CI at #38295 4fdcc1aa when this was written: 31 success, 17 skipped, 0 failed, Test Core (1/10) in progress, one superseded PR-body guards run cancelled.", "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm", "mcp_calls": "0 writes", "api_writes": "fleet-write relay: pr_create #38293, pr_create #38295, issue_patch #38293 x2 (r2, r3), issue_patch #38295 x3 (r2, r3, r4); this os-dev-report comment (POST issues/37763/comments)", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "none filed - runs parked by deletes before this release are not cleaned up (ruling), the changeset and the guide say how an administrator finds them (request cancel_reason record_deleted, flow_run_id, run still paused)" ] }Generated by Claude Code
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Landed · 2026-11-28T13:14Z
Both PRs of this card merged at 2026-11-28T12:59Z through the merge queue: #38293 (behaviour, on the seat's ACCEPT 7239048902) and #38295 (skill and guide, Tier H, on the maintainer's approval after the seat's ACCEPT 7239085736), whose
Fixesline closed this card. What changed, per the maintainer's ruling A (7237973760):paused) and cancel them by hand.Neither was ejected.
pm:dispatchedis cleared on this card, andpm:awaiting-mergeon #38295.