From 2527c94d4e626506c9ed140f3f4bc11cf375f662 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Mon, 28 Sep 2026 19:37:57 +0800 Subject: [PATCH] ci(host-boundary): allow the language servers' local reads ui::lsp only ever holds local buffers (OpenFile::local refuses any other host) and runs its servers on this machine, so the files it reads to measure a column, apply a rename to disk or find a project root are on this disk. Each call is allowlisted with that reason. --- .github/scripts/check-host-boundary.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/scripts/check-host-boundary.sh b/.github/scripts/check-host-boundary.sh index f7adaf4f..b68bdfab 100755 --- a/.github/scripts/check-host-boundary.sh +++ b/.github/scripts/check-host-boundary.sh @@ -104,6 +104,23 @@ src/ui/code_editor.rs|std::fs::metadata # that copy goes through `Host`, and the one `std::fs::copy` that touches a # destination sits inside a branch already gated on `host.id().is_local()`. src/ui/file_copy.rs|std::fs:: + +# The code editor's language servers run on this machine and only ever take a +# local buffer: `OpenFile::local` refuses anything whose host is not local, so +# every path `ui::lsp` holds is on this disk. It reads files a server points +# into that are not open (to measure a column, to apply a rename to disk), +# looks for project markers above a file (`Cargo.toml`, `package.json`, …), +# and checks a server binary is executable. A remote workspace gets language +# servers by running them over there, not by routing these reads. +src/ui/lsp/editor.rs|std::fs::read_to_string +src/ui/lsp/locations.rs|std::fs::read_to_string +src/ui/lsp/mod.rs|std::fs::read_to_string +src/ui/lsp/servers.rs|std::fs::metadata +src/ui/lsp/servers.rs|std::fs::read_to_string +# Its tests live in their own file (not a trailing `mod tests`), writing +# fixtures into a local temp dir. +src/ui/lsp/tests.rs|std::fs::write +src/ui/lsp/tests.rs|.canonicalize() EOF )