Skip to content

fix(coverage): report aggregate count overflow as unknown - #1454

Merged
EffortlessSteven merged 1 commit into
fix/sensor-exit-auditfrom
fix/coverage-total-overflow
Oct 14, 2026
Merged

EffortlessSteven merged 1 commit into
fix/sensor-exit-auditfrom
fix/coverage-total-overflow

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Two complete LCOV source records whose aggregate exceeds u64::MAX panic while writing the coverage summary in native builds. Check additions for LF/LH/FNF/FNH; overflow returns unknown with a diagnostic and all totals zero. Preserve individual malformed-count coercion, representable u64::MAX, repeated complete source paths, CRLF, missing final newline, file presence and independent process statuses.

Fixes #1452. Separate companion stacked on #1437's frozen fix/sensor-exit-audit branch; only src/sensors/coverage.rs changes. The parent branch remains untouched. This inherited arithmetic defect is distinct from #1434's bounded record-completeness guard.

Policy receipts

Existing Rust surface only; no new exception, suppression, analyzer adoption, gate, threshold, workflow, upload or credential changes.

Verification

Base 026f93c; head e424abb; tree 8b9d64d5599e0c4c4ed0e53878773ee7e1ee730b. Rust 1.95.0, PATH=/workspace/.cargo/bin:$PATH, CARGO_HOME=/workspace/.cargo, RUSTUP_HOME=/workspace/.rustup, separate CARGO_TARGET_DIR=/workspace/lcov-boundary-target.

  • Tests-first RED: cargo test --workspace --locked coverage_summary_rejects_aggregate_count_overflow compiles and exits101 on the frozen parent production code, attempt to add with overflow at coverage.rs:108.
  • GREEN: cargo test --workspace --locked coverage_summary passes six tests before the fixture strengthening; the final workspace suite passes all six including strengthened fixture, all four overflowing counters, nonzero earlier totals and process-status linkage.
  • Temporary omit-lines_hit-reset mutant compiles and exits101 under the strengthened regression, actual1 versus expected0. Restored final source afterward. This is a new arithmetic/reset control; no duplicate parent guard mutant.
  • Final cargo fmt --all -- --check; cargo check --workspace --all-targets --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test --workspace --all-targets --locked; cargo doc --workspace --no-deps --locked; cargo xtask policy-check; python3 scripts/verify-bun-review-artifacts.py --self-test; cargo xtask precommit --staged; git diff --check all pass.
  • Final suite: 1,264 top-level tests passed, zero failures, one intentional ignored subprocess driver; nested subprocess control passed separately.
  • Staged precommit tested this exact tree: zero blocking findings; fmt/check/Clippy pass. cargo-allow/ripr/unsafe-review/ast-grep missing, actionlint skipped for unchanged workflows. Existing rustdoc ambiguous-link and overdue policy warnings retained.
  • Independent GPT-6 Luna source review of the exact head/tree found no source defect. Reviewer identified and verified repair of an initially weak reset oracle, and inspected native logs; reviewer did not independently rerun tests.

Retained executor-local evidence /workspace/lcov-boundary-evidence, not hosted artifacts:
overflow-red.log SHA256 7f0a31ebeb595e9413121ec5f6f78b381cd0d32f820a5a9e20664683813c1c30
reset-mutant.log SHA256 6bc184b966458359bf257197df8698f9e294ad0906ff55d76a226e5acc8eb569
final-test.log SHA256 2c56dc82b8a44727caa12f37251333725d582c7e2965c032e50eabda7fdfc47f
final-precommit.log SHA256 88a9305b7cba55715a238650215f0a5c5f38bff14ec537aae52adf4a3acff183
final source SHA256 69e2506f04b7745badc8b64bcf2ec71ad42540c949590414c36450c24de677a0

CI budget

Default; no new deep lane.

Agent notes

Native proof establishes the tested stacked tree only. No full LCOV grammar, expected-file inventory, path deduplication, atomic-read or release-mode execution claim. Main at 3dbcc2b differs from the parent's original base only in src/gate_truth.rs; no current-main native composition execution claimed.

Keep Draft. Hosted qualification and main integration remain parent-owned and pending. #1437's separate five-findings/maximum-zero analyzer gate is not waived. No Ready, merge, release, deployment, live thirdparty services or parent-branch update.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 29b5c75f-9ccd-4d54-bff5-01ac6d11b621

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

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

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

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent executed review for #1452 at head e424abb83c0d6e4530e29b7afae9ee06ceba8ab6, tree 8b9d64d5599e0c4c4ed0e53878773ee7e1ee730b, against feature target fix/sensor-exit-audit at 026f93c0f0ad72740e082003cae2403e8ac676c6. No material source defect found in the declared bounded repair. Read AGENTS, native workflow, review/delivery skills, PR/issue contracts, and parent audit review 5512909469. Connected formal review and inline-thread reads were empty before this submission.

