Implementation Plan: T5-P4-A2-WP2 Make build_inspector_cmd a Proper Capability-Gated Method#4093
Merged
Trecek merged 3 commits intoJun 12, 2026
Conversation
…portedError Replace unchecked RuntimeError stubs in ClaudeCodeBackend and CodexBackend build_inspector_cmd with proper CapabilityNotSupportedError raised only when inspector_capable=False. This graduates inspector_capable from _FORWARD_DECLARED (it now has a production consumer) and makes the CapabilityNotSupportedError exception available via autoskillit.core for downstream consumers. Changes: - Add CapabilityNotSupportedError in core/types/_type_exceptions.py (subclasses Exception, exposes capability + backend_name fields) - Add re-export to core/__init__.pyi stub - Replace RuntimeError in both backends with proper capability-gated guard plus AssertionError dead-code tail (test_no_not_implemented forbids NotImplementedError on registered backend classes) - Remove inspector_capable from _FORWARD_DECLARED in test_capability_consumption - Update test_build_inspector_cmd_raises_when_not_capable to assert CapabilityNotSupportedError with structured field validation - Add parametrized test_incapable_backends_raise_capability_not_supported in test_backend_behavioral_contract - Add inspector_capable entry to CAPABILITY_METHOD_MAP
… limit _type_exceptions is now imported by execution/backends after CapabilityNotSupportedError was added; MODULE_CASCADE_CORE must include 'execution' to pass the cascade guard. codex.py grew to 1061 lines due to build_inspector_cmd capability gate; bump _LINE_LIMIT_EXEMPTIONS ceiling from 1060 to 1062 with rationale.
…tion commit 35654aa added 'execution' to MODULE_CASCADE_CORE["_type_exceptions"] in _test_filter.py after CapabilityNotSupportedError was added to _type_exceptions.py and imported by execution/backends, but test_type_exceptions_cascade and test_type_exceptions_narrow_cascade were not updated to match the new 5-member cascade set.
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 the unchecked
RuntimeErrorstubs in bothClaudeCodeBackend.build_inspector_cmdandCodexBackend.build_inspector_cmdwith a properCapabilityNotSupportedErrorthat is raised only wheninspector_capable=False. This involves:CapabilityNotSupportedError(Exception)incore/types/_type_exceptions.pywith structuredcapabilityandbackend_namefieldsRuntimeErrorraises in both backends withCapabilityNotSupportedErrorinspector_capablefrom_FORWARD_DECLARED(it now has a production consumer)test_backend_behavioral_contract.pyImplementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260612-102320-415368/.autoskillit/temp/make-plan/t5-p4-a2-wp2-capability-gated-build-inspector-cmd_plan_2026-06-12_103500.mdCloses #4017
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown