Skip to content

evidence(OMN-14714): fail-closed replacements for two fail-open negative probes - #5277

Merged
jonahgabriel merged 2 commits into
devfrom
jonah/omn-14714-failclosed-negative-probes
Jul 28, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
jonah/omn-14714-failclosed-negative-probes

Conversation

@jonahgabriel

Copy link
Copy Markdown
Contributor

OMN-14714 — fail-closed replacements for two fail-open negative probes

Evidence-Source: OmniNode-ai/onex_change_control
Evidence-Ticket: OMN-14714

Third-party remediation of OCC#5272 (merged b2147b5a43f663742b2a9448d316be8c78914367). I am neither #1927's nor #5272's implementer.

The defect

Two of the five probes OCC#5272 landed fail open:

  • dod-14714-merged-0747500e-stale-width-removed
  • dod-14714-merged-0747500e-xfail-flipped

Both have the shape ! <gh api ...> | base64 -d | grep -q .... The ! negates the pipeline exit status — grep's. When gh api produces no output (GC'd ref, API outage, rate limit, auth failure), grep exits 1 and ! inverts it to exit 0 = PASS. The probe reports GREEN while observing nothing, and a re-execution during any API hiccup writes a false PASS receipt into the evidence store.

This is strictly worse than the durability defect OCC#5272 existed to fix. Its own argument was that a dead ref should make a probe error rather than go honestly RED; two of its five replacements go silently GREEN instead.

Nothing upstream catches it. validate_pr_deploy_required._command_of explicitly skips a leading ! when locating command position, so both still classify falsifiable=True; scripts/lint_contract_check_values.py has no rule for this shape.

Execution matrix (/bin/sh -c, the same path run_contract_compliance_check._check_command uses)

