Rename mcp_health_guard.py to mcp_health_advisor.py#2163
Merged
Trecek merged 1 commit intoMay 7, 2026
Conversation
Trecek
added a commit
that referenced
this pull request
May 8, 2026
## Summary This PR renames `mcp_health_guard.py` → `mcp_health_advisor.py` and updates all references throughout the codebase. The hook was misnamed — it lives in `guards/` and has `_guard` in its name, but its docstring states "Never blocks tool execution." It only emits a `hookSpecificOutput.message` — it never sets `permissionDecision`. This breaks the naming convention: every other file in `guards/` is an actual guard that can deny tool calls. The correct naming pattern already exists: `recipe_write_advisor.py` uses the `_advisor` suffix for non-blocking hooks. Files updated: 1. `src/autoskillit/hooks/guards/mcp_health_guard.py` → renamed to `mcp_health_advisor.py` 2. `src/autoskillit/hook_registry.py` — updated `HOOK_REGISTRY` entry path; added `"mcp_health_guard.py"` to `RETIRED_SCRIPT_BASENAMES` 3. `src/autoskillit/hooks/guards/CLAUDE.md` — updated table entry 4. `docs/safety/hooks.md` — updated section header and description 5. `tests/infra/test_mcp_health_guard.py` → renamed to `tests/infra/test_mcp_health_advisor.py` 6. `hooks.json` (regenerated at install time) ## Requirements (No explicit ## Requirements section in issue #2047) ## Conflict Resolution Decisions The following files had merge conflicts that were automatically resolved. (No conflict resolution report provided) Closes #2047 ## Implementation Plan Plan file: (plan file not available at specified path) 🤖 Generated with [Claude Code](https://claude.com/claude-code) via AutoSkillit <!-- autoskillit:pipeline-signature steps=prepare_pr,run_arch_lenses,compose_pr,annotate_pr_diff,review_pr --> ## Token Usage Summary | Step | Model | count | uncached | output | cache_read | peak_ctx | turns | cache_write | time | |------|-------|-------|----------|--------|------------|----------|-------|-------------|------| | plan | claude-opus-4-6 | 1 | 60 | 7.4k | 610.2k | 52.6k | 55 | 43.1k | 3m 50s | | verify | claude-opus-4-6 | 1 | 38 | 6.8k | 788.0k | 51.0k | 80 | 37.9k | 4m 25s | | implement* | MiniMax-M2.7-highspeed | 1 | 912.0k | 7.1k | 1.3M | 29.8k | 89 | 16.2k | 3m 25s | | fix | claude-opus-4-6 | 1 | 50 | 5.2k | 869.6k | 51.4k | 38 | 38.5k | 4m 49s | | prepare_pr* | MiniMax-M2.7-highspeed | 1 | 193.0k | 4.5k | 592.2k | 29.8k | 40 | 15.2k | 1m 49s | | compose_pr* | MiniMax-M2.7-highspeed | 1 | 83.2k | 2.0k | 294.7k | 29.8k | 23 | 14.8k | 56s | | **Total** | | | 1.2M | 33.0k | 4.4M | 52.6k | | 165.6k | 19m 15s | \* *Step used a non-Anthropic provider; caching behavior may differ.* ## Token Efficiency | Step | LoC Changed | cache_read/LoC | cache_write/LoC | output/LoC | |------|-------------|----------------|-----------------|------------| | plan | 0 | — | — | — | | verify | 0 | — | — | — | | implement | 33 | 38690.3 | 490.1 | 216.0 | | fix | 3 | 289853.3 | 12819.3 | 1749.0 | | prepare_pr | 0 | — | — | — | | compose_pr | 0 | — | — | — | | **Total** | **36** | 123094.0 | 4599.0 | 916.8 | ## Model Usage Breakdown | Model | steps | uncached | output | cache_read | cache_write | time | |-------|-------|----------|--------|------------|-------------|------| | claude-opus-4-6 | 3 | 148 | 19.4k | 2.3M | 119.4k | 13m 5s | | MiniMax-M2.7-highspeed | 3 | 1.2M | 13.6k | 2.2M | 46.2k | 6m 10s | Co-authored-by: Trecek <trecektalon@gmail.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
This PR renames
mcp_health_guard.py→mcp_health_advisor.pyand updates all references throughout the codebase. The hook was misnamed — it lives inguards/and has_guardin its name, but its docstring states "Never blocks tool execution." It only emits ahookSpecificOutput.message— it never setspermissionDecision. This breaks the naming convention: every other file inguards/is an actual guard that can deny tool calls. The correct naming pattern already exists:recipe_write_advisor.pyuses the_advisorsuffix for non-blocking hooks.Files updated:
src/autoskillit/hooks/guards/mcp_health_guard.py→ renamed tomcp_health_advisor.pysrc/autoskillit/hook_registry.py— updatedHOOK_REGISTRYentry path; added"mcp_health_guard.py"toRETIRED_SCRIPT_BASENAMESsrc/autoskillit/hooks/guards/CLAUDE.md— updated table entrydocs/safety/hooks.md— updated section header and descriptiontests/infra/test_mcp_health_guard.py→ renamed totests/infra/test_mcp_health_advisor.pyhooks.json(regenerated at install time)Requirements
(No explicit ## Requirements section in issue #2047)
Conflict Resolution Decisions
The following files had merge conflicts that were automatically resolved.
(No conflict resolution report provided)
Closes #2047
Implementation Plan
Plan file: (plan file not available at specified path)
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown