Repository navigation
feat(OMN-20309): the hook-emit drainer installs as a systemd --user unit on Linux - #2465
Merged
Merged
Conversation
…nit on Linux OMN-20309 The hook-emit drainer was previously shipped only as a launchd plist, leaving the Linux lab host (omninode-pc) without a drainer. This resulted in 1064 queued records at alert time and 1175 when read. Changes: - scripts/install-hook-emit-drainer.sh: Added a Linux branch. The supervisor is auto-detected: launchctl on PATH preserves the existing launchd path; otherwise, systemctl selects systemd. - scripts/systemd/ai.omninode.hook-emit-drainer.service: New systemd --user unit with Restart=always, RestartSec=30, StartLimitIntervalSec=0, Nice=10, WantedBy=default.target, and no User= (runs as current user). Uses the omniclaude project venv interpreter. - Installer enhancements: Supports install, --dry-run, --uninstall, and --status. --status reports unit state, journal count (Pending), and emit_spool count (Spooled), exiting non-zero if the unit is not installed. Install validates the venv (uv sync hint if missing or imports fail for omnibase_infra/omnimarket) and attempts loginctl enable-linger, warning on failure. - tests/scripts/test_install_hook_emit_drainer_systemd.py: New tests (written red first, 6 failures) driving the installer with a stub systemctl and no launchctl. Existing status tests remain passing (13 passed total).
jonahgabriel
enabled auto-merge (squash)
October 1, 2026 14:23
jonahgabriel
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 1, 2026
) * evidence(OMN-20309): author OCC companion for OmniNode-ai/omniclaude#2465 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 6b8b462cb1bf613cf58a1d8d40da5bf8203fe2af. * evidence(OMN-20309): self-bind OCC#12170 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
Contributor
✅ 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OMN-20309. Slack alert 09:20 ET: hook capture on omninode-pc (.201) was not delivering, 1064 events queued, drainer reported no state. The drainer shipped only as a launchd plist, so nothing drained the journal on Linux.
scripts/install-hook-emit-drainer.shgets a Linux branch (extended, no new script, per the 2026-10-01 operator ruling).launchctlon PATH keeps the launchd path unchanged; otherwisesystemctlselects systemd. Newscripts/systemd/ai.omninode.hook-emit-drainer.serviceis asystemd --userunit:Restart=always,RestartSec=30,StartLimitIntervalSec=0,Nice=10,WantedBy=default.target, noUser=, so no root. Interpreter is the omniclaude project venv. Flags: install,--dry-run,--uninstall,--status(unit state,Pending,Spooled; exits non-zero when the unit is not installed).Test plan
tests/scripts/test_install_hook_emit_drainer_systemd.py, written red first (6 failed), then green; with the existing status tests, 13 passed.bash scripts/install-hook-emit-drainer.shinstalled the unit as uid 1000 with no root;systemctl --userreports active/running, NRestarts=0. Journal 1213 at install, 1346 at last read.Known blocker: the queue does not drain yet
Every publish is refused by the broker ACLs:
ONEX_CORE_025_PERMISSION_DENIEDononex.evt.omniclaude.tool-executed.v1(986 of the queued records aretool.executed). The principal this host declares,dev-jonah-omninode-pc, lists 3 topics and none of theonex.evt.omniclaudetopics, so it holds no WRITE grant on them. The broker is reachable; the fault is the grant. The fix is a broker-side grant (LITERAL WRITE + DESCRIBE on the omniclaude event topics for that principal), an operator-gated broker change this PR does not make. Records stay in the journal, un-acked, and replay once the grant exists.Lab: host h201, installed as a systemd --user unit, active/running with NRestarts=0. Publishes are refused by broker ACL, so the queue is not drained yet.
Evidence-Ticket: OMN-20309
Evidence-Source: OCC#12170