forked from gsd-build/gsd-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Wire structured error propagation through UnitResult #6
Copy link
Copy link
Open
Description
Problem
UnitResult has status: "error" but nothing ever produces it — dead code. All error context (provider errors, timeouts, idle watchdog kills) is discarded at the resolve boundary:
resolveAgentEnd(event)always produces{ status: "completed", event }resolveAgentEndCancelled()always produces{ status: "cancelled" }with zero context
The journal's error classification relies on regex-matching message content — fragile and unreliable across providers.
Solution
Add typed ErrorContext to UnitResult and wire it through the 4 call sites that discard error information. Replace regex heuristics in stuck detection and journal emit with structured field access.
Implementation
PR: gsd-build#2612
Files changed
auto/types.ts—ErrorContextinterface + field onUnitResultauto/resolve.ts—resolveAgentEndCancelled(errorContext?)auto-timers.ts— idle/hard timeout error contextauto/run-unit.ts— session error/timeout contextauto/phases.ts— structured classification + journal enrichment- 3 test files updated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels