fix(git,macos,runs): close the review findings on #22, #34 and #38

- 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:
2026-09-23 12:28:02 +07:00
parent 478418f602
commit 04b6b98d97
9 changed files with 61 additions and 9 deletions
+2
View File
@@ -424,6 +424,8 @@ function liveServers() {
// An entry older than this boot is a leftover whose pid may now belong to
// an unrelated process (macOS has no systemd to clean up after a reboot).
// 60 s margin for clock skew; an unparseable startedAt is kept.
// ponytail: an NTP step larger than 60 s after boot misreads a live entry
// as stale; compare against a monotonic boot id if that ever bites.
const bootedAt = Date.now() - os.uptime() * 1000 - 60_000;
return servers.filter((s) => s && isPidAlive(s.pid) && !(Date.parse(s.startedAt) < bootedAt));
} catch {