Repository navigation
Conversation
thenom
requested review from
JWThewes,
eipasteur and
jeromevdl
as code owners
November 13, 2026 13:50
|
Automatically computed PR review signals (deterministic) Complexity and branch coverage help focus review on functions and their tests; these signals are advisory. Complexity and test coverage8 changed JS/TS files analyzed · 8 flagged functions.
🟢 Improving · 🟠 Needs attention · 🔴 High risk · 🟣 Highest risk — = unavailable · n/a = not applicable · * = incomplete tests Isobar repository mapThis fixed repository map locates changed files and their possible reach through static links. Signals
Legend
|
…ge straight away When a stage fails in a parallel unit lane the lane ends, and the section asks retry, skip or abort only once every other lane has settled. With PR per unit that includes lanes waiting for a person to review and merge, so a failed unit can wait days for a retry while its dependents stay blocked. With lane_failure_policy = "ask" (default "halt", unchanged), a failed lane stage opens a gate owned by that unit with retry and leave-failed: - The gate parks only its unit. META stays RUNNING, so sibling lanes keep running and pushing; the lane releases its concurrency permit and runtime session while it waits, and dependents wait on it. - Retry runs the stage again on the same branch, telling the agent why the last attempt failed and passing on any guidance in the answer. After a rejected push, the engine first undoes the unpushed commits and keeps their changes in the working tree, so the retry can remove what the remote rejected. A repeat failure asks again. - Leave-failed ends the lane as before, so halt-and-ask still applies. - The policy is read in the existing load-meta checkpoint, so a run in progress keeps halting; no steps are added or reordered for it.
thenom
force-pushed
the
feat/lane-failure-retry-761
branch
from
November 18, 2026 17:56
07e1b85 to
1d97e05
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Closes #761
Problem
When a stage fails in a parallel unit lane, the lane ends and the section asks retry, skip or abort only once every other lane in the round has settled. With PR per unit that includes lanes waiting for a person to review and merge, so a failed unit can wait days for a retry while its dependents stay blocked.
Solution
A new opt-in Terraform variable,
lane_failure_policy("halt"by default, which leaves behaviour unchanged, or"ask"), passed to the v2 orchestrator asLANE_FAILURE_POLICY. With"ask", a failed lane stage opens a lane gate owned by the unit, with optionsretryandleave-failed:createHumanTaskwrites it in the same transaction as the run-ownership check on META, but leaves META'sstatusandpendingHumanTaskIdalone, so sibling lanes stayRUNNING(the credential broker serves onlyCREATEDandRUNNINGexecutions). It is unparked throughunparkGate's lane path, as lane questions are. The row carrieslaneGate: true, and the intents API'sresumeOwedtreats an answered, unconsumed lane gate of the current run as owed, so "Resume run" still works after a failed callback send.FAILEDwith ablockedReason; dependents wait on the lane rather than being blocked.-a<n>, as halt-and-ask rounds use-r<n>). The agent is told why the last attempt failed, with the remote's fuller output for a rejected push, and given any guidance in the answer. After a rejected push the engine first undoes the unpushed commits (discardUnpushedCommits), keeping their changes in the working tree, so the retry can remove what the remote rejected. A repeat failure asks again.HALT_REASK_LIMIT, then treated as leave-failed. A superseded gate retires the run.v2.unit.retryandv2.unit.retry_declined.load-metacheckpoint, ascompletionPolicyVersionandlaneWaitPolicyVersionare. A history recorded before the change has no field and keeps halting, so no steps are added or reordered for runs in progress. Withhaltthe step sequence is unchanged.docs/concepts/execution.md.Known limits: only stage failures in the lane's stage loop ask; failures in init-lane, merge-back, reconcile, unit PR creation or conflict resolution still end the lane. The gate shows with the intent's other pending gates, not on the unit's card.
This and #764 both add a block to
run-stage.jsbefore the CLI starts, so whichever merges second needs a small rebase.User experience
With the setting on, a failed unit shows "Waiting for a decision: retry this stage or leave it failed", and a gate for that unit appears straight away while the other units keep running. The gate card's options are labelled for a lane retry.
Testing
git-engine(undoing unpushed commits) andrun-stage(retry prompt and undo).yjs-serverfiles, which fail to importyjsfrom the root locally, as on cleanmain. Frontend:tsc -b --noEmitand the full suite (1321 tests).npm run lint(warnings only),npm run format:check,npm run dep:check, the pre-commit hook.fmt -check,validate -no-testswith the CI backend override, and the seven test suites as in CI exceptlambda-packaging.