Skip to content

fix(contracts): OMN-8606 DoD uses {pr}/{repo} placeholders, removes open-PR-blocking checks - #273

Merged
jonahgabriel merged 4 commits into
mainfrom
jonah/omn-8606-fix-contract-dod
Apr 14, 2026
Merged

jonahgabriel merged 4 commits into
mainfrom
jonah/omn-8606-fix-contract-dod

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • dod-001: use gh pr view {pr} --repo {repo} so the command resolves in CI detached HEAD
  • dod-002/003: replace gh pr view --json mergedAt and gh pr checks --watch (always fail for open PRs) with file_exists + grep checks that verify the actual code change
  • dod-004: pre-commit unchanged

Why

Contract Compliance Check for omnidash PR #598 was failing because bare gh pr view calls fail when git is in detached HEAD (as in CI merge checkouts), and dod-002 checked for mergedAt which is null on open PRs.

Test plan

Summary by CodeRabbit

  • Chores
    • Updated evidence validation to use explicit templated PR/repo inputs instead of relying on implicit context.
    • One check now validates a specific reference field rather than a merge timestamp.
    • Replaced a runtime CI status check with a static file-content pattern verification for more deterministic artifact validation.

…nd file-based checks

Replace bare `gh pr view` commands (fail in detached HEAD) with:
- dod-001: gh pr view {pr} --repo {repo} (uses CI-injected PR number)
- dod-002/003: file_exists + grep checks that pass on open PRs
- dod-004: pre-commit unchanged
@github-actions
github-actions Bot enabled auto-merge April 14, 2026 17:08
@coderabbitai

coderabbitai Bot commented Apr 14, 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 0 minutes and 14 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 0 minutes and 14 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: d445366d-d675-41e0-ac1a-ddea370ef4c6

📥 Commits

Reviewing files that changed from the base of the PR and between f4926ac and e07073a.

📒 Files selected for processing (243)
  • contracts/OMN-123.yaml
  • contracts/OMN-1323.yaml
  • contracts/OMN-1411.yaml
  • contracts/OMN-1412.yaml
  • contracts/OMN-1690.yaml
  • contracts/OMN-1707.yaml
  • contracts/OMN-1770.yaml
  • contracts/OMN-1859.yaml
  • contracts/OMN-2204.yaml
  • contracts/OMN-2207.yaml
  • contracts/OMN-2324.yaml
  • contracts/OMN-2358.yaml
  • contracts/OMN-2359.yaml
  • contracts/OMN-2453.yaml
  • contracts/OMN-2454.yaml
  • contracts/OMN-2465.yaml
  • contracts/OMN-2485.yaml
  • contracts/OMN-2703.yaml
  • contracts/OMN-2709.yaml
  • contracts/OMN-2710.yaml
  • contracts/OMN-2711.yaml
  • contracts/OMN-2947.yaml
  • contracts/OMN-3002.yaml
  • contracts/OMN-3008.yaml
  • contracts/OMN-3027.yaml
  • contracts/OMN-3030.yaml
  • contracts/OMN-3033.yaml
  • contracts/OMN-3056.yaml
  • contracts/OMN-3059.yaml
  • contracts/OMN-3075.yaml
  • contracts/OMN-3077.yaml
  • contracts/OMN-3099.yaml
  • contracts/OMN-3101.yaml
  • contracts/OMN-3103.yaml
  • contracts/OMN-3109.yaml
  • contracts/OMN-3111.yaml
  • contracts/OMN-3114.yaml
  • contracts/OMN-3123.yaml
  • contracts/OMN-3125.yaml
  • contracts/OMN-3126.yaml
  • contracts/OMN-3128.yaml
  • contracts/OMN-3129.yaml
  • contracts/OMN-3131.yaml
  • contracts/OMN-3146.yaml
  • contracts/OMN-3149.yaml
  • contracts/OMN-3150.yaml
  • contracts/OMN-3152.yaml
  • contracts/OMN-3161.yaml
  • contracts/OMN-3163.yaml
  • contracts/OMN-3164.yaml
  • contracts/OMN-3170.yaml
  • contracts/OMN-3175.yaml
  • contracts/OMN-3209.yaml
  • contracts/OMN-3213.yaml
  • contracts/OMN-3798.yaml
  • contracts/OMN-3820.yaml
  • contracts/OMN-3824.yaml
  • contracts/OMN-3829.yaml
  • contracts/OMN-3883.yaml
  • contracts/OMN-3904.yaml
  • contracts/OMN-3946.yaml
  • contracts/OMN-4106.yaml
  • contracts/OMN-4130.yaml
  • contracts/OMN-4131.yaml
  • contracts/OMN-4132.yaml
  • contracts/OMN-4133.yaml
  • contracts/OMN-4134.yaml
  • contracts/OMN-4135.yaml
  • contracts/OMN-4138.yaml
  • contracts/OMN-4140.yaml
  • contracts/OMN-4141.yaml
  • contracts/OMN-4142.yaml
  • contracts/OMN-4154.yaml
  • contracts/OMN-4162.yaml
  • contracts/OMN-4165.yaml
  • contracts/OMN-4180.yaml
  • contracts/OMN-4184.yaml
  • contracts/OMN-4186.yaml
  • contracts/OMN-4188.yaml
  • contracts/OMN-4191.yaml
  • contracts/OMN-4193.yaml
  • contracts/OMN-4194.yaml
  • contracts/OMN-4202.yaml
  • contracts/OMN-4213.yaml
  • contracts/OMN-4329.yaml
  • contracts/OMN-435.yaml
  • contracts/OMN-4352.yaml
  • contracts/OMN-4353.yaml
  • contracts/OMN-4355.yaml
  • contracts/OMN-4360.yaml
  • contracts/OMN-4393.yaml
  • contracts/OMN-4715.yaml
  • contracts/OMN-4717.yaml
  • contracts/OMN-4719.yaml
  • contracts/OMN-4720.yaml
  • contracts/OMN-4730.yaml
  • contracts/OMN-4731.yaml
  • contracts/OMN-4732.yaml
  • contracts/OMN-4736.yaml
  • contracts/OMN-4737.yaml
  • contracts/OMN-4738.yaml
  • contracts/OMN-4756.yaml
  • contracts/OMN-4780.yaml
  • contracts/OMN-4789.yaml
  • contracts/OMN-4976.yaml
  • contracts/OMN-4980.yaml
  • contracts/OMN-500.yaml
  • contracts/OMN-5005.yaml
  • contracts/OMN-5006.yaml
  • contracts/OMN-5007.yaml
  • contracts/OMN-5008.yaml
  • contracts/OMN-5009.yaml
  • contracts/OMN-5012.yaml
  • contracts/OMN-5013.yaml
  • contracts/OMN-5114.yaml
  • contracts/OMN-5257.yaml
  • contracts/OMN-5274.yaml
  • contracts/OMN-5275.yaml
  • contracts/OMN-5302.yaml
  • contracts/OMN-5367.yaml
  • contracts/OMN-5587.yaml
  • contracts/OMN-5593.yaml
  • contracts/OMN-5594.yaml
  • contracts/OMN-5595.yaml
  • contracts/OMN-5700.yaml
  • contracts/OMN-5732.yaml
  • contracts/OMN-5736.yaml
  • contracts/OMN-5737.yaml
  • contracts/OMN-5743.yaml
  • contracts/OMN-595.yaml
  • contracts/OMN-596.yaml
  • contracts/OMN-6238.yaml
  • contracts/OMN-6298.yaml
  • contracts/OMN-630.yaml
  • contracts/OMN-6301.yaml
  • contracts/OMN-6303.yaml
  • contracts/OMN-6307.yaml
  • contracts/OMN-6308.yaml
  • contracts/OMN-6309.yaml
  • contracts/OMN-6311.yaml
  • contracts/OMN-6312.yaml
  • contracts/OMN-6313.yaml
  • contracts/OMN-6317.yaml
  • contracts/OMN-6318.yaml
  • contracts/OMN-632.yaml
  • contracts/OMN-636.yaml
  • contracts/OMN-6380.yaml
  • contracts/OMN-6382.yaml
  • contracts/OMN-6383.yaml
  • contracts/OMN-6384.yaml
  • contracts/OMN-6385.yaml
  • contracts/OMN-6386.yaml
  • contracts/OMN-6388.yaml
  • contracts/OMN-642.yaml
  • contracts/OMN-643.yaml
  • contracts/OMN-645.yaml
  • contracts/OMN-6461.yaml
  • contracts/OMN-663.yaml
  • contracts/OMN-666.yaml
  • contracts/OMN-6794.yaml
  • contracts/OMN-6847.yaml
  • contracts/OMN-6875.yaml
  • contracts/OMN-6876.yaml
  • contracts/OMN-711.yaml
  • contracts/OMN-7213.yaml
  • contracts/OMN-7326.yaml
  • contracts/OMN-7335.yaml
  • contracts/OMN-7336.yaml
  • contracts/OMN-7343.yaml
  • contracts/OMN-7397.yaml
  • contracts/OMN-7414.yaml
  • contracts/OMN-7451.yaml
  • contracts/OMN-7452.yaml
  • contracts/OMN-7454.yaml
  • contracts/OMN-7455.yaml
  • contracts/OMN-7462.yaml
  • contracts/OMN-7527.yaml
  • contracts/OMN-7536.yaml
  • contracts/OMN-7537.yaml
  • contracts/OMN-7575.yaml
  • contracts/OMN-7590.yaml
  • contracts/OMN-7780.yaml
  • contracts/OMN-7788.yaml
  • contracts/OMN-7839.yaml
  • contracts/OMN-7847.yaml
  • contracts/OMN-7867.yaml
  • contracts/OMN-7868.yaml
  • contracts/OMN-7872.yaml
  • contracts/OMN-7873.yaml
  • contracts/OMN-7877.yaml
  • contracts/OMN-7896.yaml
  • contracts/OMN-7897.yaml
  • contracts/OMN-7905.yaml
  • contracts/OMN-7906.yaml
  • contracts/OMN-7943.yaml
  • contracts/OMN-7944.yaml
  • contracts/OMN-7990.yaml
  • contracts/OMN-7996.yaml
  • contracts/OMN-7998.yaml
  • contracts/OMN-8024.yaml
  • contracts/OMN-8038.yaml
  • contracts/OMN-8041.yaml
  • contracts/OMN-8063.yaml
  • contracts/OMN-8067.yaml
  • contracts/OMN-8069.yaml
  • contracts/OMN-8098.yaml
  • contracts/OMN-8101.yaml
  • contracts/OMN-8123.yaml
  • contracts/OMN-8124.yaml
  • contracts/OMN-8125.yaml
  • contracts/OMN-8176.yaml
  • contracts/OMN-825.yaml
  • contracts/OMN-8293.yaml
  • contracts/OMN-8349.yaml
  • contracts/OMN-8368.yaml
  • contracts/OMN-8372.yaml
  • contracts/OMN-8373.yaml
  • contracts/OMN-838.yaml
  • contracts/OMN-8409.yaml
  • contracts/OMN-8410.yaml
  • contracts/OMN-8412.yaml
  • contracts/OMN-8413.yaml
  • contracts/OMN-843.yaml
  • contracts/OMN-8445.yaml
  • contracts/OMN-8447.yaml
  • contracts/OMN-8456.yaml
  • contracts/OMN-8458.yaml
  • contracts/OMN-8459.yaml
  • contracts/OMN-8461.yaml
  • contracts/OMN-8462.yaml
  • contracts/OMN-8463.yaml
  • contracts/OMN-8465.yaml
  • contracts/OMN-8478.yaml
  • contracts/OMN-8481.yaml
  • contracts/OMN-8598.yaml
  • contracts/OMN-8601.yaml
  • contracts/OMN-8624.yaml
  • contracts/OMN-8625.yaml
  • contracts/OMN-8626.yaml
  • contracts/OMN-8627.yaml
  • contracts/OMN-8628.yaml
  • contracts/OMN-8629.yaml
  • contracts/OMN-917.yaml
