Skip to content

Commit 2677eda

Browse files
Remove --download-mode and the diff download path (#792) (#1049)
* Remove --download-mode and the diff download path (#792) Patch content is now always fetched as per-file blobs. v5 has not shipped stable, so the deprecated diff path goes before it does. Core: - delete patch/diff.rs (bspatch) and the qbsdiff dependency - apply: drop the diff strategy, AppliedVia::Diff, PatchSources::diffs_path and the now-unused `uuid` parameter of apply_package_patch / apply_go_redirect - blob_fetcher: drop DownloadMode, get_missing_archives and fetch_missing_sources; download_entries is blob-only. DIFF_ARCHIVE stays as the noun for the obsolete-archive sweep output - client: drop fetch_diff - package.rs: drop read_archive_filtered only; the other readers are used by the vendored and hosted backends - cleanup: .socket/diffs is obsolete like .socket/packages and every file in it is swept - telemetry: patch_fetched keeps download_mode, always "file" CLI: - remove --download-mode / SOCKET_DOWNLOAD_MODE outright (no alias, no warning), matching how #966 removes deprecated spellings - fetch_stage stages blobs only; with every afterHash blob staged up front, apply's mismatch-blob top-up is dead and is removed - repair downloads blobs only; the Downloaded event keeps details.mode, always "file" - appliedVia is always "blob" Tests: delete the diff e2e suites and diff/mode parse tests, add removal parse tests, a cold-cache no-/diff-request assertion and a stale referenced .socket/diffs archive sweep check. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Document the --download-mode removal for v5 (#792) CLI_CONTRACT.md: drop the flag and env rows, note the removal, make appliedVia "blob" only, and mark .socket/diffs obsolete in the GC notes. migrating-to-v5.md: add the Retired spellings row and say .socket/diffs archives are no longer read. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Update the GlobalArgs field count after removing download_mode (#792) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Drop stale references left by the diff path removal (#792) Remove the deleted diff_created_file_e2e.rs from the bare-spawn ratchet (its stale-entry check failed), point leftover comments at the blob-only pipeline, and test repair's download messages with the blob noun. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Stop logging the archive uuid in a remove test assert (#792) CodeQL flags the uuid as sensitive (cleartext logging); label the entries A/B in the assert message instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Retrigger CI after a CodeQL SARIF upload infra failure (#792) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Keep per-blob download failure reasons under --silent apply With the diff download path gone, per-item blob failures print only via format_fetch_summary, which is gated on quiet (--silent or --json). A fatal staging failure under --silent then printed the generic error without the hash and reason lines the old deferred-failure path showed (Bugbot 4223475496). Print format_fetch_failures before the error when the summary was held back; --json stays silent on stderr. Co-Authored-By: Claude <noreply@anthropic.com> * Drop --download-mode from the repair org-fallback test The test came in from main with #1041 and still passed --download-mode file, which this PR removes, so repair rejected the argument and CI went red on the main merge. Repair always fetches per-file blobs now, so the flag is simply dropped. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Drop removed download_mode field from target-ambiguity test main's new in_process_target_ambiguity test (#1034) sets GlobalArgs::download_mode, which this PR deletes, so the merge at d06ce6f does not compile the cli test targets. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 50e4654 commit 2677eda

85 files changed

Lines changed: 506 additions & 5097 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 0 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ aho-corasick = "=1.1.4"
4242
glob = "=0.3.4"
4343
toml_edit = "=0.25.12"
4444
once_cell = "=1.21.3"
45-
qbsdiff = "=1.4.4"
4645
rayon = "=1.12.0"
4746
tar = "=0.4.46"
4847
flate2 = "=1.1.9"
@@ -96,7 +95,7 @@ inherits = "release"
9695
lto = "thin"
9796

9897
# Test-execution speed: `cargo test` builds dependencies with the dev
99-
# profile; at opt-level 0 the hash/compression/bsdiff hot loops are 10-100x
98+
# profile; at opt-level 0 the hash/compression hot loops are 10-100x
10099
# slower (the self_update fixtures gzip and sha256-hash the multi-MB debug
101100
# CLI binary per test: ~403s debug vs ~2s release). Workspace members are NOT matched by "*" — they stay
102101
# opt-level 0, so incremental compile speed, debugging, and llvm-cov line
@@ -107,7 +106,7 @@ opt-level = 1
107106

108107
# The measured hot path gets full optimization: archive building
109108
# (flate2/zip over multi-MB payloads), SHA hashing in fixtures and in the
110-
# CLI's own verify paths, and qbsdiff bspatch in every apply test.
109+
# CLI's own verify paths.
111110
[profile.dev.package.sha2]
112111
opt-level = 3
113112
[profile.dev.package.sha1]
@@ -132,14 +131,6 @@ opt-level = 3
132131
opt-level = 3
133132
[profile.dev.package.zip]
134133
opt-level = 3
135-
[profile.dev.package.qbsdiff]
136-
opt-level = 3
137-
[profile.dev.package.bzip2]
138-
opt-level = 3
139-
[profile.dev.package.libbz2-rs-sys]
140-
opt-level = 3
141-
[profile.dev.package.suffix_array]
142-
opt-level = 3
143134

144135
# macOS debug builds use unpacked split-debuginfo: every linked binary —
145136
# including each of the ~90 e2e test executables — pins its per-codegen-unit

0 commit comments

Comments
 (0)