Skip to content

Remove startup and wake races from the local E2E script#16

Merged
blakebauman merged 1 commit into
mainfrom
fix/e2e-local-startup-race
Jul 10, 2026
Merged

Remove startup and wake races from the local E2E script#16
blakebauman merged 1 commit into
mainfrom
fix/e2e-local-startup-race

Conversation

@blakebauman

Copy link
Copy Markdown
Owner

Summary

e2e-local was flaky on CI (failed on the #12/#15 merges to main, passed on identical code minutes earlier). Two races in scripts/e2e-local.sh:

  1. Startup: a fixed sleep 1 after launching fold-control, then cat $FOLD_HOME/system-token under set -e. On a slow runner the control plane takes >1s to write its token files, so the script died before the daemons started (this is exactly what the failing CI logs show — the "control plane listening" line appears after the cat error). Now polls for the token file for up to 30s.
  2. Wake: the wake-on-request check was a single unretried curl. The first request after suspend triggers the snapshot restore, and a cold docker restore can outlast one proxy forward — observed failing ~1 in 2 runs locally. Now retries for up to 20s.

Script logic only — no product code changes.

Testing

  • make e2e-local passes locally end-to-end (deploy → curl → scale-to-zero → wake), twice in a row with the fix (was 1-for-2 before).
  • bash -n clean.

🤖 Generated with Claude Code

e2e-local intermittently failed on CI: the script slept a fixed 1s
after launching fold-control and then read the token files under
set -e, so on a slow runner the control plane hadn't written them yet
and the run died before the daemons even started. Poll for the token
file (up to 30s) instead.

Also retry the wake-on-request check for up to 20s: the first request
after suspend triggers the restore, and a cold docker restore can
outlast a single proxy forward (observed locally ~1 in 2 runs).

Verified: make e2e-local passes locally, including the full
deploy → curl → scale-to-zero → wake path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@blakebauman
blakebauman merged commit 10c52c4 into main Jul 10, 2026
2 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