Skip to content

fix(findings-only): never drop an incomplete or failed result - #293

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/findings-only-keeps-verdicts
Nov 13, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
fix/findings-only-keeps-verdicts

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Why

CodeRabbit raised this on #292 (comment 4563915280) after it had merged. Since #292, an untrustworthy adjudication (exit 2) sets the Chapel RepoResult.verdict to "error" but leaves RepoResult.error empty. The --findingsOnly filter in MassPanic.chpl kept only results with weakPointCount > 0 || error != "". A repository with no weak points and an incomplete adjudication was therefore dropped before reporting, so an incomplete result vanished from the output. That contradicts #292's purpose.

What

  • Chapel. A new hasFindings(r) in chapel/src/Protocol.chpl keeps any result with weak points, a scan error, or an adjudication verdict other than pass (error, fail, warn). --findingsOnly drops only clean results. MassPanic.chpl's filter now uses this predicate.
    • CodeRabbit asked only for error to be kept. A fail or warn verdict with zero weak points is also something to report, so the rule is "drop only what's clean".
  • Rust. assemblyline --findings-only had the same kind of hole. It kept only weak_point_count > 0, so repositories whose scan failed (error: Some(..)) vanished. It now keeps those too, via has_findings(), matching the Chapel side. Rust has no adjudication verdict, so that case doesn't arise there.

Tests

  • chapel/smoke/two_repo_smoke.chpl checks hasFindings for every case:
    • dropped: no verdict, pass;
    • kept: error, fail, warn, weak points, scan error.
  • New Rust unit test findings_only_keeps_failed_scans_and_drops_clean_ones.
  • Run locally: cargo fmt --check, cargo clippy --all-targets -D warnings, assemblyline unit tests (4) and tests/assemblyline_tests.rs (6) all pass.
  • Not run locally: there is no Chapel compiler in this environment. The Chapel parse, build and smoke run are left to chapel-ci.yml.
  • Not covered: no test drives MassPanic --findingsOnly end to end with a real exit-2 adjudication. The smoke test covers the predicate, and the filter is a one-line call to it.

Generated by Claude Code

Since #292, an adjudication that cannot be trusted sets the Chapel
RepoResult verdict to "error" but leaves RepoResult.error empty. With
--findingsOnly, a repository with zero weak points and that verdict was
filtered out before reporting, so the incomplete result vanished.

Chapel: hasFindings() in Protocol.chpl keeps weak points, a scan error, or
any adjudication verdict other than pass; MassPanic's filter uses it. The
two-repo smoke program checks every verdict case.

Rust: assemblyline --findings-only had the same shape of hole, keeping only
weak_point_count > 0 and so dropping repositories whose scan failed. It now
keeps r.error.is_some() as well, via has_findings(), with a unit test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 13, 2026 14:45
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-13T14:46:00.041122Z
We couldn’t complete this review. Comment @codex review to try again.
95e12e2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath merged commit 8178878 into main Nov 13, 2026
72 of 73 checks passed
@hyperpolymath
hyperpolymath deleted the fix/findings-only-keeps-verdicts branch November 13, 2026 14:46
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.

3 participants