Tracking the cleanup requested in #328's round-3 review: the version-skew fallback in home/.claude/hooks/session-start.sh is deploy-ordering scaffolding, and it becomes dead code once every machine runs an agent-event-bus-cli that understands --min-level (agent-event-bus#129). At that point the exit-2 argparse contract it keys on is an untriggerable path and should not live on.
What to remove, once the fleet is upgraded:
- The fallback branch in
session-start.sh (the [[ -z "$EVENTS" && $FETCH_RC -eq 2 ]] retry with --exclude session_registered,session_unregistered), the FETCH_RC capture, and the version-skew comment block — the fetch_events helper call with --min-level info stays.
- The
MOCK_REJECT_MIN_LEVEL machinery in the session-start mock CLI in tests/test-hooks.sh, plus test_session_start_min_level_fallback and its registration in main().
- The fallback sentence in the
session-start.sh entry of home/.claude/hooks/README.md (the split-noise-policy paragraph stays — it describes the drain lib's client-side EB_EXCLUDE, which is independent of this fallback; see agent-event-bus#134 for the cursor-ack work that would unify it).
Precondition: every machine's agent-event-bus-cli accepts --min-level — spot-check with agent-event-bus-cli events --min-level info --limit 1 exiting 0 (or 1 for a down bus, but not 2) on each machine.
Keep: test_session_start_uses_min_level and test_eventbus_lib_uses_client_side_exclude — they pin the primary path and the deliberate lib-side split, not the scaffolding.
Tracking the cleanup requested in #328's round-3 review: the version-skew fallback in
home/.claude/hooks/session-start.shis deploy-ordering scaffolding, and it becomes dead code once every machine runs anagent-event-bus-clithat understands--min-level(agent-event-bus#129). At that point the exit-2 argparse contract it keys on is an untriggerable path and should not live on.What to remove, once the fleet is upgraded:
session-start.sh(the[[ -z "$EVENTS" && $FETCH_RC -eq 2 ]]retry with--exclude session_registered,session_unregistered), theFETCH_RCcapture, and the version-skew comment block — thefetch_eventshelper call with--min-level infostays.MOCK_REJECT_MIN_LEVELmachinery in the session-start mock CLI intests/test-hooks.sh, plustest_session_start_min_level_fallbackand its registration inmain().session-start.shentry ofhome/.claude/hooks/README.md(the split-noise-policy paragraph stays — it describes the drain lib's client-sideEB_EXCLUDE, which is independent of this fallback; see agent-event-bus#134 for the cursor-ack work that would unify it).Precondition: every machine's
agent-event-bus-cliaccepts--min-level— spot-check withagent-event-bus-cli events --min-level info --limit 1exiting 0 (or 1 for a down bus, but not 2) on each machine.Keep:
test_session_start_uses_min_levelandtest_eventbus_lib_uses_client_side_exclude— they pin the primary path and the deliberate lib-side split, not the scaffolding.