Skip to content

Stop the Slack ingress env-gate test racing the relaunch sweep (CL-7453) - #649

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7453-slack-ingress-flake
Sep 5, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-7453-slack-ingress-flake

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Fixes CL-7453

Proves the leak behind CL-7453's flake directly: after hub.close(),
no further relaunch-sweep pass should fire (and log against an
already-closed db pool). Also stops slack-tag-mount.test.ts's three
env-gate cases from leaving every prior test's hub — and its
background loops — running until afterAll, which piled onto the same
race.
hub.close() stopped every other background loop (workflow scheduler,
credential-expiry sweep, inbox-unsnooze sweep, bench provisioner,
sidecar-allocation reconciliation) but never cancelled the relaunch
sweep's timer, so it kept firing on its [0, 2s, 5s, 15s, 45s] schedule
for the rest of the bun test process — including against a db pool
close() had already shut down. A suite that boots several hubs back
to back (apps/hub/test/slack-tag-mount.test.ts's env-gate suite) built
up these leaked loops, contending with later tests' own boots for
Postgres connections and surfacing as `chat·relaunch-sweep: relaunch
sweep pass failed: Failed query: select ... from chat.workbench_launch`
plus an intermittent test timeout.
@linear-code

linear-code Bot commented Sep 5, 2026

Copy link
Copy Markdown

CL-7453

@TheGreatAxios
TheGreatAxios merged commit 8d1b5b9 into main Sep 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant