2.0 KiB
2.0 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | ||
|---|---|---|---|---|---|---|---|---|
| 04-launch-failure-classification | Persist typed launch-failure reason | done | 3 |
|
plan.md | ../../specs/tasks/requirements/task-launch-failure-recovery.md |
Task 04: Persist typed launch-failure reason
Persist the typed session error with an exact row target.
-
Acceptance:
transitionLaunchFailuremapsErrInvalidBaseBranchtobase_branch_missing.- The record carries
TaskRepositoryIDfrom the lifecycle failure result. - Repository actions are absent when that identity is empty or ambiguous.
- A narrow eligibility resolver controls whether the record includes
mark_review_done. - Eligibility requires a valid terminal step and terminal relevant PR state.
- Resolver absence or error omits that action and does not block error persistence.
- The existing session and task failed-state transitions stay unchanged.
-
Verification:
cd apps/backend && go test ./internal/orchestrator/executor/... -race -
Files likely touched:
apps/backend/internal/orchestrator/executor/executor_execute.go,apps/backend/internal/orchestrator/executor/executor_execute_test.go, the narrow review-completion eligibility resolver and composition wiring. -
Dependencies: Task 01 and Task 10.
-
Parallelism: sequential.
-
Inputs: spec "Session-owned launch error" and "Failure modes".
Results
- Added typed launch-failure classification for missing base branches, unresolved defaults, and generic startup failures.
- Persisted the bounded
LastAgentErrorwith the exact task-repository ID when lifecycle identity is unambiguous, and omitted repository actions otherwise. - Added a narrow review-completion eligibility resolver. Resolver errors and missing wiring fail open without blocking error persistence.
- Preserved the existing failed-session transition and callback behavior.
- Verification:
cd apps/backend && go test ./internal/orchestrator/executor/... -racepassed with 445 tests.