zed-industries/zed · error · ValueError
build ids may only contain lowercase letters, numbers, '.',
Error message
build ids may only contain lowercase letters, numbers, '.', '_', and '-'
What it means
validate_build_id() rejects any build id that doesn't survive source.sanitize_namespace() unchanged: only lowercase letters, digits, '.', '_' and '-' are allowed. The restriction exists because build ids feed into namespace labels (e.g. Modal namespaces) with a limited charset; anything that sanitizes differently (uppercase, spaces, slashes) would silently split a run's identity from its label.
Source
Thrown at crates/eval_cli/zed_eval/builds.py:11
from __future__ import annotations
import argparse
from typing import Any
from . import source
def validate_build_id(build_id: str | None) -> None:
if build_id and source.sanitize_namespace(build_id) != build_id:
raise ValueError(
"build ids may only contain lowercase letters, numbers, '.', '_', and '-'"
)
def prepare_build_request(
*,
base_sha: str | None,
patch_path: str | None,
build_id: str | None,
allow_untracked: bool,
require_clean: bool,
repo_url: str | None,
clean_source: bool = False,
source_label: str | None = None,
pre_resolved_base_sha: str | None = None,
) -> dict[str, Any]:
validate_build_id(build_id)
source_info, patch = source.prepare_build_source(View on GitHub (pinned to bc538def45)
Solutions
- Lowercase the id and map disallowed characters to '-' or '_' before passing it
- Slugify derived ids: `echo "$branch" | tr '[:upper:]' '[:lower:]' | tr -c 'a-z0-9._-' '-'`
- If the id looks valid, check for invisible leading/trailing whitespace
Example fix
# before
validate_build_id("Feature/Login-Fix") # ValueError
# after
validate_build_id("feature-login-fix") Defensive patterns
Strategy: validation
Validate before calling
import re
BUILD_ID_RE = re.compile(r"^[a-z0-9._-]+$")
if build_id and not BUILD_ID_RE.fullmatch(build_id):
raise SystemExit("build id must match [a-z0-9._-]+") Type guard
import re
def is_valid_build_id(build_id):
return re.fullmatch(r"[a-z0-9._-]+", build_id) is not None Try / catch
try:
validate_build_id(build_id)
except ValueError:
import re
build_id = re.sub(r"[^a-z0-9._-]", "-", build_id.lower())
validate_build_id(build_id) Prevention
- Slugify branch names before using them as build ids
- Keep a shared helper that lowercases and replaces disallowed chars
- Assert validity in tests for id-generating code
When it happens
Trigger: Passing a build id containing uppercase letters, spaces, or other punctuation ("Zed Build/2024"); ids auto-derived from branch names with '/' or uppercase; timestamp ids using 'T' and ':'.
Common situations: Deriving build ids from git branch names (feature/Login-Fix); pasting human-readable labels; CI run identifiers with ISO-8601 punctuation.
Related errors
- unknown benchmark '{benchmark_id}' (valid: {valid})
- unknown benchmark '{selector}' (valid: {valid})
- app '{args.app_name}' not deployed (or function '{function_n
- benchmark {benchmark['id']} path dataset requires repo_url
- unexpected response for issue {number}
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/90ce86eda70ccc50.
Report an issue: GitHub.