Fix CI: track widened augment matcher in hook config tests#782
Merged
Conversation
The augment PostToolUse matcher gained the mcp__.*[Rr]epowise.*__.* pattern and the old value was demoted to a legacy matcher that migration widens. The hook install/migrate tests still pinned the pre-widening literal, so every run on main failed. Assert against claude_config._AUGMENT_MATCHER so the expected-output rows can't drift from the source again, and set the noop test's already-current input to the same constant.
|
✅ Health: 7.6 (unchanged) 📋 At a glance 🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)
🔎 More signals (2)🔥 Hotspot touched (1)
🔗 Hidden coupling (1 file)
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-11 13:44 UTC |
swati510
approved these changes
Jul 11, 2026
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.
Problem
CI's
Python 3.12 testsjob has been red onmainacross the last several commits (#778, #779, #780). Every run fails on the same 8 tests intests/unit/cli/test_mcp_config.py:Root cause
The augment PostToolUse matcher in
claude_config.pywas widened to appendmcp__.*[Rr]epowise.*__.*(feeding the read-after-served ledger), and the old value was demoted into_LEGACY_AUGMENT_MATCHERSso existing installs migrate in place. The hook install/migrate tests still pinned the pre-widening literal as their expected output, and the "noop when already current" test still fed the old literal as its already-current input, so both drifted from the source.Fix
Assert against
claude_config._AUGMENT_MATCHERinstead of a hardcoded string for the expected-output rows, and point the noop test's already-current input at the same constant. Legacy-input matchers (the values migration is meant to widen) are left untouched. Test-only change.All 46 tests in the file pass locally.