BoundaryML/baml · error
no completed `{CI_WORKFLOW}` runs found on branch `{branch}`
Error message
no completed `{CI_WORKFLOW}` runs found on branch `{branch}` in repo `{repo}` What it means
tools_size_gate's fetch_branch_reports queries GitHub via `gh run list` for completed runs of the configured CI workflow on the target branch/repo, and found zero runs. Without at least one run it cannot pick a run carrying the required report artifacts, so it bails.
Source
Thrown at baml_language/crates/tools_size_gate/src/fetch.rs:93
"run",
"list",
"--repo",
&repo,
"--workflow",
CI_WORKFLOW,
"--branch",
branch,
"--status",
"completed",
"--limit",
&SCAN_LIMIT.to_string(),
"--json",
"databaseId,headSha",
])?;
let runs: Vec<RunListEntry> =
serde_json::from_str(&runs_json).context("failed to parse `gh run list` output")?;
if runs.is_empty() {
bail!("no completed `{CI_WORKFLOW}` runs found on branch `{branch}` in repo `{repo}`");
}
// Pick the newest run that has every required report artifact.
let mut chosen: Option<&RunListEntry> = None;
for run in &runs {
if run_has_all_reports(&repo, run.database_id)? {
chosen = Some(run);
break;
}
eprintln!(
" run {}: missing one or more size-gate reports — skipping",
run.database_id
);
}
let chosen = chosen.with_context(|| {
format!(
"none of the last {SCAN_LIMIT} completed `{CI_WORKFLOW}` runs on `{branch}` \
had all required size-gate reports"View on GitHub (pinned to bd85ce9dee)
Solutions
- Verify branch and repo names passed to fetch_branch_reports match an existing branch with CI runs
- Check the workflow file name matches CI_WORKFLOW on that branch
- Trigger the CI workflow manually (workflow_dispatch or push) and wait for a completed run
- Confirm `gh` is authenticated and pointed at the right host/organization
Example fix
// before fetch_branch_reports(repo = "org/wrong-repo", branch = "feature-x") // after fetch_branch_reports(repo = "org/correct-repo", branch = "main")
Defensive patterns
Strategy: try-catch
Validate before calling
let out = Command::new("gh").args(["run","list","--workflow",CI_WORKFLOW,"--branch",branch,"--repo",repo,"--status","completed","--json","databaseId"])
.output()?;
if String::from_utf8(out.stdout)?.trim() == "[]" {
eprintln!("no completed {CI_WORKFLOW} runs on {branch} in {repo}; trigger CI first");
} Type guard
fn has_completed_runs(runs: &[RunListEntry]) -> bool { !runs.is_empty() } Try / catch
match fetch_branch_reports(repo, branch) {
Err(e) if e.to_string().contains("no completed") => { trigger_ci_and_wait(repo, branch)?; fetch_branch_reports(repo, branch) }
other => other,
} Prevention
- Confirm the branch has merged/triggered the CI workflow before running size gate
- Keep the workflow file name in sync with CI_WORKFLOW
- Pre-flight `gh run list` to verify runs exist before analysis
When it happens
Trigger: Calling fetch_branch_reports where the `gh run list --json databaseId,headSha` result is an empty array — no completed CI_WORKFLOW runs exist for the given branch and repo.
Common situations: Wrong branch or repo slug passed; CI workflow renamed so CI_WORKFLOW no longer matches; CI never ran (fresh branch, disabled workflows); runs exist but none completed (all in progress/failed).
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- expected {} size-gate reports from run {run_id}, found {}
- reports contained no artifacts to bake
- artifact `{name}` (kind = "pack") sets `{field}`, which is i
- `gh {}` failed: {}
- pack CLI not found at {}
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/02f5439fd39c979c.
Report an issue: GitHub.