📝 Walkthrough

Walkthrough

Updated three evidence checks in contracts/OMN-8606.yaml: dod-001 now runs gh pr view with explicit {pr} and {repo} to query .state; dod-002 targets PR 598 in OmniNode-ai/omnidash and queries .headRefName instead of .mergedAt; dod-003 replaces gh pr checks --watch with a grep that verifies the contract contains the literal json state -q .state pattern.

Changes

Cohort / File(s) Summary
Contract Evidence Configuration
contracts/OMN-8606.yaml
Adjusted three dod_evidence entries: dod-001 now invokes gh pr view {pr} --repo {repo} --json state to read .state; dod-002 now queries PR 598 in OmniNode-ai/omnidash for .headRefName (replacing .mergedAt); dod-003 removed gh pr checks --watch and added a grep validating the file contains the literal json state -q .state; descriptions updated accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I nibbled lines of YAML bright,

Tucked {pr} and {repo} in tight.
I hopped to PR five ninety-eight,
Searched for .headRefName—how great!
And grepped for json state -q .state—carrots celebrate! 🥕

🚥 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 and specifically describes the main changes: updating DoD checks to use explicit {pr}/{repo} placeholders and removing checks that block open PRs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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-8606-fix-contract-dod

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

@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 (1)
contracts/OMN-8606.yaml (1)

