- validateRemoteUrl checks the literal scheme prefix git will receive and refuses %/backslash in the authority (WHATWG normalises https:/host and percent-escapes that git reads differently); route test for EBADURL. - Parent-session scrub also drops AI_AGENT, and GIT_EDITOR when it is Claude Code's `true`. - canonicalCwd resolves a not-yet-existing path through its deepest existing ancestor, so a symlinked parent still yields one lane. - Note the clock-step ceiling on liveServers' boot-time filter. - Docs/header wording: the Active runs count is lane-scoped.
This commit is contained in:
+11
-4
@@ -171,10 +171,17 @@ function canonicalCwd(cwd) {
|
||||
// A relative path must stay relative, so createLane still refuses it.
|
||||
if (!cwd.startsWith("/")) return cwd;
|
||||
const trimmed = cwd.replace(/\/+$/, "");
|
||||
try {
|
||||
return require("node:fs").realpathSync.native(trimmed);
|
||||
} catch {
|
||||
return trimmed;
|
||||
// A path that does not exist yet resolves through its deepest existing
|
||||
// ancestor, so /link/new and /real/new still name the same lane.
|
||||
const path = require("node:path");
|
||||
const tail = [];
|
||||
for (let dir = trimmed; ; dir = path.dirname(dir)) {
|
||||
try {
|
||||
return path.join(require("node:fs").realpathSync.native(dir || "/"), ...tail);
|
||||
} catch {
|
||||
if (dir === "/" || !dir) return trimmed;
|
||||
tail.unshift(path.basename(dir));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user