Repository navigation
fix(cloud-agent-next): classify attach git failures as workspace setup - #6646
Merged
Merged
Conversation
Optimize failure handling for the user's experience: do not fail on transient conditions, fail fast with a specific reason when progress is impossible, never hang silently, and resume promptly when input arrives.
Carry the git workspace failure subtype from the wrapper attach rejection through the control protocol and the session message proofs, then classify it as workspace_setup_failed instead of wrapper_start_failed/runtime_startup. The live attach proof is authoritative; the retired proof is only a fallback when no live subtype remains, so a current subtype-less rejection never inherits an older attempt's git subtype.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental change gates attach-proof rejection marking to the attach phase and adds a regression test, resolving the prior warning; no new issues found in the changed code. Files Reviewed (2 files)
Previous Review Summary (commit e901aa1)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit e901aa1)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryOne over-broad guard in Overview
Issue Details (click to expand)WARNING
Files Reviewed (12 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
A confirmed prompt rejection no longer stamps rejectionReceived on a successfully completed attach proof. That stamp made a later attach attempt for the same message skip incrementDeliveryFailure and retry until the deadline instead of exhausting at ATTACH_FAILURE_LIMIT.
…type # Conflicts: # services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
pandemicsyn
approved these changes
Sep 23, 2026
This was referenced Sep 24, 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.
Summary
An attach rejection caused by a git clone/checkout failure was classified as
wrapper_start_failed / runtime_startup, even though the runtime had started andonly workspace setup failed. This mislabels a platform/user workspace problem as a
runtime startup problem.
(
git_clone_timeout,git_rate_limited,git_authentication_failed, ...).ControlRequestError, thesession-operation result, the attach proof, and the session message queue.
classifyControlPlaneFailuremaps a workspace subtype toworkspace_setup_failed, and the queue report's responsibility/reason come fromthe existing subtype mapping.
fallback when no live subtype remains, so a current subtype-less rejection never
inherits an older attempt's git subtype.
The field is optional and additive: an unrecognized subtype from a newer wrapper
degrades to absent instead of failing the response parse.
Verification
No manual tests were run. This change is covered by automated tests only:
vitest run src/sandbox-session/session-message-queue.test.ts src/telemetry/control-plane-failure-fence.test.ts— 360 passed.bun test src/control/apply-attach.test.ts— 64 passed.pnpm -C services/cloud-agent-next run typecheck— pass.pnpm -C services/cloud-agent-next run lint— 0 errors/warnings.pnpm -C services/cloud-agent-next run format:check— clean.Unrelated pre-existing flaky failure observed in
wrapper/src/control/worktree-runtime.test.ts("terminates a startup timeout ...", ENOENT on the child pid file, timing based); it
does not touch this change.
Visual Changes
N/A
Reviewer Notes
attach_exhaustedfailures.mapping, not from the classifier, so the test can fail on a regression.