refactor(control): split plan-todo seeding and module detection out of controller.go - #7787
Merged
Conversation
…f controller.go Pure code motion: the plan-todo seeding cluster (seedPlanTodos, PlanTodosJSON, parsePlanTodos, listItem and friends) moves to plan_todos.go and the /plan-exec workspace module scan (detectProjectModules and helpers) moves to project_modules.go. controller.go 6818 -> 6498 lines, no signature or behavior changes.
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.
Part of the controller god-object cleanup (controller.go doubled to 6.8k lines / Controller to 82 fields since the June decomposition pass).
What
Pure code motion, no signature or behavior changes:
seedPlanTodos,completePlanTodos,PlanTodosJSON,parsePlanTodos,listItem,hasTodoUpdateSinceand helpers (~250 lines). Mostly pure markdown-to-todo parsing; the only Controller state touched is sink/executor fan-out.detectProjectModules,hasFile,listSourceDirs,walkDir,hasSourceFiles(~70 lines). Pure filesystem scanning.controller.go: 6818 → 6498 lines.
sessionMessageCountstays in controller.go (generic session accessor used by the turn orchestrator).Verification
gofmtclean,go vet ./internal/control/...cleango test -race ./internal/control/greengo test ./...green (English locale)Cache-impact: none - pure file split inside internal/control; no provider request or cache logic involved.
Cache-guard: existing coverage - go test -race ./internal/control/ passes unchanged.
Documentation-impact: none - verbatim code motion within the control package; behavior and public API unchanged.