tdd(cli): prevent actor list from triggering database updates #1151

Merged
brent.edwards merged 1 commits from bugfix/m3-actor-list-no-db-update into master 2026-03-28 05:27:14 +00:00

1 Commits

Author SHA1 Message Date
brent.edwards 6b7652919f fix(cli): prevent actor list from triggering database updates
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 38s
CI / build (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 39s
CI / typecheck (pull_request) Successful in 3m57s
CI / security (pull_request) Successful in 4m8s
CI / quality (pull_request) Successful in 3m39s
CI / integration_tests (pull_request) Successful in 9m30s
CI / unit_tests (pull_request) Successful in 9m44s
CI / docker (pull_request) Successful in 1m32s
CI / e2e_tests (pull_request) Successful in 11m56s
CI / coverage (pull_request) Successful in 11m28s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Failing after 20m56s
Remove ensure_built_in_actors() calls from ActorRegistry.list() and
ActorRegistry.list_actors() so the read-only 'agents actor list' command
no longer triggers database writes (upsert_actor, set_default_actor).

Root cause: list_actors() unconditionally called ensure_built_in_actors()
which iterated all configured providers and upserted each one — a database
write on every list invocation. This caused migration prompts on fresh
checkouts and violated the read-only contract of the list command.

Includes TDD regression tests from #841 with @tdd_expected_fail removed
per Bug Fix Workflow. Updates three existing test suites (consolidated_actor,
tdd_actor_list_validation, actor_list_empty) that relied on the old
behavior where list_actors() triggered ensure_built_in_actors() — they
now call ensure_built_in_actors() explicitly before listing.

ISSUES CLOSED: #797
2026-03-28 05:11:44 +00:00