Skip to content

fix(events): preserve unowned Vibe hooks files - #4646

Open
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/vibe-hooks-preserve
Open

WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/vibe-hooks-preserve

Conversation

@WOLIKIMCHENG

Copy link
Copy Markdown
Contributor

Description

Preserve existing .vibe/hooks.toml files when Vibe cleanup finds no
Spec Kit-managed hooks to remove.

This prevents no-op installation and teardown paths from rewriting user
content, changing line endings, or deleting comment-only and whitespace-only
files. Cleanup of Spec Kit-managed hooks remains unchanged.

Testing

  • Focused Vibe cleanup tests: 22 passed
  • Compile and import checks: passed
  • git diff --check: passed

AI Disclosure

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

AI disclosure: OpenAI Codex (GPT-5.6 Sol, Terra, and Luna;
human-supervised) assisted with code and tests.

Avoid rewriting or deleting hooks.toml when cleanup finds no Spec Kit-managed hooks to remove. Preserve existing cleanup behavior for managed entries.
@mnriem mnriem added the triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review label Sep 20, 2026
@mnriem
mnriem requested a balanced review from Copilot September 21, 2026 19:29

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.

Copilot review overview

🟢 Approval recommended

The focused fix is correct and has comprehensive regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Preserves unowned Vibe hook configuration during no-op cleanup.

Changes:

  • Skips rewriting when no Spec Kit hook is removed.
  • Adds regression coverage for content, timestamps, comments, whitespace, and forced teardown.
File Description
src/​specify_cli/​events.py Adds the no-op cleanup guard.
tests/​integrations/​test_events.py Tests preservation of unowned Vibe files.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants