refactor(daemon): name stale session recovery boundary#353
Open
honor2030 wants to merge 1 commit into
Open
Conversation
2 tasks
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
Refs #352
Test Plan
uv run --with pytest --with pillow python -m pytest tests/unit/test_daemon.py::test_recoverable_current_session_error_requires_current_default_session -qfailed before the implementation withAttributeError: module 'browser_harness.daemon' has no attribute '_is_recoverable_current_session_error'.uv run --with pytest --with pillow python -m pytest tests/unit/test_daemon.py -q→11 passed.uv run --with pytest --with pillow python -m pytest tests -q→98 passed.uv run python -m compileall -q src tests.uv pip check --python .venv/bin/python→ all installed packages compatible.uv run --with ruff python -m ruff check --select B tests/unit/test_daemon.py→ all checks passed.Summary by cubic
Named a clear recovery boundary for stale current-session errors in the daemon and added tests to lock down the behavior. Only calls using the daemon’s current default session will auto re-attach and retry, progressing #352.
_is_recoverable_current_session_errorwithSTALE_SESSION_MARKERS.sidmatches the current default session; browser-level and explicit session calls surface the original error.Written for commit d0f6578. Summary will update on new commits.