Implementation Plan: Replace vestigial OSError guard with Protocol dispatch#3989
Merged
Trecek merged 3 commits intoJun 10, 2026
Merged
Conversation
…ionLocator Protocol Replace the vestigial try/except OSError guard around direct claude_code_project_dir() call with Protocol-dispatched ctx.backend.session_locator().project_log_dir(). The Protocol dispatch is backend-agnostic — ClaudeSessionLocator delegates to the same function, but other backends (e.g. Codex) can now return their own project log dir without cli/app.py needing to know. Also remove the now-unused claude_code_project_dir import and add a smoke test in tests/cli/test_app_main.py proving the activity_check lambda receives the backend-derived marker_dir. Test file size marker upgraded from small to medium (uses asyncio.run to exercise the async closure path). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
autoskillit.cli.__init__ exports `app` (the App instance), so
monkeypatch.setattr("autoskillit.cli.app.*") traverses to the App
object rather than the module. Use importlib.import_module to obtain
the module directly, matching the pattern already used in the sibling test.
…rd assertion Per reviewer findings L47 and L91: - Move asyncio and MagicMock imports from inside test function body to module level; remove redundant local `import importlib` (already at module level) - Strengthen `assert captured_activity_check` to `assert len(...) == 1` so the test catches regressions where serve_with_signal_guard is called multiple times Co-Authored-By: Claude Sonnet 4.6 <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
Replace
cli/app.py's direct call toclaude_code_project_dir()(wrapped in a deadexcept OSErrorguard) with Protocol-dispatchedctx.backend.session_locator().project_log_dir(). Remove the now-unusedclaude_code_project_dirimport. Add a smoke test proving the activity check lambda receives the backend-derived marker directory.Requirements
plan_id: a83ae274-34af-4772-a500-f9ac02160ced
source_commit: 8136d95
Goal
Replace vestigial OSError guard with Protocol dispatch and prove routing via smoke test.
Context
Deliverables
app.py — OSError guard removed, Protocol dispatch added, import removedtest_app_main.py — smoke test asserting activity_check uses backend-derived marker_dirTechnical Steps
Acceptance Criteria
Closes #3930
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260610-100822-985723/.autoskillit/temp/make-plan/t4-p3-a10-wp1-replace-vestigial-oserror-guard_plan_2026-06-10_101500.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown