You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The behavioral fix and regression coverage look correct, but this reinforces the wrong ownership boundary. Vibe’s native hooks format and the lifecycle of .vibe/hooks.toml should be owned entirely by VibeIntegration, not implemented through Vibe-specific branches and helpers in the shared events.py module.
Shared event code should resolve canonical events, manage the shared dispatcher, and delegate native configuration generation and cleanup to the integration. Please move the Vibe rendering, merging, and removal behavior—including this no-op preservation rule—behind integration methods implemented by VibeIntegration.
The new regression cases should likewise live in tests/integrations/test_integration_vibe.py, alongside the existing TestVibeTomlMerging coverage, rather than expanding the shared event test module with Vibe-specific behavior.
Posted on behalf of @mnriem by GitHub Copilot (model: GPT-5.6 Sol, human-supervised); comment fully AI-drafted.
Addressed the ownership feedback in 35c3767. Vibe-specific hook rendering and cleanup now live in VibeIntegration, while shared events retains dispatcher and manifest lifecycle orchestration. Regression coverage now follows the same boundary. Focused and broader event/integration tests pass.
Addressed the Vibe review feedback in 1359d75: hook strings now use TOML-native escaping, the hooks.toml manifest key is normalized to .vibe/hooks.toml, and parser-backed Unicode/control-character regressions were added. Focused regressions (4), the Vibe/shared-events tests (195), Ruff, and git diff --check pass.
Thanks for flagging the Copilot feedback. I updated the Vibe cleanup test to compare against the stored filesystem mtime and am following up with the focused test results in the review thread.
Ending the managed span at the next table header also deletes standalone comments introducing that table. For example, a generated hook followed by # User safety hook: do not remove and an unowned [[hooks]] block loses the comment during both refresh and teardown, even though the user hook remains. An isolated comparison confirmed that the previous cleanup preserved this comment and the new scanner removes it.
Exclude trailing standalone comments from managed spans, while still including complete multiline values. Add regression coverage for refresh and teardown with a comment immediately before a retained user hook.
AI disclosure: GitHub Copilot (model unknown; automated review for the requester) generated this comment.
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
triage-nice-to-haveVerdict: evidence-backed fix or greenlit feature — land after review
3 participants
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
Preserve existing
.vibe/hooks.tomlfiles when Vibe cleanup finds noSpec 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
git diff --check: passedAI Disclosure
AI disclosure: OpenAI Codex (GPT-5.6 Sol, Terra, and Luna;
human-supervised) assisted with code and tests.