Skip to content

fix(review): preserve counterexamples in Noema reviews - #2035

Draft
seonghobae wants to merge 4 commits into
mainfrom
codex/review-counterexample-evidence
Draft

fix(review): preserve counterexamples in Noema reviews#2035
seonghobae wants to merge 4 commits into
mainfrom
codex/review-counterexample-evidence

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Noema validates an attack/counterexample for each adversarial probe but discarded it when constructing the published review. Preserve that scenario under its probe so readers can follow the hypothesis, evidence, and outcome.

The renderer uses the existing field and publication path; verdicts, current-head binding, validation, credentials, and routing are unchanged. Historical renderer inputs without the field remain compatible.

Validation: the publication regression fails on all three review events before the fix and passes 3/3 after it. The expanded Noema suite passes 250 tests with 100% statement and branch coverage of the publication module; docstring coverage is 100%. Two additional boundary tests cover missing context, untruncated diffs, and mixed public/private DNS answers. An independent agent review found no production blocker; its contradictory fixture example was corrected. This is unit-level publication evidence; actual bot output and protected merge remain unverified.

Quality reference: BerriAI/litellm#20421 (comment). Reproduction, limits, and follow-up: docs/doctoring/noema-counterexample-publication.md.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 63913c02-8bcf-43cc-ad87-4334e6c40837

📥 Commits

Reviewing files that changed from the base of the PR and between 7fd571d and 6324f4d.

📒 Files selected for processing (7)
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • docs/doctoring/noema-counterexample-publication.md
  • docs/product-technical-gap-baseline.md
  • scripts/ci/noema_review_gate.py
  • tests/test_noema_review_gate.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-head source review of 6324f4dce523039c992956d478750d74f55e52e3: the production change preserves the already-validated attack_or_counterexample field only when present, keeps historical inputs compatible, and does not alter verdict, reviewed-commit, credential, routing, or publication-event authority. The APPROVE / REQUEST_CHANGES / COMMENT serialization regression exercises the actual review payload boundary. The additional small-context and mixed-DNS cases are tests of existing fail-closed behavior and do not broaden production scope. I found no new source-backed substantive defect in this delta. This COMMENT is not independent approval or merge authority; CodeQL settlement for this exact head remains nonterminal, and protected integration still requires current-head checks and authorized review.

@seonghobae seonghobae added bug Something isn't working priority: high High-priority or P1 work type: bug Defect or incorrect behavior labels Sep 8, 2026 — with ChatGPT Codex Connector

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 6324f4dce523039c992956d478750d74f55e52e3.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: AGENTS.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: AGENTS.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Repository file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Repository file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Repository file: CLAUDE.md"]
  S3 --> I3["repository behavior"]
  I3 --> R3["Review risk: Repository file: CLAUDE.md"]
  R3 --> V3["required checks"]
  Evidence --> S4["Docs: noema-counterexample-publication.md (2 files)"]
  S4 --> I4["operator or user guidance"]
  I4 --> R4["Review risk: Docs: noema-counterexample-publication.md (2 files)"]
  R4 --> V4["docs review"]
  Evidence --> S5["CI script: noema_review_gate.py"]
  S5 --> I5["review and security gate shell path"]
  I5 --> R5["Review risk: CI script: noema_review_gate.py"]
  R5 --> V5["bash -n plus Strix self-test"]
  Evidence --> S6["Test: test_noema_review_gate.py"]
  S6 --> I6["regression suite"]
  I6 --> R6["Review risk: Test: test_noema_review_gate.py"]
  R6 --> V6["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head RCA for 6324f4dce523039c992956d478750d74f55e52e3: noema-review reached the CO sidecar at /v1/chat/completions, then failed after 88.5s with HTTP 502 (phase=response_error, served_model=unknown, caller attempts=1). The same log records that gateway repair/failover is owned by the gateway. Preflight had ready agents, while several NVIDIA NIM candidates independently showed 404/Timeout rejections. This is not treated as a clean verdict or a consumer-side .github fallback opportunity; the RCA was handed to the CO canonical-owner task for provider/model routing repair. No check suppression or paid fallback was added.

Copy link
Copy Markdown
Contributor Author

Current exact-head review admission update for 6324f4dce523039c992956d478750d74f55e52e3: Noema rerun run 34183702988 / job 102003278065 is terminal failure. The exact log shows orchestrator/free, caller attempts=1, HTTP 429 after 322.5 s, served model deepseek-ai/deepseek-v4-flash-0731; no paid/local fallback was added. Source/security/CodeQL successes remain preserved, but OpenCode's earlier CHANGES_REQUESTED was check-derived and no qualifying current-head approval exists. Canonical owner/consumer repair is tracked in ContextualWisdomLab/contextual-orchestrator#1106 and #2042. Do not merge or reuse predecessor evidence.

@seonghobae
seonghobae marked this pull request as draft September 8, 2026 12:09

Copy link
Copy Markdown
Contributor Author

Lifecycle correction at unchanged exact head 6324f4dce523039c992956d478750d74f55e52e3: source, security, OpenCode and CodeQL evidence remains preserved, but the rerun Noema job 102003278065 is terminal failure at Prepare Noema model verdict. The PR is therefore Draft again; a failed model-backed required lane is not merge-ready and is not replaced by predecessor or status-only evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high High-priority or P1 work type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant