refactor(agent): drop pass-through methods, free functions are the surface #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent-drop-thunks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The agent/ composition root claimed in its module docstring that "the actual work lives in focused submodules," but the Agent class still carried ten pass-through methods (
_heartbeat_loop,_dispatch,_handle_garage_refresh, etc.) that only forwarded to those submodules.Production code already called the free functions directly; the thunks survived as a test-compat shim left over from the earlier agent.py → agent/ refactor. This commit finishes the job: the ten thunks are gone, Agent is now
__init__+run(), and ~25 test call sites switched to callingloops.heartbeat_loop(agent, ws),dispatch.dispatch_message(agent, ws, raw), etc. directly.While renaming, twelve instance attrs lost their leading underscore (
config,registry,garage_state, ...) since the submodules read them across module boundaries by design; the three cryptographic attrs (_secret,_nonce_store,_ssl_ctx) keep their underscore as a deliberate sigil meaning "handle with care."Net -41 lines, 1128/1128 tests pass, fitness and import-linter green.