{"record":{"id":"e9138743f3099b98","repo":"affaan-m/ECC","slug":"checked-task-text","errorCode":null,"errorMessage":"checked task text","messagePattern":"checked task text","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ecc2/src/main.rs","lineNumber":7223,"sourceCode":"                    report.requests.push(item);\n                    continue;\n                }\n            },\n            None => None,\n        };\n\n        report.ready_requests += 1;\n        if dry_run {\n            report.requests.push(item);\n            continue;\n        }\n\n        let request = match draft.request_kind {\n            session::RemoteDispatchKind::Standard => {\n                session::manager::create_remote_dispatch_request(\n                    db,\n                    cfg,\n                    body_text.expect(\"checked task text\"),\n                    target_session_id.as_deref(),\n                    draft.priority.unwrap_or(TaskPriorityArg::Normal).into(),\n                    draft.agent.as_deref().unwrap_or(&cfg.default_agent),\n                    draft.profile.as_deref(),\n                    draft.use_worktree.unwrap_or(cfg.auto_create_worktrees),\n                    session::SessionGrouping {\n                        project: draft.project.clone(),\n                        task_group: draft.task_group.clone(),\n                    },\n                    \"migrate_remote\",\n                    None,\n                )?\n            }\n            session::RemoteDispatchKind::ComputerUse => {\n                let defaults = cfg.computer_use_dispatch_defaults();\n                session::manager::create_computer_use_remote_dispatch_request(\n                    db,\n                    cfg,","sourceCodeStart":7205,"sourceCodeEnd":7241,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/ecc2/src/main.rs#L7205-L7241","documentation":"An internal invariant assertion: the dispatch code calls body_text.expect(\"checked task text\"), meaning earlier validation should have guaranteed the task body is present. If execution reaches here with body_text == None, the program panics with this message, signaling a bug in the preceding validation flow rather than user error.","triggerScenarios":"A code path where RemoteDispatchKind::Standard is selected but the task-text validation step that populates body_text was skipped or failed silently.","commonSituations":"Reaching this only after a developer adds a new dispatch path or reorders validation; users should never hit it directly, but a panic here means the earlier empty-task check didn't run.","solutions":["Report/inspect why the earlier task-text validation was bypassed; ensure body_text is set for Standard dispatch before this match.","Add a guard that validates task text before the match arm instead of relying on expect.","If hit interactively, check the command that produced an empty/missing task body (e.g. piping empty stdin)."],"exampleFix":"// before\nlet body_text = draft.task_text.filter(|t| !t.trim().is_empty());\n// later: body_text.expect(\"checked task text\")\n// after\nlet body_text = match draft.task_text {\n    Some(t) if !t.trim().is_empty() => Some(t),\n    _ => anyhow::bail!(\"task text is required for standard dispatch\"),\n};","handlingStrategy":"validation","validationCode":"let body = draft.task_text.as_deref().map(str::trim).filter(|t| !t.is_empty());\nanyhow::ensure!(body.is_some(), \"task text required\");","typeGuard":null,"tryCatchPattern":"// treat any occurrence of this panic as a bug report:\nstd::panic::catch_unwind(|| dispatch_standard(...)).unwrap_or_else(|_| {\n    eprintln!(\"internal error: task text validation skipped — please report\");\n});","preventionTips":["Validate task text once, explicitly, before dispatch matching","Replace expect() with explicit bail for user-supplied data","Add tests covering empty stdin and empty --task flags","Keep validation in one place ahead of all dispatch kinds"],"tags":["panic","invariant","dispatch"],"backgroundTag":"internal-invariant-violation","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}