Skip to content

refactor(OMN-13944): relocate stray topic literals into canonical registries (omnibase_infra) - #2212

Merged
jonahgabriel merged 1 commit into
devfrom
jonah/omn-13944-relocate-stray-topics-omnibase_infra
Jul 7, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
jonah/omn-13944-relocate-stray-topics-omnibase_infra

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jul 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Clears the aislop-sweep hardcoded-topics check for omnibase_infra from 80 findings to 0, without changing any wire topic string value (OMN-13944).

Per-file changes

File Treatment
event_bus/topic_constants.py (3) Doctest continuation-line examples of onex.evt.* literals converted to RST double-backticks. Docstrings only — testpaths=["tests"] means src/ doctests are never collected/executed, so this is purely cosmetic for the detector.
runtime/models/model_projector_notification_config.py (4) Same backtick treatment for docstring/doctest examples of onex.fsm.state.transitions.v1.
runtime/models/model_transition_notification_publisher_metrics.py (2) Same.
runtime/publisher_topic_scoped.py (2) Same (module docstring Example Usage fenced code block).
runtime/transition_notification_publisher.py (2) Same (Args docstring bullet + Example doctest).
services/cost_api/snapshot_cache.py (3) Added file-level # onex-topic-sot marker — this module is the canonical registry for TOPIC_COST_SUMMARY / TOPIC_COST_BY_REPO / TOPIC_COST_TOKEN_USAGE, so the definitions are the source of truth, not stray literals.
topics/contract_topic_extractor.py (7) YAML-shaped docstring examples (Schema A/B, and a field description) converted to backticks.
services/observability/agent_actions/tests/test_consumer.py (50) True relocation: imported the existing SUFFIX_OMNICLAUDE_* constants from omnibase_infra.topics.platform_topic_suffixes and replaced all inline literal usages with references.
services/observability/agent_actions/tests/test_hardening.py (6) Same — imported and referenced SUFFIX_OMNICLAUDE_AGENT_ACTIONS, SUFFIX_OMNICLAUDE_AGENT_ACTIONS_DLQ, SUFFIX_OMNICLAUDE_ROUTING_DECISION.
services/observability/agent_actions/tests/test_routing_decision_schema_handshake.py (1) Same — replaced the one inline literal with SUFFIX_OMNICLAUDE_ROUTING_DECISION.

No topic wire value was changed anywhere in this diff — only where/how the literal is expressed in source.

dod_evidence (OMN-13944)

  • Scanner (self-verify replica of node_aislop_sweep._check_hardcoded_topics): 80 findings → 0 findings.
  • ruff format / ruff check --fix: clean on all 10 changed files.
  • mypy --strict on the 7 changed non-test src files: Success: no issues found in 7 source files.
  • Targeted pytest: test_consumer.py + test_routing_decision_schema_handshake.py — 94/94 passed. test_hardening.py — 120/124 passed; the 4 failures (TestDLQConfiguration, TestHealthCheckHostDefault) reproduce identically on unmodified dev HEAD (missing OMNIBASE_INFRA_AGENT_ACTIONS_KAFKA_BOOTSTRAP_SERVERS env var in this shell) — pre-existing, unrelated to this change.
  • Full unit suite (pytest tests/unit, 21109 tests): 21071 passed, 9 failed (pre-existing perf-benchmark timing flakiness in test_mixin_node_introspection.py / test_handler_bootstrap_source.py / test_policy_registry_performance.py, plus unrelated test_provision_infisical.py failures — none touch files changed in this PR), 29 skipped.
  • pre-commit run --files <changed>: all hooks passed, including "Check for AI-slop patterns" and "No hardcoded ONEX topic strings".

Test plan

  • Self-verify scanner reports 0 findings
  • ruff format / ruff check --fix clean
  • mypy --strict clean on changed src files
  • Targeted tests for changed test files pass (94/94, plus 120/124 pre-existing-failure-excluded)
  • Full tests/unit suite run: no new failures introduced
  • pre-commit run --files <changed> all green

Evidence-Source: OCC#3623
Evidence-Ticket: OMN-13944

…istries (omnibase_infra)

