feat(controller): add typed runtime failure reasons#151
Conversation
0285879 to
b60884a
Compare
|
Rebuilt from scratch on current main: RuntimeFailureReason contract (16 values, registered in validate-shared-contracts), a conservative classifier with 11 tests, and reason/code threaded through LaunchResult → waitForReady → setActiveRecipe/ensureActive → publishLaunchProgress → LaunchProgressData (with equality comparison). Scope deliberately excludes HttpStatus — the Effect v4 TaggedErrorClass migration made that a separate conversation. Crash-loop-blocked launches carry code "crash-loop-blocked". check:quality green on push. |
b60884a to
87e5eea
Compare
|
The concept still holds up post-launch-failure-budget — the budget says how often a launch fails, this says why, and the optional fields keep it backward-compatible. But main has moved ~240 commits: |
Summary
RuntimeFailureReasontype.reason/codemetadata to launch/switch results and launch-progress SSE payloads while preserving rawmessage/detailstrings./launch/:recipeIdand chat-proxy 503 errors where available.main; adapted the frontend launch-progress type/equality changes to the current consolidated files.Verification
bun test tests/controller/integration/launch-failure-classifier.test.ts tests/controller/integration/observability-contracts.test.ts— 16 pass, 0 failnpm --prefix controller run typechecknpm --prefix controller run lintKnown upstream check
npm run check:contractscurrently fails on currentmainwith duplicateAggregatedSessionexports infrontend/src/app/api/agent/sessions/all/route.tsandfrontend/src/features/agent/session-contracts.ts; this PR does not touch those files.Notes
reason/codefields are optional; existing raw error strings remain intact for compatibility.