Repository navigation
docs(skills): correct skill_prompts docstring on the ~/.claude/skills symlinks - #585
Merged
Merged
Conversation
… symlinks The module docstring claimed skills are delivered through a "single delivery channel" and that "install.py no longer creates the symlink". Both were true when written (e021ac5, 2026-05-12) but went stale once Claude Code symlinking returned: the file is installer.py, and _install_claude_code_skills_per_dir creates every skill link unconditionally on the Claude Code path, as README.md, AGENTS.md and docs/ARCHITECTURE.md all document. The docstring now describes what actually ships. MCP tools are the BASELINE channel on every host; Claude Code additionally loads the skills through its native loader via the installer's symlinks. That asymmetry is deliberate: the native loader auto-loads the checklist into TodoWrite and treats the Iron Law as system-prompt-grade discipline, and it is not subject to DEFAULT_SKILL_RESPONSE_TOKEN_CAP, so the over-cap sumo-qa-reviewing-before-merge loads in full there while this route can only return the progressive-loading pointer. Removing the symlinks silently downgrades the merge gate to the pointer route, so the docstring now says so explicitly. tests/test_skill_prompts.py repeated the same stale claim in its module docstring; corrected to match. Comments only, no behaviour change.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8e9592446
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The previous docstring stated that removing the ~/.claude/skills/ symlinks downgrades Claude Code to the progressive-loading pointer route for the largest skill. That is true only for the pip + `sumo-qa-install --claude-code` topology. A plugin install (`claude --plugin-dir` or the marketplace) creates no symlinks and needs none: the plugin loader reads skills/<name>/SKILL.md directly from the plugin directory, as documented in docs/ARCHITECTURE.md (degraded-mode note) and docs/INSTALL.md (plugin-format install). Stating it unconditionally presented the symlinks as a universal Claude Code invariant, which is the same over-generalisation about delivery routes that this PR set out to correct. The docstring now enumerates both native routes, and scopes the load-bearing warning to the pip/installer setup. tests/test_skill_prompts.py carried the same unconditional claim; corrected to match. Found by the codex reviewer on PR #585 (P2). Comments only, no behaviour change.
…docstring Follow-up to 51c9a63, from a second codex review pass. All three verified against the repo before fixing. 1. Slash-menu parity was false for two of the three hosts named. The docstring justified "MCP tools as the baseline channel" on the claim that Claude Code, JetBrains AI Assistant and VS Code + Copilot "all surface MCP tools in their slash menu identically". docs/SKILLS.md states that MCP tools are NOT slash-invocable in Claude Code (its /sumo-qa-* entries come from the native skill loader), and that Junie and Copilot select by description from natural language. Only JetBrains AI Assistant slash- invokes them. The real justification is reachability parity, not UI parity; the docstring now says that and points at docs/SKILLS.md. 2. The pip and plugin install flows are additive, not exclusive (docs/INSTALL.md: "either flow (or both, since they're additive, not mutually exclusive)"). So the ~/.claude/skills/ entries are load-bearing only when they are the machine's ONLY native route. With a plugin install also present, removing them downgrades nothing. 3. _install_claude_code_skills_per_dir does not always symlink: it falls back to shutil.copytree on Windows when symlink creation raises OSError (installer.py:753-757), so those entries can be copies. The docstring no longer calls them symlinks unconditionally. Comments only, no behaviour change. Suite: 3304 passed, 100% coverage.
…e fix 7658d2c corrected the docstring to say Claude Code does not slash-invoke MCP tools, but left the paragraph below it claiming that registering skills as both tools and prompts "creates duplicate entries in Claude Code's slash menu (same name, two routes)". Those cannot both be true: if tools never reach the slash menu, the tool half of that pair cannot duplicate anything there. The underlying concern is real, but the mechanism was wrong. Claude Code already lists each skill in its slash menu via the native loader (/sumo-qa-deciding-approach), so an MCP prompt would add a second entry for the same skill under a near-identical name (/sumo_qa_deciding_approach) by a different route. The docstring now says that. Also normalises "IntelliJ" to "JetBrains AI Assistant" / "JetBrains", which is the name used everywhere else in the docstring and in docs/SKILLS.md. Found by re-running the per-file review over the post-fix content rather than reusing the pre-fix verdict. Comments only, no behaviour change. Suite: 3304 passed, 100% coverage.
sumithr
added a commit
that referenced
this pull request
Aug 3, 2026
🤖 I have created a release *beep* *boop* --- ## [0.60.6](v0.60.5...v0.60.6) (2026-08-03) ### Documentation * **skills:** correct skill_prompts docstring on the ~/.claude/skills symlinks ([#585](#585)) ([624dbd9](624dbd9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
This was referenced Aug 3, 2026
[Task]: pre-push mutation gate needs the macOS converge loop (fork wipeout blocks clean pushes)
#523
Closed
sumithr
added a commit
that referenced
this pull request
Sep 3, 2026
…n pushes (#594) Closes #523 ## The bug On macOS the fork-based mutmut runner intermittently wipes out, and the resulting mutants carry **no verdict at all**. That takes two shapes, and the gate handled neither: * a segfault (`-11`/`-9`); * the `null` that mutmut pre-populates `exit_code_by_key` with at generation time and never fills in when the run aborts before executing them. Neither is in `KILLED_EXIT_CODES` (`{1, 3, -24}`) nor equals `0`, so both collapsed to `killed=0`/`survived=0` and reported **every** module `DROPPED` on a clean tree, blocking the push. An enforced-but-flaky gate trains people to `--no-verify` past it, which defeats the enforcement #504 added. I hit this three times pushing PR #585 before coming here. ## What this does `check_mutation_gate.py --run-mutmut`: * On darwin, sets `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES` in the child env, extending `os.environ` so `PATH` still resolves the `mutmut` console script. Off darwin, no env override at all. * Runs mutmut **exactly once** and reads exactly one metadata snapshot. There is no retry and no fold. * Reports any module with an un-judged mutant as `NOT-MEASURED`, whatever its kill count, and does not block. **Exit 0 there means "not blocking", never "gate passed"**, and the output says exactly that. The verdict order is now MISSING, then SURVIVED, then NOT-MEASURED (local darwin only), then DROPPED, then OK. The survivor check runs *before* the kill-count comparison so noise cannot launder one. ## Why there is no converge loop The issue's scope prescribed a bounded converge loop: re-run a noise-dominated pass with the cache kept, then judge the folded result. I implemented that, and five consecutive adversarial review rounds each found a structurally different way the fold could manufacture an unearned "strict gate passed": 1. a noise threshold above 50% excused an unrelated real regression in the same module; 2. a threshold below 50% still blocked a clean tree, which is this issue's original bug; 3. `NOT-MEASURED` was unreachable when the kill floor was already met, so such a module read `OK`; 4. the missing-file guard on the fold missed empty and truncated metas; 5. `max(killed)` from an un-measured pass combined with `unjudged` from a measured-but-regressed pass produced `OK` when neither pass had earned it. Those are one fact seen five ways: **`mutmut-baseline.json` stores kill counts, not mutant identities**, so combining a kill count observed in one pass with a completeness observed in another asserts something no single observation ever made. No guard shape repairs that, which is why each fix surfaced the next hole. So the loop, `merge_passes()` and `MAX_CONVERGE_PASSES` are gone (commit 90c1569). The replacement invariant is trivial to keep true: every module verdict comes from exactly one metadata snapshot. Any survivor in it fails, any un-judged mutant in it yields `NOT-MEASURED`, and only a snapshot with zero un-judged mutants may reach `OK` or `DROPPED`. There is no cross-pass arithmetic left to get wrong. What this gives up is the chance to recover a strict local verdict after one transient noisy pass, so `NOT-MEASURED` will appear somewhat more often locally. That is acceptable because the local result is advisory and never blocks, the authoritative verdict is the Linux dispatch either way, and a local run drops from up to ~12 minutes back to ~6. ## Why there is no noise threshold Same root cause. Any count-based excuse has a hole on one side: above the threshold, a single un-judged mutant excuses an unrelated real regression in the same module; below it, partial fork noise on a clean tree still reports `DROPPED`. So the local run makes no attribution claim at all: any un-judged mutant means the module was not measured. ## Why this is safe The tolerance is **local-only**. `evaluate()` takes `tolerate_unjudged`, default `False`, enabled solely for a darwin `--run-mutmut` invocation. `.github/workflows/mutation.yml:73` runs this script **without** `--run-mutmut`, so the authoritative Linux gate keeps the original strict semantics and never greens a run it could not measure. A real surviving mutant fails on both paths, always. The accepted limit is pinned rather than hidden: `test_a_real_drop_hidden_by_noise_locally_is_still_caught_on_ci` asserts the **same** `.meta` is `NOT-MEASURED` locally and `DROPPED` on CI. If those two paths ever agree, the safety net is gone and that test fails. `test_tolerance_requires_darwin_not_just_run_mutmut` pins the platform half of the guard with noisy non-darwin metadata, and `test_local_run_reads_exactly_one_snapshot_and_never_retries` pins the single-invocation invariant. ## Deviation from the issue's scope Both deviations are recorded on #523 before the merge gate (comments of 2026-08-03 and 2026-08-04): * Detection covers un-judged mutants generally (segfault `-11`/`-9` and `null`), not only `{-11, -9}`. The prescribed detector would never fire on the abort-before-execute variant, which leaves `null` rather than a segfault, and both produce a byte-identical `DROPPED` verdict, so the failures I observed cannot be attributed to one or the other after the fact. * The bounded converge loop and the unit tests covering it are not delivered, for the reason above. The issue's stated goal, a clean tree pushes green locally and a genuinely red tree still fails, is met. If you would rather keep a converge loop, say so on #523 and I will reopen that part; it needs a baseline format that records mutant identities first. ## Also fixed: a test that passed for the wrong reason `test_crashed_mutmut_run_propagates_without_judging_stale_meta` documented *"No baseline/meta fixtures on purpose: reading them would raise"*, but pytest runs from the repo root where `mutmut-baseline.json` exists, so it passed even against an implementation that read the baseline eagerly. That was not academic. My first attempt moved the baseline read above the `--run-mutmut` block; the suite stayed green at 100% coverage and the code was broken, because the gate also runs inside mutmut's own `mutants/` working copy during the clean-test phase where the baseline is not copied. The eager read raised `FileNotFoundError` and aborted the entire mutation run. It surfaced only on a real end-to-end run. The test now runs from an empty cwd. Verified it fails against the eager read and passes against the lazy one. ## Verification * Full suite **3312 passed, 6 skipped, 1 xfailed**, `Required test coverage of 100% reached. Total coverage: 100.00%` * Gate suite **18 tests**, up from 7 on main (`tests/test_check_mutation_gate.py`) * Real entrypoint runs with a stub `mutmut` on `PATH`, fixture: 72 of 472 `knowledge_loaders` mutants un-judged as a `null`/`-11` mix, all other modules at baseline: * main's script, `--run-mutmut`: `knowledge_loaders` `DROPPED`, exit 1 (the #523 bug reproduced) * this branch, `--run-mutmut` on darwin: `NOT-MEASURED`, "Not blocking the push", exit 0, and the child saw `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES` * this branch, no `--run-mutmut` (the CI path) on the same fixture: `DROPPED`, exit 1 * this branch, `--run-mutmut` on the same fixture plus one exit-code-0 mutant: `SURVIVED`, exit 1 * Live end-to-end run at the merge gate, `python scripts/check_mutation_gate.py --run-mutmut --max-children 1` in a fresh clone of this branch on macOS 26.5.2 with `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES` set by the script: a full fork wipeout. All 1621 mutants across the six modules came back `-11`, mutmut reported 127 mutations/second, and the gate printed `NOT-MEASURED` for every module, "Not blocking the push", exit 0, in 2m32s. Main's script on that same live `.meta` output: every module `DROPPED`, exit 1 (the #523 bug, live). This branch's CI path (no `--run-mutmut`) on the same output: every module `DROPPED`, exit 1. The env var is a mitigation, not a guarantee, and the gate no longer depends on it. * Scoped Linux mutation-gate dispatch (`mutation.yml`) on this branch: passed * This branch was pushed with the hook **enabled** (no `SKIP=`, no `--no-verify`) and it passed: `mutmut (pre-push) ... Passed`, `PUSH_EXIT=0`. That demonstrates the hook no longer blocks; pre-commit suppresses output from passing hooks, so the run's own verdict table is not visible there. **CI note:** the first CI run failed only on the Windows pytest legs. That was the upstream `tree-sitter-language-pack` 1.14.1 release, which shipped no bundled Windows parsers; the re-run resolved 1.16.1 and every check passed. Nothing in this PR touches that dependency. **Not verified:** a partially noisy live pass (some mutants judged, some not). The live run above was a total wipeout; the partial shape is covered by the fixture runs and the stubbed-subprocess unit tests. ## Follow-up filed **#592**: the review had no probe for a test that passes only because of ambient cwd/env state, which is the class the strengthened test belongs to. ## Review history Five adversarial review rounds, each returning NOT SAFE, followed by a final naming pass: 1. Three P1s (038acdd): the tolerance leaked onto the Linux gate; the `killed + unjudged >= baseline` arithmetic could launder a real regression because the baseline holds counts rather than identities; a converge pass could erase a survivor an earlier pass saw. 2. The threshold broke on both sides (5c48a30): above it one un-judged mutant excused an unrelated regression, below it a clean tree still blocked. That pair showed the threshold premise was wrong rather than mistuned, and the threshold was removed. 3. `NOT-MEASURED` was unreachable when the kill floor was already met, so such a module read `OK` and printed "Strict gate passed"; the fold could erase the un-measured state when a later `.meta` went missing; and the platform half of the tolerance guard was unpinned (1786c89). 4. The fold's missing-file guard missed empty and truncated metas (1c5a87f). 5. A ninth hole in the fold, and the recommendation to delete it (90c1569). Done. 6. Stale converge-loop naming left in the tests (0960b40). Clarity only. 7. Merge-gate per-file review (07be388): 5c48a30 had replaced a block of `docs/DEVELOPMENT.md` and taken two accurate, unrelated paragraphs with it, the nightly/pre-push cross-link to `scripts/check_mutation_gate.py` and the mutmut `>=3,<3.6` cap rationale with its keep-the-pins-in-lockstep instruction. Restored verbatim. Also retired the last two stale converge names 0960b40 missed. Every substantive defect came from review rather than from the suite. The recurring cause was changing a rule and leaving statements that depended on it standing, which is the probe **#588** and **#592** ask for.
This was referenced Sep 29, 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.
What
Corrects the module docstrings of
src/sumo_qa/skill_prompts.pyandtests/test_skill_prompts.py, which described a delivery architecture the project does not have.Why
The docstring claimed skills ship through a "single delivery channel" and that "install.py no longer creates the symlink". Both were accurate when written (
e021ac5, 2026-05-12, the commit that made skills MCP-tools-only) and both went stale once Claude Code symlinking returned.That is worse than an out-of-date comment. It is a load-bearing design rationale pointing the wrong way, and it actively misleads anyone auditing whether the
~/.claude/skills/symlinks are redundant.What landed
Three commits. The first fixed the original staleness; the next two fixed defects the review gates found in that fix.
d8e959251c9a637658d2c4a2d1447658d2cThe corrected picture
MCP tools are the baseline channel because every supported host can reach them, not because they look the same everywhere. Per
docs/SKILLS.md, only JetBrains AI Assistant slash-invokes MCP tools; Claude Code, Junie and VS Code + Copilot call them by natural language. Claude Code's/sumo-qa-*entries come from the native skill loader, not from these tools.Claude Code additionally loads skills natively by one of two routes, which are additive, not exclusive:
~/.claude/skills/entriespip install+sumo-qa-install --claude-code_install_claude_code_skills_per_dirlinks each skill dircopytreeon Windows whensymlink_toraises)claude --plugin-diror marketplaceskills/<name>/SKILL.mdin placeSo the entries are load-bearing only when they are the machine's only native route. There, removing them silently downgrades
sumo-qa-reviewing-before-mergeto the_oversize_pointer_textroute, because it exceedsDEFAULT_SKILL_RESPONSE_TOKEN_CAP. With a plugin install present, nothing is downgraded.Review findings, all fixed
docs/ARCHITECTURE.md:106,docs/INSTALL.mddocs/SKILLS.md:13docs/INSTALL.md:98shutil.copytreeon Windows, so entries are not always symlinksinstaller.py:753-757Filed, not fixed here
docs/ARCHITECTURE.md:116anddocs/SKILLS.md:13contradict each other on whether MCP tools are slash-invocable in Claude Code. Deciding which is authoritative needs an empirical check, not a docstring edit.sumo-qa-reviewing-before-mergepass returned no material findings on this diff; codex caught all four. Includes a proposed probe extension for documentation-only diffs.Scope
Comments only. No behaviour change, no signature change, no test logic change.
register_skills_as_promptsservesSKILL.mdfiles, never the Python module docstring, so no tool response byte changes.Verification
Required test coverage of 100% reached. Total coverage: 100.00%mutation.yml) dispatched on the branch headsumo_qa_reviewing_before_mergeover MCP returns the pointer:~18141 estimated tokens, above the ~12000-token per-response capSKILL.md(~18295 tokens), served in fullskills/sumo-qa-reviewing-before-merge/SKILL.mdpresent at repo root for the plugin-loader route, no symlink involvedNote on the local pre-push mutation hook
Pushes used
SKIP=mutmut(the pytest pre-push hook still ran and passed). The local macOS mutmut gate executed zero mutants across three consecutive attempts, reporting all six modulesDROPPEDat ~160 mutations/s against a genuine ~3/s, on a cleared cache, with mutmut correctly pinned at 3.5.0. That is the pre-existing breakage tracked in #523, not a regression from this PR, whose diff cannot touch any gated module. The Linuxmutation.ymlrun is the authoritative gate.