Control coordinator refactor to add declarative task#2959
Merged
Conversation
mustafab0
requested review from
leshy,
paul-nechifor and
spomichter
as code owners
July 15, 2026 03:45
Contributor
Greptile SummaryThis PR makes control-task routing declarative. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (6): Last reviewed commit: "Auto-fixes for mustafa/control-coordinat..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #2959 +/- ##
==========================================
+ Coverage 72.31% 72.80% +0.48%
==========================================
Files 1024 1030 +6
Lines 92074 92959 +885
Branches 8418 8478 +60
==========================================
+ Hits 66585 67679 +1094
+ Misses 23232 22989 -243
- Partials 2257 2291 +34
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 18 files with indirect coverage changes 🚀 New features to boost your workflow:
|
mustafab0
force-pushed
the
mustafa/control-coordinator-refactor-main
branch
from
July 15, 2026 17:39
9958e94 to
9720a99
Compare
mustafab0
enabled auto-merge
July 16, 2026 03:14
spomichter
previously requested changes
Jul 16, 2026
Replace the two duplicated __path__ + Path.iterdir() walks with a single _task_dirs() helper built on importlib.resources.files(), so the CI guard enumerates task dirs the same way regardless of install layout (editable, wheel, or zip) and the walk logic lives in one place. Behavior-preserving: same 12 task dirs discovered; 13/13 test_registry + 123/123 control pass.
paul-nechifor
approved these changes
Jul 19, 2026
mustafab0
dismissed
spomichter’s stale review
July 21, 2026 00:18
Discussed during weekly planning this is good to go.
Contributor
|
Successfully created backport PR for |
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.
Problem
The
ControlCoordinatorhardcoded which task consumes which input stream and which methods are RPC-invokable. Adding a task meant editing the coordinator, and stream allowlists drifted from the tasks they mirrored.Issue: #2958
Closes DIM-1231
Solution
Tasks now declare their own I/O in
_registry.pymanifests as import-free string cards.ControlTaskRegistryparses them into typedStreamBinding/TaskBindings(routing.py), and the coordinator builds its route table and command allowlist from the registry at task-registration time.task_invokeonly dispatches methods a task declares viaTASK_EXPOSES. Twist, cartesian, velocity, teleop, servo, and g1-groot tasks migrated to cards.Breaking Changes
None
How to Test
.venv/bin/python -m pytest dimos/control -k "routing or coordinator_commands or registry"task_invokeon an undeclared method — expect a clear "declare it in TASK_EXPOSES" error.