Skip to content

fix(runs): every PR run re-establishes its checkout inside the retryable step - #130

Merged
debuggingfuture merged 1 commit into
mainfrom
fix/every-run-rechecks-its-checkout
Aug 15, 2026
Merged

fix(runs): every PR run re-establishes its checkout inside the retryable step#130
debuggingfuture merged 1 commit into
mainfrom
fix/every-run-rechecks-its-checkout

Conversation

@debuggingfuture

Copy link
Copy Markdown
Member

Problem & Insight

#128 gave offload-test's staged path a checkout probe and deliberately left the single-exec runs alone — "its contract is pinned byte for byte, and its exposure is one step rather than five".

That reasoning was wrong, and the evidence arrived within the hour. A consumer's check posted this as a red verdict on a 40-second run:

ExecFailed: exec failed (exit -1): working directory '/workspace/<repo>' was missing
at exec time — the checkout did not survive to this step (container recycled).
stderr: Failed to change directory to '/workspace/<repo>'

All three platform retries were spent re-running the command in the same absent directory. Exposure is not "one step": a container can be recycled between any two durable steps, and checkout is a step earlier than every exec by construction. A single-exec run has exactly the same gap as a staged one — it just has fewer chances to notice.

Take

The probe becomes a primitive — ensureWorkspace beside workspace — and check, oxlint and offload-test all call it inside the step that retries. That placement is the whole point: the rebuild has to be part of what a retry re-runs, or the retry's precondition is the thing the failure destroyed.

Key actions

  • check.test.ts pins the recovery: probe answers non-zero → two clones, command still runs, run goes green
  • offload-test.test.ts keeps its equivalent case, now against the primitive
  • Exec-list assertions in all three suites updated for the probe
  • Full suite green — 2242 tests, typecheck, oxlint

…ble step

#128 gave `offload-test`'s staged path a checkout probe and deliberately left
the single-exec runs alone — their contract was pinned and their exposure was one
step. The evidence disagreed within the hour: `check` posted

    ExecFailed: exec failed (exit -1): working directory '/workspace/<repo>' was
    missing at exec time — the checkout did not survive to this step (container
    recycled)

as a red verdict on a 40-second run, with all three platform retries spent
re-running the command in the same absent directory.

So the probe becomes a primitive — `ensureWorkspace` beside `workspace` — and
`check`, `oxlint` and `offload-test` all call it inside the step that retries.
One `test -d` on the happy path; a clone and an install on a recycled container,
which is what the step needed anyway. `offload-test`'s local copy is deleted in
favour of the shared one.

Exposure is not one step: a container can be recycled between ANY two durable
steps, and the checkout is a step earlier than every exec by construction.

@flaredispatch-fractalboxdev flaredispatch-fractalboxdev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI code review — ✅ Approve

Risk tier: full · 0 critical · 0 warnings · 0 suggestions

Reviewers: security ⚠️ · performance ⚠️ · code-quality ⚠️ · documentation ⚠️ · release-management ⚠️ · compliance 0 · agents-md 0

No findings.

📋 View full logs & reviewed diff ↗

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