Repository navigation
fix(OMN-16376): occ-autobind keys evidence to the PR TITLE ticket, never the body - #2139
Conversation
…ver the body _extract_tickets keyed a minted OCC companion to the shared _extract_ticket_ids(body, title) result — body closing-keyword matches exclusive, title only as fallback. The Receipt Gate's own identity check (_verify_ticket_identity Axis 1) requires the PR TITLE, never the body, to reference whatever ticket the companion's Evidence-Ticket names, so a body-first extraction is structurally unable to satisfy the gate it feeds whenever the body cites an unrelated ticket via a closing keyword. Live incident: omninode_infra PR #958 (title cited OMN-16368; body cited OMN-15757 as related context via a closing keyword) minted a companion keyed to OMN-15757, which could never pass OMN-16368's Receipt Gate run — a second, hand-authored companion was required and the wrong one closed as dead weight. Fix: _extract_tickets now takes only `title` and delegates to _extract_ticket_ids("", title) — same title-token regex the gate itself falls back to, body structurally excluded from the call. Regression tests reproduce the exact OMN-16368/#958 shape (title=A, body cites unrelated B via a closing keyword) both as a direct _extract_tickets assertion and end-to-end through _emit_companion_sync, asserting the minted contract/receipts key to A and that no contracts/<B>.yaml or receipt tree for B is ever authored.
|
Warning Review limit reachedNext included review available in 50 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 125 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
✅ Architectural Review — PASSEDErrors: 0 What this checks
No architectural violations found. Static architectural lint — no model inference (OMN-14176). |
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Gate semantics
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
…imarket#2139 (#7057) * evidence(OMN-16376): author OCC companion for OmniNode-ai/omnimarket#2139 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 010b3e94ff6cda456317bd33967480d6e0374d43. * evidence(OMN-16376): self-bind OCC#7057 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
Problem
OccCompanionEmitter._extract_ticketskeyed a minted OCC companion to the shared_extract_ticket_ids(body, title)result — body closing-keyword matches (Closes/Fixes/Resolves/Implements OMN-<n>) checked exclusively first, title only used as a fallback when the body has none.The Receipt Gate's own identity check (
_verify_ticket_identityAxis 1,omnibase_core/validation/validator_receipt_gate.py) requires the PR title — never the body — to reference whatever ticket the companion'sEvidence-Ticketline names. A body-first extraction is therefore structurally unable to satisfy the gate it feeds whenever the body cites an unrelated ticket via a closing keyword — there is no configuration of title-ticket != body-ticket under which the mis-keyed companion can pass.Live incident:
omninode_infraPR #958 — title cited OMN-16368 (the actual ask); the body separately cited OMN-15757 as related context via a closing keyword. The autobind companion (onex_change_control#6847) was minted keyed to OMN-15757 and could never pass OMN-16368's Receipt Gate run. A second, hand-authored companion (#6848) was required and #6847 had to be superseded/closed as dead weight.Fix
_extract_ticketsnow takes onlytitle(thebodyparameter is removed) and delegates to_extract_ticket_ids("", title)— passing an empty body means the closing-keyword branch can never fire, so only the title-token fallback (TICKET_PATTERN, the SAME regex the gate itself uses) ever runs. The one call site in_emit_companion_syncis updated accordingly; the caller-suppliedticket_idfallback (used when the title cites no ticket at all) is unchanged.Scope is intentionally narrow: only
occ_companion_emitter.py's_extract_ticketsand its single call site.node_occ_companion_computeandnode_occ_observation_effectalso call the shared_extract_ticket_ids(body, title)directly but are out of this ticket's scope (different producer surfaces; not implicated by the #958 incident).Tests
TestExtractTicketsIsTitleOnly(new): direct assertions against_extract_tickets, including a positive-control assertion that the shared_extract_ticket_ids(body, title)helper — given the real OMN-9359 implement demo market skill runtime nodes #958 body — WOULD resolve to the wrong ticket (OMN-15757), proving the fix removes a real branch, not a hypothetical one.TestFullEmitFlow.test_mints_for_title_ticket_not_a_body_mentioned_ticket(new): drives the real_emit_companion_syncend to end with the OMN-9359 implement demo market skill runtime nodes #958 shape (title=OMN-16368, body cites OMN-15757 viaCloses) and asserts the mintedcontracts/OMN-16368.yaml+ receipt tree exist while nocontracts/OMN-15757.yamlor receipt tree for OMN-15757 is ever authored.All 31 tests in
test_occ_companion_emitter.pypass; full local governed pre-push suite (7793 passed, 45 skipped, 1 xfailed) is green.Evidence-Ticket: OMN-16376
Evidence-Source: OCC#7057