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
{{ message }}
Repository navigation
vendor --force documents a missing-file tolerance and a mismatch warning that no vendored backend implements #923
[agent] Filed by the scheduled architecture audit routine (ecosystems and formats). Register: discussion #560 register.
Kind: refactor (dead parameters + stale help/contract text; no behavior change). Source: new finding (extends review 5.2, which noted three backends ignoring _sources/_force); register E65.
Problem (verified on 9c43dfc)
Since vendored acquisition became service-only, every vendored backend threads force: bool and sources: &PatchSources down to a sink that discards both. Every sink is underscore-named:
All other uses of force and sources under vendor/ are pass-throughs to these sinks.
The user-facing documentation still describes the removed behavior:
The vendor --force help (commands/vendor.rs#L71-L84) and the contract's flag row (CLI_CONTRACT.md#L89) say it "tolerate[s] missing patch-target files in the stage". The only live effect of force is the CLI's variant-probe bypass (#L2060, #L2503).
Both texts, and the error-code table (CLI_CONTRACT.md#L1234), promise a vendor_content_mismatch_overwritten warning. No production code emits it; the string appears only in that doc comment and in tests that assert its absence. The test docs of mismatched_install_does_not_change_the_server_artifact (in_process_vendor.rs) and scan_vendor_annotates_mismatched_baseline_and_vendors_anyway (scan_vendor_e2e.rs) still describe it, while the assertions check vendor_prebuilt_downloaded.
The repo's own test vendor_uses_server_artifact_when_installed_file_is_missing already pins that vendor and vendor --force behave the same with a missing target. The core test vendor_force_still_skips_missing_files (npm_lock.rs) claims "vendor --force keeps its missing-file tolerance" but passes for the same reason.
Proof (executed twice on 9c43dfc): a throwaway copy of vendor_force_still_skips_missing_files run with force in [false, true], with the installed index.js deleted, gave identical results: success=true entry=true warnings=["vendor_prebuilt_downloaded"] both times.
Symptoms / impact
Users and CI scripts set --force / SOCKET_FORCE for vendoring expecting a tolerance that doesn't exist (and isn't needed).
9 backend signatures carry two dead parameters, which also keeps the CLI building a PatchSources for vendoring (vendored_backend/mod.rs#L71-L83)`` only to discard it.
Proposed change
Delete the force and sources parameters from every vendored backend entry point and sink listed above, from test_support's wrappers and from ApplyRequest's vendoring path. Keep force only where the CLI's variant probe reads it.
Rewrite the --force help and CLI_CONTRACT.md#L89 to "bypass the installed-variant probe for multi-release ecosystems". Mark vendor_content_mismatch_overwritten in the error-code table as no longer emitted; keep the row so that consumers matching on it aren't surprised.
Rename vendor_force_still_skips_missing_files to state what it now pins: vendoring ignores the installed copy. Fix the two stale test doc comments.
Size and scope
About −60 production lines across ~15 files in vendor/, plus the CLI vendor.rs/vendored_backend call sites and two doc rows. Out of scope: PackageSource / installed_dir (#800), PatchSources::mem_blobs (#746) and the env-var naming decision (#615).
Acceptance criteria
grep -rn "_force\|_sources" crates/socket-patch-core/src/vendor finds no parameters.
vendor_uses_server_artifact_when_installed_file_is_missing and every vendored backend suite stay green.
The --force help, CLI_CONTRACT.md and docs/ describe only the variant-probe bypass.
Dependencies
Best landed after or with #800 (the same signatures). Informs #615.
[agent] Filed by the scheduled architecture audit routine (ecosystems and formats). Register: discussion #560 register.
Kind: refactor (dead parameters + stale help/contract text; no behavior change). Source: new finding (extends review 5.2, which noted three backends ignoring
_sources/_force); register E65.Problem (verified on
9c43dfc)Since vendored acquisition became service-only, every vendored backend threads
force: boolandsources: &PatchSourcesdown to a sink that discards both. Every sink is underscore-named:npm_common::stage_patch_packandnpm_dir::stage_patch_dir(vlt), behind all seven npm-family drivers;cargo::vendor_cargo_crate,composer_lock::vendor_composer,``golang::vendor_go_module;gem::materialise_patched_copy,nuget_feed::materialise_patched_nupkg,pypi::acquire_patched_wheel, andmaven_repovendor_maven_jvm/materialise_and_write.``All other uses of
forceandsourcesundervendor/are pass-throughs to these sinks.The user-facing documentation still describes the removed behavior:
vendor --forcehelp (commands/vendor.rs#L71-L84) and the contract's flag row (CLI_CONTRACT.md#L89) say it "tolerate[s] missing patch-target files in the stage". The only live effect offorceis the CLI's variant-probe bypass (#L2060,#L2503).CLI_CONTRACT.md#L1234), promise avendor_content_mismatch_overwrittenwarning. No production code emits it; the string appears only in that doc comment and in tests that assert its absence. The test docs ofmismatched_install_does_not_change_the_server_artifact(in_process_vendor.rs) andscan_vendor_annotates_mismatched_baseline_and_vendors_anyway(scan_vendor_e2e.rs) still describe it, while the assertions checkvendor_prebuilt_downloaded.vendor_uses_server_artifact_when_installed_file_is_missingalready pins thatvendorandvendor --forcebehave the same with a missing target. The core testvendor_force_still_skips_missing_files(npm_lock.rs) claims "vendor --forcekeeps its missing-file tolerance" but passes for the same reason.Proof (executed twice on
9c43dfc): a throwaway copy ofvendor_force_still_skips_missing_filesrun withforcein[false, true], with the installedindex.jsdeleted, gave identical results:success=true entry=true warnings=["vendor_prebuilt_downloaded"]both times.Symptoms / impact
--force/SOCKET_FORCEfor vendoring expecting a tolerance that doesn't exist (and isn't needed).SOCKET_FORCEper command) argues from "everyvendorwith missing-file tolerance on"; in vendor mode the variable only bypasses the variant probe.PatchSourcesfor vendoring (vendored_backend/mod.rs#L71-L83)`` only to discard it.Proposed change
forceandsourcesparameters from every vendored backend entry point and sink listed above, fromtest_support's wrappers and fromApplyRequest's vendoring path. Keepforceonly where the CLI's variant probe reads it.--forcehelp andCLI_CONTRACT.md#L89to "bypass the installed-variant probe for multi-release ecosystems". Markvendor_content_mismatch_overwrittenin the error-code table as no longer emitted; keep the row so that consumers matching on it aren't surprised.vendor_force_still_skips_missing_filesto state what it now pins: vendoring ignores the installed copy. Fix the two stale test doc comments.Size and scope
About −60 production lines across ~15 files in
vendor/, plus the CLIvendor.rs/vendored_backendcall sites and two doc rows. Out of scope:PackageSource/installed_dir(#800),PatchSources::mem_blobs(#746) and the env-var naming decision (#615).Acceptance criteria
grep -rn "_force\|_sources" crates/socket-patch-core/src/vendorfinds no parameters.vendor_uses_server_artifact_when_installed_file_is_missingand every vendored backend suite stay green.--forcehelp,CLI_CONTRACT.mdanddocs/describe only the variant-probe bypass.Dependencies
Best landed after or with #800 (the same signatures). Informs #615.