[Improve] Structured boot error codes and Docker spawn preflight - #622
Merged
Conversation
Boot/spawn failures now persist a machine-readable error_code on task_runs (additive column). The controller raises DockerBootError at the sites that know the category — a new preflight (daemon reachable, worker image present with explicit pull) plus the release-archive and worker-start assertions — with a regex fallback classifier as the single source of truth for untyped docker failures. The web startup UI maps the persisted code to copy directly, keeping text inference only for runs that predate codes, and logs a drift warning when a docker failure matches no category. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
No code issues found. See task
Reviewed d002a8c |
Review finding: `in` walks the prototype chain, so a junk persisted code like "toString" resolved to a function and crashed the failure UI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What changed
Follow-up to #544, which mapped Docker boot failures to friendly copy by pattern-matching error prose. This PR makes boot failures first-class instead:
error_codeontask_runs(additive column): the controller raisesDockerBootErrorat the sites that know the category (preflight, release-archive checks, worker start assertions withfetch failedlog classification), with a controller-side regex classifier as fallback for untyped docker failures.Why this change was made
#544 explained failures after the fact by reverse-engineering prose with seven regexes — brittle against Docker error-string drift, and invisible in telemetry. The controller knows which failure happened at throw time; persisting that category makes failure classes countable and the UI mapping exact. Preflight converts boot-then-fail into fail-fast for the cases operators hit most (daemon down, missing image).
Impact
task_runs.error_code) for support and telemetry.Validation
pnpm lint:fast,pnpm check-types:fast,pnpm knipall green🤖 Generated with Claude Code