You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[agent] Filed by the scheduled architecture audit routine (CLI and core). Register: discussion #560 register.
Kind: decision. Source: review Part 7.4 and R10; register C25.
Question
--download-mode diff is the default, but on a cold cache it downloads every diff archive and then every blob anyway. Should file become the default, and should the diff download path be retired?
Options:
A. Make file the default now (a MAJOR per CLI_CONTRACT.md#L1578). Keep diff as an accepted value that behaves like file for one major, then delete the diff machinery. Recommended.
B. Keep diff as the default, but stop the redundant blob top-up. Fetch blobs only for the files whose diff is missing or for created files, as is already done when every archive is cached. That keeps all the diff code and fixes only the bytes.
Cold cache: in fetch_stage.rs#L314-L319,`` diff mode downloads whenever any archive is missing. Then the top-up in fetch_stage.rs#L377-L398 sets `blob_scope = manifest` whenever `missing_diff_archives` was non-empty, and fetches every blob still missing from the stage. The diff fetch writes no blobs, so that is all of them.
When diff saves bytes: only when a user has committed .socket/diffs but not .socket/blobs. Then just the blobs of created files are fetched (files_diffs_cannot_cover).
Impact: every first apply on a fresh CI checkout pays an extra round-trip per patch for archives it then backs up with blobs. Removing the path deletes roughly 700 production lines and a dependency.
Proposed change (option A)
Change the default to file (clap default_value, the GlobalArgs::default(), CLI_CONTRACT.md line 56 and the env table, and the changelog as a MAJOR). diff stays accepted.
Next major: make diff an alias of file, and deletepatch/diff.rs, patch/package.rs, the diff fetch and coverage code in blob_fetcher.rs/fetch_stage.rs/repair.rs, AppliedVia::Diff, PatchSources::diffs_path and qbsdiff. repair keeps sweeping orphaned .socket/diffs/* once, then the directory is ignored.
Size and scope
Step 1: ~20 lines plus docs.
Step 2: about −700 production lines and −1,000 test lines, and it lands as one PR.
[agent] Filed by the scheduled architecture audit routine (CLI and core). Register: discussion #560 register.
Kind: decision. Source: review Part 7.4 and R10; register C25.
Question
--download-mode diffis the default, but on a cold cache it downloads every diff archive and then every blob anyway. Shouldfilebecome the default, and should the diff download path be retired?Options:
filethe default now (a MAJOR perCLI_CONTRACT.md#L1578). Keepdiffas an accepted value that behaves likefilefor one major, then delete the diff machinery. Recommended.diffas the default, but stop the redundant blob top-up. Fetch blobs only for the files whose diff is missing or for created files, as is already done when every archive is cached. That keeps all the diff code and fixes only the bytes.Problem (verified at
045d7ec)default_value = "diff"(args.rs#L153-L162).fetch_stage.rs#L314-L319,`` diff mode downloads whenever any archive is missing. Then the top-up infetch_stage.rs#L377-L398sets `blob_scope = manifest` whenever `missing_diff_archives` was non-empty, and fetches every blob still missing from the stage. The diff fetch writes no blobs, so that is all of them..socket/diffsbut not.socket/blobs. Then just the blobs of created files are fetched (files_diffs_cannot_cover).patch/diff.rs(99 production lines, bspatch);patch/package.rs(332 production lines, diff archive tarball reader);fetch_missing_diff_archivesandget_missing_archivesinapi/blob_fetcher.rs;resolve_from_diff/AppliedVia::Diffinpatch/apply.rs;fetch_stage.rs(patches_without_source,files_diffs_cannot_cover, the top-up, deferred failures) andrepair.rs;qbsdiffdependency in both crates.Impact: every first
applyon a fresh CI checkout pays an extra round-trip per patch for archives it then backs up with blobs. Removing the path deletes roughly 700 production lines and a dependency.Proposed change (option A)
file(clapdefault_value, theGlobalArgs::default(),CLI_CONTRACT.mdline 56 and the env table, and the changelog as a MAJOR).diffstays accepted.diffan alias offile, and deletepatch/diff.rs,patch/package.rs, the diff fetch and coverage code inblob_fetcher.rs/fetch_stage.rs/repair.rs,AppliedVia::Diff,PatchSources::diffs_pathandqbsdiff.repairkeeps sweeping orphaned.socket/diffs/*once, then the directory is ignored.Size and scope
Acceptance criteria
socket-patch applyon a cold cache issues blob GETs only; a test asserts that no/diffs/request is made with the default.cargo tree -p socket-patch-clilists noqbsdiff; the apply/repair suites stay green with diff fixtures removed.Dependencies
--download-mode), Stream patch blob and diff downloads to disk (#571) #607 and Tracking: one retry primitive for the patch API client (JSON, vendor service, blob and diff) #676.