2.6 KiB
2.6 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-executor-model-decision | Define executor model decisions | done | 1 | plan.md | ../../specs/no-silent-model-fallback/spec.md |
Task 01: Define executor model decisions
Acceptance
- An unadvertised requested model causes no model-selection call, and the agent default continues.
- An explicit fallback applies only when advertised, while advertised apply errors remain explicit.
- Initial launch, context reset, and workspace rebind use one typed decision helper without duplicate calls.
TDD scenarios
- RED: Replace strict-gone tests with no-call and provider-default expectations.
- RED: Add absent fallback, empty catalog, method-not-supported, and auto-fallback cases.
- RED: Add context-reset and workspace-rebind decision cases.
- GREEN: Add the typed decision and apply the executor-authoritative order.
- REFACTOR: Remove duplicated model-selection branches and keep one policy owner.
Verification
cd apps/backend && go test -tags fts5 -run 'TestApplyStartModelPolicy|TestInitializeAndPrompt.*Model|TestReapplySessionModel|TestWorkspaceRebind.*Model' ./internal/agent/runtime/lifecyclecd apps/backend && go test -tags fts5 ./internal/agent/runtime/lifecyclegit diff --check
Files likely touched
apps/backend/internal/agent/runtime/lifecycle/start_model.goapps/backend/internal/agent/runtime/lifecycle/start_model_test.goapps/backend/internal/agent/runtime/lifecycle/session.goapps/backend/internal/agent/runtime/lifecycle/session_test.goapps/backend/internal/agent/runtime/lifecycle/manager_interaction.goapps/backend/internal/agent/runtime/lifecycle/manager_interaction_test.goapps/backend/internal/agent/runtime/lifecycle/manager_workspace_rebind.goapps/backend/internal/agent/runtime/lifecycle/manager_workspace_rebind_test.go
Dependencies
None.
Parallelism
Sequential. Tasks 02 and 03 consume the typed decision contract.
Inputs
- The amended no-silent-model-fallback specification.
- The executor-authoritative model-selection ADR.
- The current strict
applyStartModelPolicyimplementation.
Output contract
Report the decision outcomes, model-selection call lists, RED evidence, GREEN evidence, and test results.
Risks
- An empty catalog can mean unsupported selection or incomplete provider data.
- Runtime model overrides must follow the same executor catalog rules.
- A handled default decision must prevent a later profile-layer retry.
Results
Implemented the typed executor-authoritative decision and reused it for initial launch, context reset, and workspace rebind. Lifecycle coverage passed with 1,857 tests.