{"record":{"id":"51243c6a40646b6c","repo":"dbt-labs/dbt-core","slug":"this-should-be-handled-somewhere-else","errorCode":null,"errorMessage":"this should be handled somewhere else","messagePattern":"this should be handled somewhere else","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-tasks-sa/src/visitor.rs","lineNumber":265,"sourceCode":"                    Vec::new(),\n                    if reuse_downstream_tests {\n                        // TODO: Unfortunately, we have diverging logic for data tests vs all other node types,\n                        // when it comes to upstream being reused. All other node tasks will run and just\n                        // report themselves as reused, but for tests we have historically propagated skips\n                        // in the visitor. This should be unified eventually.\n                        self.propagate_reuse_to_downstream_tests(task_idx, dependents, schedule)\n                    } else {\n                        Vec::new()\n                    },\n                ),\n                NodeStatus::Succeeded\n                | NodeStatus::SucceededWithWarning\n                | NodeStatus::TestPassed\n                | NodeStatus::StaticallyCheckedDataTest\n                | NodeStatus::TestWarned\n                | NodeStatus::NoOp => (Vec::new(), Vec::new()),\n                NodeStatus::SkippedUpstreamFailed => {\n                    unreachable!(\"this should be handled somewhere else\")\n                }\n            },\n            Err(_) => (\n                self.propagate_failure(task_idx, dependents, schedule),\n                Vec::new(),\n            ),\n        }\n    }\n}\n\n// Returns true when the failing task is a model with `on_error: continue`.\n//\n// Phase gating: honored for Render and Run failures, but **not** Analyze.\n// Analyze produces the type/binding facts that `--static-analysis strict`\n// downstreams consume, so upstream Analyze failures must still propagate.\n//\n// TODO: The correct rule is per-downstream — propagate Render/Analyze\n// failure only to downstreams whose `static_analysis` is `strict`. The","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-tasks-sa/src/visitor.rs#L247-L283","documentation":"When a task succeeds, the visitor maps its NodeStatus to downstream propagation actions. The SkippedUpstreamFailed status is contractually converted earlier (it should never appear as a task result at this point), so encountering it in this match means upstream-failure handling was bypassed and the code panics rather than propagating skips incorrectly.","triggerScenarios":"Calling handle_task_result (from visit or the state-comparison test visitor paths) with a task result whose NodeStatus is SkippedUpstreamFailed — i.e. a status that should have been translated before entering the success-handling match.","commonSituations":"A scheduling/propagation bug records SkippedUpstreamFailed as the task's own outcome instead of skipping via dependents; custom forks or modified status transitions leak the status into the visitor; state:test flows (reused-model preemption logic) producing this status from a different code path than the main run visitor.","solutions":["Find where the task result status is set and ensure SkippedUpstreamFailed is handled there (mark dependents skipped without calling handle_task_result).","Add an explicit early-return arm for SkippedUpstreamFailed in handle_task_result that performs the skip propagation instead of panicking.","Check custom status transitions for leaked SkippedUpstreamFailed outcomes.","Reproduce with the failing node's unique_id and trace which code path assigned the status."],"exampleFix":"// before\nNodeStatus::SkippedUpstreamFailed => unreachable!(\"this should be handled somewhere else\"),\n\n// after\nNodeStatus::SkippedUpstreamFailed => self.propagate_skipped(task_idx, dependents, schedule),","handlingStrategy":"validation","validationCode":"if result.status == NodeStatus::SkippedUpstreamFailed { return; } // handled by skip propagation elsewhere","typeGuard":"fn is_success_path_status(s: &NodeStatus) -> bool { !matches!(s, NodeStatus::SkippedUpstreamFailed) }","tryCatchPattern":"match status {\n    NodeStatus::SkippedUpstreamFailed => return Ok(()), // handled upstream; do not re-process\n    other => handle_task_result_inner(other),\n}","preventionTips":["Convert SkippedUpstreamFailed into dependent-skip actions at the point it is produced, never as a task result.","Keep NodeStatus transition logic centralized so statuses cannot leak into the wrong handler.","Add a test asserting SkippedUpstreamFailed never reaches handle_task_result."],"tags":["visitor","node-status","scheduling","unreachable","rust"],"backgroundTag":"invalid-state-transition","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}