Skip to content

ci(omnibase_infra): add standards compliance workflow with blocking UP007 [std-sweep-v2] - #894

Merged
jonahgabriel merged 3 commits into
mainfrom
jonah/std-sweep-v2-omnibase-infra-ci
Mar 18, 2026
Merged

jonahgabriel merged 3 commits into
mainfrom
jonah/std-sweep-v2-omnibase-infra-ci

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Mar 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add omni-standards-compliance.yml with blocking ruff check --select UP007,UP006 check
  • type-safety job (mypy) added as continue-on-error: true — 25 pre-existing mypy violations need cleanup in a follow-up
  • UP007 check is fully blocking (0 violations confirmed)
  • Gate job enforces UP007 only until mypy pre-existing violations are resolved

Part of std-sweep-v2 initiative [OMN-5132].

Test plan

  • type-union-check job passes (0 UP007 violations)
  • type-safety job runs but does not block merge (continue-on-error)
  • Gate passes with UP007 clean

Summary by CodeRabbit

Changes

  • Chores
    • Updated CI/CD type-safety compliance to treat pre-existing violations as non-blocking.
    • Extended public API exports to provide broader access to protocol utilities.

@coderabbitai

coderabbitai Bot commented Mar 18, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a8a28fbf-a773-401b-9801-d478de31480a

📥 Commits

Reviewing files that changed from the base of the PR and between 1ca88cd and d5d1f7c.

📒 Files selected for processing (2)
  • .github/workflows/omni-standards-compliance.yml
  • src/omnibase_infra/protocols/protocol_ledger_sink.py

📝 Walkthrough

Walkthrough

Modified CI/CD workflow to treat type-safety violations as non-blocking while enabling explicit non-blocking result handling. Extended public API exports to include EnumLedgerSinkDropPolicy alongside existing protocol exports.

Changes

Cohort / File(s) Summary
CI/CD Configuration
.github/workflows/omni-standards-compliance.yml
Added continue-on-error: true to type-safety job; updated Omni Standards Gate to handle type-safety results as non-blocking via explicit echo and comment annotation for pre-existing violations.
Public API Exports
src/omnibase_infra/protocols/protocol_ledger_sink.py
Expanded __all__ export list to publicly expose EnumLedgerSinkDropPolicy alongside ProtocolLedgerSink.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Flow like water, not like stone,
Type-checks won't block your way back home,
New exports bloom in daylight's glow,
Enums exposed for all to know,
Barriers lifted, let things flow! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: adding a standards compliance workflow with blocking UP007 checks as part of std-sweep-v2, though it does not mention the secondary change of exporting EnumLedgerSinkDropPolicy.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/std-sweep-v2-omnibase-infra-ci
📝 Coding Plan
  • Generate coding plan for human review comments

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

@jonahgabriel
jonahgabriel enabled auto-merge March 18, 2026 17:16
@jonahgabriel
jonahgabriel force-pushed the jonah/std-sweep-v2-omnibase-infra-ci branch from b40ca3e to 7dbe666 Compare March 18, 2026 18:02
…P007 [OMN-5132]

- Add omni-standards-compliance.yml with blocking ruff UP007/UP006 check
- type-safety job added as continue-on-error: pre-existing mypy violations need cleanup
- UP007 check is fully blocking (0 violations confirmed)
- Gate job enforces UP007 only until mypy is cleaned up
…ed) [std-sweep-v2]

Remove redundant cast() calls and add missing __all__ exports so that
mypy --strict passes cleanly on the full src/ tree.

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

🧹 Nitpick comments (1)
.github/workflows/omni-standards-compliance.yml (1)

48-49: Consider adding UV dependency caching for faster CI runs.

Each job runs uv sync --all-extras independently. The astral-sh/setup-uv action supports caching via enable-cache: true. This could reduce CI time on subsequent runs.

💡 Optional: Enable UV caching
       - name: Install uv
         uses: astral-sh/setup-uv@v7
         with:
           version: ${{ env.UV_VERSION }}
+          enable-cache: true

Also applies to: 85-86

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/omni-standards-compliance.yml around lines 48 - 49, The CI
currently runs "uv sync --all-extras" every job without caching; update the
GitHub Actions workflow to enable UV caching by setting the astral-sh/setup-uv
action's enable-cache: true (the same change for both occurrences that set up
UV), so the "Install dependencies" step that runs uv sync --all-extras benefits
from the action's cache on subsequent runs; locate the setup step using the
action name "astral-sh/setup-uv" and add the enable-cache: true input there.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/omni-standards-compliance.yml:
- Around line 48-49: The CI currently runs "uv sync --all-extras" every job
without caching; update the GitHub Actions workflow to enable UV caching by
setting the astral-sh/setup-uv action's enable-cache: true (the same change for
both occurrences that set up UV), so the "Install dependencies" step that runs
uv sync --all-extras benefits from the action's cache on subsequent runs; locate
the setup step using the action name "astral-sh/setup-uv" and add the
enable-cache: true input there.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a34d3b4b-5828-4249-bcd9-6dd1311dd57d

