Skip to content

refactor(cli): drop the copilot command handler's frontmatter method nothing calls - #823

Merged
blafourcade merged 1 commit into
nextfrom
refactor/copilot-drop-unused-command-frontmatter
Sep 10, 2026
Merged

blafourcade merged 1 commit into
nextfrom
refactor/copilot-drop-unused-command-frontmatter

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

🎯 What & why

commandsHandler.convertFrontmatter in the copilot profile is never called. The commands capability gets convertCommandFrontmatter directly, and the handler only serves buildFilePath. The #799 mutation pass found it, because its mutants could only survive. knip does not see unused methods on an object literal.

🛠️ How it works

Six lines deleted from cli/src/contexts/tools/domain/profiles/copilot/profile.ts. Nothing else changes.

🧪 How to verify

git grep -n "commandsHandler.convertFrontmatter" -- cli/src   # nothing
cd cli && pnpm vitest run --project unit --project integration tests/contexts/tools && pnpm vitest run --project e2e tests/golden

The tools suite and the golden snapshots pass unchanged. Typecheck, lint, test:arch, knip and type honesty are clean.

⚠️ Heads-up

CI runs the tools-copilot mutation gate. Removing lines whose mutants could only survive can only raise that score.

🔗 Linked issue

Fixes #822

✅ I certify

  • I have read the contributing guide and followed the PR template.
  • Every gate listed above passed locally. There is no behaviour to write a failing test for, and the unchanged golden snapshots prove the output is the same.

🤖 Generated with Claude Code

https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb

…nothing calls

The copilot commands capability is built with convertCommandFrontmatter
directly, so commandsHandler.convertFrontmatter was never reached: the
handler serves buildFilePath alone. Copilot's commands are unchanged; the
tools suite and the golden snapshots pass as they were.

Fixes #822

Co-Authored-By: Claude Opus 5 <[email protected]>
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:21
@blafourcade
blafourcade merged commit c628218 into next Sep 10, 2026
25 checks passed
@blafourcade
blafourcade deleted the refactor/copilot-drop-unused-command-frontmatter branch September 11, 2026 07:42
@aidd-bot aidd-bot Bot mentioned this pull request Sep 24, 2026
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