intake(lote-A): import upstream PR #1844#4
Open
nsalvacao wants to merge 6 commits intobaseline/develop-sync-2026-02-17from
Open
intake(lote-A): import upstream PR #1844#4nsalvacao wants to merge 6 commits intobaseline/develop-sync-2026-02-17from
nsalvacao wants to merge 6 commits intobaseline/develop-sync-2026-02-17from
Conversation
When spec creation crashes, the task gets stuck in "planning" state forever because the backend never emits PLANNING_FAILED to the frontend XState machine. Clicking Resume then also crashes because the resume logic transitions to "coding" state, but there are no subtasks yet. Root causes and fixes: 1. Backend orchestrator (orchestrator.py): - Wrap run() in try/except to emit PLANNING_FAILED on unhandled exceptions - Add _emit_planning_failed() calls at every early return path - Fix spec_dir tracking after rename_spec_dir_from_requirements() 2. XState machine (task-machine.ts): - Add PLANNING_STARTED transitions from error and human_review states - This allows tasks that crashed during planning to resume back to planning 3. Execution handlers (execution-handlers.ts): - Detect error state with 0 subtasks and send PLANNING_STARTED (not USER_RESUMED) - Check actual implementation_plan.json for subtasks instead of task.subtasks.length - Handles both with-actor and without-actor (app restart) code paths Closes AndyMik90#1562 Co-Authored-By: Claude Opus 4.6 <[email protected]>
…name, empty except (AndyMik90#1562) - Move planHasSubtasks calculation (reads implementation_plan.json) before XState handling so the crash-during-planning check uses the reliable file-based check instead of task.subtasks.length - Change rename_spec_dir_from_requirements to return the new Path directly instead of a bool, eliminating brittle directory scanning in orchestrator - Add descriptive comment to empty except clause to satisfy code scanning Co-Authored-By: Claude Opus 4.6 <[email protected]>
…hange (AndyMik90#1562) Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Update phase_executor.spec_dir and spec_validator after directory rename so subsequent phases don't use stale paths (critical bug flagged by sentry, coderabbitai, and Auto Claude review) - Fix TASK_UPDATE_STATUS handler to use file-based plan check instead of unreliable task.subtasks.length (same AndyMik90#1562 bug fixed in TASK_START) - Replace manual subtask counting with existing checkSubtasksCompletion helper - Use safeReadFileSync instead of existsSync+readFileSync (TOCTOU fix) - Add self.validator update to backward-compat _rename_spec_dir_from_requirements Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ake/lote-A-pr-1844
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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.
Upstream intake PR for isolated review.
intake/lote-A-pr-1844baseline/develop-sync-2026-02-17Checklist: