chore(workspace): remove dead defensive block in load_skills AST gate - #2554
Merged
HongmingWang-Rabbit merged 1 commit intoMay 3, 2026
Merged
Conversation
Self-review of PR #2553 caught an unreachable defensive block at test_load_skills_call_sites.py:99-103: the inner check guarded `call.func.__class__.__name__ == "Name"` from a FunctionDef, but `_find_load_skills_calls` already filters its return type to `ast.Call` — `FunctionDef` cannot reach that loop body. The block was a no-op `pass` with a misleading comment. Removing keeps the gate behaviorally identical; tests still pass. Same five-axis review pass that turned this up also approved the substantive logic of #2553, so no behavior change here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
HongmingWang-Rabbit
requested a review
from hongmingwang-moleculeai
as a code owner
May 3, 2026 08:30
HongmingWang-Rabbit
enabled auto-merge
May 3, 2026 08:30
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
Self-review of #2553 (#119 PR-4) caught an unreachable defensive block at
test_load_skills_call_sites.py:99-103:The inner check guarded against
FunctionDef, but_find_load_skills_callsalready restricts its return type toast.Call— aFunctionDefcannot reach that loop body. The block is a no-oppasswith a misleading comment that implies the check matters for correctness when it doesn't.Removing keeps the gate behaviorally identical; both tests still pass (
pytest workspace/tests/test_load_skills_call_sites.py→ 2 passed).The five-axis review that turned this up also approved the substantive logic of #2553 — this is the only follow-up cleanup it surfaced.
Test plan
pytest workspace/tests/test_load_skills_call_sites.py→ 2 passed-5lines, no behavior change🤖 Generated with Claude Code