Repository navigation
A new worktree links its deps and Games, and the daemon restarts Vite when the games world changes - #2322
Merged
Conversation
… when the games world changes
Noisemaker111
enabled auto-merge
October 24, 2026 03:18
Noisemaker111
added a commit
that referenced
this pull request
Oct 24, 2026
pr:sweep counted every `statusCheckRollup` row, so an attempt from a superseded push could name a red on a PR that was green. - `scripts/pr-sweep.ts` judges each armed PR's rollup through `judgeChecks`: one row per check name, on the head commit, so an older attempt or a same-commit cancelled duplicate cannot read as red. - Three verdicts, one line per PR: `RED` naming each real failing check with its URL, `wait` with `still running: N of M (run <id>)`, or `ok`. A check cancelled on every attempt is a re-run rather than a red, because nothing is broken. - Same job as before: one `gh pr list`, non-zero exit while any armed PR is really red. - `package.json`: the script is now `pr:sweep`, the name `AGENTS.md` and the script's own usage line already used; `bun run pr:sweep` failed with "Script not found" before this. Root cause: the sweep trusted a flat list of attempts where each check name can appear once per workflow run, so the last attempt to finish was not necessarily the one that decided. Verification: - `bun test scripts/pr-sweep.test.ts` - pass, 12 tests: #2330's real 42-row, 21-name rollup reads clean; a failing current check is RED and named; #2322's cancelled-then-skipped jobs ask for a re-run; a failure from a superseded push says nothing. - `bun run verify:fast` - pass - `bun run check-types` - pass, 28 stages - `bun run pr:sweep` against the live repo - pass, prints `1 open PR(s), 0 armed` Phantom check over the 102 open and last-100 merged PRs, old logic vs new: old named 4 reds, 3 of them phantom (#2287, #2252, #2235 named `quick`/`ci` failure while the newer attempt on the same PR passed and it merged), and 10 green merged PRs read as `wait` from cancelled rows alone. #2330's real rollup now prints `ok`; #2317 (open) stays RED on `types`, `test (g)` and `ci`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fresh worktrees created by
claude --worktreeorgit worktree addhad no node_modules and noGameslink, and the shoot daemon kept a Vite server whose game list was frozen before that link existed.Root cause: readiness lived only in
agent:worktree, and only for the tree it created.ensure-readyandagent:bootstrapinstalled packages but never linkedGames, so a bare tree reported "ready" and then rejected every game.scripts/agent-worktree.ts: one readiness path (ensureWorktreeReady) shared by the command and any tree; finds the main checkout from the worktree's.gitfile, links deps,Gamesand dev assets, repairs dangling junctions, prints a one-line summary with the whole command's wall time.scripts/ensure-ready.ts: calls that path before the install check, so every test/build/smoke run repairs a bare tree; no-op and silent when already ready.scripts/shoot-daemon.ts: daemon state records the games world (link target, link mtime, games HEAD, game ids).ensureDaemonTargetretires the target's Vite server when that world changed and boots it against the new one; an unchanged world reuses the server. Fingerprint costs 0.5-1.4 ms per shot (measured, 2 and 15 games).Verification
bun test scripts/agent-worktree.test.ts scripts/shoot-daemon.test.ts scripts/ensure-ready.test.ts- pass (38)bun run verify:fast- pass;bun run check-types- 28 stages passbun run agent:worktree -- prove-readyon a real fresh worktree: 20.7 s cold (15.7 s of itbun install, locks differed from the main checkout), second call 0.7 s with "already set up", deps and Games present; worktree deleted after the runGames-> world-a (beatlane), the dev server's game glob served beatlane only; repointed the link to world-b (beatlane + bogeylab), the next shot loggedGames ... -> ...; +bogeylab — restarting the dev server against itand the glob then served bogeylab; a third shot reused the server without a restartStill true: linking needs the main checkout on the same lockfile, so when
origin/betahas moved each worktree pays onebun install(~16 s, bun's store makes it 411 packages in ~10-16 s, not minutes).