Use when a flutter_rust_bridge PR has Codecov patch or project coverage drops, Codecov comments mention missing lines, or you need to decide whether to add tests or justified coverage-ignore markers.
77
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use this skill to turn a vague Codecov PR comment into concrete file/line facts, then decide whether the right fix is real coverage or a narrow, justified ignore marker.
Start from the latest PR head. Codecov comments can be edited and old comments/checks can describe stale commits.
Fetch the PR metadata, Codecov comments/checks, and the full Codecov report into a local temporary directory with the bundled analyzer:
python3 .claude/skills/frb-fix-codecov/codecov_analyzer.py download --pr <number>
python3 .claude/skills/frb-fix-codecov/codecov_analyzer.py analyze --input-dir <output_dir>download writes pr.json, check-runs.json, codecov-report.json, codecov-comment.md,
codecov-checks.json, and codecov-files-summary.json under /private/tmp/frb-codecov-<pr>-<timestamp>/ by
default. Use download --output-dir <dir> to choose a stable path for debugging or examples.
analyze is offline: it reads the downloaded directory, writes missing-patch-lines.txt, and prints the exact
missing patch lines.
The full Codecov report?sha= endpoint is preferred because it returns all files in one response. Codecov also has
file_report/<urlencoded-path>?sha=<sha> for one file; use it only when the full report is too large or you
need to re-check a path precisely.
Read both Codecov statuses:
codecov/patch: coverage on changed lines only. This is the usual PR blocker.codecov/project: whole-project coverage delta. A green project status does not make a red patch status
irrelevant.The GitHub comment usually lists files and missing counts, not precise line numbers. Compute exact missing
patch lines by intersecting Codecov's missing lines with Git's added/changed lines. In Codecov's
line_coverage, FRB's uploaded custom Rust coverage JSON uses:
null: not coverable or ignored0: coveredThe analyzer computes exact missing patch lines by intersecting the saved Codecov report with
git diff --unified=0 <base_sha> <head_sha>. Read missing-patch-lines.txt first, then use the raw JSON files
when the summary does not explain the status.
If the computed output disagrees with Codecov:
HEAD_SHA.filepath= query.Misc :: Codecov downloaded all expected *-coverage artifacts before upload; use the
gh-actions-live-logs skill for GitHub Actions logs.In this repo the Rust-side marker is frb-coverage:ignore-start /
frb-coverage:ignore-end (not frb-codecov-ignore). It is implemented by
tools/frb_internal/lib/src/utils/codecov_transformer.dart, which removes those Rust lines before upload.
Dart-side code uses normal Dart coverage markers:
// coverage:ignore-start
...
// coverage:ignore-endOnly use ignore markers when the code genuinely should not be judged by Codecov. Existing FRB examples usually have an explanatory comment immediately above the marker. Acceptable reasons include:
When adding Rust ignores, keep the ignored range as small as possible and write the reason first:
// This is executed at build time, but llvm-cov does not observe that path.
// frb-coverage:ignore-start
...
// frb-coverage:ignore-endDo not use ignore markers merely because adding a test is inconvenient. If the reason cannot be explained in one short public comment, treat the line as coverage-relevant.
Investigate why each exact missing line is not covered.
Prefer real coverage when the uncovered line represents product behavior that should keep working. Good candidates for tests:
For feature behavior, default to an E2E-style regression first, especially by extending an existing
pure_dart scenario when that can exercise the real generated workflow.
Only fall back to narrower tests when the E2E route is brittle, too expensive, or cannot reach the behavior:
Use the relevant skills after choosing the test path:
frb-develop-feature for feature/bug regression coverage.frb-test for selecting local test commands.tom-frb-env before running FRB tests or setup commands in Tom's environment.If the behavior matters but a focused test would be brittle, very expensive, or require a product decision, summarize the exact missing lines, the suspected reason they are uncovered, and the realistic options, then ask the human which tradeoff to take.
After changing tests or ignore markers:
codecov/patch and codecov/project statuses on the new head.1d5348b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.