Skip to content

fix(macapp): fence stale stop and steer actions - #1127

Merged
dennisonbertram merged 2 commits into
codex/issue-1122-interactive-statefrom
codex/issue-1125-action-owner
Aug 3, 2026
Merged

fix(macapp): fence stale stop and steer actions#1127
dennisonbertram merged 2 commits into
codex/issue-1122-interactive-statefrom
codex/issue-1125-action-owner

Conversation

@dennisonbertram

Copy link
Copy Markdown
Owner

Summary

  • bind native Stop, Composer steer, and ToolWalk timeout to the run identity that rendered/started the action
  • preserve legacy programmatic APIs while guards prevent stale A from mutating or requesting newer B
  • add deterministic A-to-B Stop, force-stop, steer, and ToolWalk timeout endpoint regressions
  • apply strict Swift formatting inherited from fix(macapp): fence stale interactive affordances #1123

Closes #1125

Stack

Test-first evidence

  • expected failure: stale visible actions resolved currentRunID at invocation, so A could target B; deterministic A-to-B endpoint assertions define the regression.

Verification

  • swift format lint --strict --recursive Sources Tests
  • swift test --filter 'RunSessionExternalControlTests|ToolWalkTests' (32 tests / 4 suites)\n- swift test (225 tests / 43 suites)\n- ./scripts/test-regression.sh (PASS; 85.5% coverage, zero zero-coverage functions)

@dennisonbertram
dennisonbertram force-pushed the codex/issue-1125-action-owner branch from 2968674 to b2ae9ba Compare August 3, 2026 21:42
* fix(macapp): bind ToolWalk to submitted run identity

* fix(macapp): retain submitted run outcomes (#1131)

* fix(toolwalk): observe displaced submission outcomes (#1138)

* fix(toolwalk): observe displaced submission outcomes

* fix(toolwalk): retain immutable timeout authority (#1139)

* fix(toolwalk): retain immutable timeout authority

* test(toolwalk): prove displaced timeout orchestration

* docs(plan): record timeout authority regression evidence

* docs: correct focused orchestration evidence count

* fix(toolwalk): gate timeout cancellation by deadline ticket (#1146)
@dennisonbertram
dennisonbertram marked this pull request as ready for review August 3, 2026 23:14
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@dennisonbertram
dennisonbertram merged commit 14ef088 into codex/issue-1122-interactive-state Aug 3, 2026
5 checks passed
@dennisonbertram
dennisonbertram deleted the codex/issue-1125-action-owner branch August 3, 2026 23:14
dennisonbertram added a commit that referenced this pull request Aug 3, 2026
* fix(macapp): fence stale interactive affordances

* style(macapp): format interactive control views

* fix(macapp): fence stale stop and steer actions (#1127)

* fix(macapp): fence stale stop and steer actions

* fix(macapp): bind ToolWalk to submitted run identity (#1129)

* fix(macapp): bind ToolWalk to submitted run identity

* fix(macapp): retain submitted run outcomes (#1131)

* fix(toolwalk): observe displaced submission outcomes (#1138)

* fix(toolwalk): observe displaced submission outcomes

* fix(toolwalk): retain immutable timeout authority (#1139)

* fix(toolwalk): retain immutable timeout authority

* test(toolwalk): prove displaced timeout orchestration

* docs(plan): record timeout authority regression evidence

* docs: correct focused orchestration evidence count

* fix(toolwalk): gate timeout cancellation by deadline ticket (#1146)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a52c50a2f8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +234 to +239
if !submission.isTerminal {
recordSubmissionFailure(
submission,
runID: started.runID,
message: "run event stream ended before a terminal event"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve forced-cancel state when detaching the stream

When the user presses Stop a second time before the terminal SSE arrives, cancel(runID:) marks the transcript cancelled and cancels streamTask, but HarnessClient.streamEvents represents task cancellation as a normal end-of-stream. Execution therefore reaches this unconditional EOF branch, which changes the submission to failed and—because the retired run still satisfies ownsVisibleSubmission when currentRunID is nil—overwrites the visible cancellation with a connection error and failed transcript. Reset/load detachments have the same false-failure behavior; skip EOF failure handling when the consuming task was intentionally cancelled.

Useful? React with 👍 / 👎.

dennisonbertram added a commit that referenced this pull request Aug 3, 2026
* fix(macapp): bind external runs to controls

* fix(macapp): fence stale interactive affordances (#1123)

* fix(macapp): fence stale interactive affordances

* style(macapp): format interactive control views

* fix(macapp): fence stale stop and steer actions (#1127)

* fix(macapp): fence stale stop and steer actions

* fix(macapp): bind ToolWalk to submitted run identity (#1129)

* fix(macapp): bind ToolWalk to submitted run identity

* fix(macapp): retain submitted run outcomes (#1131)

* fix(toolwalk): observe displaced submission outcomes (#1138)

* fix(toolwalk): observe displaced submission outcomes

* fix(toolwalk): retain immutable timeout authority (#1139)

* fix(toolwalk): retain immutable timeout authority

* test(toolwalk): prove displaced timeout orchestration

* docs(plan): record timeout authority regression evidence

* docs: correct focused orchestration evidence count

* fix(toolwalk): gate timeout cancellation by deadline ticket (#1146)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant