Repository navigation
feat(OMN-11271): enforce ## Infra Health section in handoff docs - #1617
Conversation
Add pre-commit hook check-handoff-infra-health.sh and reusable GHA workflow handoff-infra-health-gate.yml that hard-fail when handoff documents (docs/handoffs/*.md, docs/*handoff*.md, docs/tracking/*handoff*.md) are missing the mandatory ## Infra Health section required by OMN-8867. Both layers block unconditionally — no warn-only mode per CLAUDE.md Rule #5 (enforcement, not detection) and Rule #10 (no informational gates). Includes 6 unit tests covering accept/reject/ignore paths.
📝 WalkthroughWalkthroughThis PR introduces validation enforcement requiring handoff markdown documents to include a mandatory ChangesInfra Health Section Enforcement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
| Verdict | Meaning | Blocks merge? |
|---|---|---|
passed |
No critical/error findings | No |
blocked |
CRITICAL or ERROR findings found | Yes |
degraded |
All models unavailable (infra) | No (pilot) |
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)
Checkov CKV2_GHA_1 requires top-level permissions to not be write-all. Add `permissions: contents: read` to satisfy the check.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/handoff-infra-health-gate.yml:
- Around line 59-60: The fallback that sets CHANGED_FILES using "git diff
--name-only HEAD~1...HEAD" is insufficient; replace it with a robust strategy
that computes the PR base/head SHAs and diffs across the full PR (e.g., fetch
origin ${BASE_REF}, compute MERGE_BASE via git merge-base origin/${BASE_REF}
${GITHUB_SHA} or use provided GITHUB_BASE_SHA/GITHUB_HEAD_SHA) and then run "git
diff --name-only <merge-base>...<head>" so CHANGED_FILES always reflects all PR
changes instead of only the last commit.
- Around line 42-45: Update the "Checkout code" GitHub Actions step that
currently uses actions/checkout@v6 to pin to the full 40-character commit SHA
for the desired release (replace the tag with something like
actions/checkout@<FULL_COMMIT_SHA>) and add the setting persist-credentials:
false under the step's with: block (in addition to existing fetch-depth: 0) to
disable credential persistence and reduce supply-chain risk.
🪄 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: e1bd665f-6784-40a1-8bdd-0ae7b1815bfc
📒 Files selected for processing (8)
.github/workflows/handoff-infra-health-gate.yml.github/workflows/reviewdog-caller.yml.pre-commit-config.yaml.pre-commit-hooks/check-handoff-infra-health.shtests/hooks/fixtures/handoff_infra_health/invalid_missing_section.mdtests/hooks/fixtures/handoff_infra_health/non_handoff_doc.mdtests/hooks/fixtures/handoff_infra_health/valid_with_section.mdtests/hooks/test_check_handoff_infra_health.py
💤 Files with no reviewable changes (1)
- .github/workflows/reviewdog-caller.yml
Evidence-Ticket: OMN-11271
Evidence-Source: 101a7bb8a36b991061893b376c9759bea7301ab1
Summary
Both layers block unconditionally — no warn-only mode per CLAUDE.md Rule #5 (enforcement, not detection) and Rule #10 (no informational gates).
Ticket
OMN-11271 — Handoff CI enforcement: pre-commit + CI check that handoff docs include infra health section
dod_evidence
type: pre_commit_hook_added
artifact: .pre-commit-hooks/check-handoff-infra-health.sh
description: Hard-fail hook wired in .pre-commit-config.yaml, 6 passing unit tests
type: gha_workflow_added
artifact: .github/workflows/handoff-infra-health-gate.yml
description: Reusable workflow with required status check gate / Handoff Infra Health
Test plan
Summary by CodeRabbit