fix: preserve requested model provenance on rerun#581
Conversation
Preserve explicit requested model/provider separately from effective execution settings so reruns can reevaluate current defaults when no request was pinned. Also exposes requested model/provider as optional hidden TUI queue columns and updates SQLite/PostgreSQL sync schema accordingly. Validation: - go test ./internal/storage ./internal/daemon ./cmd/roborev/tui - go vet ./... 🤖 Generated with [OpenAI Codex](https://openai.com/codex) Co-authored-by: OpenAI Codex <noreply@openai.com>
363b8f9 to
6b554e6
Compare
Fix the PostgreSQL UpsertJob INSERT to match the target column count. This addresses the GitHub Actions integration failure in TestIntegration_UpsertJob_BackfillsModel. Validation: - go test ./internal/storage ./internal/daemon ./cmd/roborev/tui - go vet ./... 🤖 Generated with [OpenAI Codex](https://openai.com/codex) Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
Addresses the three issues raised on PR #581: - preserve agentic during SQLite rebuild migration - resolve rerun config from worktree path when present - allow sync upserts to clear model/provider/requested fields Validation: - go test ./internal/storage ./internal/daemon ./cmd/roborev/tui - go vet ./... 🤖 Generated with [OpenAI Codex](https://openai.com/codex) Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
|
@wesm I think we probably don't want to do that much backwards compat support here since we'll have to guess either way the upgrade goes. This path makes old records behave like they do now. |
roborev: Combined Review (
|
roborev: Combined Review (
|
|
As intended. |
Summary
requested_model/requested_provideralongside effectivemodel/providerWhy
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/providervalues 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:
requested_model = NULLandrequested_provider = NULLNULLrequested 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/tuigo 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.