fix: harden orchestration performance and recovery - #3141
Merged
Conversation
This was referenced Jul 16, 2026
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.
What changed
deterministic smoke-only exit after packaged readiness.
across CI runners without weakening production resource admission.
Why
The runtime could accumulate excessive retained orchestration state, repeatedly start short-lived Git/helper containers, lose durable workspace ownership across restarts, and encounter branch/worktree races during QA or merge finalization. CI repair could also charge one real provider attempt multiple times while replaying host publication, immediately re-lock a task after an operator reset, or stall a sprint-level repair on a legacy database constraint. Together these gaps caused slow invocation startup, unnecessary CPU/memory pressure, JavaScript heap exhaustion under very large DAGs, and occasional failed or stalled continuations.
User and developer impact
Validation
pnpm run cipassed before the final focused CI-repair follow-up:pnpm run lintpassed.pnpm run test:backendpassed: 467 files, 6,146 tests passed, 12 skipped.pnpm run buildpassed.pnpm run check:docs-webandgit diff --checkpassed.ENOENT; the parent is recreated and the same acquisition succeeds.pnpm run test:e2e: 74/74 Playwright tests passed.pnpm run lint,pnpm run build,pnpm run check:docs-web, andgit diff --checkpassed.its smoke-only quit request was deferred; the probe now exits directly with code zero while
production shutdown continues to drain the embedded runtime.
The 400-task extreme DAG rerun was stopped at the user's request to commit and publish.
Risk and rollback
This is a broad orchestration/runtime change touching durable continuation state, Git/worktree handling, Docker lifecycle, guardrail persistence, realtime projections, dashboard status rendering, and native release-candidate validation. Roll back by reverting commits
d02a674d2a65d1c09ca382e52dfe15a88b9ac3ea,1b29091e7f8884667b8496b221407cca5835473a, anda2fa33b524d591c390f0d716e2181de7fe47270c.Before rollback, pause or settle active hosted QA/planning continuations. Older runtimes may not understand newly persisted continuation state such as
awaiting_provider, so reverting while active work is in flight can require manual reconciliation.