CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(merge-queue,docs): an untimed spawnSync on the request path, and a deploy doc its own test called stale #5496

MergedXSccantynz wants to mergefix/untimed-spawn-and-stale-deploy-docmainopened 20d ago
2 changed files+16−4
ModifiedCLAUDE.md+5−3View fileUnifiedSplit
4848- **Deploy = push to canonical remote + wait ~60–90s.** The
4949 `gluecron-update.timer` (60s) runs `scripts/auto-update.sh`, which
5050 rebuilds on change. Watch `/admin/deploys`.
51- The `post-receive.ts``self-deploy.sh` path exists in code but **never
52 fires** in prod — do not trust it or its log. If a push hasn't shipped,
53 check `systemctl list-timers 'gluecron-*'` first.
51- **Not the deploy trigger:** the `post-receive.ts``self-deploy.sh` path
52 exists in code but **does not run** in prod — do not trust it or its log.
53 It stays dormant because `SELF_HOST_REPO` is not set where the container
54 can read it (`/opt/gluecron/.env`). If a push hasn't shipped, check
55 `systemctl list-timers 'gluecron-*'` first.
5456- **Server:** `gluecron.com``66.42.121.161` (Vultr). SSH via Tailscale:
5557 `ssh root@100.109.131.122` (node `jarvis`). App runs in Docker at
5658 `/opt/gluecron` (`docker-compose.standalone.yml`).
Modifiedsrc/routes/merge-queue.tsx+11−1View fileUnifiedSplit
10141014 `refs/heads/${pr.baseBranch}`,
10151015 `refs/heads/${pr.headBranch}`,
10161016 ],
1017 { cwd: repoDir }
1017 // `spawnSync` on a request path with no deadline blocks the event loop —
1018 // not just this request, the whole server — for as long as git takes.
1019 // `merge-base --is-ancestor` is normally instant, but it walks history,
1020 // and a corrupt or enormous object store has no upper bound.
1021 //
1022 // On timeout the child is killed and `exitCode` is non-zero, which routes
1023 // to `mergeWithAutoResolve` below — the conservative branch that treats
1024 // the ancestry as unproven. Failing that way is correct: the INCIDENT
1025 // guard above exists to stop a stale branch REPLACING base, so "could not
1026 // prove base is an ancestor" must never be read as "it is".
1027 { cwd: repoDir, timeout: 15_000, killSignal: "SIGKILL" }
10181028 );
10191029 if (ancestry.exitCode !== 0) {
10201030 const mergeResult = await mergeWithAutoResolve(
10211031
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts