Repository navigation
fix(OMN-14637): re-anchor dod_verify live-OPEN gate to MERGED after product PR merges - #1774
Conversation
…roduct PR merges node_dod_verify re-executes every contract command/check_value literally. A DoD evidence check that asserts its product PR is still live-OPEN (the canonical `gh pr view <n> --repo <r> --json state,... --jq '.state == "OPEN" and ...'` idiom) becomes permanently false the instant the PR squash-merges: GitHub flips .state to MERGED and deletes the head branch. The sanctioned closeout then fails-closed forever on a normal, successful merge (13/26 checks failed re-running `dod_verify OMN-11878` post-merge). Fix: when an evidence item is authoritatively bound to a CONFIRMED-MERGED PR (reusing the OMN-14207 binding + live-probe machinery), the collector re-anchors ONLY the `.state == "OPEN"` equality to the merged terminal state (`.state == "MERGED"`). Every other predicate (.headRefOid/.files/.title/ .baseRefName/receipt greps — all retained by gh for a merged PR) still runs, so a genuinely-incomplete ticket STILL FAILS. Verification-preserving and non-vacuous. - EvidenceCollector._item_bound_to_merged_pr: authoritative, live-probe-gated, fail-safe (disabled live check / unbound / OPEN / unresolved probe -> verbatim). - EvidenceCollector._relax_merged_pr_state_predicate: surgical rewrite of only the .state OPEN equality (single/double quoted), never an unrelated "OPEN". - Wired into _check_evidence_item -> _run_command_check (post placeholder resolve). Regression test proves RED-verbatim -> GREEN-relaxed on the identical command, a non-vacuous control (unmet content still FAILS for a merged PR), predicate precision, and the merged-binding gate. 16 new tests; 218 dod_verify tests green. dod_evidence: omnimarket tests/unit/nodes/node_dod_verify/test_omn_14637_merged_pr_state_relaxation.py (16 pass); full node_dod_verify unit+integration+golden-chain suites 218 pass; ruff format+check clean; mypy --strict clean on evidence_collector.py; pre-commit green (topic-naming-lint env-only).
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Handoff note (background LANE B, not merging — Codex owns landing): Code is proven green locally; the only CI reds are the OCC-companion dependency cascade. Root cause of every red: To unjam: author the OCC Evidence-Source companion for OMN-14637 (Codex/autogen path). Once occ-preflight passes, the real matrix runs. Local proof on this branch:
|
Summary
Closes OMN-14637.
node_dod_verifyre-executes every contractcommand/check_valuecheck literally. A DoD evidence check that asserts its product PR is still live-OPEN — the canonicalgh pr view <n> --repo <r> --json state,... --jq '.state == "OPEN" and ...'idiom — becomes permanently false the instant the PR squash-merges: GitHub flips.statetoMERGEDand deletes the head branch. The sanctionedonex skill dod_verifycloseout then fails-closed forever on a normal, successful merge (13/26 checks failed re-runningdod_verify OMN-11878post-merge, even though the work is verifiably merged and correct).Fix (sanctioned mechanism #2 from the ticket — substitute a merge-commit-content check on MERGED)
When an evidence item is authoritatively bound to a CONFIRMED-MERGED PR — reusing the exact OMN-14207 binding (
_resolve_pr_bindings: explicitprfield or durable receiptpr_number+repo) and live-probe (_fetch_pr_merge_state) machinery — the collector re-anchors only the.state == "OPEN"equality to the merged terminal state (.state == "MERGED")..headRefOid,.files,.title,.baseRefName, receipt greps — all of whichgh pr viewstill reports for a merged PR) still runs. A genuinely-incomplete ticket whose merge commit lacks the expected content STILL FAILS. The relaxation is verification-preserving and non-vacuous.DOD_VERIFY_LIVE_PR_CHECK=0), the item binds to no PR, or the PR is OPEN/CLOSED/unresolved..stateOPENequality (single- or double-quoted, quote style preserved) moves; an unrelated"OPEN"literal (e.g..title == "OPEN") is untouched.Changed surface
EvidenceCollector._item_bound_to_merged_pr— authoritative, live-probe-gated, fail-safe merged-binding detection.EvidenceCollector._relax_merged_pr_state_predicate— pure, surgical.state == "OPEN"→.state == "MERGED"rewrite._check_evidence_item→_run_command_check(applied after placeholder resolution, gated per-item).Scope note
This closes the dominant
.state == "OPEN"self-referential class (the ticket's headline example, dod-001). The separategh repo clone --branch <deleted-branch>anti-pattern (dod-004/005) is a contract-authoring issue — the durable content-at-SHA form (gh api contents?ref=<sha>, used by dod-002/003) already survives merge, which is the ticket's suggestion #1 and is OCC-authoring territory, not a node change.dod_evidence
tests/unit/nodes/node_dod_verify/test_omn_14637_merged_pr_state_relaxation.py(16 tests) proves:.state'sOPENmoves; unrelated"OPEN"and.state == "CLOSED"untouched).collect()and the handler.uv run pytest tests/unit/nodes/node_dod_verify/ tests/integration/node_dod_verify/ tests/test_golden_chain_dod_verify.py→ 218 passed (16 new + 202 pre-existing, no regressions).ruff format+ruff checkclean;mypy --strictclean onevidence_collector.py;pre-commit run --filesgreen.Not in scope for this PR
Evidence-Source: OCC#4223
Evidence-Ticket: OMN-14637
Evidence-Commit: e511ad5109f38e561b75f6501ed2b2c1b011d23e
Evidence-Head: 7e8477a