Source and pre-Ready feature integration evidence:

  • coverage.rs: checked LF/LH/FNF/FNH accumulation returns unknown, the overflow diagnostic, and four zero totals. The completeness prepass keeps truncated-record diagnostics; overflow stops subsequent accumulation. Disk receipt controls confirmed the diagnostic survives and process statuses/reasons remain independent.
  • Independent detached lab, Rust 1.95.0, dedicated Cargo target. Replacing only production code with frozen target code while retaining candidate regression tests reproduced native exit101: attempt to add with overflow at coverage.rs:108. With both DEV/TEST overflow checks disabled, old production instead failed with actual collected versus expected unknown. Checked production passed the same arithmetic configuration.
  • Four separate omit-reset mutants (lines_found, lines_hit, functions_found, functions_hit) each compiled and were killed by the submitted overflow regression: retained nonzero totals versus expected zero. Experiments stayed in the reviewer lab; pristine source restored and positive controls rerun.
  • Supplemental audit_boundary_matrix passed: complete nonzero preceding record plus partial SF:/path/count/terminator or repeated open record yields unknown/all-zero; malformed, negative, fractional, empty and individually out-of-range counts preserve zero coercion; repeated complete paths remain additive; LF/CRLF and both final-newline cases preserve behavior. All four overflowing counters with later complete records retain unknown/diagnostic/all-zero, file presence and telemetry flags across ok/failed/timed_out/missing process receipts. Submitted representable-u64::MAX controls pass. A partial bare SF remains collected as the documented parser/inventory limitation; no full LCOV grammar/completeness claim.
  • git merge-tree --write-tree <target> <head> returns exactly the candidate tree. Connected GitHub merge object a4df9237b53fe8d2568dda7454a8d1ec4017da3a independently has those exact two parents and that tree. Native baseline executed this composition-equivalent tree.
  • PASS: fmt; workspace/all-targets locked check, Clippy -D warnings, and tests; workspace/no-deps locked docs; policy-check; verifier self-test; diff check. Suite: 1,264 top-level passes, zero failures, one intentional ignore, plus passing nested subprocess control. Actual optimized cargo test --release --workspace --locked coverage_summary: all six pass.
  • Exact child diff staged in a second isolated lab at the frozen target, index/worktree tree equal to the candidate: cargo xtask precommit --staged passes, one changed file/affected package, zero blocking findings. cargo-allow/ripr/unsafe-review/ast-grep missing; actionlint skipped for unchanged workflows. Existing rustdoc ambiguity and overdue policy warnings retained. A separate clean-checkout precommit had no affected files and is not used as changed-surface proof.

Hosted merge qualification remains separate: last connected read showed independent baseline success and child gate in progress. I have not established hosted checkout provenance or all required merge checks. Parent #1437's separate five-findings/maximum-zero gate is not waived. This review establishes bounded source review and local feature-target integration prerequisites only: no main/adoption clearance, Ready, merge, release, branch updates or thread resolution. Lifecycle and hosted qualification remain parent-owned.

Retained executor-local evidence (not hosted artifacts): /workspace/coverage-review-1454-evidence, including reproducible experiment runner, supplemental test, mutant diffs, complete logs and precommit artifacts. SHA256:

  • old-debug-red.log: f17e48a46fd2b654107ed9c41d8cf2e46ed974705ecb03e2c360a86a0f845168
  • matrix.log: 586a13047ac1f15aa3dd9979bab43d18beff4676c737fd8256ca24fcc1f7ae89
  • test.log: ca642dca50f3bb3bd4d9c558809a70245cfedf4c2f59673ccdac22edd07de4fb
  • release-focused.log: dd9a7a92547483d56e3f658949c9fe4188e752434adc19adcd68d0a7add6f794
  • staged-precommit.log: aa4d16686319156335fa31f362333bf15ad186b37aac9f530569512203704037
  • full SHA256SUMS manifest: 3e55c47ef0068aa2409fcdacd16b3c375a425035f5b6f1697f8b2b65dce66d0e

Final candidate source SHA256 matches 69e2506f04b7745badc8b64bcf2ec71ad42540c949590414c36450c24de677a0; author branch untouched; all local validation commands terminated.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 14, 2026 04:11

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@EffortlessSteven
EffortlessSteven merged commit 569f74d into fix/sensor-exit-audit Oct 14, 2026
23 checks passed
EffortlessSteven added a commit that referenced this pull request Oct 31, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
EffortlessSteven added a commit that referenced this pull request Oct 31, 2026
…#1437)

* fix(coverage): reject unfinished LCOV summary records

* fix(coverage): report aggregate count overflow as unknown (#1454)

Co-authored-by: Steven Zimmerman <steven@stevenzim.com>

* chore(ripr): receipt-suppress exposure gaps on PR 1437

---------

Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
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