feat(gpu): surface silent GPU-operator init failures (ADR-0019) - #337
Open
jeffcrouse wants to merge 1 commit into
Open
feat(gpu): surface silent GPU-operator init failures (ADR-0019)#337jeffcrouse wants to merge 1 commit into
jeffcrouse wants to merge 1 commit into
Conversation
A GPU op whose shader/pipeline failed to initialize did `if (!pipe_) return;` — a black frame with NO log, toast, health signal, or node badge, and no way to tell a broken shader from a routing problem. (This cost hours in the grid reactive-visuals session: a custom op rendered pure black with zero feedback.) Reuse the already-wired per-node error channel (vivid_report_gpu_error → VisualNode::runtime_error → node badge) and make it loud + observable: - gpu_common.h: `report_if_no_pipeline(c, pipe, err)` — ops call it in the pipeline guard so a failed init reports the concise WGSL error EVERY frame it is down (the runtime value-inits ctx per frame; a one-shot report flickers). Plus `concise_gpu_error()` to reduce a wgpu validation dump to one line. - Sweep 14 GPU ops onto it (cosine_palette, time_machine, solids, emitter, instancer, feedback, bloom, mesh, note_type, text, vectortext, gradient, step_bars, blit_op). Ops with two pipelines (mesh/note_type/vectortext) report inline. The 6 ops that already reported (switch/image/video/mesh_render/ mesh_displace/model) are unchanged and now get the promotion for free. - frame.cpp `promote_operator_errors`: edge-trigger a node's new runtime_error to VLOG_ERR (→ auto-toast + header dot, mirroring the ADR-0016 shader-file path). Without this a broken op only showed a node badge — invisible headless. - runtime health: `errored_ops` count in the snapshot + get_health JSON; severity WARNING (not Error) since the channel also carries soft notices like Render3D's light-ceiling — it must not red-alert a whole session. Verified: a project op with intentionally-broken WGSL now yields get_health.errored_ops=1 + a promoted "operator 'X' error: <concise msg>" log (was: silent black). Full ctest 99/99; test_runtime_health covers the new errored_ops severity + JSON. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QB6eSNJE55ru3g4vsL77GT
Contributor
Production gate (core): ✅ PASS
|
jeffcrouse
enabled auto-merge (squash)
August 11, 2026 14:00
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.
Summary
A GPU op whose shader/pipeline failed to initialize did
if (!pipe_) return;— a black frame with no log, toast, health signal, or node badge, and never retried. You couldn't tell a broken shader from a routing problem (this cost hours in the grid reactive-visuals session).Fix
Reuse the already-wired per-node error channel (
vivid_report_gpu_error→VisualNode::runtime_error→ node badge) and make it loud + observable:gpu_common.h:report_if_no_pipeline(c, pipe, err)(ops call it in the pipeline guard so a failed init reports the concise WGSL error every frame it's down) +concise_gpu_error().frame.cpppromote_operator_errors: edge-trigger a newruntime_errortoVLOG_ERR→ auto-toast + header dot (mirrors the ADR-0016 shader-file path).errored_opsin the snapshot +get_healthJSON, Warning severity (not Error — the channel also carries soft notices like Render3D's light-ceiling).Verification
A project op with intentionally-broken WGSL now yields
get_health.errored_ops=1+ a promotedoperator 'X' error: <concise msg>(was: silent black). Full ctest 99/99;test_runtime_healthcovers the newerrored_opsseverity + JSON.🤖 Generated with Claude Code
https://claude.ai/code/session_01QB6eSNJE55ru3g4vsL77GT