Skip to content

fix: G0 health check misses top-level event-key hooks#92

Merged
claudioemmanuel merged 1 commit intomainfrom
fix/health-check-top-level-hooks
Apr 28, 2026
Merged

fix: G0 health check misses top-level event-key hooks#92
claudioemmanuel merged 1 commit intomainfrom
fix/health-check-top-level-hooks

Conversation

@claudioemmanuel
Copy link
Copy Markdown
Owner

Closes #91

Follow-up to #90. End-to-end testing of the new SessionStart health check produced a false missing alarm against a real installation where squeez hooks were correctly present.

Cause: squeez writes hooks at settings.PreToolUse (top-level), but the check only inspected settings.hooks.PreToolUse.

Fix: scan both buckets + the statusLine slot.

Test plan

  • Verified against a real settings.json with squeez at top-level → returns ok
  • Verified against synthetic OMC-style settings.json without squeez → returns missing

The squeez install patches `~/.claude/settings.json` by writing hook
arrays at top-level event keys (settings.PreToolUse, settings.SessionStart,
settings.PostToolUse). Other tools nest under settings.hooks.* — Claude
Code reads both shapes for backwards compat.

The G0 health check shipped in #90 only inspected settings.hooks.* and
falsely reported "missing" on installs where squeez hooks live at the
top level. Now scans both buckets plus the statusLine slot.

Signed-off-by: claudioemmanuel <42774167+claudioemmanuel@users.noreply.github.com>
@claudioemmanuel claudioemmanuel merged commit bbd647f into main Apr 28, 2026
5 checks passed
@claudioemmanuel claudioemmanuel deleted the fix/health-check-top-level-hooks branch April 28, 2026 18:59
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.

fix: G0 health check misses top-level event-key hooks

1 participant