Commit a5eea51
Include branchless jobs in fix, set branch on analyze (#175)
## Summary
- `roborev fix` was not finding analyze jobs because they had no branch
set and the branch filter excluded them
- `roborev analyze` now sets the branch field when enqueuing jobs
- New `WithBranchOrEmpty` storage option includes jobs with empty/NULL
branch, used only by the fix query path via `branch_include_empty=true`
API param
- `WithBranch` remains strict exact-match for all other callers (TUI,
status, etc.)
## Files changed
| File | What |
|------|------|
| `cmd/roborev/analyze.go` | Set `branch` from `git.GetCurrentBranch()`
in `enqueueAnalysisJob` |
| `cmd/roborev/fix.go` | Pass `branch_include_empty=true` in fix query |
| `internal/storage/jobs.go` | Add `WithBranchOrEmpty` option (matches
branch OR empty/NULL) |
| `internal/daemon/server.go` | Support `branch_include_empty=true`
query param |
| `internal/storage/db_test.go` | `TestWithBranchOrEmpty` — strict
excludes branchless, inclusive includes them |
## Test plan
- [x] `go build ./...`
- [x] `go test ./...` — all pass
- [x] `TestWithBranchOrEmpty` — verifies both strict and inclusive
behavior
- [x] Verified: `fix` with branch=main now returns 19 jobs (was 1) for a
repo with branchless analyze jobs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent e1612df commit a5eea51
File tree
5 files changed
+72
-7
lines changed- cmd/roborev
- internal
- daemon
- storage
5 files changed
+72
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
| 444 | + | |
443 | 445 | | |
444 | 446 | | |
445 | 447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
600 | 604 | | |
601 | 605 | | |
602 | 606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1759 | 1759 | | |
1760 | 1760 | | |
1761 | 1761 | | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
1762 | 1807 | | |
1763 | 1808 | | |
1764 | 1809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1104 | 1105 | | |
1105 | 1106 | | |
1106 | 1107 | | |
1107 | 1108 | | |
1108 | 1109 | | |
1109 | 1110 | | |
1110 | 1111 | | |
1111 | | - | |
| 1112 | + | |
1112 | 1113 | | |
1113 | 1114 | | |
1114 | 1115 | | |
1115 | 1116 | | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1116 | 1126 | | |
1117 | 1127 | | |
1118 | 1128 | | |
| |||
1151 | 1161 | | |
1152 | 1162 | | |
1153 | 1163 | | |
1154 | | - | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1155 | 1169 | | |
1156 | 1170 | | |
1157 | 1171 | | |
| |||
0 commit comments