Skip to content

fix: remove pre-launch backward-compat shims and reset buyer tables to v1 - #2369

Merged
thiras merged 2 commits into
mainfrom
fix/2367-remove-compat-shims
Oct 7, 2026
Merged

thiras merged 2 commits into
mainfrom
fix/2367-remove-compat-shims

Conversation

@thiras

@thiras thiras commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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 wire: admin_v1_drain(req: DrainRequest) is required (it was Option), and so are DrainRequest.wait_admin and EvictRequest.dry_run (no serde(default)). A drain with no params gets -32602 and does not fire. The --wait refusal stays, because the trigger is first-writer-wins: an earlier drain without --wait still wins the race. Its comment and error text now describe that case instead of an "older binary".
  • Storage:
    • buyer_pool_state_v6 / buyer_pool_owner_index_v6 become _v1, and BUYER_SUPPORTED_SCHEMA_VERSION goes from 4 to 1. The buyer_pool_* names started at _v3, so no stale _v1 table exists.
    • lanes.redb no longer runs the capability_v1/capability_v2 drop at open.
  • Config / CLI:
    • 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.
    • The --to fs: rejection is kept and reworded as input validation. fs is the config kind name, so --to fs:/var/lib/... is a likely typo. With --move-source it would move every input into $PWD/fs:/…, a directory the node never reads.
  • Not in the issue: the voucher_signer empty → ? rendering was dead code. The field is a required String the node always sets.
  • Wording: all pre-#NNN/post-#NNN comments, plus about 40 "used to / no longer / older build" comments, are rewritten in present tense. rg -i '(pre|post)-#[0-9]' crates contracts/src returns nothing.

Reviewer notes

  • Kept on purpose:
    • The blacklist_watcher back-fill is reworded, not deleted. chain_denied lives only in memory, so after every restart it is the only thing that turns an evicted, governance-blacklisted hash back into HashBlacklisted rather than EvictedSinceProbe.
    • The stranded-deposit report in buyer_channel is also kept and reworded.
    • The buyer-table layout rule is kept in present tense: a layout change bumps schema_version and the table-name suffix together.
  • Out of scope: ADR 013 trailing-bytes forward compatibility.
  • Testnet rollout: existing _v6 buyer rows are orphaned, and nodes re-adopt their pool from chain.
  • adr/appendix-local-admin-http.md: DrainRequest is no longer marked "(optional)". The appendix now says the admin_v2 cutover rule applies from the first public deployment, and that parameters are required and positional.
  • Review follow-up: admin_drain_ack_reports_the_first_writers_wait_admin pins that the ack reports the trigger's effective value. A mutation that echoes the request fails it.

Verification

  • cargo fmt -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo nextest run --workspace: 4718 passed
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items
  • pre-commit run on changed files
  • User-visible change: CHANGELOG.md entry added
  • ADR appendix updated

🤖 Generated with Claude Code

…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]>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 21:51
@thiras thiras added rust Dependabot: a Cargo update; use area: labels for Rust code otherwise kind:chore Cleanup, dependencies, tooling or release work; no user-visible change status:mainnet-blocking Must land before the mainnet deployment labels Oct 7, 2026
@thiras thiras self-assigned this Oct 7, 2026

Copilot AI 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.

🟢 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.

@github-code-quality

github-code-quality Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

The overall line coverage in commit 3700857 in the fix/2367-remove-comp... branch remains at 74%, unchanged from commit 0b7a452 in the main branch.

Show a line coverage summary of the most impacted files.
File main 0b7a452 fix/2367-remove-comp... 3700857 +/-
crates/cli/src/...ommands/node.rs 59% 59% 0%
crates/cache/src/engine.rs 91% 91% 0%
crates/protocol/src/framing.rs 93% 93% 0%
crates/node/src...hannel_store.rs 84% 84% 0%
crates/node/src...t_settlement.rs 76% 76% 0%
crates/common/s...c/config/mod.rs 97% 97% 0%
crates/cli/src/...octor/config.rs 100% 100% 0%
crates/node/src...nt/serve_leg.rs 91% 93% +2%

Updated October 07, 2026 23:00 UTC

- 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]>
@thiras
thiras merged commit cdd1db5 into main Oct 7, 2026
32 checks passed
@thiras
thiras deleted the fix/2367-remove-compat-shims branch October 7, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:chore Cleanup, dependencies, tooling or release work; no user-visible change rust Dependabot: a Cargo update; use area: labels for Rust code otherwise status:mainnet-blocking Must land before the mainnet deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove backward-compat shims and reset schema/table versions to v1 (pre-launch)

2 participants