Repository navigation
fix: remove pre-launch backward-compat shims and reset buyer tables to v1 - #2369
Merged
Merged
Conversation
…o v1 Pre-launch, no wire, storage or config shape needs a compatibility path. - admin_v1_drain takes a required DrainRequest with wait_admin, and admin_v1_evict a required dry_run. A no-params drain is refused and does not fire. The --wait guard stays for the first-writer-wins race. - Buyer pool tables reset to _v1 / record schema 1; lanes.redb no longer drops the capability_v1/v2 tables at open. - Drop the DECDN_DELIVERY_CEILING retired-env warning and the doctor env-var remediation branch, the `fs:` --to rejection, and the dead voucher_signer `?` rendering. - Reword changelog-voice comments (pre-#NNN, "used to", "older build") to present tense. The blacklist back-fill and stranded-deposit report stay: both still serve the current build after a restart or store reset. Closes #2367 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
Coordinated caller updates and regression coverage support the intentional pre-launch changes, with no unresolved blocking issues.
0 open findings
What changed in this PR
Aligns deCDN with its pre-launch policy by removing compatibility shims while preserving required restart recovery and drain-race handling.
Changes:
- Requires explicit admin drain and eviction parameters, with updated callers and rejection tests.
- Resets buyer tables and schema to v1; removes obsolete storage, configuration, and CLI handling.
- Rewrites historical comments in present tense and documents the breaking changes.
| File | Description |
|---|---|
| crates/protocol/src/client.rs | Rewords deposit-recovery documentation. |
| crates/node/tests/support/mod.rs | Clarifies receipt-log test comments. |
| crates/node/tests/sighup_signal.rs | Clarifies reload coverage comments. |
| crates/node/tests/probe_loopback.rs | Rewords probe coverage comments. |
| crates/node/tests/node_origin_pull.rs | Rewords pull regression explanations. |
| crates/node/tests/client_loopback.rs | Rewords delivery regression explanations. |
| crates/node/tests/channel_state_store.rs | Clarifies replay-test comments. |
| crates/node/tests/anvil_settlement_e2e.rs | Clarifies channel ownership comments. |
| crates/node/tests/anvil_bringup_shutdown_e2e.rs | Passes the required drain request. |
| crates/node/src/runtime/reload.rs | Describes the reload completion marker. |
| crates/node/src/payment_settlement.rs | Simplifies checkpoint comments. |
| crates/node/src/node_origin/mod.rs | Clarifies disabled pull-through behavior. |
| crates/node/src/handlers/probe.rs | Clarifies hold-budget documentation. |
| crates/node/src/handlers/client/voucher/tests.rs | Rewords signature-verification comments. |
| crates/node/src/handlers/client/voucher.rs | Rewords concurrency comments. |
| crates/node/src/handlers/client/tests.rs | Clarifies lane-concurrency comments. |
| crates/node/src/handlers/client/mod.rs | Clarifies optional dependency behavior. |
| crates/node/src/dht/chain_projection.rs | Clarifies poller ownership documentation. |
| crates/node/src/coarse_clock.rs | Rewords clock fallback documentation. |
| crates/node/src/channel_store/tests.rs | Removes obsolete table-migration coverage. |
| crates/node/src/channel_store.rs | Removes superseded capability-table cleanup. |
| crates/node/src/buyer_channel.rs | Clarifies stranded-deposit reporting comments. |
| crates/node/src/blacklist_watcher/tests.rs | Explains restart recovery coverage. |
| crates/node/src/blacklist_watcher.rs | Explains why deny-set recovery remains. |
| crates/node/src/admin/tests.rs | Updates required drain requests and coverage. |
| crates/node/src/admin.rs | Requires drain requests; clarifies race handling. |
| crates/incentive/src/store.rs | Clarifies on-disk key stability. |
| crates/incentive/src/buyer_pool_table/tests.rs | Updates schema fixtures and rejection tests. |
| crates/incentive/src/buyer_pool_table.rs | Resets buyer tables and schema to v1. |
| crates/e2e/tests/origin_stream_while_store.rs | Rewords corruption-test documentation. |
| crates/e2e/tests/node_to_node_coalesce.rs | Rewords shutdown-budget comments. |
| crates/e2e/tests/node_pull_topup.rs | Clarifies economic fixture sizing. |
| crates/e2e/tests/cli_fetch_topup.rs | Clarifies top-up fixture sizing. |
| crates/e2e/src/chain.rs | Rewords deployment-budget comments. |
| crates/config-types/src/retry.rs | Describes current retry behavior. |
| crates/config-types/src/hash.rs | Clarifies shared hash representation. |
| crates/config-types/src/circuit_breaker.rs | Describes disabled breaker behavior. |
| crates/common/src/config/types.rs | Rewords configuration documentation. |
| crates/common/src/config/tests.rs | Removes retired-variable tests; updates wording. |
| crates/common/src/config/resolved.rs | Clarifies origin-list representation. |
| crates/common/src/config/mod.rs | Removes retired environment-variable warnings. |
| crates/common/src/config/errors.rs | Documents dotted notice labels. |
| crates/common/src/cli/origin.rs | Removes legacy-prefix documentation. |
| crates/common/src/admin/tests.rs | Tests required drain and eviction fields. |
| crates/common/src/admin.rs | Requires explicit admin request fields. |
| crates/client/src/tests.rs | Clarifies base-frame encoding comments. |
| crates/client/src/lib.rs | Rewords request and recovery documentation. |
| crates/client/src/driver/tests.rs | Rewords deposit-recovery test comments. |
| crates/client/src/driver.rs | Simplifies payment-baseline comments. |
| crates/cli/tests/key_gen_password_sources.rs | Rewords password-warning documentation. |
| crates/cli/tests/admin_rpc.rs | Verifies parameterless drain rejection. |
| crates/cli/src/commands/setup/tests.rs | Clarifies registration-test comments. |
| crates/cli/src/commands/pool.rs | Rewords token ownership comments. |
| crates/cli/src/commands/origin/tests.rs | Removes legacy-prefix rejection coverage. |
| crates/cli/src/commands/origin.rs | Removes special fs: rejection. |
| crates/cli/src/commands/node/tests.rs | Removes legacy signer-rendering coverage. |
| crates/cli/src/commands/node.rs | Updates drain calls, diagnostics, and signer rendering. |
| crates/cli/src/commands/fetch.rs | Rewords token ownership comments. |
| crates/cli/src/commands/doctor/config/tests.rs | Removes retired-variable remediation coverage. |
| crates/cli/src/commands/doctor/config.rs | Simplifies notice remediation. |
| crates/cli/src/commands/bundle_pull.rs | Clarifies staging-helper comments. |
| crates/cli/Cargo.toml | Rewords dependency comments only. |
| crates/cache/tests/s3_origin.rs | Rewords encoding and size-limit comments. |
| crates/cache/tests/pull_through.rs | Rewords retry and redirect comments. |
| crates/cache/src/retry.rs | Clarifies retry documentation. |
| crates/cache/src/origin/decompress.rs | Simplifies strict-mode comments. |
| crates/cache/src/metrics.rs | Rewords metric documentation. |
| crates/cache/src/fill_session.rs | Rewords allocation-cost documentation. |
| crates/cache/src/engine/tests.rs | Rewords cache regression comments. |
| crates/cache/src/engine.rs | Clarifies origin and conversion-cost documentation. |
| CHANGELOG.md | Records breaking changes and storage reset. |
| adr/appendix-local-admin-http.md | Marks the drain request as required. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit 3700857 in the Show a line coverage summary of the most impacted files.
Updated |
- Restore the `--to fs:` rejection as input validation: `fs` is the config kind name, and the typo would seed a relative directory the node never reads. - Restore the buyer-table layout rule in present tense: a layout change bumps schema_version and the table suffix together. - Test that the drain ack reports the first writer's wait_admin, not the request (mutation-checked). - CHANGELOG: a client in a node's data dir does not re-adopt, so give the pool recovery step; drop the fs: entry; show the drain wire form. - ADR appendix: the admin_v2 cutover rule applies from first deployment; every parameter is required and positional. - Fix comment accuracy, fragments and changelog voice the sweep missed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What
Removes the backward-compatibility shims that slipped in before launch, resets the buyer table names and schema version to v1, and rewrites changelog-voice comments in present tense.
Closes #2367
admin_v1_drain(req: DrainRequest)is required (it wasOption), and so areDrainRequest.wait_adminandEvictRequest.dry_run(noserde(default)). A drain with no params gets-32602and does not fire. The--waitrefusal stays, because the trigger is first-writer-wins: an earlier drain without--waitstill wins the race. Its comment and error text now describe that case instead of an "older binary".buyer_pool_state_v6/buyer_pool_owner_index_v6become_v1, andBUYER_SUPPORTED_SCHEMA_VERSIONgoes from 4 to 1. Thebuyer_pool_*names started at_v3, so no stale_v1table exists.lanes.redbno longer runs thecapability_v1/capability_v2drop at open.RETIRED_ENV_VARS(DECDN_DELIVERY_CEILING) is removed, along with doctor's "unset in the environment" branch. Every remaining notice uses a dotted config label.--to fs:rejection is kept and reworded as input validation.fsis the configkindname, so--to fs:/var/lib/...is a likely typo. With--move-sourceit would move every input into$PWD/fs:/…, a directory the node never reads.voucher_signerempty →?rendering was dead code. The field is a requiredStringthe node always sets.pre-#NNN/post-#NNNcomments, plus about 40 "used to / no longer / older build" comments, are rewritten in present tense.rg -i '(pre|post)-#[0-9]' crates contracts/srcreturns nothing.Reviewer notes
blacklist_watcherback-fill is reworded, not deleted.chain_deniedlives only in memory, so after every restart it is the only thing that turns an evicted, governance-blacklisted hash back intoHashBlacklistedrather thanEvictedSinceProbe.buyer_channelis also kept and reworded.schema_versionand the table-name suffix together._v6buyer rows are orphaned, and nodes re-adopt their pool from chain.decdn_buyer_pool_adoption_failures_totaland theBuyerPoolService bootstrap complete tracked=0 adopted=trueline on every node. An adoption that fails on a flaky RPC opens a second pool.decdn fetch/bundle pullclient that signs with a node's wallet does not adopt; the CHANGELOG gives thepool list --allrecovery.adr/appendix-local-admin-http.md:DrainRequestis no longer marked "(optional)". The appendix now says theadmin_v2cutover rule applies from the first public deployment, and that parameters are required and positional.admin_drain_ack_reports_the_first_writers_wait_adminpins that the ack reports the trigger's effective value. A mutation that echoes the request fails it.Verification
cargo fmt -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run --workspace: 4718 passedRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-itemspre-commit runon changed filesCHANGELOG.mdentry added🤖 Generated with Claude Code