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
ccantynzcommented 20d ago

Two failures the suite has been reporting, both real, neither reaching CI.

1. Bun.spawnSync with no deadline in a route handler

src/routes/merge-queue.tsx:1009. spawnSync blocks the event loop — not just this request, the whole server — for as long as git takes. merge-base --is-ancestor is normally instant, but it walks history and has no upper bound on a corrupt or enormous object store.

Now timeout: 15_000, killSignal: "SIGKILL".

On timeout the child is killed and exitCode is non-zero, routing to mergeWithAutoResolve — the conservative branch that treats ancestry as unproven. Failing that way is the correct direction: the INCIDENT 2026-08-08 guard immediately above exists to stop a stale branch REPLACING base, so "could not prove base is an ancestor" must never be read as "it is".

2. CLAUDE.md still described the dormant deploy path ambiguously

docs-rule.test.ts pins this wording because, as its own comment records, the drift "was corrected once and was still wrong afterwards". The section now says Not the deploy trigger and does not run, and names why it stays dormant — SELF_HOST_REPO is not set where the container can read it (/opt/gluecron/.env), which is the detail that made it look armed.

That file is what every agent session reads first, so a stale claim there isn't a docs nit — it is the map. This session began by trusting its mirroring description and finding the mechanism dead.

Why CI was green while these failed

Both src/lib/selfcheck/subprocess.test.ts and docs-rule.test.ts are in scripts/ci-test-excludes.txt (issue #213). They're excluded for subprocess-PATH reasons unrelated to what they assert.

Verification

before after
selfcheck medium 5 4
selfcheck score 82 83
docs-rule + subprocess 3 fail 22 pass, 0 fail

merge-queue: 5 pass. tsc --noEmit clean.

ccantynzAI Reviewcommented 20d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

gluecron[bot]🤖 botAI Reviewcommented 20d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts