Fail fast for task jobs with missing prompt #200
Merged
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
git logon the analysis type nameBackground (fixes #194)
The reported error was:
This happened because
roborev analyze complexity file.gostores the analysis type name ("complexity") in thegit_reffield and the full prompt in thepromptcolumn. The worker is supposed to detect task jobs viaIsTaskJob() && Prompt != ""and use the stored prompt directly, skippinggit 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). TheIsTaskJob()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 byensureDaemondue to a process management edge case), analyze jobs fall through to the normal commit path, which runsgit 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 logerror is what this PR addresses.Fix
Added a defensive branch in the worker's prompt-building logic: if
IsTaskJob()is true butPromptis empty, fail immediately with an actionable error message suggestingroborev daemon restart, instead of falling through togit log.Test plan
go test ./internal/daemon/ -run TestWorker -vpassesgo test ./...passes🤖 Generated with Claude Code