2.6 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-backend-default-inheritance | Repair backend default inheritance | done | 1 | plan.md | ../../specs/agents/requirements/utility-agent-profiles.md |
Task 01: Repair backend default inheritance
Implement the amended utility-agent binding contract before changing the settings UI.
-
Acceptance: Built-in rows in the inherited or legacy migration state without a concrete profile inherit the saved default. Empty
unconfiguredrows from older releases remain fail-closed, and custom unmatched rows remainunconfigured. -
Acceptance: Deleting an explicit profile preserves its stale ID and keeps execution fail-closed. Deleting the global default does not convert inherited built-ins into repair state.
-
Acceptance: Plugin reads and utility execution use the same effective-default predicate.
-
Verification: Add the failing service tests first, then run:
cd apps/backend go test -run 'Test(MigrateLegacyBindings|PreparePromptRequest|ClearAgentProfileBindings)' ./internal/utility/service/... go test ./internal/utility/service/... ./internal/utility/profilebinding/... -
Files likely touched:
apps/backend/internal/utility/models/models.go,apps/backend/internal/utility/service/service.go,apps/backend/internal/utility/service/service_test.go,apps/backend/internal/backendapp/orchestrator.go, andapps/backend/internal/backendapp/services.go. -
Dependencies: None.
-
Parallelism: sequential.
-
Inputs: The amended legacy migration, failure-mode, persistence, and scenario sections in
docs/specs/agents/requirements/utility-agent-profiles.md, plus ADR-2026-08-12-built-in-utility-default-inheritance. -
Output contract: Report the backend files changed, exact test commands and results, stale-ID and default-deletion behavior, and synchronized task/plan status.
Results
Implemented the shared inherited-built-in predicate, legacy migration normalization, default-backed
execution, stale explicit-ID preservation, and default-aware plugin/dependency reads. Empty
unconfigured rows remain fail-closed because older releases could erase deleted profile IDs.
Deleting a global default no longer rewrites inherited built-ins into repair state.
Verification:
cd apps/backend && go test -run 'Test(MigrateLegacyBindings|PreparePromptRequest|ClearAgentProfileBindings)' ./internal/utility/service/...(pass: 13 tests)cd apps/backend && go test ./internal/utility/service/... ./internal/utility/profilebinding/...(pass: 17 tests)cd apps/backend && go test -run 'TestPluginsUtilityAgentAdapter' ./internal/backendapp(pass: 3 tests)