Skip to content

test(cli): kill the surviving mutants of the copilot, codex and opencode profiles - #821

Merged
blafourcade merged 3 commits into
nextfrom
test/profile-pockets-survivors
Sep 10, 2026
Merged

test(cli): kill the surviving mutants of the copilot, codex and opencode profiles#821
blafourcade merged 3 commits into
nextfrom
test/profile-pockets-survivors

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

🎯 What & why

Last lot of #799: the three tool-profile scopes left below target. Each held a floor under 90, so a profile's build contract or path mapping could change without any test noticing. This PR adds the tests their survivors named. It changes no source.

🛠️ How it works

Scope Before After Target Floor
tools-copilot (426 mutants) 82.39 (55 survived, 20 uncovered) 95.31 (19, 1) ≥ 90 80 → 93
tools-codex (381) 89.50 (38, 2) 96.33 (14, 0) ≥ 92 87 → 94
tools-opencode (283) 87.63 (34, 1) 96.82 (8, 1) ≥ 90 81 → 94
  • Tests under cli/tests/contexts/tools/domain/profiles/. They cover each profile's path mapping, build contract, the codex agent TOML and transcript location, and the opencode hooks bridge.
  • 71 mutants were applied by hand, and each turned its test red. Example: codex build.ts:65 with >= turned into > fails "leaves a user's project_doc_max_bytes already at the floor untouched".
  • Every score comes from run-mutation.mjs <scope> --force, before and after. Each floor is the measured score minus two, rounded down.

🧪 How to verify

git diff --stat origin/next... -- cli/src      # empty
cd cli && for s in tools-copilot tools-codex tools-opencode; do node scripts/run-mutation.mjs $s; done

Measured on this branch: 379 files and 5073 tests passed. Typecheck, lint, test:arch, knip and type honesty are clean.

⚠️ Heads-up

  • The surviving mutants are equivalent. Most are section-prefix regexes whose callers always pass a path that already starts with the section. A few are the known stryker artefact of a capability constructor that throws at import.
  • One piece of dead code turned up and is left for its own issue: commandsHandler.convertFrontmatter in the copilot profile.

🔗 Linked issue

Refs #799. With #815 and #819 this covers every scope #799 names, so it closes once all three are merged.

✅ I certify

  • I have read the contributing guide and followed the PR template.
  • Tests were written red first and every gate listed above passed locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb

blafourcade and others added 3 commits September 10, 2026 11:14
tools-copilot under run-mutation.mjs --force, 426 mutants:
- before: 82.39, 55 survived, 20 uncovered
- after: 95.31, 19 survived, 1 uncovered

Floor raised from 80 to 93.

Refs #799

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb
AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
tools-codex under run-mutation.mjs --force, 381 mutants:
- before: 89.50, 38 survived, 2 uncovered
- after: 96.33, 14 survived, 0 uncovered

Floor raised from 87 to 94.

Refs #799

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb
AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
tools-opencode under run-mutation.mjs --force, 283 mutants:
- before: 87.63, 34 survived, 1 uncovered
- after: 96.82, 8 survived, 1 uncovered

Floor raised from 81 to 94.

Refs #799

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb
AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
@blafourcade
blafourcade requested a review from a team as a code owner September 10, 2026 09:18
@blafourcade
blafourcade merged commit 780e9ee into next Sep 10, 2026
36 checks passed
@blafourcade
blafourcade deleted the test/profile-pockets-survivors branch September 11, 2026 07:42
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