Commit d2d671f
fix: preserve requested model provenance on rerun (#581)
## Summary
- add `requested_model` / `requested_provider` alongside effective
`model` / `provider`
- recompute effective model/provider on rerun from requested intent plus
current config/defaults
- expose requested model/provider as optional hidden queue columns in
the TUI
- extend SQLite, PostgreSQL, and sync paths for the new provenance
fields
## Why
Issue #556 came from reruns replaying stale effective OpenCode model
values. The old schema only stored the effective model/provider, so
rerun could not tell whether a value was explicitly requested or merely
resolved from config/defaults.
## Ambiguous migration choice
Existing rows are ambiguous: the historical `model` / `provider` values
do not tell us whether they were explicitly requested or implicitly
resolved.
I considered storing a per-row creation/model-schema version marker so
rerun could special-case older rows, but that adds more schema and
branching complexity than the problem warrants.
This change instead chooses the simpler behavior:
- migrate existing rows with `requested_model = NULL` and
`requested_provider = NULL`
- do **not** backfill requested fields from historical effective values
- treat `NULL` requested fields as "no explicit request recorded;
reevaluate"
That means pre-migration rows will rerun against current defaults/config
rather than freezing an old ambiguous effective value.
## Validation
- `go test ./internal/storage ./internal/daemon ./cmd/roborev/tui`
- `go vet ./...`
## Exact scenario checked
I also re-ran the exact configuration discussed in #556:
- `default_agent = "opencode"`
- `default_model = "opencode/nemotron-3-super-free"`
Before this change, that config stored the resolved effective model in
`review_jobs.model`, which rerun then replayed as if it were original
intent. After this change, explicit requested intent is tracked
separately, and config-derived runs leave requested fields empty so
rerun can reevaluate.
---------
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com>1 parent ea575f3 commit d2d671f
File tree
19 files changed
+747
-324
lines changed- cmd/roborev/tui
- internal
- daemon
- storage
- schemas
19 files changed
+747
-324
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2200 | 2200 | | |
2201 | 2201 | | |
2202 | 2202 | | |
| 2203 | + | |
| 2204 | + | |
2203 | 2205 | | |
2204 | 2206 | | |
2205 | 2207 | | |
2206 | 2208 | | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
2207 | 2215 | | |
2208 | 2216 | | |
| 2217 | + | |
| 2218 | + | |
2209 | 2219 | | |
2210 | 2220 | | |
2211 | 2221 | | |
| |||
2221 | 2231 | | |
2222 | 2232 | | |
2223 | 2233 | | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
321 | 325 | | |
322 | 326 | | |
323 | 327 | | |
| |||
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
596 | | - | |
597 | | - | |
| 600 | + | |
| 601 | + | |
598 | 602 | | |
599 | 603 | | |
600 | 604 | | |
| |||
645 | 649 | | |
646 | 650 | | |
647 | 651 | | |
648 | | - | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
649 | 656 | | |
650 | 657 | | |
651 | 658 | | |
| |||
770 | 777 | | |
771 | 778 | | |
772 | 779 | | |
773 | | - | |
| 780 | + | |
774 | 781 | | |
775 | 782 | | |
776 | 783 | | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
787 | 796 | | |
788 | 797 | | |
789 | 798 | | |
790 | 799 | | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
801 | 812 | | |
802 | 813 | | |
803 | 814 | | |
| |||
838 | 849 | | |
839 | 850 | | |
840 | 851 | | |
841 | | - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
842 | 855 | | |
843 | 856 | | |
844 | 857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments