Repository navigation
Keep coverage's instrumented binary under the update cap - #2071
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
The self-update e2e suites serve the instrumented socket-patch as a release asset, and the updater refuses any binary over its 256 MiB cap. With line-tables-only debug info the instrumented binary is ~274 MB locally, and feat/bazel-support already pushed it over the cap in CI: 8 self-update tests fail in both coverage shards with "exceeds the 268435456-byte cap". coverage is the gating Linux test leg, so the next big feature merge would block the queue. llvm-cov reads the __llvm_cov* sections, not DWARF, and panic locations come from #[track_caller], so dropping debug info changes neither the LCOV nor the failure annotations. The binary drops to ~163 MB. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeQEJr2Vxu6jJ5Jh1hH
|
bugbot run Generated by Claude Code |
PR SummaryLow Risk Overview With default dev line-tables-only debug, DWARF bloated the coverage artifact (~274 MB locally) and large branches could push CI over the limit and fail those tests. Disabling debug info trims the binary (~163 MB locally) while llvm-cov still maps coverage from instrumentation sections and panic locations stay unchanged for LCOV and failure annotations. A YAML comment documents the rationale; the first post-merge coverage run will use a new rust-cache key and may rebuild dependencies once. Reviewed by Cursor Bugbot for commit 0774706. Configure here. |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0774706. Configure here.
|
Generated by Claude Code |
|
[agent] PR shepherd: review brief for the approver What it does. The Risk: low. It changes one environment variable on one CI job, and no product code. Look here
Verified
Changes I made: none. Open questions: none. Generated by Claude Code |
Problem
The
coverageleg (the gating Linux test run behindci-ok) builds an instrumentedsocket-patch, and the self-update e2e suites serve that same binary to the updater as a fake release asset. The updater refuses any binary over 256 MiB (MAX_BINARY_BYTES,crates/socket-patch-core/src/update/download.rs). Main's instrumented binary is close to that cap, and a large feature is enough to cross it:feat/bazel-support(about 96k lines of new src), run 43482044084: both coverage shards fail with 8 self-update tests (self_update_failures_e2e,self_update_channels_e2e,self_update_telemetry_e2e,update_json_contracts), withDownloaded binary failed verification: socket-patch exceeds the 268435456-byte cap/verify_failedwherepermission_deniedwas expected.-C instrument-coveragebuild of main'ssocket-patchis already 274,450,464 bytes, over the cap. With this setting, those tests failed locally on main too (see Proof).If that branch or any comparable growth lands, every merge-queue entry fails
coverageand the queue blocks.Root cause
[profile.dev] debug = "line-tables-only". In the instrumented binary, about 107 MB is.debug_*(.debug_str44 MB,.debug_line29 MB,.debug_info22 MB,.debug_ranges12 MB). The fixture serves this test build artifact, not a release-sized binary.Fix
Set
CARGO_PROFILE_DEV_DEBUG: '0'on thecoveragejob only. This is the same settinge2e-buildalready uses. llvm-cov maps coverage from the__llvm_cov*sections, not DWARF. A panic's file:line comes from#[track_caller], so neither the LCOV nor the failure annotations change, and CI doesn't setRUST_BACKTRACE. The production cap stays as it is.Proof
Local, rustc 1.93.1,
RUSTFLAGS="-C instrument-coverage --cfg=coverage --cfg=trybuild_no_target",cargo test -p socket-patch-cli --test self_update_failures_e2eon main:socket-patchexplicit_pin_downgrades_without_force,concurrent_update_lock_held)The CI change only takes effect on a new head commit, so this PR's own
coverageshards check it.ci-okdon't change.actionlintandzizmoraren't installed in this session. The YAML parses, and thescripts/testsunittest suite passes (411 tests).coveragerust-cache key changes, so the first run on main rebuilds dependencies once.Generated by Claude Code