Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

fix(health-check): include slack-bridge in dup-process + auto-resurrect lists - #67

Open
jsun-m wants to merge 1 commit into
mainfrom
fix/health-check-slack-bridge-1257
Open

jsun-m wants to merge 1 commit into
mainfrom
fix/health-check-slack-bridge-1257

Conversation

@jsun-m

@jsun-m jsun-m commented May 27, 2026

Copy link
Copy Markdown

Summary

Tonight on the Mac Studio core, slack-bridge had two simultaneously-running processes (a launchd-managed instance ~21 min old and a standalone-launched instance ~7 days old) — but health-check.py reported only telegram-bridge and discord-bridge warnings, because slack-bridge was missing from both:

  • the configured-bridge iteration tuple at src/health-check.py:821
  • the --fix auto-resurrection tuple at src/health-check.py:1270

Adding slack-bridge to both restores parity. The detector and resurrect paths are otherwise identical — same pgrep -f '<name>\.py$' anchor, same ~/.claude/channels/<name>/ env gating.

Verification

Before the patch on the affected host:

$ python3 src/health-check.py | grep bridge
  ✓ telegram-bridge   ok    running
  ✓ discord-bridge    ok    running
$ pgrep -f 'slack-bridge\.py$' | wc -l
       2

After the patch on the same host (no other changes):

$ python3 src/health-check.py | grep bridge
  ✓ telegram-bridge   ok    running
  ✓ discord-bridge    ok    running
  ⚠ slack-bridge      warn  multiple processes (2 PIDs: 52298,87616)

Context

Companion to sonichi#1257 (root-cause fix proposes fcntl.flock single-instance guards inside the bridge processes themselves). This PR is the smaller of the two — closing the observability gap so dup-bridge regressions are visible regardless of which root cause they originate from.

Test plan

  • python3 src/health-check.py flags slack-bridge dup
  • CI lint/tests pass
  • Spot-check --fix path on a host with a stale (down) slack-bridge

🤖 Generated with Claude Code

…ct lists (sonichi#1257)

slack-bridge was the only messaging bridge not covered by health-check's
"multiple processes" detector or by --fix's stale-bridge resurrection
path. Tonight on the Mac Studio core, slack-bridge had two PIDs (a
launchd-managed instance 21min old and a standalone-launched instance
7 days old), and the warn surfaced only after manual pgrep — not via
health-check.

This adds slack-bridge to:
- the configured-bridge iteration tuple at line 821 (so the detector
  fires for it), and
- the auto-resurrect tuple at line 1270 (so --fix knows to resurrect
  it when stale).

Verified locally: after the patch, health-check emits
  ⚠ slack-bridge  warn  multiple processes (2 PIDs: 52298,87616)
on the host where it was previously silent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@bassilkhilo-ag2 bassilkhilo-ag2 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean fix — adds slack-bridge to both the dup-process detector and the --fix resurrection path, exactly matching the existing telegram/discord entries. The companion PR in sonichi/sutando (sonichi#1257) is the deeper root-cause guard; this PR closes the observability gap regardless of root cause. LGTM.

@bassilkhilo-ag2

Copy link
Copy Markdown

Same two-line change as PR #92 (jgluck96). Whichever merges first, the other will be a no-op (or trivial conflict). Worth closing one to avoid confusion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants