Commit b70b530
committed
fix: surface early startup failures to clients via Initializing status
The P0 performance optimization (42s -> <1s HTTP response) introduced
silent failures: start_attempt() runs in tokio::spawn() with errors
only logged, returning is_attempt_running=true before knowing if the
attempt actually started.
This fix:
- Add `Initializing` status to ExecutionProcessStatus enum
- Create ExecutionProcess with Initializing status BEFORE spawning
- Transition to Running on success, Failed on error
- SSE automatically pushes status changes to clients
Also fixes logging:
- main.rs: Log success/failure of PATH cache warming (not just "warmed")
- shell.rs: Restore debug/warn logging for shell failures/timeouts
forge-core files changed:
- crates/db/src/models/execution_process.rs: New status + helper methods
- crates/server/src/routes/tasks.rs: Create EP early
- crates/server/src/routes/task_attempts.rs: Same pattern
- crates/services/src/services/container.rs: New start_attempt_with_process()
- crates/server/src/main.rs: Better PATH warming logs
- crates/utils/src/shell.rs: Restore shell error logging1 parent af3fdad commit b70b530
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
0 commit comments