{"record":{"id":"de313a47a13c8a52","repo":"zed-industries/zed","slug":"app-args-app-name-not-deployed-or-function","errorCode":null,"errorMessage":"app '{args.app_name}' not deployed (or function '{function_name}' missing) — run 'zed-eval deploy' first","messagePattern":"app '(.+?)' not deployed \\(or function '(.+?)' missing\\) — run 'zed-eval deploy' first","errorType":"exception","errorClass":"AppNotDeployedError","httpStatus":null,"severity":"warning","filePath":"crates/eval_cli/zed_eval/common.py","lineNumber":142,"sourceCode":"\n\ndef deployed_function(args: argparse.Namespace, function_name: str):\n    \"\"\"Look up an already-deployed Modal function. Never deploys.\n\n    `modal.Function.from_name` resolves a published function without deploying,\n    which is exactly what we want: deploying would cancel in-flight runs. We\n    hydrate eagerly so a missing app/function fails here with an actionable\n    message instead of deep inside a later `.spawn()`/`.remote()` call.\n    \"\"\"\n    import modal\n    from modal.exception import NotFoundError\n\n    configure_modal_environment(args)\n    function = modal.Function.from_name(args.app_name, function_name)\n    try:\n        function.hydrate()\n    except NotFoundError as error:\n        raise AppNotDeployedError(\n            f\"app '{args.app_name}' not deployed (or function \"\n            f\"'{function_name}' missing) — run 'zed-eval deploy' first\"\n        ) from error\n    return function\n\n\ndef modal_call_id(call: Any) -> str:\n    for attribute in (\"object_id\", \"id\", \"function_call_id\"):\n        value = getattr(call, attribute, None)\n        if value:\n            return str(value)\n    return str(call)\n\n\ndef print_table(rows: list[dict[str, Any]], columns: list[tuple[str, str]]) -> None:\n    if not rows:\n        print(\"No rows\")\n        return","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/eval_cli/zed_eval/common.py#L124-L160","documentation":"The mark exists as Mark::Local but its anchor vector is empty, so there is no position to resolve and the command fails. This is an internal invariant violation of the marks data structure — a stored mark is expected to carry at least one anchor — rather than a user mistake.","triggerScenarios":"vim.get_mark returns Some(Mark::Local(vec![])) and anchors.last() is None: a mark that was inserted empty or whose anchors were all invalidated (buffer rollback/undo to before the mark, branch switch, or detached anchors).","commonSituations":"Rare; most plausible after heavy undo/git operations that invalidate every anchor behind a mark. If it reproduces with a plain key sequence, it indicates a bug worth reporting.","solutions":["Re-set the mark with ma (or the relevant mark key) and retry the command","If it reproduces reliably, capture the key sequence and report it upstream — an empty anchor list should not normally be stored"],"exampleFix":"\" before\n:`a   \" mark a exists but holds no anchors\n\n\" after\nma    \" re-set the mark, which stores a fresh anchor\n:`a","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"// Treat only marks with at least one anchor as usable:\nfn mark_has_position(mark: Option<Mark>) -> Option<&Anchor> {\n    match mark {\n        Some(Mark::Local(anchors)) if !anchors.is_empty() => anchors.last(),\n        _ => None,\n    }\n}","tryCatchPattern":"if let Err(err) = run_mark_command(name, vim, editor, window, cx) {\n    if err.to_string().contains(\"empty anchors\") {\n        // Repair by re-setting the mark rather than failing the whole command.\n        re_set_mark(name, editor, vim, window, cx);\n    } else {\n        set_status(&err.to_string());\n    }\n}","preventionTips":["Guard consumers of Mark::Local with a non-empty-anchors check so the invariant break degrades to 'mark not set'","When invalidating anchors (undo/rollback), drop marks whose anchor list becomes empty instead of storing them"],"tags":["vim","mark","internal-invariant"],"backgroundTag":"internal-invariant-violation","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}