Skip to content

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

Merged
dennisonbertram merged 3 commits into
codex/issue-1007-external-run-controlsfrom
codex/issue-1122-interactive-state
Aug 3, 2026
Merged

fix(macapp): fence stale interactive affordances#1123
dennisonbertram merged 3 commits into
codex/issue-1007-external-run-controlsfrom
codex/issue-1122-interactive-state

Conversation

@dennisonbertram

Copy link
Copy Markdown
Owner

Summary

  • stamp approval and plan affordances with their originating run ID
  • synchronously clear approval, plan, and input state at run-owner selection, retirement, fallback, and reset fences
  • bind Chat and ToolWalk actions to guarded expected-run APIs so stale closures issue no request to a newer continuation

Closes #1122

Stack

Test-first evidence

  • Expected red: swift test --package-path macapp --filter RunSessionExternalControlTests failed because PendingApproval/PendingPlan had no runID and explicit expectedRunID action APIs did not exist.

Verification

  • swift test --package-path macapp --filter TranscriptTests (19 tests)
  • swift test --package-path macapp --filter RunSessionExternalControlTests (11 tests)
  • swift test --package-path macapp (222 tests / 43 suites)
  • ./scripts/test-regression.sh (PASS; total coverage 85.5%, zero uncovered functions)

Scope / rollback

Native in-memory state and client actions only; no server, callback, TUI, persistence, or wire change. Revert this commit to restore the prior native behavior.

@dennisonbertram
dennisonbertram force-pushed the codex/issue-1122-interactive-state branch from d1931ae to 93d0460 Compare August 3, 2026 21:36
* 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)
@dennisonbertram
dennisonbertram marked this pull request as ready for review August 3, 2026 23:18
@dennisonbertram
dennisonbertram merged commit 4c337d6 into codex/issue-1007-external-run-controls Aug 3, 2026
5 checks passed
@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 deleted the codex/issue-1122-interactive-state branch August 3, 2026 23:18

@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: 14ef088d4f

ℹ️ 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".

// timestamped lifecycle evidence arrives. Preserve that timestamp
// so a genuinely later scheduled continuation can take visual
// ownership, while an older replay still cannot.
activeRunTimestamps[event.runID] = timestamp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve only the lifecycle-start timestamp

Because locally submitted runs are consumed concurrently from per-run and conversation-wide streams, an A event can be applied out of order after B actually started. This assignment overwrites A's lifecycle timestamp on every selected nonterminal event: for example, A starts at t1, an A message at t3 arrives first, and B's start at t2 arrives afterward; B is then compared against t3 and incorrectly rejected even though it started after A. Keep the first timestamped lifecycle evidence instead so the newer continuation becomes the visible action owner.

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