Clears all 80 hardcoded-topics aislop-sweep findings in omnibase_infra to 0
without changing any wire topic string value.

Changes:
- event_bus/topic_constants.py: doctest continuation lines showing topic
  literals converted to RST double-backticks (docstring example only,
  testpaths is tests/ only so src/ doctests are never executed).
- runtime/models/model_projector_notification_config.py,
  runtime/models/model_transition_notification_publisher_metrics.py,
  runtime/publisher_topic_scoped.py,
  runtime/transition_notification_publisher.py: same backtick treatment for
  docstring/doctest examples showing "onex.fsm.state.transitions.v1".
- topics/contract_topic_extractor.py: YAML-shaped docstring examples
  converted to backticks.
- services/cost_api/snapshot_cache.py: added `# onex-topic-sot` file-level
  marker — this module IS the canonical registry for the three cost-snapshot
  projection topic constants it defines.
- services/observability/agent_actions/tests/{test_consumer.py,
  test_hardening.py, test_routing_decision_schema_handshake.py}: true
  relocation — imported the existing SUFFIX_OMNICLAUDE_* constants from
  omnibase_infra.topics.platform_topic_suffixes and replaced 57 duplicate
  inline topic literals with references to them (no more test-fixture
  markers needed since canonical constants already existed for every
  literal used).

dod_evidence (OMN-13944):
- hardcoded-topics scanner: 80 findings -> 0 findings (self-verify replica
  of node_aislop_sweep._check_hardcoded_topics)
- ruff format + ruff check --fix: clean on all 10 changed files
- mypy --strict on 7 changed non-test src files: Success, no issues
- pytest targeted: 94/94 passed (test_consumer.py +
  test_routing_decision_schema_handshake.py), 120/124 passed in
  test_hardening.py (4 pre-existing failures reproduced identically on
  unmodified dev HEAD — missing OMNIBASE_INFRA_AGENT_ACTIONS_KAFKA_BOOTSTRAP_SERVERS
  env var in this shell, unrelated to this change)
- pytest tests/unit (full unit suite, 21109 tests): 21071 passed, 9 failed
  (pre-existing perf-benchmark timing flakiness + unrelated
  test_provision_infisical.py failures, none touching changed files), 29
  skipped
- pre-commit run --files <changed>: all hooks passed, including "Check for
  AI-slop patterns" and "No hardcoded ONEX topic strings"
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ed2e2398-27ca-4304-94b4-81b5f4b37a97

📥 Commits

Reviewing files that changed from the base of the PR and between 15ba4f3 and ce6e12c.

📒 Files selected for processing (10)
  • src/omnibase_infra/event_bus/topic_constants.py
  • src/omnibase_infra/runtime/models/model_projector_notification_config.py
  • src/omnibase_infra/runtime/models/model_transition_notification_publisher_metrics.py
  • src/omnibase_infra/runtime/publisher_topic_scoped.py
  • src/omnibase_infra/runtime/transition_notification_publisher.py
  • src/omnibase_infra/services/cost_api/snapshot_cache.py
  • src/omnibase_infra/services/observability/agent_actions/tests/test_consumer.py
  • src/omnibase_infra/services/observability/agent_actions/tests/test_hardening.py
  • src/omnibase_infra/services/observability/agent_actions/tests/test_routing_decision_schema_handshake.py
  • src/omnibase_infra/topics/contract_topic_extractor.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-13944-relocate-stray-topics-omnibase_infra

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

@jonahgabriel
jonahgabriel enabled auto-merge July 5, 2026 09:58
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@jonahgabriel

Copy link
Copy Markdown
Collaborator Author

Auto-merged by merge-sweep | correlation_id: 5987bf85-c096-498b-aba1-90b9c5bfb910

2 similar comments
@jonahgabriel

Copy link
Copy Markdown
Collaborator Author

Auto-merged by merge-sweep | correlation_id: 5987bf85-c096-498b-aba1-90b9c5bfb910

@jonahgabriel

Copy link
Copy Markdown
Collaborator Author

Auto-merged by merge-sweep | correlation_id: 5987bf85-c096-498b-aba1-90b9c5bfb910

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 5, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 6, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 6, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request Jul 7, 2026
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jul 7, 2026
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.

1 participant