Repository navigation
fix: invoke registered command hook only once - #5219
Merged
Merged
Conversation
Remove the duplicate integration hook call before placeholder resolution. Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change removing the duplicate integration-hook invocation.
No open issues 🎉
What changed in this PR
Fixes command registration so each integration hook runs once, preventing duplicate transformations of command frontmatter and bodies.
Changes:
- Removes the duplicate
process_registered_command()invocation. - Preserves hook execution before argument and command-reference placeholder resolution.
| File | Description |
|---|---|
src/specify_cli/agents.py |
Removes the redundant integration hook call from CommandRegistrar.register_commands(). |
Review effort: Balanced (auto)
kevinnguyenhoang91
pushed a commit
to kevinnguyenhoang91/spec-kit
that referenced
this pull request
Nov 10, 2026
Remove the duplicate integration hook call before placeholder resolution. Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Description
Remove the duplicate
process_registered_command()invocation inCommandRegistrar.register_commands(). Integration hooks now run once before argument and command-reference placeholder resolution, preventing repeated transformations of command frontmatter and bodies.Testing
uv run specify --helpuv sync && uv run pytestThe existing-tests checkbox was validated using the documented worktree-local interpreter rather than bare
uv run pytest:uv sync --extra test --quiet— passed..venv/bin/python -m pytest tests/test_registered_command_hook.py -qbefore the fix — reproduced the three failures; four tests passed..venv/bin/python -m pytest tests/test_registered_command_hook.py tests/integrations/test_integration_cline.py tests/integrations/test_integration_base_markdown.py tests/integrations/test_integration_base_toml.py tests/integrations/test_integration_base_skills.py -qafter the fix — 59 passed.LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest tests -n auto -q— 14,085 passed, 132 skipped, 63 warnings on macOS with Python 3.13.17.uv run specify --help— passed.git diff --check— passed.Sample-project testing is not applicable to removing the duplicate hook invocation; existing registration tests exercise generated command output.
AI Disclosure
AI disclosure: GitHub Copilot using GPT-6.1 Sol, in autonomous agent mode at the contributor's direction, investigated the failure, removed the duplicate call, ran automated checks, authored the commit, and drafted this PR. No human line-by-line review is claimed; the reasoning-effort setting was not exposed.