📥 Commits

Reviewing files that changed from the base of the PR and between 9148e6f and 7dbe666.

📒 Files selected for processing (21)
  • .github/workflows/omni-standards-compliance.yml
  • src/omnibase_infra/diagnostics/bus_audit.py
  • src/omnibase_infra/event_bus/adapters/adapter_protocol_event_publisher_kafka.py
  • src/omnibase_infra/event_bus/event_bus_inmemory.py
  • src/omnibase_infra/event_bus/testing/adapter_protocol_event_publisher_inmemory.py
  • src/omnibase_infra/gateway/services/service_envelope_validator.py
  • src/omnibase_infra/models/dispatch/model_topic_parser.py
  • src/omnibase_infra/models/registration/model_node_event_bus_config.py
  • src/omnibase_infra/nodes/node_artifact_reconciliation_orchestrator/handlers/handler_plan_to_yaml.py
  • src/omnibase_infra/nodes/node_registration_orchestrator/dispatchers/dispatcher_node_introspected.py
  • src/omnibase_infra/nodes/node_registration_orchestrator/dispatchers/dispatcher_node_registration_acked.py
  • src/omnibase_infra/nodes/node_registration_orchestrator/dispatchers/dispatcher_runtime_tick.py
  • src/omnibase_infra/nodes/node_registration_reducer/models/model_payload_postgres_update_registration.py
  • src/omnibase_infra/observability/handlers/model_metrics_handler_response.py
  • src/omnibase_infra/observability/sinks/sink_metrics_prometheus.py
  • src/omnibase_infra/plugins/examples/plugin_json_normalizer.py
  • src/omnibase_infra/plugins/examples/plugin_json_normalizer_error_handling.py
  • src/omnibase_infra/protocols/protocol_ledger_sink.py
  • src/omnibase_infra/runtime/binding_resolver.py
  • src/omnibase_infra/runtime/models/model_config_ref.py
  • src/omnibase_infra/services/retry_worker/models/model_delivery_attempt.py

@jonahgabriel
jonahgabriel force-pushed the jonah/std-sweep-v2-omnibase-infra-ci branch from 7dbe666 to 6ba20ec Compare March 18, 2026 18:06

@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

🧹 Nitpick comments (3)
.github/workflows/omni-standards-compliance.yml (3)

14-19: Set explicit least-privilege workflow permissions.

No permissions block is defined, so token scope depends on repo/org defaults. Explicitly setting read-only contents reduces accidental privilege drift.

Suggested patch
 env:
   PYTHON_VERSION: "3.12"
   UV_VERSION: "0.8.3"
   REPO_NAME: "omnibase_infra"
+
+permissions:
+  contents: read
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/omni-standards-compliance.yml around lines 14 - 19, The
workflow lacks an explicit top-level permissions block, which leaves
GITHUB_TOKEN privileges to repo/org defaults; add a top-level "permissions"
block to the workflow YAML and set minimal required privileges (e.g.,
permissions: contents: read) to enforce least-privilege for the actions that run
in this file (place the permissions block alongside env and jobs at the top
level of the workflow).

51-57: MyPy config discovery is too narrow (mypy.ini only).

Line 53 ignores other standard config locations (for example .mypy.ini, pyproject.toml, setup.cfg), which can make CI results diverge from local/type-check expectations.

Suggested patch
       - name: Run MyPy type checking
         run: |
-          if [ -f mypy.ini ]; then
-            uv run mypy src/ --config-file=mypy.ini
+          if [ -f mypy.ini ] || [ -f .mypy.ini ] || [ -f pyproject.toml ] || [ -f setup.cfg ]; then
+            uv run mypy src/
           else
             uv run mypy src/ --strict
           fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/omni-standards-compliance.yml around lines 51 - 57, The
MyPy step ("Run MyPy type checking") only checks for mypy.ini and misses other
standard config locations; update the conditional around the uv run mypy
invocation to detect any of .mypy.ini, mypy.ini, pyproject.toml, or setup.cfg
and, if found, pass the appropriate --config-file to mypy (or omit --config-file
so mypy auto-discovers), otherwise run mypy with --strict; modify the existence
checks in that step to look for these filenames and prefer using mypy's built-in
discovery when possible so CI matches local behavior.

25-29: schedule branch in runner selection is dead code right now.

Line 28/67/99 checks github.event_name == 'schedule', but no on.schedule trigger exists (Line 6-13). Either add a schedule trigger or remove this condition to keep intent clear.

Also applies to: 64-68, 96-100

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/omni-standards-compliance.yml around lines 25 - 29, The
workflow contains dead conditional branches checking github.event_name ==
'schedule' without any corresponding on: schedule trigger; update the workflow
by either adding an on: schedule trigger with the desired cron(s) or removing
the schedule checks (instances of github.event_name == 'schedule') from the
runner selection logic (the conditional that uses vars.USE_SELF_HOSTED_RUNNERS
and fromJSON('["self-hosted","omnibase-ci"]')) so the conditions reflect actual
triggers; apply the same change to all repeated occurrences of that condition.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/omni-standards-compliance.yml:
- Around line 88-90: The workflow step named "Check for Optional/Union usage
(PEP 604)" currently runs ruff with both selectors UP007,UP006 so UP006 failures
also fail the type-union-check gate; change it so only UP007 is blocking and
UP006 is informational by splitting into two runs: one that runs uv run ruff
check src/ --select UP007 (keeps current failure semantics for the blocking
check) and a separate run for uv run ruff check src/ --select UP006 that is
marked non-blocking (e.g., set continue-on-error: true or append || true) or
moved to an informational step so UP006 failures do not flip the
type-union-check job to failed.

---

Nitpick comments:
In @.github/workflows/omni-standards-compliance.yml:
- Around line 14-19: The workflow lacks an explicit top-level permissions block,
which leaves GITHUB_TOKEN privileges to repo/org defaults; add a top-level
"permissions" block to the workflow YAML and set minimal required privileges
(e.g., permissions: contents: read) to enforce least-privilege for the actions
that run in this file (place the permissions block alongside env and jobs at the
top level of the workflow).
- Around line 51-57: The MyPy step ("Run MyPy type checking") only checks for
mypy.ini and misses other standard config locations; update the conditional
around the uv run mypy invocation to detect any of .mypy.ini, mypy.ini,
pyproject.toml, or setup.cfg and, if found, pass the appropriate --config-file
to mypy (or omit --config-file so mypy auto-discovers), otherwise run mypy with
--strict; modify the existence checks in that step to look for these filenames
and prefer using mypy's built-in discovery when possible so CI matches local
behavior.
- Around line 25-29: The workflow contains dead conditional branches checking
github.event_name == 'schedule' without any corresponding on: schedule trigger;
update the workflow by either adding an on: schedule trigger with the desired
cron(s) or removing the schedule checks (instances of github.event_name ==
'schedule') from the runner selection logic (the conditional that uses
vars.USE_SELF_HOSTED_RUNNERS and fromJSON('["self-hosted","omnibase-ci"]')) so
the conditions reflect actual triggers; apply the same change to all repeated
occurrences of that condition.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1171ee95-501b-4211-b9eb-ec56efc45ef6

📥 Commits

Reviewing files that changed from the base of the PR and between 7dbe666 and 6ba20ec.

📒 Files selected for processing (7)
  • .github/workflows/omni-standards-compliance.yml
  • src/omnibase_infra/event_bus/event_bus_inmemory.py
  • src/omnibase_infra/nodes/node_registration_reducer/models/model_payload_postgres_update_registration.py
  • src/omnibase_infra/observability/handlers/model_metrics_handler_response.py
  • src/omnibase_infra/protocols/protocol_ledger_sink.py
  • src/omnibase_infra/runtime/models/model_config_ref.py
  • src/omnibase_infra/services/retry_worker/models/model_delivery_attempt.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/omnibase_infra/nodes/node_registration_reducer/models/model_payload_postgres_update_registration.py
  • src/omnibase_infra/services/retry_worker/models/model_delivery_attempt.py
  • src/omnibase_infra/protocols/protocol_ledger_sink.py

Comment thread .github/workflows/omni-standards-compliance.yml
@jonahgabriel
jonahgabriel force-pushed the jonah/std-sweep-v2-omnibase-infra-ci branch from 6ba20ec to 1ca88cd Compare March 18, 2026 18:26
@jonahgabriel
jonahgabriel added this pull request to the merge queue Mar 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Mar 18, 2026
…d-sweep-v2]

Preserve continue-on-error: true on type-safety job (pre-existing mypy
violations on main, non-blocking until resolved per OMN-5132).
@jonahgabriel
jonahgabriel force-pushed the jonah/std-sweep-v2-omnibase-infra-ci branch from 1ca88cd to d5d1f7c Compare March 18, 2026 19:52
@jonahgabriel
jonahgabriel enabled auto-merge March 18, 2026 19:52
@jonahgabriel
jonahgabriel added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit 312ba54 Mar 18, 2026
37 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/std-sweep-v2-omnibase-infra-ci branch March 18, 2026 20:14
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