Skip to content

feat(OMN-13092): register durable-capture event types + cross-registry consistency gate - #1751

Merged
jonahgabriel merged 3 commits into
devfrom
jonah/omn-13092-capture-event-types
Jun 12, 2026
Merged

jonahgabriel merged 3 commits into
devfrom
jonah/omn-13092-capture-event-types

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase 0c (omniclaude side) of the skill-output-suppression slice (epic OMN-13089), ticket OMN-13092. Pairs with merged omnimarket PR #1201 (daemon-side topic registration).

Registers the two durable-capture event types end-to-end on the hook side and adds the blocking cross-registry consistency gate:

  • artifact.captured → onex.evt.omnimarket.artifact-captured.v1 (duty_critical)
  • tool.output.captured → onex.evt.omnimarket.tool-output-captured.v1 (duty_critical)

Changes

Surface Change
plugins/onex/hooks/lib/emit_client_wrapper.py SUPPORTED_EVENT_TYPES += both event types (closes F10: registered nowhere)
src/omniclaude/hooks/topics.py TopicBase.ARTIFACT_CAPTURED / TOOL_OUTPUT_CAPTURED
src/omniclaude/hooks/event_registry.py EventRegistration entries (partition correlation_id, required fields mirror the daemon registry)
plugins/onex/lib/event_registry/omniclaude.yaml Live --event-registry launch registry registers both events (the daemon rejects unregistered event types with "Unknown event type")
src/omniclaude/hooks/topic_allowlist.yaml Governance entries — producer-side contract ownership is omnimarket node_emit_daemon (contract.yaml publish_topics + registries/topics.yaml)
tests/hooks/test_registry_consistency.py NEW blocking gate: hook frozenset ⊆ omniclaude EVENT_REGISTRY ⊆ omnimarket daemon YAML; per-event fan-out topic subset; capture topics exactly duty_critical
.github/workflows/ci.yml Dedicated registry-consistency job: checks out omnimarket@dev and runs the gate against the live routing authority (wired into the Tests Gate aggregator)

Pre-existing gate violations

The pre-existing pre-commit violations originally fixed in this branch (demo skill hardcoded topics, legacy CLAUDE_SESSION_ID read, stale SPDX years) landed on dev independently while this PR was in flight; this branch rebased onto them and now carries only the OMN-13092 registration + gate changes.

dod_evidence

  • uv run pytest tests/hooks/test_registry_consistency.py -v → 4 passed (frozenset⊆EVENT_REGISTRY, frozenset⊆daemon YAML, duty_critical assertion, per-event topic subset)
  • Full suite uv run pytest tests/ -m "not integration" -q → 11,117 passed, 0 failed (integration tests require the local Redpanda bus, unavailable on this machine by design; CI runs them)
  • uv run mypy src/ --config-file mypy.ini → Success, no issues in 711 files
  • uv run ruff format / ruff check → clean
  • pre-commit run --all-files → exit 0

Evidence-Ticket: OMN-13092
Evidence-Source: OCC#2588
Paired OCC receipt PRs: onex_change_control #2575 (contract + registration receipts, merged), #2581 (deploy verification receipt, merged), #2589 (omniclaude PR receipt, open), #2588 (omniclaude PR binding receipt, merged)

Summary by CodeRabbit

  • New Features

    • Added support for two new event types: artifact capture and tool output capture events, enabling enhanced durability and reliability tracking for critical system operations.
  • Tests

    • Implemented comprehensive cross-registry consistency validation to ensure event definitions remain synchronized between local and daemon components, preventing registration mismatches and improving overall system reliability.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jonahgabriel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 hours, 26 minutes, and 33 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8009f479-1e4f-430e-a2b1-f004d822fb86

📥 Commits

Reviewing files that changed from the base of the PR and between a432027 and 02d145e.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • scripts/validation/validate_topic_naming.py
  • tests/hooks/test_registry_consistency.py
📝 Walkthrough

Walkthrough

This PR adds two new durable capture event types to omniclaude's hook-emitted event system by updating topic definitions, event registries (YAML and Python), client support, allowlisting, and cross-registry validation. A new CI job enforces consistency between the local registries and the canonical omnimarket daemon registry.

Changes

Durable Capture Events Implementation

Layer / File(s) Summary
Topic definitions and schema
src/omniclaude/hooks/topics.py
Two new TopicBase enum members define canonical artifact-captured and tool-output-captured ONEX topics with docstrings describing content-addressed artifact and tool-output capture semantics.
Event registry configuration
plugins/onex/lib/event_registry/omniclaude.yaml, src/omniclaude/hooks/event_registry.py, src/omniclaude/hooks/topic_allowlist.yaml, tests/hooks/test_event_registry.py
Events registered in the daemon YAML with duty-critical fan-out, Python event registry wired to topic enums with passthrough transforms and correlation_id partitioning, topics allowlisted with integration lifecycle, and event registry tests updated to expect the new types.
Client event emission support
plugins/onex/hooks/lib/emit_client_wrapper.py, tests/hooks/test_emit_client_wrapper.py
New event types added to SUPPORTED_EVENT_TYPES frozenset, enabling client CLI/API validation; client test updated to verify expanded event-type set.
Cross-registry consistency enforcement
tests/hooks/test_registry_consistency.py
New test module validates that both events exist in EVENT_REGISTRY and daemon YAML, that capture events route to duty-critical topics, and that fan-out topics remain consistent across all three registries.
CI workflow integration
.github/workflows/ci.yml
New registry-consistency job checks out omnimarket, installs dependencies, and runs the consistency test; tests-gate updated to depend on and validate the result.

