Fast Lane: add model-neutral routing plans - #27
Conversation
Reviewer's GuideThis PR adds a model-neutral Fast Lane compilation path in which plans emit hashed routing requirements and coordinator-owned selection state, while exact model choices are recorded and validated against the plan before dispatch; legacy routing contracts remain replay-compatible, and the package is released as 1.1.5. Sequence diagram for model-neutral Fast Lane selectionsequenceDiagram
participant Coordinator
participant DevKit as DevKit Fast Lane
participant Dispatch as collaboration.spawn_agent
Coordinator->>DevKit: prepare_model_neutral_fast_lane_request(request)
Coordinator->>DevKit: compile_fast_lane(request-v2)
DevKit-->>Coordinator: fast-lane-plan-v3 requirements
Note over DevKit: plan_only, not_dispatched
Coordinator->>DevKit: record_model_selection(assignment, model_id, reasoning_effort, selection_reason)
DevKit-->>Coordinator: model-selection-record-v1
Coordinator->>Dispatch: dispatch selected model and effort
Dispatch-->>Coordinator: availability validation
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="mcp-tools/devkit_fastlane/scripts/team_efficiency.py" line_range="4831-4833" />
<code_context>
+) -> dict[str, Any]:
+ """Project a new source-plan schema while leaving legacy replay untouched."""
+
+ if legacy_plan.get("status") != "planned":
+ result = dict(legacy_plan)
+ result["schema"] = "team-efficiency/decomposition-plan-v2"
+ if result.get("reason") == "Semantic decomposition requires Sol-owned design.":
+ result["reason"] = (
</code_context>
<issue_to_address>
**issue (bug_risk):** An inactive model-neutral source plan keeps the legacy units unchanged and only rewrites the top-level schema, so its units still contain `recommended_route` and lack `route_requirements`. `_compile_fast_lane_local_plan` nevertheless sends this plan to `_fast_lane_model_neutral_routing_context`, which reads `base.get("complexity")` from the missing requirements and then `_route_requirements` raises `ValueError`; `enable=false` therefore fails instead of returning the documented inactive plan-v3 with zero assignments.
**Triggers:** When a valid request-v2 is compiled with `enable=false` or otherwise produces a non-`planned` source plan.
**Suggested fix:** Normalize inactive units as well: remove `recommended_route` and add validated model-neutral `route_requirements` before the routing context is built, or skip model-neutral routing-context construction when the plan is inactive.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and if the new requirement or selection binding is wrong, coordinators could choose an unsuitable model or effort and dispatch bounded work with unnecessary cost or incorrect changes. Reverting stops future plan generation, but already-created selection records or dispatched work would need to be reviewed, reverted, or rerun separately.
Blocking findings: mcp-tools/devkit_fastlane/scripts/team_efficiency.py:4833
| if legacy_plan.get("status") != "planned": | ||
| result = dict(legacy_plan) | ||
| result["schema"] = "team-efficiency/decomposition-plan-v2" |
There was a problem hiding this comment.
issue (bug_risk): An inactive model-neutral source plan keeps the legacy units unchanged and only rewrites the top-level schema, so its units still contain recommended_route and lack route_requirements. _compile_fast_lane_local_plan nevertheless sends this plan to _fast_lane_model_neutral_routing_context, which reads base.get("complexity") from the missing requirements and then _route_requirements raises ValueError; enable=false therefore fails instead of returning the documented inactive plan-v3 with zero assignments.
Triggers: When a valid request-v2 is compiled with enable=false or otherwise produces a non-planned source plan.
Suggested fix: Normalize inactive units as well: remove recommended_route and add validated model-neutral route_requirements before the routing context is built, or skip model-neutral routing-context construction when the plan is inactive.
Summary
team-efficiency/fast-lane-plan-v3assignments as model-neutral routing requirements instead of embedding a package-owned model recommendation.Boundaries
plan_only/selection_only,not_dispatched, and do not authorize execution, create worktrees, claim leases, or prove model availability.Verification
uv lock --check72 passed, 2 skipped, 8 subtests passed203 passed, 318 subtests passedgit diff --check: passedmainremained at baselinebdcb68593eeea21a5b9ae1fc95c2cc9e661dfe09immediately before commitSummary by Sourcery
Adopt model-neutral Fast Lane routing while preserving legacy replay contracts and keeping model selection and dispatch authority with the coordinator.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: