Skip to content

Conversation

@wesm
Copy link
Collaborator

@wesm wesm commented Feb 4, 2026

Summary

  • When a task job (analyze, run, custom) has no stored prompt, the worker now fails with a clear error message instead of falling through to git log on the analysis type name

Background (fixes #194)

The reported error was:

Error: prompt failed: build prompt: get commit info: git log: exit status 128

This happened because roborev analyze complexity file.go stores the analysis type name ("complexity") in the git_ref field and the full prompt in the prompt column. The worker is supposed to detect task jobs via IsTaskJob() && Prompt != "" and use the stored prompt directly, skipping git log.

The most likely cause is a daemon version mismatch. Prior to v0.20.0, the worker recognized task jobs only when git_ref == "prompt" (the hardcoded literal). The IsTaskJob() function that handles arbitrary labels like "complexity" was introduced alongside the analyze command in v0.20.0. If a stale daemon process from an older version is still running (e.g., not killed by ensureDaemon due to a process management edge case), analyze jobs fall through to the normal commit path, which runs git log "complexity" and fails with exit status 128.

The reporter was on v0.23.1 with codex as the agent (not authenticated), so the jobs also failed in 0s. The codex auth issue is separate, but the confusing git log error is what this PR addresses.

Fix

Added a defensive branch in the worker's prompt-building logic: if IsTaskJob() is true but Prompt is empty, fail immediately with an actionable error message suggesting roborev daemon restart, instead of falling through to git log.

Test plan

  • go test ./internal/daemon/ -run TestWorker -v passes
  • go test ./... passes
  • Verify that a task job with missing prompt produces the new error message instead of "git log: exit status 128"

🤖 Generated with Claude Code

When a task job (analyze, run, custom) has no stored prompt, the worker
previously fell through to the normal commit review path, which runs
`git log` on the git_ref. For analyze jobs, git_ref is the analysis
type name (e.g., "complexity"), causing a confusing "git log: exit
status 128" error.

This can happen due to a daemon version mismatch: prior to v0.20.0 the
worker only recognized task jobs where git_ref == "prompt". The
IsTaskJob() function that handles arbitrary labels was introduced
alongside the analyze command. If a stale daemon from an older version
is still running, it falls through to git log for analyze-type refs.

Now the worker detects this case and fails with an actionable error
message suggesting `roborev daemon restart`.

Closes #194

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@wesm wesm merged commit 4b19960 into main Feb 4, 2026
7 checks passed
@wesm wesm deleted the analyze-sha-issue branch February 4, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

roborev analyze fails with "git log: exit status 128" - analysis type stored in SHA field

2 participants