30-36: Evidence check is weaker than the stated requirement.

Lines 30-36 validate only prompt_tokens (Line 35), but the description says token columns. Consider adding another check (or a single command check) to assert all required token fields.

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

In `@contracts/OMN-8606.yaml` around lines 30 - 36, The check in OMN-8606.yaml
currently only greps for "prompt_tokens" in
migrations/0063_llm_routing_decisions.sql but the description requires token
columns (plural); update the checks array to assert all required token fields
(e.g., "prompt_tokens", "completion_tokens", "total_tokens" or whatever the
schema uses) by adding additional grep checks or a single pattern that matches
all token column names, referencing the existing check_type "grep" and the
target file "migrations/0063_llm_routing_decisions.sql" so the contract verifies
every token column rather than just prompt_tokens.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@contracts/OMN-8606.yaml`:
- Around line 27-28: The contract uses an unsupported check_type "file_exists"
causing dod-002 to hard-fail; replace it with a supported check_type (e.g.,
"command" or "grep") that verifies the same condition. Update the entry where
check_type is "file_exists" and check_value is
"migrations/0056_session_post_mortems.sql" to use a supported check (for
example, set check_type to "command" and provide a command that tests file
presence, or set check_type to "grep" and use a pattern against an
index/listing) so the runner can execute the check without blocking.

---

Nitpick comments:
In `@contracts/OMN-8606.yaml`:
- Around line 30-36: The check in OMN-8606.yaml currently only greps for
"prompt_tokens" in migrations/0063_llm_routing_decisions.sql but the description
requires token columns (plural); update the checks array to assert all required
token fields (e.g., "prompt_tokens", "completion_tokens", "total_tokens" or
whatever the schema uses) by adding additional grep checks or a single pattern
that matches all token column names, referencing the existing check_type "grep"
and the target file "migrations/0063_llm_routing_decisions.sql" so the contract
verifies every token column rather than just prompt_tokens.
🪄 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: af86ad90-f390-4b79-b3f2-e24796af66f6

📥 Commits

Reviewing files that changed from the base of the PR and between cdb08ff and d8e5792.

📒 Files selected for processing (1)
  • contracts/OMN-8606.yaml

Comment thread contracts/OMN-8606.yaml Outdated
The grep check_type runner uses --include=*.py which skips YAML files.
Replace with a command check that greps the contract YAML directly.
Pattern avoids {pr}/{repo} placeholders to prevent runner substitution.
…tracts

DoD runner only handles endpoint/command/grep check types. Replace
check_type: "file_exists" with check_type: "command" + command: "test -f <path>"
across all 243 affected contract YAML files.
@jonahgabriel
jonahgabriel merged commit 922eed7 into main Apr 14, 2026
21 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-8606-fix-contract-dod branch April 14, 2026 22:05
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