Skip to content

fix(session): release a settled approval overlay before delivering - #1520

Merged
TheGreatAxios merged 5 commits into
cl-10852-deliver-approvals-for-parked-calls-in-queue-drained-turnsfrom
cl-10854-stop-a-settled-approval-overlay-from-aborting-permission
Oct 19, 2026
Merged

TheGreatAxios merged 5 commits into
cl-10852-deliver-approvals-for-parked-calls-in-queue-drained-turnsfrom
cl-10854-stop-a-settled-approval-overlay-from-aborting-permission

Conversation

@bwachman

@bwachman bwachman commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Approval resume releases its parked overlay registration as soon as the operator answers, before it delivers the decision. Previously it released it in finally, after delivery resolved.
  • The TUI permission prompt's abort signal merges that registered overlay controller, which is aborted once the overlay settles. Any prompt raised while the decision was being delivered was therefore denied before it was shown ("tool no longer running; permission request denied"). approve_worker_call raises one for the worker's frozen call as soon as its redispatched call starts, so it always failed after the operator approved it.
  • A reactor approval timeout still dismisses an overlay that is open, because the timeout watcher aborts the overlay controller directly.

Stacked on #1519; review that first. The diff against its branch is this change only.

Verification

  • bun run check and bun run test pass (9235 tests)
  • The new test raises a permission prompt's signal from inside the decision delivery, using the real parked-overlay binding and approval resume. It is aborted on the base branch and live here.
  • Live, interactive TUI without yolo, on a build of this branch: the nested prompt for the worker's frozen git status --short call was shown and approved after approve_worker_call (before this change it was aborted unseen after 0 ms). The full flow completed once fix(permission): key worker grants on the dispatched call #1521 was added on top.

Fixes CL-10854
Part of CL-10852

@linear-code

linear-code Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

CL-10852

CL-10854

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Request changes

Releases the parked overlay abort registration as soon as the operator answers, before the decision is delivered, so a permission prompt raised during that delivery is not pre-aborted.

Findings

  • 0dc8fc95 — subject test(session): cover prompts raised while an approval decision is delivered is 75 characters. The cap is 72. Shorten it. The fix subject is 66 and fine; both bodies are empty, which is allowed.

Code check: no defect in the release timing. The controller is aborted at src/session/approval-resume.ts:547 before registerOverlayAbort(undefined) at line 552, and an already-open prompt captured that signal at resolveSuspended, so a timeout still dismisses it. bun test src/session/approval-resume.test.ts src/session/approval-resume-interrupt.test.ts src/tui/runner/session.overlay-abort.test.ts — 106 pass, 0 fail, including the new "not pre-aborted" case and the parked-call timeout case.

@bwachman
bwachman force-pushed the cl-10854-stop-a-settled-approval-overlay-from-aborting-permission branch from 162692d to c03784d Compare October 18, 2026 22:50
@bwachman

Copy link
Copy Markdown
Contributor Author

Kept your reworded subjects through the rebase onto the updated #1519 (13cfb0d, c03784d). git range-diff shows both commits identical to your push apart from the base; no other changes.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Approve

Releases the parked overlay abort registration as soon as the operator answers, before the decision is delivered.

Findings

No findings.

The previous finding was the test subject length. It is now test(session): cover a prompt raised during approval delivery (61 characters). The unique diff against the current #1519 tip is still only src/session/approval-resume.ts and its test. The controller is aborted at src/session/approval-resume.ts:547, then registerOverlayAbort(undefined) runs at line 552, before deliverDecision. The rebase onto 9161a317 did not change that. bun test src/session/approval-resume.test.ts -t "permission prompt raised while the decision is delivered" — 1 pass, 0 fail.

@corbits-triage

corbits-triage Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Fail

@bwachman, please address the following:

  • Split out unrelated change: src/permission/reactor-authorize.ts
  • Split out unrelated change: src/permission/worker-grant-dispatch-identity.test.ts

…rized-retry-on-the-dispatched-call-so-the

fix(permission): key worker grants on the dispatched call
@TheGreatAxios
TheGreatAxios merged commit 93e7ca0 into cl-10852-deliver-approvals-for-parked-calls-in-queue-drained-turns Oct 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants