Skip to content

OMN-12770 evidence: delegation route binding receipts - #2287

Merged
jonahgabriel merged 2 commits into
devfrom
hotfix/omn-12770-occ-evidence
Jun 7, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
hotfix/omn-12770-occ-evidence

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Verification

  • uv run python scripts/check_dod_evidence_present.py contracts/OMN-12770.yaml -> passed
  • uv run python scripts/lint_contract_check_values.py contracts/OMN-12770.yaml -> passed
  • uv run validate-yaml contracts/OMN-12770.yaml -> contract valid
  • ModelDodReceipt.model_validate(...) -> all five receipts valid
  • uv run python -m omnibase_core.validation.validator_occ_merge_eligibility ... --pr-number 2287 ... -> eligible=true
  • uv run pre-commit run --files contracts/OMN-12770.yaml drift/dod_receipts/OMN-12770/*/command.yaml -> passed

Linear: OMN-12770

@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates GitHub Actions, pre-commit rules, allowlists, and many contract evidence checks. It adds retrying uv sync flows, new workflow gating, and widespread receipt path changes from $CONTRACT_REPO_DIR to repository-relative locations.

Changes

Boundary validation and contract evidence updates

Layer / File(s) Summary
Workflow and action updates
.github/actions/validate-boundaries/action.yml, .github/actions/validate-contract/action.yml, .github/workflows/call-occ-preflight.yml, .github/workflows/ci.yml, .github/workflows/imperative-contract-guard.yml, .github/workflows/main-target-guard.yml, .github/workflows/occ-rerun-downstream.yml
Composite actions and workflows update Python/uv versions, add retry loops, add --scan-freestanding, add PR target gating, restrict permissions, and switch rerun PRs to dev.
Pre-commit and allowlist config
.gitignore, .pre-commit-config.yaml, allowlists/*
Pre-commit hooks exclude evidence files, a new freestanding contract check is added, .onex_state/ is ignored, and multiple allowlist YAML files add, remove, or normalize handler entries.
Early contract evidence rewrites
contracts/OMN-10143.yaml … contracts/OMN-10983.yaml
Many contract definitions update dod_evidence/evidence_requirements checks to use direct drift/dod_receipts/... or evidence/... paths, and a few files add new contract metadata and receipt checks.
Later contract evidence rewrites
contracts/OMN-11012.yaml … contracts/OMN-11423.yaml
The remaining contract files continue the same receipt-path normalization across command checks, PR bindings, deploy checks, and self-binding receipts, including several later contract additions and new evidence entries.

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant GitHubActions
  participant validate_contract
  participant validate_boundaries
  participant uv
  participant check_imperative_contracts

  PullRequest->>GitHubActions: trigger pull_request / workflow_call
  GitHubActions->>validate_contract: install validators
  validate_contract->>uv: sync with retry loop
  GitHubActions->>validate_boundaries: clone peer repos
  validate_boundaries->>uv: sync workspace with retry loop
  GitHubActions->>check_imperative_contracts: run --scan-freestanding
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 I hop through workflows, neat and bright,
From drift paths old to paths just right.
I munch the checks, then race the breeze,
And twirl through YAML with easy ease.
Hops, syncs, and guards — a cozy tune,
Under the moon, I pounce at noon.

✨ 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 hotfix/omn-12770-occ-evidence

@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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

169-188: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit least-privilege permissions to imperative-contract-guard.

This job currently inherits default token scopes. Explicitly setting minimal permissions avoids accidental write access from repository-level defaults.

Suggested patch
   imperative-contract-guard:
     name: Imperative Contract Guard
+    permissions:
+      contents: read
     runs-on: >-
       ${{
         (github.event_name == 'pull_request' &&
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 169 - 188, The job
imperative-contract-guard currently relies on default token scopes; add an
explicit permissions block under the imperative-contract-guard job to enforce
least-privilege (e.g., set permissions: contents: read and pull-requests: read)
so the workflow only has read access required for uv run
check-imperative-contracts and cannot perform writes; add the permissions entry
directly beneath the job header (the imperative-contract-guard job name) so the
steps (actions/checkout@v6, ./.github/actions/setup-uv, and the "Validate
imperative contract guard wiring" run) inherit the constrained token scope.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/main-target-guard.yml:
- Around line 10-24: Add an explicit permissions block to the workflow to
enforce least privilege: modify the workflow root (where the pull_request
trigger and job main-target-guard are defined) to declare only the specific
token permissions required (e.g., contents: read, pull-requests: write/read as
needed) instead of relying on defaults; update the workflow to include the
permissions: mapping immediately under the workflow root so the
main-target-guard job runs with only those declared scopes.

In @.pre-commit-config.yaml:
- Around line 139-146: The hook "check-imperative-contracts-freestanding" is
currently limited by types: [python] so with pass_filenames: false commits
touching only allowlists/*.yaml won't run the guard; update that hook (id:
check-imperative-contracts-freestanding, entry and pass_filenames settings) to
ensure it triggers for allowlist/policy changes—either remove the types
constraint or add an explicit files pattern matching allowlists (e.g.,
allowlists/.*\.ya?ml) or set always_run: true so the hook runs on non-Python
commits as well.

In `@contracts/OMN-10278.yaml`:
- Around line 187-188: The description text that references "PR `#452`" is
inconsistent with the enforced receipt binding which uses PR `#456` in the
check_value and evidence path
("drift/dod_receipts/OMN-10278/dod-omninode-infra-pr-456/command.yaml"); update
the human-readable description or header that mentions PR `#452` so it instead
references PR `#456` to match the check_value, evidence id/path and remove the
mismatch (search for the PR number in the same OMN-10278 contract and replace
452 → 456).

In `@contracts/OMN-10487.yaml`:
- Around line 41-49: The check for id "dod-rerun-state-pr-target" contains an
inconsistent path using $CONTRACT_REPO_DIR in the check_value grep commands;
replace references to
$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml with the
repository-relative path .github/workflows/occ-rerun-downstream.yml in the
check_value string (the three grep calls) so the command matches the same
normalized path style used elsewhere and keep the rest of the grep expressions
(--base dev, '\[skip ci\]', 'Evidence-Ticket: OMN-10487') unchanged.

In `@contracts/OMN-11068.yaml`:
- Around line 48-62: The check_value commands for the dod_evidence entries with
ids "dod-runtime-health-pr-1765" and "dod-occ-pr-1715" use undefined shell
variables ${PR_NUMBER} and ${REPO}; fix by prefixing each check_value with
inline variable assignments (e.g., REPO=<owner/repo> PR_NUMBER=<number>) before
the gh command so the gh pr view invocation in the check_value string resolves
correctly, updating the check_value strings for those entries accordingly.

---

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 169-188: The job imperative-contract-guard currently relies on
default token scopes; add an explicit permissions block under the
imperative-contract-guard job to enforce least-privilege (e.g., set permissions:
contents: read and pull-requests: read) so the workflow only has read access
required for uv run check-imperative-contracts and cannot perform writes; add
the permissions entry directly beneath the job header (the
imperative-contract-guard job name) so the steps (actions/checkout@v6,
./.github/actions/setup-uv, and the "Validate imperative contract guard wiring"
run) inherit the constrained token scope.
🪄 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: b5400483-39c4-4c12-9a2d-5573dfb55aee

📥 Commits

Reviewing files that changed from the base of the PR and between 378ce47 and 128b7f2.

📒 Files selected for processing (300)
  • .github/actions/validate-boundaries/action.yml
  • .github/actions/validate-contract/action.yml
  • .github/workflows/call-occ-preflight.yml
  • .github/workflows/ci.yml
  • .github/workflows/imperative-contract-guard.yml
  • .github/workflows/main-target-guard.yml
  • .github/workflows/occ-rerun-downstream.yml
  • .gitignore
  • .pre-commit-config.yaml
  • allowlists/omnibase_infra.yaml
  • allowlists/omniintelligence.yaml
  • allowlists/omnimarket.yaml
  • allowlists/omnimemory.yaml
  • allowlists/onex_change_control.yaml
  • contracts/OMN-10143.yaml
  • contracts/OMN-10151.yaml
  • contracts/OMN-10207.yaml
  • contracts/OMN-10278.yaml
  • contracts/OMN-10316.yaml
  • contracts/OMN-10353.yaml
  • contracts/OMN-10377.yaml
  • contracts/OMN-10409.yaml
  • contracts/OMN-10424.yaml
  • contracts/OMN-10475.yaml
  • contracts/OMN-10483.yaml
  • contracts/OMN-10485.yaml
  • contracts/OMN-10487.yaml
  • contracts/OMN-10489.yaml
  • contracts/OMN-10490.yaml
  • contracts/OMN-10491.yaml
  • contracts/OMN-10500.yaml
  • contracts/OMN-10512.yaml
  • contracts/OMN-10518.yaml
  • contracts/OMN-10519.yaml
  • contracts/OMN-10520.yaml
  • contracts/OMN-10521.yaml
  • contracts/OMN-10535.yaml
  • contracts/OMN-10539.yaml
  • contracts/OMN-10540.yaml
  • contracts/OMN-10541.yaml
  • contracts/OMN-10542.yaml
  • contracts/OMN-10543.yaml
  • contracts/OMN-10544.yaml
  • contracts/OMN-10546.yaml
  • contracts/OMN-10547.yaml
  • contracts/OMN-10548.yaml
  • contracts/OMN-10552.yaml
  • contracts/OMN-10554.yaml
  • contracts/OMN-10561.yaml
  • contracts/OMN-10563.yaml
  • contracts/OMN-10564.yaml
  • contracts/OMN-10565.yaml
  • contracts/OMN-10566.yaml
  • contracts/OMN-10567.yaml
  • contracts/OMN-10569.yaml
  • contracts/OMN-10570.yaml
  • contracts/OMN-10572.yaml
  • contracts/OMN-10579.yaml
  • contracts/OMN-10580.yaml
  • contracts/OMN-10581.yaml
  • contracts/OMN-10584.yaml
  • contracts/OMN-10586.yaml
  • contracts/OMN-10587.yaml
  • contracts/OMN-10588.yaml
  • contracts/OMN-10589.yaml
  • contracts/OMN-10591.yaml
  • contracts/OMN-10592.yaml
  • contracts/OMN-10593.yaml
  • contracts/OMN-10602.yaml
  • contracts/OMN-10604.yaml
  • contracts/OMN-10605.yaml
  • contracts/OMN-10606.yaml
  • contracts/OMN-10607.yaml
  • contracts/OMN-10608.yaml
  • contracts/OMN-10609.yaml
  • contracts/OMN-10610.yaml
  • contracts/OMN-10611.yaml
  • contracts/OMN-10612.yaml
  • contracts/OMN-10613.yaml
  • contracts/OMN-10614.yaml
  • contracts/OMN-10615.yaml
  • contracts/OMN-10616.yaml
  • contracts/OMN-10617.yaml
  • contracts/OMN-10618.yaml
  • contracts/OMN-10619.yaml
  • contracts/OMN-10620.yaml
  • contracts/OMN-10621.yaml
  • contracts/OMN-10622.yaml
  • contracts/OMN-10626.yaml
  • contracts/OMN-10635.yaml
  • contracts/OMN-10636.yaml
  • contracts/OMN-10638.yaml
  • contracts/OMN-10640.yaml
  • contracts/OMN-10641.yaml
  • contracts/OMN-10644.yaml
  • contracts/OMN-10645.yaml
  • contracts/OMN-10648.yaml
  • contracts/OMN-10649.yaml
  • contracts/OMN-10650.yaml
  • contracts/OMN-10653.yaml
  • contracts/OMN-10655.yaml
  • contracts/OMN-10656.yaml
  • contracts/OMN-10657.yaml
  • contracts/OMN-10661.yaml
  • contracts/OMN-10665.yaml
  • contracts/OMN-10669.yaml
  • contracts/OMN-10670.yaml
  • contracts/OMN-10675.yaml
  • contracts/OMN-10676.yaml
  • contracts/OMN-10688.yaml
  • contracts/OMN-10689.yaml
  • contracts/OMN-10691.yaml
  • contracts/OMN-10692.yaml
  • contracts/OMN-10693.yaml
  • contracts/OMN-10694.yaml
  • contracts/OMN-10695.yaml
  • contracts/OMN-10696.yaml
  • contracts/OMN-10697.yaml
  • contracts/OMN-10698.yaml
  • contracts/OMN-10705.yaml
  • contracts/OMN-10715.yaml
  • contracts/OMN-10717.yaml
  • contracts/OMN-10718.yaml
  • contracts/OMN-10720.yaml
  • contracts/OMN-10721.yaml
  • contracts/OMN-10722.yaml
  • contracts/OMN-10723.yaml
  • contracts/OMN-10724.yaml
  • contracts/OMN-10725.yaml
  • contracts/OMN-10726.yaml
  • contracts/OMN-10727.yaml
  • contracts/OMN-10728.yaml
  • contracts/OMN-10729.yaml
  • contracts/OMN-10730.yaml
  • contracts/OMN-10731.yaml
  • contracts/OMN-10733.yaml
  • contracts/OMN-10734.yaml
  • contracts/OMN-10736.yaml
  • contracts/OMN-10737.yaml
  • contracts/OMN-10741.yaml
  • contracts/OMN-10742.yaml
  • contracts/OMN-10743.yaml
  • contracts/OMN-10744.yaml
  • contracts/OMN-10745.yaml
  • contracts/OMN-10748.yaml
  • contracts/OMN-10749.yaml
  • contracts/OMN-10750.yaml
  • contracts/OMN-10753.yaml
  • contracts/OMN-10754.yaml
  • contracts/OMN-10755.yaml
  • contracts/OMN-10768.yaml
  • contracts/OMN-10769.yaml
  • contracts/OMN-10771.yaml
  • contracts/OMN-10773.yaml
  • contracts/OMN-10778.yaml
  • contracts/OMN-10779.yaml
  • contracts/OMN-10780.yaml
  • contracts/OMN-10782.yaml
  • contracts/OMN-10783.yaml
  • contracts/OMN-10784.yaml
  • contracts/OMN-10786.yaml
  • contracts/OMN-10790.yaml
  • contracts/OMN-10791.yaml
  • contracts/OMN-10796.yaml
  • contracts/OMN-10799.yaml
  • contracts/OMN-10800.yaml
  • contracts/OMN-10810.yaml
  • contracts/OMN-10811.yaml
  • contracts/OMN-10813.yaml
  • contracts/OMN-10814.yaml
  • contracts/OMN-10815.yaml
  • contracts/OMN-10816.yaml
  • contracts/OMN-10817.yaml
  • contracts/OMN-10818.yaml
  • contracts/OMN-10819.yaml
  • contracts/OMN-10820.yaml
  • contracts/OMN-10822.yaml
  • contracts/OMN-10824.yaml
  • contracts/OMN-10835.yaml
  • contracts/OMN-10836.yaml
  • contracts/OMN-10837.yaml
  • contracts/OMN-10846.yaml
  • contracts/OMN-10847.yaml
  • contracts/OMN-10848.yaml
  • contracts/OMN-10859.yaml
  • contracts/OMN-10862.yaml
  • contracts/OMN-10866.yaml
  • contracts/OMN-10868.yaml
  • contracts/OMN-10870.yaml
  • contracts/OMN-10871.yaml
  • contracts/OMN-10872.yaml
  • contracts/OMN-10873.yaml
  • contracts/OMN-10874.yaml
  • contracts/OMN-10889.yaml
  • contracts/OMN-10895.yaml
  • contracts/OMN-10963.yaml
  • contracts/OMN-10964.yaml
  • contracts/OMN-10966.yaml
  • contracts/OMN-10972.yaml
  • contracts/OMN-10978.yaml
  • contracts/OMN-10983.yaml
  • contracts/OMN-11012.yaml
  • contracts/OMN-11065.yaml
  • contracts/OMN-11068.yaml
  • contracts/OMN-11070.yaml
  • contracts/OMN-11080.yaml
  • contracts/OMN-11083.yaml
  • contracts/OMN-11088.yaml
  • contracts/OMN-11104.yaml
  • contracts/OMN-11116.yaml
  • contracts/OMN-11130.yaml
  • contracts/OMN-11131.yaml
  • contracts/OMN-11137.yaml
  • contracts/OMN-11138.yaml
  • contracts/OMN-11139.yaml
  • contracts/OMN-11140.yaml
  • contracts/OMN-11141.yaml
  • contracts/OMN-11142.yaml
  • contracts/OMN-11143.yaml
  • contracts/OMN-11144.yaml
  • contracts/OMN-11149.yaml
  • contracts/OMN-11150.yaml
  • contracts/OMN-11151.yaml
  • contracts/OMN-11152.yaml
  • contracts/OMN-11153.yaml
  • contracts/OMN-11154.yaml
  • contracts/OMN-11155.yaml
  • contracts/OMN-11156.yaml
  • contracts/OMN-11157.yaml
  • contracts/OMN-11158.yaml
  • contracts/OMN-11159.yaml
  • contracts/OMN-11160.yaml
  • contracts/OMN-11166.yaml
  • contracts/OMN-11168.yaml
  • contracts/OMN-11169.yaml
  • contracts/OMN-11170.yaml
  • contracts/OMN-11171.yaml
  • contracts/OMN-11173.yaml
  • contracts/OMN-11174.yaml
  • contracts/OMN-11176.yaml
  • contracts/OMN-11177.yaml
  • contracts/OMN-11183.yaml
  • contracts/OMN-11184.yaml
  • contracts/OMN-11185.yaml
  • contracts/OMN-11189.yaml
  • contracts/OMN-11194.yaml
  • contracts/OMN-11202.yaml
  • contracts/OMN-11203.yaml
  • contracts/OMN-11206.yaml
  • contracts/OMN-11227.yaml
  • contracts/OMN-11228.yaml
  • contracts/OMN-11231.yaml
  • contracts/OMN-11234.yaml
  • contracts/OMN-11241.yaml
  • contracts/OMN-11243.yaml
  • contracts/OMN-11246.yaml
  • contracts/OMN-11247.yaml
  • contracts/OMN-11249.yaml
  • contracts/OMN-11261.yaml
  • contracts/OMN-11262.yaml
  • contracts/OMN-11266.yaml
  • contracts/OMN-11267.yaml
  • contracts/OMN-11268.yaml
  • contracts/OMN-11269.yaml
  • contracts/OMN-11270.yaml
  • contracts/OMN-11271.yaml
  • contracts/OMN-11272.yaml
  • contracts/OMN-11273.yaml
  • contracts/OMN-11274.yaml
  • contracts/OMN-11276.yaml
  • contracts/OMN-11277.yaml
  • contracts/OMN-11278.yaml
  • contracts/OMN-11279.yaml
  • contracts/OMN-11280.yaml
  • contracts/OMN-11282.yaml
  • contracts/OMN-11283.yaml
  • contracts/OMN-11284.yaml
  • contracts/OMN-11285.yaml
  • contracts/OMN-11292.yaml
  • contracts/OMN-11294.yaml
  • contracts/OMN-11297.yaml
  • contracts/OMN-11298.yaml
  • contracts/OMN-11299.yaml
  • contracts/OMN-11301.yaml
  • contracts/OMN-11330.yaml
  • contracts/OMN-11331.yaml
  • contracts/OMN-11346.yaml
  • contracts/OMN-11348.yaml
  • contracts/OMN-11350.yaml
  • contracts/OMN-11354.yaml
  • contracts/OMN-11379.yaml
  • contracts/OMN-11381.yaml
  • contracts/OMN-11382.yaml
  • contracts/OMN-11384.yaml
  • contracts/OMN-11385.yaml
  • contracts/OMN-11386.yaml
  • contracts/OMN-11413.yaml
  • contracts/OMN-11420.yaml
  • contracts/OMN-11421.yaml
  • contracts/OMN-11423.yaml

Comment on lines +10 to +24
on:
pull_request:
types: [opened, edited, synchronize]

jobs:
main-target-guard:
name: main-target-guard
runs-on: >-
${{
(github.event.pull_request.head.repo.full_name != github.repository)
&& fromJSON(vars.OMNI_PUBLIC_PR_RUNS_ON_JSON || '["ubuntu-latest"]')
|| fromJSON(vars.OMNI_TRUSTED_CI_RUNS_ON_JSON || '["self-hosted","omnibase-ci"]')
}}
timeout-minutes: 5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Declare explicit workflow permissions to enforce least privilege.

This workflow doesn’t need broad token scopes; relying on defaults weakens security posture if repository defaults are permissive.

Suggested patch
 on:
   pull_request:
     types: [opened, edited, synchronize]

+permissions:
+  contents: read
+  pull-requests: read
+
 jobs:
   main-target-guard:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/main-target-guard.yml around lines 10 - 24, Add an
explicit permissions block to the workflow to enforce least privilege: modify
the workflow root (where the pull_request trigger and job main-target-guard are
defined) to declare only the specific token permissions required (e.g.,
contents: read, pull-requests: write/read as needed) instead of relying on
defaults; update the workflow to include the permissions: mapping immediately
under the workflow root so the main-target-guard job runs with only those
declared scopes.

Comment thread .pre-commit-config.yaml
Comment on lines +139 to +146
- id: check-imperative-contracts-freestanding
name: Imperative contract guard with freestanding reachability
language: system
entry: >-
uv run check-imperative-contracts --repo-root . --allowlists-dir allowlists --scan-freestanding
pass_filenames: false
types: [python]
stages: [pre-commit]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Freestanding guard can be bypassed on allowlist-only commits.

Line 145 gates this hook to Python-file changes; combined with pass_filenames: false, commits that only modify allowlists/*.yaml (or other non-Python policy files) won’t run the guard locally.

Suggested fix
       - id: check-imperative-contracts-freestanding
         name: Imperative contract guard with freestanding reachability
         language: system
         entry: >-
           uv run check-imperative-contracts --repo-root . --allowlists-dir allowlists --scan-freestanding
         pass_filenames: false
-        types: [python]
+        always_run: true
         stages: [pre-commit]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.pre-commit-config.yaml around lines 139 - 146, The hook
"check-imperative-contracts-freestanding" is currently limited by types:
[python] so with pass_filenames: false commits touching only allowlists/*.yaml
won't run the guard; update that hook (id:
check-imperative-contracts-freestanding, entry and pass_filenames settings) to
ensure it triggers for allowlist/policy changes—either remove the types
constraint or add an explicit files pattern matching allowlists (e.g.,
allowlists/.*\.ya?ml) or set always_run: true so the hook runs on non-Python
commits as well.

Comment thread contracts/OMN-10278.yaml
Comment on lines +187 to +188
check_value: "grep -q '^status: PASS$' \"drift/dod_receipts/OMN-10278/dod-omninode-infra-pr-456/command.yaml\"
&& grep -q '^pr_number: 456$' \"drift/dod_receipts/OMN-10278/dod-omninode-infra-pr-456/command.yaml\""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix PR-number mismatch between description and enforced receipt binding.

Line 182 says PR #452, but this evidence block’s id/path/checks bind to `PR `#456 (including Line 188). Please align the description to the bound PR number to avoid audit ambiguity.

Suggested fix
-    description: "omninode_infra PR `#452` — port tag-based network discovery to prod cluster Terraform
+    description: "omninode_infra PR `#456` — port tag-based network discovery to prod cluster Terraform
       (migrate from broken terraform_remote_state)"

Based on learnings: only internal consistency issues in contracts/*.yaml should be flagged in this repository context.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@contracts/OMN-10278.yaml` around lines 187 - 188, The description text that
references "PR `#452`" is inconsistent with the enforced receipt binding which
uses PR `#456` in the check_value and evidence path
("drift/dod_receipts/OMN-10278/dod-omninode-infra-pr-456/command.yaml"); update
the human-readable description or header that mentions PR `#452` so it instead
references PR `#456` to match the check_value, evidence id/path and remove the
mismatch (search for the PR number in the same OMN-10278 contract and replace
452 → 456).

Source: Learnings

Comment thread contracts/OMN-10487.yaml
Comment on lines +41 to +49
- id: "dod-rerun-state-pr-target"
description: "OCC rerun-state automation opens dev-targeted PRs without suppressing CI."
source: "manual"
checks:
- check_type: "command"
check_value: >-
grep -q -- '--base dev' "$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml" && !
grep -q '\\[skip ci\\]' "$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml" && grep
-q 'Evidence-Ticket: OMN-10487' "$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Inconsistent path normalization: $CONTRACT_REPO_DIR should be removed.

Lines 47-49 use $CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml, but other files in this PR (e.g., OMN-10485.yaml line 70) reference workflow files with bare relative paths like .github/workflows/call-occ-preflight.yml. The PR's stated objective is to normalize paths away from $CONTRACT_REPO_DIR toward repository-relative locations.

🔧 Suggested fix
-        check_value: >-
-          grep -q -- '--base dev' "$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml" && !
-          grep -q '\\[skip ci\\]' "$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml" && grep
-          -q 'Evidence-Ticket: OMN-10487' "$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml"
+        check_value: >-
+          grep -q -- '--base dev' .github/workflows/occ-rerun-downstream.yml && !
+          grep -q '\\[skip ci\\]' .github/workflows/occ-rerun-downstream.yml && grep
+          -q 'Evidence-Ticket: OMN-10487' .github/workflows/occ-rerun-downstream.yml
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@contracts/OMN-10487.yaml` around lines 41 - 49, The check for id
"dod-rerun-state-pr-target" contains an inconsistent path using
$CONTRACT_REPO_DIR in the check_value grep commands; replace references to
$CONTRACT_REPO_DIR/.github/workflows/occ-rerun-downstream.yml with the
repository-relative path .github/workflows/occ-rerun-downstream.yml in the
check_value string (the three grep calls) so the command matches the same
normalized path style used elsewhere and keep the rest of the grep expressions
(--base dev, '\[skip ci\]', 'Evidence-Ticket: OMN-10487') unchanged.

Comment thread contracts/OMN-11068.yaml
Comment on lines +48 to +62
- id: "dod-runtime-health-pr-1765"
description: "omnibase_infra PR #1765 is the rebased healthcheck fix replacing closed PR #1608."
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: "gh pr view ${PR_NUMBER} --repo ${REPO} --json state,title"
- id: "dod-occ-pr-1715"
description: "OCC PR #1715 carries the replacement OMN-11068 receipt binding for omnibase_infra PR
#1765."
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: "gh pr view ${PR_NUMBER} --repo ${REPO} --json state,title"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Undefined shell variables will cause command failure.

The new dod_evidence entries use ${PR_NUMBER} and ${REPO} variables without defining them. The check_value commands will fail unless these environment variables happen to be set externally.

Compare to the pattern in contracts/OMN-10983.yaml line 38:

check_value: "REPO=OmniNode-ai/omnimarket PR_NUMBER=699 gh pr view ${PR_NUMBER} --repo ${REPO} ..."

Here, the variables are defined inline before use. The new entries should follow the same pattern.

🔧 Proposed fix
   - id: "dod-runtime-health-pr-1765"
     description: "omnibase_infra PR `#1765` is the rebased healthcheck fix replacing closed PR `#1608`."
     source: "manual"
     status: "verified"
     checks:
       - check_type: "command"
-        check_value: "gh pr view ${PR_NUMBER} --repo ${REPO} --json state,title"
+        check_value: "PR_NUMBER=1765 REPO=OmniNode-ai/omnibase_infra gh pr view ${PR_NUMBER} --repo ${REPO} --json state,title"
   - id: "dod-occ-pr-1715"
     description: "OCC PR `#1715` carries the replacement OMN-11068 receipt binding for omnibase_infra PR
       `#1765`."
     source: "manual"
     status: "verified"
     checks:
       - check_type: "command"
-        check_value: "gh pr view ${PR_NUMBER} --repo ${REPO} --json state,title"
+        check_value: "PR_NUMBER=1715 REPO=OmniNode-ai/onex_change_control gh pr view ${PR_NUMBER} --repo ${REPO} --json state,title"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@contracts/OMN-11068.yaml` around lines 48 - 62, The check_value commands for
the dod_evidence entries with ids "dod-runtime-health-pr-1765" and
"dod-occ-pr-1715" use undefined shell variables ${PR_NUMBER} and ${REPO}; fix by
prefixing each check_value with inline variable assignments (e.g.,
REPO=<owner/repo> PR_NUMBER=<number>) before the gh command so the gh pr view
invocation in the check_value string resolves correctly, updating the
check_value strings for those entries accordingly.

* evidence(OMN-12770): add delegation route binding receipts

* evidence(OMN-12770): bind OCC receipts to hotfix PRs

* style(OMN-12770): normalize OCC receipt YAML
@jonahgabriel
jonahgabriel force-pushed the hotfix/omn-12770-occ-evidence branch from d12d784 to 4cb53b3 Compare June 7, 2026 12:03
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 7, 2026
Merged via the queue into dev with commit 7e93008 Jun 7, 2026
60 checks passed
@jonahgabriel
jonahgabriel deleted the hotfix/omn-12770-occ-evidence branch June 7, 2026 12:15
jonahgabriel added a commit that referenced this pull request Jul 13, 2026
…ight

Same fix shape as prior OCC companions in this session (OMN-14504/#4081):
this companion PR's own title contains the OMN-14548 token, so
occ-preflight's self-referential ticket-token extraction requires a PASS
receipt bound to THIS PR (#4093), not only to the product PR #2287.
occ-self-bind-pr-4093 closes that gap. Verified locally:
validate_occ_merge_eligibility resolves eligible:true for both #2287 and
#4093 snapshots; run_contract_compliance_check --pr 4093 reports 3/3 PASS.
jonahgabriel added a commit that referenced this pull request Jul 13, 2026
…-DLQ fix (#4093)

* evidence(OMN-14548): OCC companion for omnibase_infra#2287 — boundary-DLQ fix

Non-implementer-style DoD companion for omnibase_infra#2287 (OMN-14548,
child of epic OMN-14507). Two independent verification events, neither
self-authored by #2287's implementer:

1. dod-verify-2287-static-markers: hermetic gh-api reads at #2287's head
   confirm forbid-verify's requested G1-G3 gap fixes (non-retryable
   content-error classification, split swallow_observed/swallow_prevented
   metric naming, best-effort-DLQ honesty language) are actually present in
   the shipped code.

2. dod-forbid-verify-independent-review: re-confirms the cross-agent seam-
   match finding forbid-verify made in its independent review (verbatim
   quote in the contract) — the real EventBusKafka._publish_raw_to_dlq
   signature at event_bus/mixin_kafka_dlq.py:560-570 (pinned SHA, not a
   moving dev ref) matches #2287's call field-for-field.

Net-new files only: contracts/OMN-14548.yaml + 2 receipts under
drift/dod_receipts/OMN-14548/. Self-bind for this OCC PR's own occ-preflight
(self-referential ticket-token extraction) follows in a subsequent commit
once the real PR number is known.

* fix(OMN-14548): add PR#4093 self-bind receipt for OCC's own occ-preflight

Same fix shape as prior OCC companions in this session (OMN-14504/#4081):
this companion PR's own title contains the OMN-14548 token, so
occ-preflight's self-referential ticket-token extraction requires a PASS
receipt bound to THIS PR (#4093), not only to the product PR #2287.
occ-self-bind-pr-4093 closes that gap. Verified locally:
validate_occ_merge_eligibility resolves eligible:true for both #2287 and
#4093 snapshots; run_contract_compliance_check --pr 4093 reports 3/3 PASS.

* fix(OMN-14548): rebind OCC companion to infra#2288, add deploy-gate evidence

infra#2287 was reissued as #2288 at a new head (f7588b2979d...) after two
real CI-gate fixes: (1) branch renamed to reference the cited ticket
OMN-14548 instead of the epic OMN-14507, fixing the verify/verify identity-
binding gate; (2) a follow-up commit removing a mypy --strict redundant-cast
finding (CI's Omni Standards Gate / Type Safety Validation runs --strict,
catching what a local non-strict single-file run missed).

Re-pins dod-verify-*-static-markers to the new head (all G1-G3 markers
re-verified present). dod-forbid-verify-independent-review and
occ-self-bind-pr-4093 get description-only updates (PR number references),
re-hashed accordingly.

New: dod-no-deploy-required-flag-unwired closes the deploy-gate (OMN-8912)
finding -- #2288 touches a runtime path, and deploy-gate requires a cited
ticket to carry deploy DoD evidence. Proves the negative claim (not asserted
in prose): downloads the full repo tree at #2288's head and confirms
ONEX_BOUNDARY_DLQ_ENABLED is referenced by zero docker-compose/service-
catalog files, so the flag has no path to become true in any deployed
environment via existing config -- no live deploy action is required for
this default-off landing. A live deploy readback belongs to the separate
flip-on ticket (OMN-14551).

Verified locally: validate_occ_merge_eligibility resolves eligible:true for
#2288; run_contract_compliance_check --pr 2288 reports 4/4 PASS;
check_receipt_hardening.py exits 0.

* fix(OMN-14548): re-pin OCC evidence to infra#2288 final head

#2288 gained a second follow-up commit (e43e7b3c) sanitizing two raw
exception interpolations CodeRabbit flagged as Major security findings.
Re-pins dod-verify-2288-static-markers and dod-no-deploy-required-flag-
unwired to that final head; both re-verified locally (all G1-G3 markers
still present, deploy-evidence negative-claim still holds).

Verified locally: eligible:true, check_receipt_hardening.py exits 0,
run_contract_compliance_check --pr 2288 reports 4/4 PASS.
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