Skip to content

feat(OMN-9043): add check-local-paths pre-commit hook - #1065

Merged
jonahgabriel merged 4 commits into
mainfrom
jonah/omn-9043-remove-tests-exclude
May 12, 2026
Merged

jonahgabriel merged 4 commits into
mainfrom
jonah/omn-9043-remove-tests-exclude

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • OMN-9043 — Gap 2: omnibase_core had no check-local-paths pre-commit hook, meaning hardcoded /Volumes/, /Users/, /home/ paths in this repo's source were never caught at commit time
  • Adds check-local-paths hook directly invoking omnibase_core.validation.validator_local_paths (no wrapper needed since the module lives here)
  • Excludes tests/fixtures/ and validator test files that intentionally contain hardcoded paths for testing the validator itself
  • Annotates 10 legitimate test data paths with # local-path-ok
  • Removes stale MISSING_PRE_COMMIT baseline entry from validator-requirements-baseline.yaml
  • Fixes pre-existing ONEX_EXCLUDE comment misplacement in model_contract_base.py (comment was on closing paren, not the line with dict[str, Any], so it never suppressed the dict-any gate)

Test plan

  • pre-commit run --all-files passes (verified locally — all 70+ hooks green)
  • uv run pytest tests/unit/models/contracts/test_model_dod_receipt.py tests/unit/models/handlers/test_model_handler_packaging.py tests/unit/models/intelligence/ -- 234 passed
  • CI green

Evidence-Ticket: OMN-9043
Evidence-Source: OCC#952

Wire omnibase_core.validation.validator_local_paths as a pre-commit gate
in omnibase_core. Uses the module directly (no wrapper) since it lives in
this repo. Excludes tests/fixtures/ and validator test files that
intentionally contain hardcoded paths. Annotates 10 test violations with
# local-path-ok. Removes stale MISSING_PRE_COMMIT baseline entry.
Also fixes pre-existing ONEX_EXCLUDE comment placement in
model_contract_base.py that was silently not suppressing the dict-any gate.
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

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

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ 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: 3bdd8c98-af6e-4be7-a89f-cd171394f4d2

📥 Commits

Reviewing files that changed from the base of the PR and between 96d48cf and 7afb103.

📒 Files selected for processing (8)
  • .pre-commit-config.yaml
  • architecture-handshakes/validator-requirements-baseline.yaml
  • src/omnibase_core/models/contracts/model_contract_base.py
  • tests/fixtures/README.md
  • tests/unit/models/contracts/test_model_dod_receipt.py
  • tests/unit/models/handlers/test_model_handler_packaging.py
  • tests/unit/models/intelligence/test_model_tool_execution.py
  • tests/unit/models/intelligence/test_model_tool_execution_content.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-9043-remove-tests-exclude

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

@jonahgabriel
jonahgabriel merged commit 48597cc into main May 12, 2026
93 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-9043-remove-tests-exclude branch May 12, 2026 14:21
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