Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
34f9a09
Read lockfile discovery through any project view
mikolalysenko Oct 7, 2026
b2e5e39
Decide recorded hosted pins through lockfile discovery
mikolalysenko Oct 7, 2026
6d6ac14
Never write hosted pins lockfile discovery would contest
mikolalysenko Oct 7, 2026
c225773
Keep vendored takeovers out of the attribution veto
mikolalysenko Oct 7, 2026
e25c17d
Keep nested roots' pins out of a root's in-memory recorded view
mikolalysenko Oct 7, 2026
ddd285a
Tell NuGet config spellings apart on Windows by file identity
claude Oct 7, 2026
5f0b71c
Merge remote-tracking branch 'origin/main' into pr-1058
claude Oct 7, 2026
8da8a1a
Count configured patch servers in the attribution gate and foreign up…
mikolalysenko Oct 7, 2026
f27cf57
WIP: reuse scan's discovery in the unattributed-pins gate when nothin…
claude Oct 7, 2026
caf0799
Reuse the attribution gate's discovery after the hosted writes
mikolalysenko Oct 8, 2026
6e8f7f1
Reuse the post-write discovery across the vlt heal when the store holds
mikolalysenko Oct 8, 2026
83dbebe
Make each lockfile discovery cheaper and memoize the identity sweep
mikolalysenko Oct 8, 2026
2f9837f
Walk vlt's store for bundled copies in one blocking task
mikolalysenko Oct 8, 2026
9b0ca61
Check Gradle's build-level refusals once per discovery, not per pin
mikolalysenko Oct 8, 2026
8bf77dc
Reuse scan's pre-lock discovery only while what it read is unchanged
mikolalysenko Oct 8, 2026
6990860
Show overlaid creations to view listings; reuse the gate's discovery …
mikolalysenko Oct 8, 2026
ee875cb
Merge remote-tracking branch 'origin/agent/perf-1058-memo' into prfix…
mikolalysenko Oct 8, 2026
640f703
Merge remote-tracking branch 'origin/main' into prfix3/1058
mikolalysenko Oct 8, 2026
08eb037
Never open non-regular NuGet configs on Windows
mikolalysenko Oct 8, 2026
56ca23e
Merge remote-tracking branch 'origin/main' into prfix3/1058
mikolalysenko Oct 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/socket-patch-cli/CLI_CONTRACT.md

Large diffs are not rendered by default.

21 changes: 17 additions & 4 deletions crates/socket-patch-cli/src/commands/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::path::PathBuf;

use socket_patch_core::ledgers::{Ledgers, LoadedLedgers};
use socket_patch_core::vendor::lock_inventory::{
DiskSnapshot, LockfileEntry, ProjectView, UnsupportedNpmLayout,
DiskSnapshot, LockfileEntry, ProjectView, ReadSet, UnsupportedNpmLayout,
};
use socket_patch_core::vex::discover::Discovery;
use tokio::sync::OnceCell;
Expand All @@ -39,7 +39,10 @@ pub(crate) struct ProjectContext<'a> {
snapshot: DiskSnapshot<'a>,
ledgers: OnceCell<LoadedLedgers>,
locks: OnceCell<LockSet>,
discovery: OnceCell<Discovery>,
/// The discovery, with the paths it read and their fingerprints
/// (`None` when they cannot cover what it read; see
/// [`DiskSnapshot::end_recording`]).
discovery: OnceCell<(Discovery, Option<ReadSet>)>,
}

impl<'a> ProjectContext<'a> {
Expand All @@ -53,7 +56,7 @@ impl<'a> ProjectContext<'a> {
Self {
common,
root,
snapshot: DiskSnapshot::new(&common.cwd),
snapshot: DiskSnapshot::tracked(&common.cwd),
ledgers: OnceCell::new(),
locks: OnceCell::new(),
discovery: OnceCell::new(),
Expand Down Expand Up @@ -93,8 +96,18 @@ impl<'a> ProjectContext<'a> {

/// The lockfile wiring discovery of `--cwd` ([`super::discover_wiring`]).
pub(crate) async fn discovery(&self) -> &Discovery {
&self.recorded_discovery().await.0
}

/// [`Self::discovery`] with the read set that tells whether it still
/// describes the project (stats only; see [`ReadSet::unchanged`]).
pub(crate) async fn recorded_discovery(&self) -> &(Discovery, Option<ReadSet>) {
self.discovery
.get_or_init(|| super::discover_wiring_in(self.common, &self.snapshot))
.get_or_init(|| async {
self.snapshot.begin_recording();
let discovery = super::discover_wiring_in(self.common, &self.snapshot).await;
(discovery, self.snapshot.end_recording())
})
.await
}
}
8 changes: 2 additions & 6 deletions crates/socket-patch-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,7 @@ pub(crate) async fn discover_wiring_in(

fn discover_options(common: &crate::args::GlobalArgs) -> socket_patch_core::vex::DiscoverOptions {
socket_patch_core::vex::DiscoverOptions {
patch_server_origins: common
.patch_server_url
.iter()
.filter(|url| !url.trim().is_empty())
.cloned()
.collect(),
patch_server_origins: rollback::patch_server_origins(common),
}
}

Expand All @@ -137,6 +132,7 @@ pub(crate) async fn hosted_inventory(
/// edits) — it is never persisted.
///
/// [`RedirectState`]: socket_patch_core::patch::redirect::RedirectState
#[cfg(test)]
pub(crate) async fn hosted_state_from_lockfiles(
common: &crate::args::GlobalArgs,
root: &Path,
Expand Down
Loading
Loading