Repository navigation
✨ feat: advisor phase — frontier model plans the sweep, workers execute it - #24
Merged
Merged
Conversation
The advisor executor was built from the provider registry unconditionally, so it spawned claude on the host even under --vm, breaking VM isolation for worker execution. It also ran before the --dry-run early-return, spending a real model call (up to 5 min) on dry runs that previously made none. Gate advisor resolution on cfg.VM (warn and disable, since the VM executor doesn't support model selection yet) and gate the advise() call on !cfg.DryRun so dry-run stays free of model calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #21
What
Optional advisor phase: when configured, a frontier model plans each sweep round — task ordering, per-file difficulty, strategy hints, worker-tier suggestions — and cheaper worker models execute the fixes.
Design
pkg/advisor:BuildPrompt(lint output + history summaries — never file contents),Advise(one-shot executor call with 5m timeout),ParsePlan(fence/prose-tolerant JSON extraction),Apply(overlays plan on mechanical grouping: drops hallucinated files, appends omitted ones, first-wins dedupe),ResolveStrategy(retry/exploration hints honored only when history exists).advise()once per round before dispatch; any failure falls back to the mechanicalGroupByFileplan with a warning and keeps sweeping.--vm(VM executor can't select models yet) and skipped under--dry-run(keeps dry runs free).advisor_plantelemetry event (round, provider, model, duration, files_input, success, files_planned/error).Verification
pkg/advisor(23),pkg/config(4),pkg/agent(8+), all TDD (watched fail first). Full suite green.--vmisolation;--dry-runmaking a real model call) fixed in f4e2f30 with tests.--advisor-model test-opus --model test-haiku→ advisor invoked with--model test-opus+ planning prompt (no file contents), worker with--model test-haiku+ fix prompt;advisor_plan {"success":true, files_input:1, files_planned:1}; per-modelfix_attemptattributionadvisor_planevents (default unchanged)Warning: advisor failed ... using mechanical plan,"success":false, still 1 fixed--advisor-provider ollama→Warning: advisor requires a CLI provider, sweep proceeds mechanically--advisor-model X --dry-run→ zero model invocationsFollow-ups (non-blocking, from review)
ExtraArgs) — natural fit with Per-role model config and model escalation ladder on stagnation #22files_appliedalongsidefiles_plannedinadvisor_plantelemetry; surface advisor stats insweeper observeParsePlan:continue(not return) past a zero-task candidate; naive brace-span heuristic--vmonce the VM executor learns model selection (see Plumb --model through to claude and codex executors #20 comment)[advisor] timeoutconfigurability