refactor(control): extract autoResearchManager collaborator - #7796
Merged
Conversation
The AutoResearch subsystem (~320 lines: task prepare/resume, heartbeats, evidence recording, direction summaries, readiness) lived inline on Controller. Per the leaf-collaborator playbook it moves to autoresearch_manager.go: autoResearchManager wraps the optional workspace autoresearch.Store and never touches Controller state — assistant text and task IDs are passed in. Controller keeps thin glue that resolves the active task from the goal machine and owns notices (prepareAutoResearchTask fast-path, finalizeAutoResearchTask, the AutoResearch* port methods). controller.go 6498 -> 6179 lines.
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.
Continues the controller god-object cleanup (#7787). The AutoResearch subsystem (~320 lines) lived inline on Controller with 13 methods and direct
*autoresearch.Storeaccess scattered across controller.go, turn_orchestrator.go, and input.go.What
autoResearchManager(autoresearch_manager.go) per the established leaf-collaborator playbook: wraps the optional workspaceautoresearch.Store, zero-value disabled, every method nil-safe. It never touches Controller state — task IDs and assistant text are passed in by the caller.prepareAutoResearchTask(goal-machine fast-path),finalizeAutoResearchTask(notices), and theAutoResearch*port methods (task resolution viac.goals).c.autoResearch.store.Verification
gofmtclean,go vet ./internal/control/...cleango test -race ./internal/control/greengo test ./...green (English locale)Cache-impact: none - control-plane code motion; no provider request shaping or cache logic involved.
Cache-guard: existing coverage - goal_test.go AutoResearch integration tests pass unchanged under -race.
Documentation-impact: none - internal reorganization; AutoResearch behavior and public API unchanged.