Sequence Diagram(s)

sequenceDiagram
    participant Client as emit_event CLI
    participant SupportedTypes as SUPPORTED_EVENT_TYPES
    participant Registry as EVENT_REGISTRY
    participant Kafka as Kafka Topics
    participant DaemonRegistry as Daemon YAML

    Client->>SupportedTypes: validate artifact.captured
    SupportedTypes-->>Client: type recognized
    Client->>Registry: resolve fan-out routes
    Registry->>Kafka: publish to ARTIFACT_CAPTURED topic
    Registry->>Registry: partition by correlation_id
    Kafka-->>DaemonRegistry: topic must exist in fan_out
    DaemonRegistry-->>Kafka: tier: duty_critical
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • OmniNode-ai/omniclaude#1630: Extends the same event-type routing plumbing by adding new daemon-emitted events (tool.content) to SUPPORTED_EVENT_TYPES and corresponding omniclaude event fan-out registrations.

Poem

🐰 Two capture events hop into the fray,
With duty-critical routing to save the day,
Cross-registry checks keep all registries aligned,
A consistency gate leaves no surprises behind! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: registering two durable-capture event types and adding a cross-registry consistency gate, directly matching the core objectives of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-13092-capture-event-types

Comment @coderabbitai help to get the list of available commands and usage tips.

…y consistency gate

Phase 0c (omniclaude side) of the skill-output-suppression slice (epic OMN-13089):

- emit_client_wrapper SUPPORTED_EVENT_TYPES += artifact.captured, tool.output.captured
- TopicBase += ARTIFACT_CAPTURED / TOOL_OUTPUT_CAPTURED (onex.evt.omnimarket.*-captured.v1)
- EVENT_REGISTRY registrations (duty-critical capture trail, no-hidden-loss invariant)
- live daemon launch registry (plugins/onex/lib/event_registry/omniclaude.yaml) registers
  both events so the --event-registry path accepts them at runtime
- topic_allowlist.yaml entries (producer-side contract ownership is omnimarket
  node_emit_daemon contract.yaml + registries/topics.yaml)
- NEW blocking gate: tests/hooks/test_registry_consistency.py — hook frozenset ⊆
  omniclaude EVENT_REGISTRY ⊆ omnimarket daemon YAML registry, capture topics
  duty_critical; dedicated registry-consistency CI job checks out omnimarket@dev
  and is wired into the Tests Gate aggregator
@jonahgabriel
jonahgabriel force-pushed the jonah/omn-13092-capture-event-types branch from b93d8b3 to a432027 Compare June 12, 2026 20:13
@github-actions

github-actions Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Hostile Reviewer — DEGRADED (informational)

Blocking findings (critical/error): 0
Total findings: 0
Models succeeded: none

Note: All reviewer models failed or were unavailable. Degraded results are informational during the pilot phase (OMN-8524) and do not block merge. Error: cli_review exited non-zero (all models failed or binary error)


Gate semantics (pilot phase)

Verdict Meaning Blocks merge?
passed No critical/error findings No
blocked CRITICAL or ERROR findings found Yes
degraded All models unavailable (infra) No (pilot)

Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)

@github-actions
github-actions Bot enabled auto-merge June 12, 2026 20:14
Comment thread tests/hooks/test_registry_consistency.py Fixed

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 1225-1233: Both checkout steps ("Checkout code" and "Checkout
canonical omnimarket registry") leave Git credentials in the repo by default;
update each actions/checkout@v6 step to include persist-credentials: false in
their with: block so the runner does not persist the token to local git config
before running repository-controlled commands like uv sync and pytest.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9ab88a4e-9c09-49b0-a651-46bd91f5ffe6

📥 Commits

Reviewing files that changed from the base of the PR and between db021a6 and a432027.

📒 Files selected for processing (9)
  • .github/workflows/ci.yml
  • plugins/onex/hooks/lib/emit_client_wrapper.py
  • plugins/onex/lib/event_registry/omniclaude.yaml
  • src/omniclaude/hooks/event_registry.py
  • src/omniclaude/hooks/topic_allowlist.yaml
  • src/omniclaude/hooks/topics.py
  • tests/hooks/test_emit_client_wrapper.py
  • tests/hooks/test_event_registry.py
  • tests/hooks/test_registry_consistency.py

Comment thread .github/workflows/ci.yml
@github-actions
github-actions Bot added this pull request to the merge queue Jun 12, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jun 12, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 12, 2026
Merged via the queue into dev with commit 46a9821 Jun 12, 2026
100 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-13092-capture-event-types branch June 12, 2026 21:22
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.

2 participants