Run against the check_values parsed out of the landed / proposed YAML, at three refs:
GREEN = 0747500e682c903301bc1bd9eb56578c6dad72af (omnimarket#1927 squash), RED = parent 848d3333553b5838d9ad1635be89e9d89f0f850b, DEAD = deadbeefdeadbeefdeadbeefdeadbeefdeadbeef.

dod-14714-merged-0747500e-stale-width-removed    GREEN=0  RED=1  DEAD=0   <- FAIL-OPEN
dod-14714-merged-0747500e-xfail-flipped          GREEN=0  RED=1  DEAD=0   <- FAIL-OPEN
dod-14714-failclosed-stale-width-removed         GREEN=0  RED=1  DEAD=1   ok
dod-14714-failclosed-xfail-flipped               GREEN=0  RED=1  DEAD=1   ok

The repair

Two appended entries, each carrying supersedes_dod_evidence:<fail-open id>:

new entry supersedes change
dod-14714-failclosed-stale-width-removed dod-14714-merged-0747500e-stale-width-removed capture response to $out, assert test -n "$out" before negating the grep
dod-14714-failclosed-xfail-flipped dod-14714-merged-0747500e-xfail-flipped same fail-closed shape, plus scope narrowing (below)

Scope narrowing (second defect). The superseded xfail probe asserted zero pytest.mark.xfail occurrences anywhere in the module, so any future unrelated xfail added to that test file would flip OMN-14714's evidence RED for reasons unrelated to OMN-14714. Simulated by execution on a copy of the merged file with one unrelated xfail inserted 40 lines above the target test: superseded form exits 1 (false RED), replacement exits 0. The replacement windows the absence assertion to the six lines directly above def test_merged_path_supersession_is_yamlfmt_clean — where the strict xfail actually sat at parent 848d3333 (lines 454-459) — and first asserts the test function is still present, so a rename cannot make the window vacuous.

Correction of a false claim. OCC#5272's dod-14714-merged-0747500e-xfail-flipped description states: "Verified: the obvious candidate (gh api .../pulls/5272/files --jq .patch | grep ...) classifies INERT." That is false and was not verified by execution. Re-run against both real evaluators: contract_compliance_check._is_inert_check → False (ACTIVE); validate_pr_deploy_required.classify_check_value → falsifiable=True; no SELF_REFERENTIAL_PATTERNS entry matches (the string contains neither contracts/OMN- nor dod_receipts). The two mechanisms also differ — OCC's _INERT_CHECK_PATTERNS uses a negative lookbehind (?<![\w/])contracts/OMN-, so even a genuine own-contract read via a contents-API path is not inert to OCC; only the deploy-gate's lookbehind-free pattern catches it. Omitting a self-bind entry stands as a decision; the justification recorded for it was wrong. Since dod_evidence is append-only, the correction is recorded in the superseding entry's description and in a comment on #5272.

Verified against the real evaluators (not asserted)

  • validate_pr_deploy_required.classify_check_value (from omniclaude@main): both new entries falsifiable=True (['gh-api']); has_deploy_evidence → True.
  • contract_compliance_check (from onex_change_control@dev): _is_inert_check → False for both (ACTIVE); _non_hermetic_reason → None; _has_effective_check → True; _superseded_dod_ids → 6 (the 4 from evidence(OMN-14714): bind #1927's deliverables at the durable squash commit, retire the hollow entries #5272 plus the 2 new retirements).
  • scripts/lint_contract_check_values.py → exit 0.
  • yamlfmt with OCC's .yamlfmt is a byte-exact no-op on the contract and both receipts (the OMN-14714 failure mode itself).

Honest residuals

  • supersedes_dod_evidence does not affect deploy-gate. has_deploy_evidence is purely existential (if falsifiable: return True) and never subtracts. Retirement is honored only by contract_compliance_check.py / lint_contract_check_values.py. The fail-open entries stay in the file (append-only) and remain readable by any consumer that ignores supersession.
  • This is a general vector, not local to OMN-14714. Any !-negated pipeline in any contract in this store has the same false-green mode. A lint rule rejecting !-negated pipelines that lack a non-empty assertion is the mechanism; filed separately rather than smuggled into this PR.
  • Falsifiability is report mode org-wide and deploy-gate is not a required context on omnimarket dev — this changes no gate verdict. Evidence integrity only.
  • These probes prove the fixed code exists at a durable ref; that the corruption regression test passes is proven by omnimarket CI on evidence(OMN-12438): OCC contract for consumer.py max_tokens regression fix #1927, not by these checks.

proof_class: replay-proven (evaluator verdicts recomputed from canonical remote refs) + live-readback (all four probes re-executed against the live GitHub API at three refs).

…ive probes

Adversarial verification of OCC#5272 found two of its five landed probes FAIL
OPEN. Both are `! <gh api ...> | base64 -d | grep -q ...`; the `!` negates the
pipeline exit status, i.e. grep is. When `gh api` yields no output (GC-d ref,
API outage, rate limit, auth failure) grep exits 1 and `!` inverts it to exit 0
- a vacuous PASS that would be written into the evidence store as a receipt.

Proven by execution against ref deadbeef...deadbeef through the same `sh -c`
path run_contract_compliance_check uses:

  dod-14714-merged-0747500e-stale-width-removed  GREEN=0 RED=1 DEAD=0  FAIL-OPEN
  dod-14714-merged-0747500e-xfail-flipped        GREEN=0 RED=1 DEAD=0  FAIL-OPEN
  dod-14714-failclosed-stale-width-removed       GREEN=0 RED=1 DEAD=1  ok
  dod-14714-failclosed-xfail-flipped             GREEN=0 RED=1 DEAD=1  ok

Nothing upstream catches the fail-open shape: validate_pr_deploy_required
skips a leading `!` when locating command position, so both still classify
falsifiable=True, and scripts/lint_contract_check_values.py has no rule for it.

Two appended entries carry supersedes_dod_evidence markers retiring the
fail-open pair. The repair captures the API response to a variable and asserts
it non-empty BEFORE negating the grep.

The xfail entry is also scope-narrowed: the superseded form asserted zero
pytest.mark.xfail anywhere in the module, so any future unrelated xfail in that
file would flip OMN-14714 evidence RED. The replacement windows the assertion
to the six lines above the target test (where the strict xfail sat at parent
848d3333) and first asserts the test function is still present.

The new entry description also corrects a false "verified by execution" claim
in the superseded entry (append-only, so it cannot be edited in place): the
self-bind shape it said "classifies INERT" does not - _is_inert_check returns
False and classify_check_value returns falsifiable=True for it.

Append-only: no landed entry edited or removed. Evidence integrity only;
deploy-gate falsifiability is report-mode and this changes no gate verdict.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 17 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6d6edee2-4c3e-4aaa-843b-9a7f59b5ee14

📥 Commits

Reviewing files that changed from the base of the PR and between b77b10b and d135a71.

📒 Files selected for processing (3)
  • contracts/OMN-14714.yaml
  • drift/dod_receipts/OMN-14714/dod-14714-failclosed-stale-width-removed/command.yaml
  • drift/dod_receipts/OMN-14714/dod-14714-failclosed-xfail-flipped/command.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-14714-failclosed-negative-probes

Comment @coderabbitai help to get the list of available commands.

…acements

Two PASS receipts under drift/dod_receipts/OMN-14714/, one per appended entry,
bound to contract_sha256 f49b4e7d (the committed contract bytes) and per-entry
contract_entry_sha256 (OMN-13888 canonical-JSON scheme, cross-validated by
recomputing an already-merged receipt of this ticket and matching its landed
digest exactly).

Each receipt records the full three-ref exit matrix, including exit 1 at the
nonexistent ref where the superseded entry returns exit 0 - the fail-open
defect being retired. yamlfmt is a byte-exact no-op on both receipts on the
first generation pass (literal block-scalar dumper), so the OMN-14714
corruption mode is not reintroduced by this PR is own artifacts.
@jonahgabriel
jonahgabriel merged commit a6ff6d9 into dev Jul 28, 2026
55 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-14714-failclosed-negative-probes branch July 28, 2026 10:35
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