inspector/scripts/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall f99402918d feat: queue concurrent local:gate runs on a machine-wide lease (#2339)
`npm run local:gate` now runs its stages under `scripts/gate-lease.mjs`, a
`proper-lockfile` lease under `os.tmpdir()` (or `$XDG_RUNTIME_DIR`), so a gate
started in a second worktree waits for the first instead of overlapping it.

Measured on v2/main @ aa56551b: a quiet gate is 257s green; two started
together had one fail at 279s (`smoke:web:chromium` found port 6298 held by
the other gate's smoke) and the survivor take 338s. Under the lease, three
gates started within seconds ran back to back (259s, then 262s, then the
third), each green with zero timeouts.

The lease grants rather than polls a threshold, so two waiters cannot
deadlock on each other; a holder that dies stops refreshing and is taken over
after 30s; a signal to the wrapper stops the whole process group, releases,
and exits 128+signal; the wait names the holder's pid and worktree and gives
up after 45 minutes. `INSPECTOR_SKIP_GATE_LEASE=1` bypasses it. A lock that
cannot be created runs the gate unleased with a warning.

`scriptChainRuns` looks through the wrapper (and only it) so the existing
vouches about what `local:gate` runs keep reading the real chain.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-09-12 22:00:33 -04:00
..
announced-child.mjs chore(scripts): rename the local pre-push gate off ci, and guard it out of CI (#2146) 2026-08-26 23:56:34 -04:00
announced-child.test.mjs chore(scripts): rename the local pre-push gate off ci, and guard it out of CI (#2146) 2026-08-26 23:56:34 -04:00
browser-timeouts.mjs fix: address Copilot review round 4 2026-09-12 14:21:54 -04:00
browser-timeouts.test.mjs fix: address Copilot review round 1 on #2323 2026-09-12 10:46:28 -04:00
child-cleanup.mjs fix(scripts): await the pack:verify web child's exit before removing its work dir (#1895) 2026-08-01 19:50:00 -04:00
child-cleanup.test.mjs fix(scripts): await the pack:verify web child's exit before removing its work dir (#1895) 2026-08-01 19:50:00 -04:00
claude-cli.mjs chore: address Copilot review round 17 2026-08-29 04:54:04 -04:00
claude-cli.test.mjs chore: address Copilot review round 7 (Windows .cmd shims) 2026-08-29 02:32:30 -04:00
deep-link-connect.mjs chore(web): connected-flow smoke for the Tools, Resources and Prompts tabs 2026-08-26 23:09:44 -04:00
deep-link-connect.test.mjs chore(web): connected-flow smoke for the Tools, Resources and Prompts tabs 2026-08-26 23:09:44 -04:00
ensure-test-servers.mjs docs(scripts): correct the deleted-source caveat — it is silent, not loud 2026-08-25 01:37:40 -04:00
ensure-test-servers.test.mjs fix(scripts): pin the tsbuildinfo inside build/, assert on cache hits 2026-08-25 01:11:10 -04:00
headless-browser.mjs fix(smoke): assert the requested engine is the one launched; fix the remedy 2026-08-26 09:33:21 -04:00
headless-browser.test.mjs fix(smoke): assert the requested engine is the one launched; fix the remedy 2026-08-26 09:33:21 -04:00
mcp-app-flow.mjs chore(web): connected-flow smoke for the Tools, Resources and Prompts tabs 2026-08-26 23:09:44 -04:00
mcp-app-flow.test.mjs Merge branch 'v2/main' into v2/chore/2003-pack-verify-app-render 2026-08-24 09:05:53 -04:00
npm-scripts.mjs feat: queue concurrent local:gate runs on a machine-wide lease (#2339) 2026-09-12 22:00:33 -04:00
npm-scripts.test.mjs fix: address Copilot review round 6 2026-09-12 20:40:44 -04:00
prod-web-server.mjs test(smoke): cover loadBrowser's failure branches; fix a stale helper comment 2026-08-25 22:42:06 -04:00
prod-web-server.test.mjs fix(smoke): pin the teardown ordering, and correct a docblock the test refuted 2026-08-11 15:17:56 -04:00
pty.mjs fix(scripts): address Copilot review round 2 on #2147 2026-08-26 21:36:40 -04:00
pty.test.mjs fix(scripts): address Copilot review round 2 on #2147 2026-08-26 21:36:40 -04:00
render-smoke.mjs fix(scripts): make the test stubs drain, and the raw-mode guard testable (#2147) 2026-08-26 22:13:35 -04:00
render-smoke.test.mjs test(scripts): anchor the render-smoke overlap paint to the parent's clock 2026-08-27 23:51:36 -04:00
resolve-node-bin.mjs fix(scripts): keep the resolver local, complete the cmd.exe quoting 2026-08-17 00:18:40 -04:00
resolve-node-bin.test.mjs fix(scripts): keep the resolver local, complete the cmd.exe quoting 2026-08-17 00:18:40 -04:00
skill-manifest.mjs feat(skills): measure a skill reached from another skill (#2204) 2026-09-04 19:07:26 -04:00
skill-manifest.test.mjs feat(skills): measure a skill reached from another skill (#2204) 2026-09-04 19:07:26 -04:00
tsc-program.mjs fix(scripts): validate the bin name and that its file exists 2026-08-16 23:43:24 -04:00
tsc-program.test.mjs chore(scripts): compare only the copies a program actually met 2026-08-16 12:35:38 -04:00
win-shell-args.mjs fix(scripts): keep the resolver local, complete the cmd.exe quoting 2026-08-17 00:18:40 -04:00
win-shell-args.test.mjs fix(scripts): keep the resolver local, complete the cmd.exe quoting 2026-08-17 00:18:40 -04:00
workflow-gate.mjs chore: run each client's test suite once in local:gate, not twice (#2341) 2026-09-12 19:53:08 -04:00
workflow-gate.test.mjs feat: queue concurrent local:gate runs on a machine-wide lease (#2339) 2026-09-12 22:00:33 -04:00