Problem
Issue #944 (strip global hook duplicates from per-repo settings templates) incorrectly stripped the `conversation_archiver` Stop hook from `plugins/autonomous-dev/templates/settings.granular-bash.json`. The hook is present in the main repo but absent in the batch worktree after #944 ran.
This causes the regression test `test_conversation_archiver.py::TestHookRegistration::test_hook_in_all_settings_templates` to fail.
Repo: autonomous-dev
Session: 2026-04-25T11:44 - 13:23 (batch-20260425-214020)
Evidence
Main repo settings.granular-bash.json Stop hooks (2 entries):
session_activity_logger.py
CONVERSATION_ARCHIVE=true ... conversation_archiver.py
Worktree after #944:
session_activity_logger.py
- (MISSING) conversation_archiver entry was stripped
Failure:
FAILED tests/unit/hooks/test_conversation_archiver.py::TestHookRegistration::test_hook_in_all_settings_templates
AssertionError: conversation_archiver not found in settings.granular-bash.json Stop hooks
Hook test suite: 6 failures in worktree vs 0 failures in main repo HEAD.
Root Cause
The strip_global_duplicates() function added by #944 incorrectly identified conversation_archiver as a "global duplicate" in the granular-bash template and removed it. The conversation_archiver entry in granular-bash is intentionally present — it is a per-mode hook, not a global duplicate.
Suggested Fix
- Audit
CANONICAL_GLOBAL_HOOKS set in settings_merger.py — ensure it does NOT include conversation_archiver
- Add regression test:
strip_global_duplicates on granular-bash template MUST preserve conversation_archiver entry
- Re-run strip on the granular-bash template to restore the missing hook
Plugin Version: PLUGIN_VER_PLACEHOLDER
Filed automatically by continuous-improvement-analyst
Problem
Issue #944 (strip global hook duplicates from per-repo settings templates) incorrectly stripped the `conversation_archiver` Stop hook from `plugins/autonomous-dev/templates/settings.granular-bash.json`. The hook is present in the main repo but absent in the batch worktree after #944 ran.
This causes the regression test `test_conversation_archiver.py::TestHookRegistration::test_hook_in_all_settings_templates` to fail.
Repo: autonomous-dev
Session: 2026-04-25T11:44 - 13:23 (batch-20260425-214020)
Evidence
Main repo
settings.granular-bash.jsonStop hooks (2 entries):session_activity_logger.pyCONVERSATION_ARCHIVE=true ... conversation_archiver.pyWorktree after #944:
session_activity_logger.pyFailure:
Hook test suite: 6 failures in worktree vs 0 failures in main repo HEAD.
Root Cause
The
strip_global_duplicates()function added by #944 incorrectly identifiedconversation_archiveras a "global duplicate" in the granular-bash template and removed it. Theconversation_archiverentry in granular-bash is intentionally present — it is a per-mode hook, not a global duplicate.Suggested Fix
CANONICAL_GLOBAL_HOOKSset insettings_merger.py— ensure it does NOT includeconversation_archiverstrip_global_duplicateson granular-bash template MUST preserve conversation_archiver entryPlugin Version: PLUGIN_VER_PLACEHOLDER
Filed automatically by continuous-improvement-analyst