Repository navigation
test!: drop tests of dead code, removed features and duplicates - #2959
Merged
Merged
Conversation
- bao-range: delete the unused `streaming` module (encode_whole_blob_headerless) and its tests; serve_store's reference encoding strips the 8-byte header from encode_verified_range instead. Drop the thiserror #[from] test. - config-types: delete test-only Bytes::is_zero/saturating_add/saturating_sub/ Display, PinnedHashes::diff and OriginUrl::into_url with their tests; drop the duplicate default_and_disabled_are_distinct tests. - cache: drop the stale partial_hit_size mirror, the iroh-blobs spike test, the observe_hit forwarding test, two access-time tests (fetch assertion moved into second_populate_updates_access_time), two NoOrigin integration tests, the http 404-only range test, two size-proof duplicates (kept-proof assertion moved into a_wrong_size_gets_no_proof) and the second fs outboard-oversize test (length assertion merged). Strengthen encode_verified_range_roundtrips_for_honest_bytes to check header and exact wire length; fix test names/docs that referred to CacheEngine::get. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Delete the unused pending-settle store: PendingSettle/PendingSettleStore
(incentive), both redb tables, their helpers, BuyerPendingSettleStoreHandle,
and the tests of them.
- Delete test-only PersistentPoolStateStore::{path,deployment} and
PoolStoreFiles::path with lane_store_lives_in_data_dir.
- Delete StaticOriginDirectory::with_operators and
PoolSettlementService::redeem_hint_sender (no callers).
- Delete dht/bootstrap unit tests that re-implement the seed loop, and
duplicate or tautological tests in handlers/client, node_origin,
runtime, runtime/reload, admin, dht rate_limit and origin, buyer_ledgers,
metrics, load_shed, binding_check, selection, incentive store.
- Strengthen: dispatch in-flight gauge read, distinct bump counts for
attestation and serve-cache metrics, a specific StoreError for bad
permissions, a real flush in truncated_file_refuses_to_start.
- Fix stale comments in range_helper_tests and runtime tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…licate tests - common: delete test-only ResolvedBlockchain::first_payment_pool; drop derived serde round-trips in admin, Option presence tests in config/types, region tests the protocol crate already pins, a duplicate identity reload test, a Debug-in-struct restatement, a clap flag restatement, and eight removed-knob unknown-field pins. - incentive: delete uncalled tx::send_unrecorded; drop eth_identity tests that exercise the sol! macro and alloy; rename a lane test that never called stage_voucher and drop its clone half. - protocol: drop eleven client and ten dht serde round-trips covered by the full-stack and discriminant tests, the unknown-discriminant decode tests, and validator tests subsumed by the dispatcher test. - reputation: merge the two speed-score tests, drop the local copy and two EWMA tests subsumed by others. - sponsord-api: drop arithmetic_saturates (restates std). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Remove tests of deleted code and tests a surviving test already covers: - client_loopback: floor-reservation pair, client_deposit_gate_prices_one_chunk, the bound-signer-without-lane duplicates, the delegate-signer happy-path duplicates, pull_through_authorizes_the_delegate_not_the_funder, buyer_refuses_an_over_ceiling_blob_without_paying, and over_cap_stream_is_reset_without_signing_a_response. - origin_range_pull: the floor-leak follow-up pull in the cold out-of-bounds test. - node_to_node_pull_through: upstream_hash_mismatch_is_rejected and its liar helpers. - anvil_settlement_e2e: the forge_script_body_completed unit tests (e2e covers them). origin_only_node_declines_a_foreign_hash now asserts the Declined class and the foreign-decline counter. Comments stop reasoning in voucher nonces, the buyer-cap comments name the proven-size gate, and the redundant with_client_binding re-signs go (pool_context attaches the same binding). Co-Authored-By: Claude Opus 5.5 <[email protected]>
- bundle engine: drop a_fallback_drive_keeps_the_bytes_spliced_before_it (pre-assembly store-splice guard); splice tests and docs name the assembly file, not .partial - streamer: size-claim wording on two open_range refusal tests - segment: split_evenly test asserts four contiguous pieces - lib tests: drop orphan doc block - discovery: drop skips_inactive_nodes (duplicate) - buyer_pool: merge two openPool pairs, drop open_on, the let _ = signature tests and the RFC 6979 determinism test - config: drop const-construction test and literal assert - source: drop compile-time PeerSource: BlobSource test - ledger: drop two subsumed tests - connection: drop concurrent_gets_share_one_dial (subsumed) - lane_sources: doc matches what the test checks - receipt: drop incentive verify_forward assert, rename test - peer_store: multiaddrs is required; drop serde(default) and its back-compat test Co-Authored-By: Claude Opus 5.5 <[email protected]>
- cli: deregister/unbond confirm through rotate_key::confirm_or_bail (their copies and tests go); fold setup's days_from_civil test into civil_time, pool's data-dir test into config_fills_unset_flags; drop running_version_is_the_crate_version, the unused mod common in pool_lifecycle, and the removed-flag/command and has_blob absence pins; rename publish *_round_trip(s) tests to *_json_shape. - e2e: delete capture_delivery_wire and its wire-tap helpers, ChainFixture::rotate_node_id and head_timestamp, NodeFixture::wait_for_log_line, time::advance_to, assert::expect_revert and operator_active, and bindings nothing calls; one rewrite_int replaces three copy-paste config rewriters; delete smoke.rs (covered by G-NODE-01), the namespace-transfer and below-min-bond journeys (covered by forge), and the allowance-absent check; fix stale docs in coalesce_two_clients and the authorized-origin comments; rename peer_store_probeless to peer_store_fast_path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pending-settle store is gone, so settle.redb holds the settlement ledger and the sent redeemMany hashes. Move the orphaned #1042 doc onto its test and restate the empty-blob test doc in the present tense. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pins - PaymentPool: drop the five removed-selector pins, the pause tests covered by PaymentPoolSweep.test_pause_blocksInflowsOnly, armsMinDeposit, and the redeem payout copy; Sweep drops its constructor-immutables copy. - DeployProtocolScript: drop the SlashJudge/SlashAppeal absence asserts. - CapacityBond: drop declaredMbps_storesValue, the re-register region test (covered by the cooldown test), and raiseNeverEjects (its ejected assert moves into grandfathersActiveOperator). - GovernanceLifecycle: drop the three canaries (DeployProtocol pins the same wiring) and the lifecycle bound reverts whose bound is unit-tested in the target's own suite. - ContentBlacklist: orphan headers and stray notice go, the regional test is named for what it checks, the ratify duplicate goes, and the deregister assert from ContentBlacklistMutations moves into the suspension test. - OriginAssignment, DecdnGovernor, Token, E2EProtocol: drop tests subsumed by others, moving unique asserts into the survivors. - Delete unused mock setters (MockFeeRouter.setWindowEpochs, MockEjector.setWindow, setSqrtPrice); regenerate .gas-snapshot. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Vouchers carry no nonce, so the field always reported 0. Remove it from the admin DTO, the node producer, the `decdn node lanes` NONCE column, and the dashboard type and fixtures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The gateway allowance, the old recovery flags and the single-chain flags fail to parse like any unknown flag; keep only the --pool-rpc-url needs --pool check. Drop the deleted smoke journey from the CI comment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code coverage overviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-cov
View coverage of the 10 most impacted files.
Solidity / code-coverage/forge
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Gas snapshotNo gas changes vs base. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A test-suite audit turned up tests of code that no longer runs in production, tests of removed features, and duplicates. This PR removes them: 142 files, +848 / -6026.
Dead production code kept alive only by tests (deleted with its tests)
PendingSettleStore,PendingSettle, both redb tables,BuyerPendingSettleStoreHandle). No production caller since feat(payments): shared payment pool — capped delegated signers + node-addressed cumulative vouchers #1667.streaming(encode_whole_blob_headerless),Bytes::{is_zero, saturating_*, Display},PinnedHashes::diff,OriginUrl::into_url,first_payment_pool,send_unrecorded,redeem_hint_sender,StaticOriginDirectory::with_operators, the pool-storepath()accessors.capture_delivery_wire,rotate_node_id,wait_for_log_line), unused bindings and contract mock setters.Tests of removed features
partial_hit_size, DHT bootstrap tests that never calledbootstrap().deny_unknown_fields/ clap alone.Duplicates and no-op tests
deregisterandunbondcallrotate_key::confirm_or_bailinstead of carrying their own copies.Breaking
LaneSnapshot::last_nonceis gone (it always reported 0; vouchers carry no nonce).decdn node lanesdrops the NONCE column; the admin JSON and dashboard type drop the field.multiaddrsno longer decodes; the store skips it with a warning, as it does for other missing fields.Strengthened rather than deleted
bad_permissions_rejectedasserts theStoreErrorvariant.origin_only_node_declines_a_foreign_hashassertsDeclinedandforeign_declined_total 1.Not in this PR
origin_only_node_declines_a_foreign_blob_already_in_cachestill asserts onlyis_err(): its setup faults the backend, so the foreign-decline gate never runs. It needs a clean-absence backend.set_boundacquire machinery, gating test fakes behindtest-support, whetheropen_range_cursorshould enforcemax_blob_bytes.Verification
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --all-features -- -D warnings,CARGO_BUILD_WARNINGS=deny cargo doc --workspace --no-deps --document-private-itemscargo nextest run --workspace: 5978 passedcargo test --no-run -p decdn-e2e --features anvil-e2epnpm -C crates/cli/dashboard test: 78 passedforge fmt --check,FOUNDRY_PROFILE=ci forge build --sizes --deny warnings,forge test(720 passed), gas snapshot regenerated🤖 Generated with Claude Code