Keep workspace Git refreshes responsive at scale (#2979)

* fix(server): prevent Git watcher fanout stalls

Repository metadata events were refreshing every observed worktree, multiplying Git process submissions and starving workspace create and archive requests behind observation work. Route metadata to the workspaces that depend on it, preserve conservative shared-ref refreshes, and admit interactive lifecycle operations ahead of queued background reads.

* fix(server): preserve Git metadata dependencies
This commit is contained in:
Mohamed Boudra
2026-08-07 18:50:43 +08:00
committed by GitHub
parent a5184fd08a
commit a06e4d60e9
14 changed files with 1569 additions and 57 deletions
+7
View File
@@ -42,6 +42,13 @@ describe("path equivalence", () => {
);
});
test("preserves the casing of Windows relative suffixes", () => {
expect(getRealpathAwareRelativePath("C:\\Repo\\.git", "c:\\repo\\.git\\HEAD")).toBe("HEAD");
expect(
getRealpathAwareRelativePath("C:\\Repo\\.git", "c:\\repo\\.git\\refs\\heads\\FeatureCase"),
).toBe("refs\\heads\\FeatureCase");
});
test.skipIf(process.platform === "win32")(
"derives the contained suffix from a realpath-equivalent root",
() => {