Repository navigation
fix(hooks): alarm on a journal with no drainer installed (OMN-17427) - #2598
Conversation
|
Lab: host=h202; lane=h202-hook-drain-2135; command: pytest tests/hooks/test_workspace_reconcile.py tests/hooks/test_hooks_baseline_omn_13244.py; observed: 91 passed; the 4 alarm-positive new tests fail against the unmodified script and pass with the change; pre-commit clean; head=c806e8f1d85d8446a5749c24c382a87dcab017f0 |
) * evidence(OMN-17427): author OCC companion for OmniNode-ai/omniclaude#2598 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head c806e8f1d85d8446a5749c24c382a87dcab017f0. * evidence(OMN-17427): self-bind OCC#13241 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Findings
Gate semantics (pilot phase)
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
|
Lab: host=h201; lane=cause-claude-bump-2245; command: pytest tests/hooks/test_workspace_reconcile.py tests/hooks/test_hooks_baseline_omn_13244.py, then python3 scripts/validation/validate_plugin_version_bump.py --base origin/dev; observed: 91 passed; the plugin version bump gate exits 0 with plugin.json and the dev marketplace entry at 2.4.52 over dev 2.4.49 (dev 246826a merged in by a merge commit); pre-commit clean; head=ce3454c51f0b5823a2ab23d528c24c79b2c34865 |
ALARM on journalled events without drainer unit. h202 held 38,653 pending records, oldest 2026-09-30. Not silenced by quiet/tick; names installer script. Detects only; does not install. 6 test cases added.
Resolve both manifest version conflicts against dev version 2.4.50. The missing-drainer alarm and its tests applied cleanly.
ce3454c to
7a2475b
Compare
OMN-17427: Add drainer alarm to session_start_workspace_sync.sh
Base: dev
Summary
Adds
_drainer_alarmtoplugins/onex/hooks/scripts/session_start_workspace_sync.sh. It runs beside the existing load-path alarm and above the session-intent gate, so quiet/tick intent does not silence it.Behavior
Prints an ALARM line when both hold:
~/.config/systemd/user/ai.omninode.hook-emit-drainer.service(honouringXDG_CONFIG_HOME)~/Library/LaunchAgents/ai.omninode.hook-emit-drainer.plist*.jsonrecord.Journal dir resolution:
ONEX_HOOK_EMIT_JOURNAL_DIR→ONEX_STATE_DIR/hook_emit_journal→~/.onex_state/hook_emit_journal.The alarm names the missing definition path, the journal path, and the repair:
bash $OMNI_HOME/omniclaude/scripts/install-hook-emit-drainer.sh.Cost
One
staton a healthy host; afindthat stops at the first record only on an already-wrong host. Pure bash, exit 0 always.Motivation
On 2026-10-07, host h202 had 38,653 pending hook journal records (oldest 2026-09-30) with no drainer unit, while h201 drained. The installer is a manual operator step; no bring-up path runs it, so nothing on h202 reported the gap.
Limit
Detects a never-installed drainer only. Does not install it; does not detect an installed-but-stuck drainer.
Tests
tests/hooks/test_workspace_reconcile.pygains 6 tests. Four alarm-positive tests fail against unmodified script, pass with change. Result: 91 passed acrosstest_workspace_reconcile.pyandtest_hooks_baseline_omn_13244.py. Pre-commit clean on both changed files.Evidence-Ticket: OMN-17427
Evidence-Source: OCC#13241