Repository navigation
Merged
Conversation
…f reporting healthy (#131) `recover` short-circuited on the recovery state machine's `healthy` and never looked at the single-attacher table, so a client outside the session's executor that owned the session's tab kept refusing every fresh attach ("already attached by another client") while `recover` said healthy and `session reset` (which only reaps the executor) could not free it. - Clients report their pid on the control ws (`?pid=`); the daemon records it on `ClientState`. - `recover` gains a rung 0: `DaemonState.release_foreign_attachers` drops attacher ownership of the session's tabs held outside the live executor process, each release reported as an `attach` step. The resident executor's own attachment is kept (by design). - The attach-conflict fix hint now names what each verb can free: `recover` for an outside attacher, then `session reset` when the executor process itself is the attacher. - ADR-0013 amended. Known limits: matching is per process, so an extra attacher inside the executor process still needs `session reset`; a client too old to report its pid is treated as outside. The incident's trigger (PageBindTimeout and per-call lingering connections) was not reproduced and is out of scope. E2E: tests/daemon/e2e/test_issue131_stray_attacher.py (stray stays alive throughout; resident-executor negative control). Full e2e: 96 passed. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
recoverno longer reportshealthywhile a client outside the session's executor process is the attacher of the session's tab. Before this change, that attacher refused every fresh attach (already attached by another client),recoverreturned straight from the state machine'shealthywithout checking, andsession reset(which only reaps the executor) could not free it.?pid=).recovergains a rung 0,DaemonState.release_foreign_attachers, which releases attacher ownership of the session's tabs held outside the live executor process. Each release is reported as anattachstep. The resident executor's own attachment is kept, as designed.recoverreleases an outside attacher; if the error survives a healthyrecover,session resetfrees an attacher inside the executor process. ADR-0013 is amended.session reset.PageBindTimeout, and connections that kept piling up per call) was not reproduced and is out of scope.Closes #131
Test evidence
New E2E test,
tests/daemon/e2e/test_issue131_stray_attacher.py(real Chrome for Testing + unpacked extension):recoverreports the release, and aftersession reseta new outside process can attach.recovercold-started the executor and released nothing.recoverreleases nothing.bash tests/daemon/e2e/run.sh (full real-Chrome E2E)
mise run test
UI evidence
N/A: no UI change (CLI
recoveroutput gains anattach:step line).Checklist
🤖 Generated with Claude Code