Repository navigation
fix(coverage): report aggregate count overflow as unknown - #1454
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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 overflowat coverage.rs:108. With both DEV/TEST overflow checks disabled, old production instead failed with actualcollectedversus expectedunknown. 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_matrixpassed: 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 bareSFremains 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 objecta4df9237b53fe8d2568dda7454a8d1ec4017da3aindependently 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 --stagedpasses, 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.
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
…#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>
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.
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.