Skip to content

Rename mcp_health_guard.py to mcp_health_advisor.py#2163

Merged
Trecek merged 1 commit into
developfrom
rename-mcp-health-guard-py-to-mcp-health-advisor-py/2047
May 7, 2026
Merged

Rename mcp_health_guard.py to mcp_health_advisor.py#2163
Trecek merged 1 commit into
developfrom
rename-mcp-health-guard-py-to-mcp-health-advisor-py/2047

Conversation

@Trecek
Copy link
Copy Markdown
Collaborator

@Trecek Trecek commented May 7, 2026

Summary

This PR renames mcp_health_guard.pymcp_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 via AutoSkillit

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

@Trecek Trecek added this pull request to the merge queue May 7, 2026
Merged via the queue into develop with commit 8d8e1a5 May 7, 2026
2 checks passed
@Trecek Trecek deleted the rename-mcp-health-guard-py-to-mcp-health-advisor-py/2047 branch May 7, 2026 16:36
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant