G
YouTube TikTok Games
Skip to content

fix: invoke registered command hook only once - #5219

Merged
mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-workflow-failure-diagnosis
Nov 2, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-workflow-failure-diagnosis

Conversation

@mnriem

@mnriem mnriem commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Remove the duplicate process_registered_command() invocation in CommandRegistrar.register_commands(). Integration hooks now run once before argument and command-reference placeholder resolution, preventing repeated transformations of command frontmatter and bodies.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

The 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 -q before 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 -q after 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

  • I did not use AI assistance for this contribution
  • I did use AI assistance (fill in the disclosure below)

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.

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>
Copilot AI dynamic review requested due to automatic review settings November 2, 2026 22:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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)

@mnriem
mnriem merged commit 316dcae into github:main Nov 2, 2026
16 checks passed
@mnriem
mnriem deleted the mnriem-workflow-failure-diagnosis branch November 2, 2026 22:27
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>
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.

2 participants