Skip to content

fix(infra): OMN-9154 import DEFAULT_INTROSPECTION_TOPIC from model SoT - #1392

Merged
jonahgabriel merged 1 commit into
mainfrom
jonah/omn-9154
Apr 24, 2026
Merged

jonahgabriel merged 1 commit into
mainfrom
jonah/omn-9154

Conversation

@jonahgabriel

Copy link
Copy Markdown
Collaborator

Summary

Ticket: OMN-9154 — replace DEFAULT_INTROSPECTION_TOPIC hardcoded literal in cli/infra_test/introspect.py with import from the canonical source.

The original hardcoded literal was removed in a prior PR (OMN-7226), but the CLI still held its own copy of DEFAULT_INTROSPECTION_TOPIC derived from the generated EnumPlatformTopic. This PR:

  • Imports DEFAULT_INTROSPECTION_TOPIC directly from omnibase_infra.models.discovery.model_introspection_config (the canonical model-level default that resolves to SUFFIX_NODE_INTROSPECTION), removing the CLI-layer duplicate.
  • Adds two unit tests under TestDefaultIntrospectionTopicSoT that guard against drift:
    • CLI default is the same object as the model default.
    • Both resolve to SUFFIX_NODE_INTROSPECTION.

Acceptance criteria

  • Literal removed (already done in OMN-7226; this PR also removes the CLI-layer enum copy).
  • Import path from SoT module (model_introspection_config.DEFAULT_INTROSPECTION_TOPIC).
  • Unit test verifies default value matches canonical source (TestDefaultIntrospectionTopicSoT).

Scope note

The envvar="ONEX_INTROSPECTION_TOPIC" operator-override knob on line 104 is intentionally left in place. The allowlist-vs-ban decision for *_TOPIC envvars is the responsibility of OMN-9151 child #1 (validator) and is out of scope here.

dod_evidence

  • tests/unit/cli/infra_test/test_introspect.py::TestDefaultIntrospectionTopicSoT (2 tests, both PASS)
  • Full unit suite for tests/unit/cli tests/unit/mixins/test_mixin_node_introspection.py tests/unit/models/discovery: 418 PASS
  • pre-commit run on changed files: PASS (including Topic Naming Lint, AI-slop check, topic drift check)

Test plan

  • uv run pytest tests/unit/cli/infra_test/test_introspect.py -v — 18/18 PASS
  • uv run pytest tests/unit/cli tests/unit/mixins/test_mixin_node_introspection.py tests/unit/models/discovery -v — 418/418 PASS
  • uv run ruff format && uv run ruff check — clean
  • pre-commit run --files ... — all hooks passed
  • CI green on PR

The CLI previously held its own `DEFAULT_INTROSPECTION_TOPIC` derived from
the generated `EnumPlatformTopic` enum. Align the CLI with the canonical
model-level default (`model_introspection_config.DEFAULT_INTROSPECTION_TOPIC`,
which resolves to `SUFFIX_NODE_INTROSPECTION`) so there is a single source
of truth for the topic.

Add a unit test that guards against drift between the CLI default, the
model default, and `SUFFIX_NODE_INTROSPECTION`.

The `envvar="ONEX_INTROSPECTION_TOPIC"` operator-override knob is left in
place; the allowlist-vs-ban decision is the responsibility of OMN-9151
child #1 and is intentionally out of scope here.
@coderabbitai

coderabbitai Bot commented Apr 24, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jonahgabriel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 54 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 54 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4b97e5c7-be3a-4df6-9a82-164b70c41d6d

📥 Commits

Reviewing files that changed from the base of the PR and between 51cc548 and 7145737.

📒 Files selected for processing (2)
  • src/omnibase_infra/cli/infra_test/introspect.py
  • tests/unit/cli/infra_test/test_introspect.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-9154

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

@jonahgabriel
jonahgabriel enabled auto-merge April 24, 2026 06:02
@jonahgabriel
jonahgabriel added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit bd13da5 Apr 24, 2026
55 of 58 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-9154 branch April 24, 2026 06:19
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