Repository navigation
fix(OMN-15025,OMN-15712): done-flip guard bare-#N false positives + attachment supersession - #1976
Conversation
…ttachment supersession
Two defect classes in pre_tool_use_done_flip_guard.sh (OMN-13856 lineage)
blocked three fresh dod_verify PASS closeouts (OMN-15464 8/8, OMN-15539
12/12, OMN-15422 18/18) on 2026-08-05:
(a) OMN-15025: `_PR_NUMBER_RE` matched ANY bare `#<digits>` in prose ("cause
#2 is always mislabelled as cause #3" in OMN-15464's own description) as
an unresolvable PR reference. Narrowed to require an adjacent PR/pull
token ("PR #N" / "pull #N" / "pull request #N", case-insensitive) per
OMN-15025's first suggested fix direction. Dropping a bare match falls
through to decide()'s existing fail-closed OCC-receipt/exempt-label path
rather than silently allowing, so this is not a detection weakening.
(b) OMN-15712 (new): the attachment PR scan had no supersession awareness —
a stale CLOSED-unmerged attached PR (core#1533 on OMN-15539, never cited
by any OCC receipt; infra#2596 on OMN-15422, explicitly retired by a PASS
`-superseded` OCC receipt) still hard-blocked the flip. Added
`list_ticket_receipt_fields` (same git-backed origin/dev read as the
existing path-B OCC probe) + `pr_citation_state` to classify a blocking
PR ref as uncited/superseded/active against the ticket's own OCC receipt
set, and only filter uncited/superseded refs out of the block set when
the ticket HAS at least one OCC receipt (zero-receipt tickets are fully
unaffected — no citation data to reason from).
TDD: RED proven by stashing done_flip_guard.py and confirming the 11 new
OMN-15712 tests fail with AttributeError/TypeError against the pre-fix
guard; GREEN after restoring. Adversarial case covered explicitly
(genuinely-unmerged, actively-cited PR still blocks despite OCC receipts
existing for the ticket). 116/116 tests pass across both files.
Dedup: OMN-15025 already existed (Backlog, unstarted) for defect (a) —
adopted rather than duplicated. OMN-15712 filed new for defect (b) — no
prior ticket covered attachment-supersession awareness.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 52 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 (5)
Comment |
…ude#1976 (#6115) * evidence: OCC companion pass 1 for OmniNode-ai/omniclaude#1976 * evidence: OCC companion self-bind for #6115 --------- Co-authored-by: node-occ-companion-effect <occ-companion-effect@omninode.ai>
|
| 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)
|
@codex DO NOT MERGE — verified regression by independent adversarial verifier (opus, wave-12 verify). The new |
…ged refs only Adversarial verify (opus, wave-12) reproduced a live regression in the just-merged OMN-15712 supersession-awareness fix: the new pr_citation_state() "uncited" branch made ANY ticket holding >=1 OCC receipt non-blocking on ANY unmerged PR absent from receipts' pr_number field -- including a genuinely-OPEN, load-bearing, not-yet-receipted PR. Reproduced on the production default path with OMN-15422's 12 real receipts + a description citing genuinely-OPEN omniclaude#1976: FIXED guard allowed=True, LIVE guard on byte-identical input blocked (pr_not_merged). Re-opened the OMN-8375/OMN-14582/OMN-14641 "Done while implementing PR still open" shape for the ordinary multi-PR flow. Fix: the citation-awareness carve-out is a stale-CLOSED-attachment concept, not a general "no receipt mentions it" bypass. An OPEN PR (or an unresolvable probe, i.e. error set) always blocks regardless of citation state -- only a CLOSED-unmerged ref is eligible for the uncited/superseded carve-out. - OPEN PR ref -> always blocks (unchanged from pre-OMN-15712 guard) - CLOSED-unmerged ref -> blocks only if cited by an active (non-superseded) receipt, or the ticket has no OCC receipts at all (prior behavior, outside this branch) - MERGED -> never blocks (unchanged) New tests: test_open_pr_in_description_must_block_omn_15712_regression pins the exact repro (TDD RED confirmed pre-fix via git stash, GREEN post-fix); test_open_pr_citation_state_uncited_but_still_blocks_via_state_check pins that the OPEN carve-out lives at the decide() call site, not inside the pure pr_citation_state() classifier. 118/118 tests green (tests/hooks/test_done_flip_guard.py + test_linear_done_verify.py). Live re-verification against real tickets with the fixed guard: OMN-15464 -> allowed (all_prs_merged), OMN-15539 -> allowed (blocking_refs_uncited_or_superseded_by_occ_contract, CLOSED-unmerged core#1533 never cited), OMN-15422 -> allowed (same reason, CLOSED-unmerged infra#2596 explicitly superseded) -- all three unchanged from the original fix's intent. Synthetic OPEN-PR case (real OMN-15422 receipts + description citing OPEN omniclaude#1976) -> blocked (pr_not_merged, state=OPEN) -- the regression is closed. Evidence-Ticket: OMN-15712
|
@codex Regression fixed and re-greened — safe to merge whenever picked up. Commit 36f2237 scopes the OMN-15712 citation-supersession carve-out to CLOSED-unmerged refs only:
TDD: new test Live re-verification with the fixed guard against real Linear/gh/OCC state: OMN-15464 -> allowed (all_prs_merged); OMN-15539 -> allowed (blocking_refs_uncited_or_superseded_by_occ_contract, CLOSED-unmerged core#1533 never cited — unchanged); OMN-15422 -> allowed (same reason, CLOSED-unmerged infra#2596 explicitly superseded — unchanged); synthetic case (real OMN-15422 receipts + description citing this repo's own genuinely-OPEN PR #1976) -> blocked (pr_not_merged, state=OPEN) — the leak is closed. CI green (all required contexts pass, mergeStateStatus=CLEAN, mergeable=MERGEABLE). Un-drafted. I will not merge this myself. |
…ode-ai/omniclaude#1976 (#6121) * evidence(OMN-15025, OMN-15712): author OCC companion for OmniNode-ai/omniclaude#1976 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 36f22375a55c97569a75f27a583f481cd9fe7d33. * evidence(OMN-15025, OMN-15712): self-bind OCC#6121 + rebind contract_sha256 * fix(OMN-15025,OMN-15712): preserve merged OCC receipts --------- Co-authored-by: omnimarket-bot <bot@omninode.ai> Co-authored-by: Jonah Gray <jonah@omninode.ai>
Summary
Two defect classes in
pre_tool_use_done_flip_guard.sh(OMN-13856 lineage) hard-blocked three freshdod_verifyPASS closeouts on 2026-08-05: OMN-15464 (8/8), OMN-15539 (12/12), OMN-15422 (18/18, correctly-superseded chain).(a) OMN-15025 (adopted — pre-existing Backlog ticket, not duplicated):
_PR_NUMBER_REmatched ANY bare#<digits>in prose as an unresolvable PR reference — e.g. OMN-15464's own description: "cause #2 is always mislabelled as cause #3". Narrowed the regex to require an adjacentPR/pull/pull requesttoken, per OMN-15025's first suggested fix direction. A dropped bare match falls through todecide()'s existing fail-closed OCC-receipt/exempt-label path rather than silently allowing — not a detection weakening.(b) OMN-15712 (new ticket — no prior duplicate found): the attachment PR scan had no supersession awareness. A stale CLOSED-unmerged attached PR still hard-blocked the flip even when the ticket's own OCC DoD contract had retired it:
omnibase_core#1533is CLOSED/unmerged, but no OCC receipt anywhere citespr_number: 1533— the real DoD contract cites1532/1996instead.omnibase_infra#2596is CLOSED/unmerged, but an explicit PASSdod-...-pr-2596-supersededOCC receipt retires it in favor of merged#2597(same head commit).Added
list_ticket_receipt_fields(reuses the existing git-backedorigin/devread used by the path-B OCC probe) +pr_citation_stateto classify a blocking PR ref asuncited/superseded/activeagainst the ticket's own OCC receipt set. Only when a ticket has at least one OCC receipt does this filtering apply — a ticket with zero OCC receipts is completely unaffected (no citation data exists to reason from), so the ordinary blocking behavior is untouched for the common non-OCC ticket shape.Test plan
git stash-ingdone_flip_guard.pyand confirming all 11 new OMN-15712 tests fail (AttributeError/TypeError) against the pre-fix guard.pytest tests/hooks/test_done_flip_guard.py tests/hooks/test_linear_done_verify.py -q→ 116/116 pass.test_adversarial_active_unmerged_pr_still_blocks_despite_receipts).test_no_occ_receipts_at_all_is_unaffected_by_citation_filterproves the zero-receipt case is untouched.parse_pr_refs— zero bare-#Nfalse matches post-fix (was 2:#2,#3).ruff format,ruff check,mypy --ignore-missing-importsclean; fullpre-commit runclean on push.Ticket
OMN-15025, OMN-15712
Evidence-Source: OCC#6121
Evidence-Ticket: OMN-15025
Evidence-Ticket: OMN-15712