Skip to content

fix(check): say a mixed check is incomplete when a target cannot run - #132

Merged
kvlonge merged 1 commit into
mainfrom
fix/incomplete-check-summary
Nov 10, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/incomplete-check-summary

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Why

When one target of a mixed check cannot run, fensu check exits 2 and prints the error, but the report of the targets that did run still ended with Found 0 faults. Read on its own, as a log tail or a CI summary, that looks like a clean check of the whole repository. One example is a Rust target without cargo next to a Python target with custom rules.

Changes

  • When a target of a mixed check fails, its error still goes to stderr and the exit code stays 2. The faults of the targets that ran are still printed, but the summary now reads:

    Check incomplete: found 1 fault in the targets that ran
    

    It is coloured as unhealthy even when the count is 0.

  • A complete check keeps Found N faults. A single-target check that cannot run already exits 2 before any report, as before.

  • docs/rust.md describes the incomplete summary.

Verification

  • New CLI test: a Python target with a custom rule and a Rust target, with cargo missing. It expects exit 2, the FPRSL902 … cargo not found error, the incomplete summary, and no Found line. It fails on main, which prints Found 1 fault, and passes with this change.
  • The existing test that a mixed check keeps native web output when the Python host fails still passes.
  • cargo test -p fensu-cli --test command: 141 passed. test_rule::given_forced_color_… fails here on main too, which looks environmental. cargo test -p fensu-cli --lib: 36 passed.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, and fensu check on this repository (Rust and Python targets) are clean.

When one target of a mixed check cannot run, for example a Rust target
without cargo next to a Python target with custom rules, fensu check
already exits 2 and prints the error, but the report of the targets that
did run ended with "Found 0 faults", which reads like a clean check. The
summary now says "Check incomplete: found N faults in the targets that
ran". Those targets' faults are still printed.
@kvlonge
kvlonge enabled auto-merge (squash) November 10, 2026 00:33
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying fensu with  Cloudflare Pages  Cloudflare Pages

Latest commit: 473b01b
Status: ✅  Deploy successful!
Preview URL: https://0b6cf7d0.fensu.pages.dev
Branch Preview URL: https://fix-incomplete-check-summary.fensu.pages.dev

View logs

@kvlonge
kvlonge merged commit 3c6cf77 into main Nov 10, 2026
34 checks passed
@kvlonge
kvlonge deleted the fix/incomplete-check-summary branch November 10, 2026 01:09
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