Repository navigation
fix: Code Mode leaves cancelled tools marked active - #176658
Merged
Merged
Conversation
Record terminal lifecycle accounting before nested activity acceptance can reject or suppress presentation. Keep terminal event publication after accepted history and preserve captured effect evidence. Fixes the accounting regression introduced by 440c86f (#176403). Both reported cases failed on main under Node and Bun; reversing only that commit's production delta made both pass. The append-boundary regression also failed for rejected and superseded writes before this fix. Full focused proof: Node 42/42, pinned Bun 42/42, maxWorkers=1. Targeted types, typed core/boundary lint, format and P2 review passed. Changed fixture full-file wall time: Node 185.99s, Bun 171.58s; imports and worker preparation dominate, with no additional cases or setup.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 19, 2026 00:14
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
steipete
added a commit
that referenced
this pull request
Oct 19, 2026
Close the retained rehearsal worker before deleting its socket directory. Observe native-child cleanup receipts on Windows while retaining open-handle refusal and source-preservation assertions. These are fixture lifecycle and worker ownership repairs, not restored wave-28 checks. Exact-head CI: 39185480559 passed; 39185547813 passed all 17 native Windows state-isolation cases and all 41 targeted Bun config cases (full config-state shard: 258 passed). Code Mode repair already landed in #176658.
steipete
added a commit
that referenced
this pull request
Oct 19, 2026
* refactor: bind private core seams to serving owners Use canonical message boundaries, the singleton auth-row cache, direct exec resolution and concrete sandbox pin owner. Preserve effect authority, delivery receipts and settlement. Current focused types, ordinary lint, suppression suite and independent review pass. Preserve this reviewed checkpoint before the coordinator-required tooling rebase; runtime and cycle proof remain incomplete. * fix(agents): settle discarded nested tool items * refactor(agents): use main nested lifecycle settlement owner Drop the overlapping local accounting repair after main c5c558d (#176658) landed. All three files now match the fetched main owner exactly; its accepted-history publication gates and exactly-once completion regression remain intact.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 19, 2026
…6658) Record terminal lifecycle accounting before nested activity acceptance can reject or suppress presentation. Keep terminal event publication after accepted history and preserve captured effect evidence. Fixes the accounting regression introduced by 716bf79 (openclaw#176403). Both reported cases failed on main under Node and Bun; reversing only that commit's production delta made both pass. The append-boundary regression also failed for rejected and superseded writes before this fix. Full focused proof: Node 42/42, pinned Bun 42/42, maxWorkers=1. Targeted types, typed core/boundary lint, format and P2 review passed. Changed fixture full-file wall time: Node 185.99s, Bun 171.58s; imports and worker preparation dominate, with no additional cases or setup.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 19, 2026
Close the retained rehearsal worker before deleting its socket directory. Observe native-child cleanup receipts on Windows while retaining open-handle refusal and source-preservation assertions. These are fixture lifecycle and worker ownership repairs, not restored wave-28 checks. Exact-head CI: 39185480559 passed; 39185547813 passed all 17 native Windows state-isolation cases and all 41 targeted Bun config cases (full config-state shard: 258 passed). Code Mode repair already landed in openclaw#176658.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 19, 2026
* refactor: bind private core seams to serving owners Use canonical message boundaries, the singleton auth-row cache, direct exec resolution and concrete sandbox pin owner. Preserve effect authority, delivery receipts and settlement. Current focused types, ordinary lint, suppression suite and independent review pass. Preserve this reviewed checkpoint before the coordinator-required tooling rebase; runtime and cycle proof remain incomplete. * fix(agents): settle discarded nested tool items * refactor(agents): use main nested lifecycle settlement owner Drop the overlapping local accounting repair after main 46dea10 (openclaw#176658) landed. All three files now match the fetched main owner exactly; its accepted-history publication gates and exactly-once completion regression remain intact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes cancelled or expired Code Mode calls leaving a settled nested tool marked active.
User Impact
Code Mode completion and recovery see settled work accurately after cancellation, supersession, or a rejected activity write. Terminal events still wait for accepted history, and rejected or stale presentation remains suppressed. No configuration or migration is required.
Why This Change Was Made
#176403 correctly deferred terminal presentation until nested activity was accepted, but also deferred the lifecycle counters into that conditional publication. Move those existing counter updates to the completion owner alongside the captured terminal outcome, and remove their old branch from the event emitter. The existing append-boundary fixture now checks exactly-once settlement as well as event ordering and retained effect evidence.
Evidence
--maxWorkers=1. The changed append-boundary file took 185.99 s (Node) and 171.58 s (Bun), dominated by existing imports/worker preparation; its three cases took 241 ms and 88 ms respectively. No cases or setup were added.proc-safe0.4.1 declarations in isolation because the prepared shared install still has 0.3.0.PR CI supplies the broad hosted proof.