Visual Studio Code, rebuilt in Rust
Rust
fix(extensions): install a workbench VSIX's dependencies and pack first
rokartur551848aebafe
diff --git a/native/crates/app/Cargo.toml b/native/crates/app/Cargo.tomlindex d6ae7deca68..9af2060c80e 100644--- a/native/crates/app/Cargo.toml+++ b/native/crates/app/Cargo.toml@@ -55,6 +55,7 @@ regex = "1"serde_json.workspace = true[dev-dependencies]+exthost = { path = "../exthost", features = ["test-support"] }gpui = { workspace = true, features = ["test-support"] }gpui_platform = { workspace = true, features = ["font-kit", "test-support"] }diff --git a/native/crates/app/src/cli_process.rs b/native/crates/app/src/cli_process.rsindex 828b29ec260..4b3b50d6678 100644--- a/native/crates/app/src/cli_process.rs+++ b/native/crates/app/src/cli_process.rs@@ -271,7 +271,7 @@ fn is_vsix(input: &str) -> bool {input.to_lowercase().ends_with(".vsix")}-fn string_list(value: &serde_json::Value) -> Vec<String> {+pub(crate) fn string_list(value: &serde_json::Value) -> Vec<String> {value.as_array().into_iter().flatten().filter_map(|item| item.as_str().map(Into::into)).collect()}diff --git a/native/crates/app/src/workbench/extension_management.rs b/native/crates/app/src/workbench/extension_management.rsindex ddbae93fe66..5918d3c53a5 100644--- a/native/crates/app/src/workbench/extension_management.rs+++ b/native/crates/app/src/workbench/extension_management.rs@@ -95,13 +95,71 @@ impl Workbench {}/// `extensionsWorkbenchService.install(vsix)` for each file; `notify` shows the result as INSTALL_FROM_VSIX does.+ /// `installExtensions`: the gallery dependencies and pack members of each VSIX install first, off the UI thread; a+ /// VSIX whose lookup fails installs without them.fn install_vsixs(&mut self, vsixs: Vec<PathBuf>, notify: bool, cx: &mut Context<Self>) -> Outcome {let done = match (notify, vsixs.len()) {(false, _) => None,(true, 1) => Some("Completed installing extension."),(true, _) => Some("Completed installing extensions."),};- self.run_extension_jobs(vsixs.into_iter().map(Job::InstallVsix).collect(), done, cx, |error| error)+ let (downloads, verify_signature) = self.download_settings();+ let gallery = self.gallery();+ let installed = self.extensions.clone();+ let prepare = cx.background_executor().spawn(async move {+ let mut jobs = Vec::new();+ let mut queued: Vec<String> = Vec::new();+ for vsix in &vsixs {+ // A VSIX without a readable manifest fails in its own install job, with its error.+ let Ok(manifest) = exthost::extension_management::vsix_manifest(vsix) else { continue };+ let id = exthost::extension_management::gallery_extension_id(&manifest);+ let dependencies = crate::cli_process::string_list(&manifest["extensionDependencies"]);+ let pack = crate::cli_process::string_list(&manifest["extensionPack"]);+ let others = match gallery.dependencies_and_packs(&id, &dependencies, &pack, &installed, false) {+ Ok(others) => others,+ Err(error) => {+ eprintln!("[extensions] Cannot install dependencies and packed extensions of extension: {id} {error:#}");+ continue;+ }+ };+ for other in others {+ if queued.contains(&other.id.to_lowercase()) {+ continue;+ }+ queued.push(other.id.to_lowercase());+ jobs.push(Job::InstallGallery(gallery.download(&other, Operation::Install, &downloads, verify_signature)?, Box::new(other)));+ }+ }+ jobs.extend(vsixs.into_iter().map(Job::InstallVsix));+ anyhow::Ok(jobs)+ });+ let (sender, receiver) = oneshot::channel();+ cx.spawn(async move |workbench, cx| {+ let installed = match prepare.await {+ Ok(jobs) => workbench.update(cx, |workbench, cx| workbench.run_extension_jobs(jobs, done, cx, |error| error)),+ Err(error) => workbench.update(cx, |workbench, _| {+ let error = format!("{error:#}");+ workbench.notify_error(error.clone());+ Outcome::Ready(Err(serialized_error(&error)))+ }),+ };+ let result = match installed {+ Ok(Outcome::Ready(result)) => result,+ Ok(Outcome::Pending(pending)) => pending.await.unwrap_or(Ok(Value::Null)),+ Err(_) => Ok(Value::Null),+ };+ let _ = sender.send(result);+ })+ .detach();+ Outcome::Pending(receiver)+ }++ /// Where gallery downloads go (`<user data>/CachedExtensionVSIXs`) and whether their signatures are checked.+ fn download_settings(&self) -> (PathBuf, bool) {+ let settings = self.settings.lock().unwrap();+ let downloads = settings.user_home().parent().expect("the user home is <user data>/User").join("CachedExtensionVSIXs");+ let verify_signature = settings.get_value(Some("extensions.verifySignature"), &Overrides::default()) != Some(Value::Bool(false));+ (downloads, verify_signature)}/// `extensionsWorkbenchService.installExtension` with `justification`: asks "Would you like to install ..." with the@@ -143,10 +201,7 @@ impl Workbench {let installed = self.extensions.iter().find(|extension| extension.id.eq_ignore_ascii_case(&id));let builtin = installed.is_some_and(|extension| extension.description["isBuiltin"] == true);let operation = if installed.is_some() { Operation::Update } else { Operation::Install };- let settings = self.settings.lock().unwrap();- let downloads = settings.user_home().parent().expect("the user home is <user data>/User").join("CachedExtensionVSIXs");- let verify_signature = settings.get_value(Some("extensions.verifySignature"), &Overrides::default()) != Some(Value::Bool(false));- drop(settings);+ let (downloads, verify_signature) = self.download_settings();let lower = id.to_lowercase();if !self.extensions_viewlet.installing.contains(&lower) {self.extensions_viewlet.installing.push(lower.clone());@@ -432,3 +487,6 @@ fn id_and_version_splits_a_version_suffix() {assert_eq!(id_and_version("redhat.vscode-yaml@prerelease"), ("redhat.vscode-yaml".into(), Some("prerelease".into())));assert_eq!(id_and_version("redhat.vscode-yaml@latest"), ("redhat.vscode-yaml@latest".into(), None));}++#[cfg(test)]+mod tests;diff --git a/native/crates/app/src/workbench/extension_management/tests.rs b/native/crates/app/src/workbench/extension_management/tests.rsnew file mode 100644index 00000000000..0e532b52e05--- /dev/null+++ b/native/crates/app/src/workbench/extension_management/tests.rs@@ -0,0 +1,111 @@+use std::path::{Path, PathBuf};+use std::sync::mpsc::Receiver;+use std::sync::{Arc, Mutex};++use config::registry::Registry;+use config::service::Settings;+use exthost::extension_management::Job;+use exthost::gallery::test_support::{gallery_entry, serve_gallery};+use exthost::gallery::{Gallery, extension_key};+use gpui::{TestAppContext, VisualTestContext};+use serde_json::json;++use crate::host_sync::{HostMessage, HostSync};+use crate::languages::Languages;+use crate::workbench::Workbench;++struct Fixture {+ dir: PathBuf,+ messages: Receiver<HostMessage>,+}++impl Drop for Fixture {+ fn drop(&mut self) {+ let _ = std::fs::remove_dir_all(&self.dir);+ }+}++/// A workbench on a fake gallery of `entries` (id, dependencies, pack) with signature checks off; the downloads of+/// `entries` are in the cache already, and the host is a channel the test reads its jobs from.+fn workbench_on_gallery<'a>(name: &str, entries: &[(&str, &[&str], &[&str])], cx: &'a mut TestAppContext) -> (Fixture, gpui::Entity<Workbench>, &'a mut VisualTestContext) {+ let dir = std::env::temp_dir().join(format!("code-gpui-{name}-{}", std::process::id()));+ let _ = std::fs::remove_dir_all(&dir);+ let user = dir.join("data/User");+ std::fs::create_dir_all(&user).unwrap();+ std::fs::write(user.join("settings.json"), r#"{ "extensions.verifySignature": false }"#).unwrap();+ let served = entries.iter().map(|(id, dependencies, pack)| (id.to_string(), gallery_entry(id, dependencies, pack))).collect();+ let gallery = Gallery { service_url: serve_gallery(served), product_version: crate::VERSION.clone() };+ let downloads = dir.join("data/CachedExtensionVSIXs");+ std::fs::create_dir_all(&downloads).unwrap();+ for (id, _, _) in entries {+ let extension = gallery.installable_extension(id, None, false).unwrap();+ std::fs::write(downloads.join(extension_key(&extension).to_lowercase()), b"").unwrap();+ }+ let app_root = Path::new(env!("VSCODE_SRC")).to_path_buf();+ let themes = exthost::scan::scan_extension(&app_root.join("extensions/theme-defaults"), true).unwrap();+ let theme = crate::theme::load_theme(&[themes], "Dark Modern").unwrap();+ let settings = Arc::new(Mutex::new(Settings::load(Registry::with_extensions(&[]), user, None)));+ let (sender, messages) = std::sync::mpsc::channel();+ let (workbench, cx) = cx.add_window_view(|_, cx| {+ let mut workbench = Workbench::new(theme, app_root, None, Languages::new(&[]), settings, HostSync::new(sender), cx);+ workbench.gallery_url = gallery.service_url;+ workbench.trust_publishers(&[("a".into(), "Red Hat".into())]);+ workbench+ });+ (Fixture { dir, messages }, workbench, cx)+}++/// The jobs sent to the host: a gallery install by its id, a VSIX install as `vsix`.+fn sent_jobs(messages: &Receiver<HostMessage>) -> Vec<String> {+ let mut jobs = Vec::new();+ for message in messages.try_iter() {+ match message.extensions {+ Some((Job::InstallGallery(_, extension), _)) => jobs.push(extension.id),+ Some((Job::InstallVsix(_), _)) => jobs.push("vsix".into()),+ _ => {}+ }+ }+ jobs+}++fn write_vsix(dir: &Path, dependencies: &[&str], pack: &[&str]) -> PathBuf {+ let manifest = json!({ "name": "root", "publisher": "a", "version": "1.0.0", "engines": { "vscode": "^1.0.0" }, "extensionDependencies": dependencies, "extensionPack": pack }).to_string();+ let vsix = dir.join("root.vsix");+ std::fs::write(&vsix, exthost::zip::write_stored(&[("extension/package.json", manifest.as_bytes())])).unwrap();+ vsix+}++/// abstractExtensionManagementService.ts `installExtensions`: a VSIX's dependencies and pack members come from the+/// gallery and install before it.+#[gpui::test]+fn the_dependencies_and_pack_of_a_vsix_install_before_it(cx: &mut TestAppContext) {+ let entries: &[(&str, &[&str], &[&str])] = &[("a.dep", &[], &[]), ("a.member", &[], &[])];+ let (fixture, workbench, cx) = workbench_on_gallery("vsix-dependencies", entries, cx);+ let vsix = write_vsix(&fixture.dir, &["a.dep"], &["a.member"]);+ workbench.update(cx, |workbench, cx| drop(workbench.install_vsixs(vec![vsix], false, cx)));+ cx.run_until_parked();+ assert_eq!(sent_jobs(&fixture.messages), ["a.dep", "a.member", "vsix"]);+}++/// A VSIX ignores its dependencies and pack when the gallery cannot resolve them.+#[gpui::test]+fn a_vsix_installs_alone_when_the_gallery_fails(cx: &mut TestAppContext) {+ let (fixture, workbench, cx) = workbench_on_gallery("vsix-no-gallery", &[], cx);+ let vsix = write_vsix(&fixture.dir, &["a.dep"], &[]);+ workbench.update(cx, |workbench, cx| {+ workbench.gallery_url = "http://127.0.0.1:1".into();+ drop(workbench.install_vsixs(vec![vsix], false, cx));+ });+ cx.run_until_parked();+ assert_eq!(sent_jobs(&fixture.messages), ["vsix"]);+}++/// `installFromGallery` then `installExtensions`: dependencies and pack members install before the extension.+#[gpui::test]+fn a_gallery_install_brings_its_dependencies_and_pack_first(cx: &mut TestAppContext) {+ let entries: &[(&str, &[&str], &[&str])] = &[("a.root", &["a.dep"], &["a.member"]), ("a.dep", &["a.leaf"], &[]), ("a.member", &[], &[]), ("a.leaf", &[], &[])];+ let (fixture, workbench, cx) = workbench_on_gallery("gallery-dependencies", entries, cx);+ workbench.update(cx, |workbench, cx| drop(workbench.install_from_gallery("a.root".into(), None, false, cx)));+ cx.run_until_parked();+ assert_eq!(sent_jobs(&fixture.messages), ["a.dep", "a.leaf", "a.member", "a.root"]);+}diff --git a/native/crates/exthost/Cargo.toml b/native/crates/exthost/Cargo.tomlindex cd684d995ae..d58c67181e7 100644--- a/native/crates/exthost/Cargo.toml+++ b/native/crates/exthost/Cargo.toml@@ -19,6 +19,9 @@ serde_json.workspace = truesha2 = "0.10"storage = { path = "../storage" }+[features]+test-support = []+[target.'cfg(target_os = "macos")'.dependencies]block2 = "0.6"objc2 = "0.6"diff --git a/native/crates/exthost/src/gallery.rs b/native/crates/exthost/src/gallery.rsindex 208b75b1256..ea45e9be560 100644--- a/native/crates/exthost/src/gallery.rs+++ b/native/crates/exthost/src/gallery.rs@@ -1023,5 +1023,7 @@ fn to_extension(raw: &Value, version: &Value, all_target_platforms: &[&'static s}}+#[cfg(any(test, feature = "test-support"))]+pub mod test_support;#[cfg(test)]mod tests;diff --git a/native/crates/exthost/src/gallery/test_support.rs b/native/crates/exthost/src/gallery/test_support.rsnew file mode 100644index 00000000000..bf2391e0413--- /dev/null+++ b/native/crates/exthost/src/gallery/test_support.rs@@ -0,0 +1,55 @@+//! A fake gallery for the tests of gallery installs, here and in the workbench.++use serde_json::{Value, json};++/// Open VSX's answer to `/vscode/redhat/vscode-yaml/latest`: a pre-release 2.1.2026112008 and the release 2.0.0.+pub const VSCODE_YAML: &str = include_str!("vscode-yaml-latest.json");++/// vscode-yaml republished as `id` with these `extensionDependencies` and `extensionPack` in every version.+pub fn gallery_entry(id: &str, dependencies: &[&str], pack: &[&str]) -> Value {+ let mut raw: Value = serde_json::from_str(VSCODE_YAML).unwrap();+ let (publisher, name) = id.split_once('.').unwrap();+ raw["publisher"]["publisherName"] = publisher.into();+ raw["extensionName"] = name.into();+ raw["extensionId"] = format!("uuid-{id}").into();+ for version in raw["versions"].as_array_mut().unwrap() {+ let properties = version["properties"].as_array_mut().unwrap();+ properties.retain(|property| !property["key"].as_str().unwrap().starts_with("Microsoft.VisualStudio.Code.Extension"));+ properties.push(json!({ "key": "Microsoft.VisualStudio.Code.ExtensionDependencies", "value": dependencies.join(",") }));+ properties.push(json!({ "key": "Microsoft.VisualStudio.Code.ExtensionPack", "value": pack.join(",") }));+ }+ raw+}++/// A gallery on localhost that answers each query with the `entries` whose id the query names, by name or by uuid.+pub fn serve_gallery(entries: Vec<(String, Value)>) -> String {+ use std::io::{BufRead, BufReader, Read, Write};+ let listener = std::net::TcpListener::bind("127.0.0.1:0").unwrap();+ let url = format!("http://{}", listener.local_addr().unwrap());+ std::thread::spawn(move || {+ for stream in listener.incoming().flatten() {+ let mut reader = BufReader::new(stream);+ let mut length = 0;+ loop {+ let mut line = String::new();+ reader.read_line(&mut line).unwrap();+ if line.trim().is_empty() {+ break;+ }+ if let Some((name, value)) = line.split_once(':')+ && name.eq_ignore_ascii_case("content-length")+ {+ length = value.trim().parse().unwrap();+ }+ }+ let mut body = vec![0; length];+ reader.read_exact(&mut body).unwrap();+ let query = String::from_utf8_lossy(&body).to_lowercase();+ let named: Vec<&Value> = entries.iter().filter(|(id, _)| query.contains(id.as_str())).map(|(_, entry)| entry).collect();+ let body = json!({ "results": [{ "extensions": named, "resultMetadata": [{ "metadataType": "ResultCount", "metadataItems": [{ "name": "TotalCount", "count": named.len() }] }] }] }).to_string();+ let reply = format!("HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{body}", body.len());+ reader.into_inner().write_all(reply.as_bytes()).unwrap();+ }+ });+ url+}diff --git a/native/crates/exthost/src/gallery/tests.rs b/native/crates/exthost/src/gallery/tests.rsindex 6f341df1d9a..3bed49d57ae 100644--- a/native/crates/exthost/src/gallery/tests.rs+++ b/native/crates/exthost/src/gallery/tests.rs@@ -1,9 +1,7 @@use serde_json::{Value, json};use super::*;--/// Open VSX's answer to `/vscode/redhat/vscode-yaml/latest`: a pre-release 2.1.2026112008 and the release 2.0.0.-const VSCODE_YAML: &str = include_str!("vscode-yaml-latest.json");+use super::test_support::{VSCODE_YAML, gallery_entry, serve_gallery};fn version(number: &str, platform: Option<&str>) -> Value {json!({ "version": number, "targetPlatform": platform })@@ -182,55 +180,6 @@ fn verification_failures_refuse_the_install() {assert!(check_verification(Some(VerificationCode::EntryIsTampered), false).is_err());}-/// vscode-yaml republished as `id` with these `extensionDependencies` and `extensionPack` in every version.-fn gallery_entry(id: &str, dependencies: &[&str], pack: &[&str]) -> Value {- let mut raw: Value = serde_json::from_str(VSCODE_YAML).unwrap();- let (publisher, name) = id.split_once('.').unwrap();- raw["publisher"]["publisherName"] = publisher.into();- raw["extensionName"] = name.into();- raw["extensionId"] = format!("uuid-{id}").into();- for version in raw["versions"].as_array_mut().unwrap() {- let properties = version["properties"].as_array_mut().unwrap();- properties.retain(|property| !property["key"].as_str().unwrap().starts_with("Microsoft.VisualStudio.Code.Extension"));- properties.push(json!({ "key": "Microsoft.VisualStudio.Code.ExtensionDependencies", "value": dependencies.join(",") }));- properties.push(json!({ "key": "Microsoft.VisualStudio.Code.ExtensionPack", "value": pack.join(",") }));- }- raw-}--/// A gallery on localhost that answers each query with the `entries` whose id the query names, by name or by uuid.-fn serve_gallery(entries: Vec<(String, Value)>) -> String {- use std::io::{BufRead, BufReader, Read, Write};- let listener = std::net::TcpListener::bind("127.0.0.1:0").unwrap();- let url = format!("http://{}", listener.local_addr().unwrap());- std::thread::spawn(move || {- for stream in listener.incoming().flatten() {- let mut reader = BufReader::new(stream);- let mut length = 0;- loop {- let mut line = String::new();- reader.read_line(&mut line).unwrap();- if line.trim().is_empty() {- break;- }- if let Some((name, value)) = line.split_once(':')- && name.eq_ignore_ascii_case("content-length")- {- length = value.trim().parse().unwrap();- }- }- let mut body = vec![0; length];- reader.read_exact(&mut body).unwrap();- let query = String::from_utf8_lossy(&body).to_lowercase();- let named: Vec<&Value> = entries.iter().filter(|(id, _)| query.contains(id.as_str())).map(|(_, entry)| entry).collect();- let body = json!({ "results": [{ "extensions": named, "resultMetadata": [{ "metadataType": "ResultCount", "metadataItems": [{ "name": "TotalCount", "count": named.len() }] }] }] }).to_string();- let reply = format!("HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{body}", body.len());- reader.into_inner().write_all(reply.as_bytes()).unwrap();- }- });- url-}-/// abstractExtensionManagementService.ts `getAllDepsAndPackExtensions`: dependencies and pack members, recursively,/// in query order, without the installed ones.#[test]diff --git a/native/crates/exthost/src/zip.rs b/native/crates/exthost/src/zip.rsindex 32de8ae0c5e..3f1b97adf7a 100644--- a/native/crates/exthost/src/zip.rs+++ b/native/crates/exthost/src/zip.rs@@ -163,7 +163,7 @@ fn zip64_extended_information(mut extra: &[u8]) -> Option<&[u8]> {}/// Writes a stored zip, for tests of the readers of VSIX files.-#[cfg(test)]+#[cfg(any(test, feature = "test-support"))]pub fn write_stored(files: &[(&str, &[u8])]) -> Vec<u8> {let mut out = Vec::new();let mut central = Vec::new();diff --git a/port/ledger.md b/port/ledger.mdindex d568cbf5588..51ff204c99c 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -206,7 +206,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| platform/encryption | src/vs/platform | M10 | removed | | the port keeps secrets as Keychain items (MainThreadSecretState row, port/notes.md), so there is no safeStorage key to encrypt with || platform/endpoint | src/vs/platform | | removed | | no remote or tunnels by decision (port/notes.md); one local extension host || platform/environment | src/vs/platform | M10 | verified | | port/tools/settings-check environment: the paths and values init data carries match the reference except appName, uriScheme, machineId format and isTelemetryEnabled (product and no-telemetry decisions); argv.ts and argvHelper.ts are ported in argv.rs (`OPTIONS`, minimist parsing, `parseArgs`, `--goto` validation, help and version text), which cli.rs and `start_open_window` parse with (cargo test -p app argv:: : parses_the_command_line_as_upstream_argv, help_matches_upstream_text, goto_mode_validates_its_arguments); stdin.ts piped input decoded from the terminal encoding (resolveTerminalEncoding: cargo test -p app cli::); userDataPath.ts and the Electron main environment are replaced by main.rs's flags (`--user-data-dir`, `--extensions-dir`, `--profile`, `--profile-temp`, `--extensionDevelopmentPath`, `--extensionTestsPath`); copilotHome removed (no AI by decision) |-| platform/extensionManagement | src/vs/platform | M18 | ported | [3 L] the workbench has no ExtensionsWatcher: a running app does not start or stop the extensions a CLI install or uninstall adds to or removes from `extensions.json` until it restarts <br> [3 S] workbench/extension_management.rs `install_vsixs`: a VSIX installed in the workbench does not bring its `extensionDependencies` and `extensionPack` from the gallery (the CLI and gallery installs do) | zip64 VSIX read as yauzl does (cargo test -p exthost zip::tests::reads_zip64_records_and_extended_information). VSIX and gallery install, update, uninstall and clean-up on disk (extensionsScannerService.ts, extensionsProfileScannerService.ts layout): cargo test -p exthost extension_management, zip; PORT_GALLERY=1 port/tools/extensions-check 5 ok (an ESM VSIX and redhat.vscode-yaml from Open VSX activate without restart); the extracted package.json is written as `JSON.stringify(manifest, null, '\t')`, strings untouched (cargo test -p exthost keeps_double_spaces_in_manifest_strings; port/tools/update-check pre-release installs the rust-analyzer pre-release, whose setting descriptions have two spaces in a row). The CLI (cliProcessMain.ts, extensionManagementCLI.ts): cli_process.rs runs `--list-extensions` (`--show-versions`, `--category`), `--install-extension` (ids, `id@version`, VSIX paths, `--force`, `--pre-release`), `--uninstall-extension`, `--update-extensions`, `--locate-extension` and `--install-source` with `--profile`, and exits without a window; a built-in is located and refused uninstalling, downloads follow `extensions.verifySignature` (cargo test -p app cli::tests::uninstall_extension_runs_in_the_cli_without_the_app cli_process::; `getAllDepsAndPackExtensions` for CLI and workbench gallery installs: cargo test -p exthost dependencies_and_packs_come_along_recursively, and the release CLI installs ms-python.isort with ms-python.python and its pack; the release binary as bin/code starts it installs, updates, lists, locates and uninstalls Open VSX extensions and a VSIX) |+| platform/extensionManagement | src/vs/platform | M18 | ported | [3 L] the workbench has no ExtensionsWatcher: a running app does not start or stop the extensions a CLI install or uninstall adds to or removes from `extensions.json` until it restarts | zip64 VSIX read as yauzl does (cargo test -p exthost zip::tests::reads_zip64_records_and_extended_information). VSIX and gallery install, update, uninstall and clean-up on disk (extensionsScannerService.ts, extensionsProfileScannerService.ts layout): cargo test -p exthost extension_management, zip; PORT_GALLERY=1 port/tools/extensions-check 5 ok (an ESM VSIX and redhat.vscode-yaml from Open VSX activate without restart); the extracted package.json is written as `JSON.stringify(manifest, null, '\t')`, strings untouched (cargo test -p exthost keeps_double_spaces_in_manifest_strings; port/tools/update-check pre-release installs the rust-analyzer pre-release, whose setting descriptions have two spaces in a row). The CLI (cliProcessMain.ts, extensionManagementCLI.ts): cli_process.rs runs `--list-extensions` (`--show-versions`, `--category`), `--install-extension` (ids, `id@version`, VSIX paths, `--force`, `--pre-release`), `--uninstall-extension`, `--update-extensions`, `--locate-extension` and `--install-source` with `--profile`, and exits without a window; a built-in is located and refused uninstalling, downloads follow `extensions.verifySignature` (cargo test -p app cli::tests::uninstall_extension_runs_in_the_cli_without_the_app cli_process::; `getAllDepsAndPackExtensions` for CLI, workbench gallery and workbench VSIX installs (a VSIX whose lookup fails installs alone): cargo test -p exthost dependencies_and_packs_come_along_recursively, cargo test -p app workbench::extension_management::tests, and the release CLI installs ms-python.isort with ms-python.python and its pack; the release binary as bin/code starts it installs, updates, lists, locates and uninstalls Open VSX extensions and a VSIX) || platform/extensionRecommendations | src/vs/platform | M18 | verified | | recommendation reasons and the workspace prompt text (extensionRecommendations.ts, extensionRecommendationNotificationService.ts): cargo test -p app recommendation; ui-pair port/fixtures/extensions/ui-recommendations.json (prompt, Recommended view) against the reference || platform/extensionResourceLoader | src/vs/platform | M18 | verified | | installed extensions' README, changelog and icon read from disk, gallery ones from their asset URIs (Open VSX has no `resourceUrlTemplate`): ui-pair port/fixtures/extensions/ui-view.json `details` shows the yaml README as the reference || platform/extensions | src/vs/platform | M18 | verified | | extensionValidator.ts with the cases of extensionValidator.test.ts: cargo test -p exthost extension_validator; installs validated in PORT_GALLERY=1 port/tools/extensions-check; built-in extensions are not validated yet |@@ -391,7 +391,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/services/editor | workbench service | M11 | verified | | editor groups (editor_grid.rs grid of gridview.ts, workbench/editor_groups.rs): split (Cmd+\, directions, orthogonal, `workbench.editor.splitSizing`, `openSideBySideDirection`), one text model per resource shared by its editors (editor.rs `SharedModel`), focus and move editors between groups, move group, close group and closeEmptyGroups, join, the 8 editor layouts, flip, even and expand widths, maximize group, group sashes with double click reset; groups reach the host as view columns (`$acceptEditorTabModel`, editorPosition); cargo test -p app editor_groups editor_grid host_sync; pixel-check window split (port/results/layout.md). group drag and drop (editor_groups.rs `group_drop_area`, `split_direction` of editorDropTarget.ts: cargo test -p app a_drag_splits_at_the_edges_and_moves_in_the_center) and the persisted editor part state (editor_groups/part_state.rs: cargo test -p app the_grid_and_its_editors_come_back_from_workspace_storage sticky_editors_come_back_sticky); verified: cargo test -p app editor_grid (grid.test.ts, gridview.test.ts); ui-pair hot-exit.json `restored` vs the reference (port/results/windows.md, milestone 11 verification): the editor part state with its untitled editor restored and focused; locked groups (editor_groups/locked_groups.rs): Lock/Unlock/Toggle Editor Group Lock, the Unlock and Lock Group title icons, the empty group toolbar, opening editors skipping a locked group (editorGroupFinder.ts), `workbench.editor.autoLockGroups`, `locked` stored: cargo test -p app editor_groups (a_locked_group_hands_opened_editors_to_an_unlocked_group, auto_lock_groups_locks_a_new_group_of_a_listed_editor), ui-pair editor-window-compact-lock.json (port/results/auxiliary-windows.md); external drops (dnd.ts `handleDrop`, `handleWorkspaceDrop`): cargo test -p app files_dropped_from_outside_open_in_the_group_the_overlay_shows folders_dropped_from_outside_enter_an_untitled_workspace || workbench/services/encryption | workbench service | M10 | removed | | proxy of platform/encryption, removed with it || workbench/services/environment | workbench service | M10 | verified | | the workbench environment's paths and args as init data and app paths (platform/environment row): port/tools/settings-check environment; environmentService.test.ts reads the browser workbench's URL options (web only); copilotHomeService removed by decision (no AI) |-| workbench/services/extensionManagement | workbench service | M18 | verified | | installVSIX, install from Open VSX, uninstall, Install from VSIX and their errors: PORT_GALLERY=1 port/tools/extensions-check 5 ok; enablement: cargo test -p app extension_enablement; trusted publishers (`checkForTrustedPublishers` before a gallery install, `extensions.trustedPublishers`, product.json `trustedExtensionPublishers`, Manage Trusted Extension Publishers: workbench/trusted_publishers.rs, cargo test -p app trusted_publishers; ui-pair port/fixtures/ui-steps/trusted-publisher.json against REF=~/Developer/vscode-ref-openvsx: the "Do you trust the publisher "MS-CEINTL"?" dialog matches, 3% of the dialog crop off where the product name rewraps the text) |+| workbench/services/extensionManagement | workbench service | M18 | verified | | installVSIX, install from Open VSX, uninstall, Install from VSIX and their errors: PORT_GALLERY=1 port/tools/extensions-check 5 ok; dependencies and pack members of a gallery or VSIX install queued before it: cargo test -p app workbench::extension_management::tests; enablement: cargo test -p app extension_enablement; trusted publishers (`checkForTrustedPublishers` before a gallery install, `extensions.trustedPublishers`, product.json `trustedExtensionPublishers`, Manage Trusted Extension Publishers: workbench/trusted_publishers.rs, cargo test -p app trusted_publishers; ui-pair port/fixtures/ui-steps/trusted-publisher.json against REF=~/Developer/vscode-ref-openvsx: the "Do you trust the publisher "MS-CEINTL"?" dialog matches, 3% of the dialog crop off where the product name rewraps the text) || workbench/services/extensionRecommendations | workbench service | M18 | verified | | workspaceExtensionsConfig.ts from `.vscode/` and `.vsrustium/` (`.vsrustium/` wins per key), ignored recommendations: cargo test -p app recommendation; ui-pair port/fixtures/extensions/ui-recommendations.json || workbench/services/extensions | workbench service | M18 | verified | | extensionsProposedApi.ts `enabledApiProposals` filtering with product.json's allow-list and `--enable-proposed-api`, one policy per window (cargo test -p exthost proposed_api, cargo test -p app a_host_restart_gives_the_extensions); `_deltaExtensions` with `_activateAddedExtensionIfNeeded` and configuration defaults: port/tools/extensions-check, exthost-probe --install-vsix/--uninstall; other extension points the workbench reads (icon themes, static status bar items) are read at startup only || workbench/services/files | workbench service | M12 | verified | | the disk provider and watcher client run in process: native/crates/files (disk provider, FSEvents watcher, cargo test -p files); elevatedFileService.ts writeElevated is text_files.rs write_elevated of milestone 8 (port-integrate); verified: api-tests MOCHA_GREP="vscode API - (workspace|file system|env|types|tasks)" at 44a309311e1: every workspace, workspace-fs, workspace events, workspace-watcher and file system test passes, api-workspace 4/0/0 (port/results/api-tests.md "M12 verification"), workspace-fs and file system |