daemon: drop dead nil paths and group methods by cluster #1929

Closed
opened 2026-11-12 16:35:18 +00:00 by sam · 1 comment
Owner

Production sets every Daemon dependency except ContainerPool/Storage, so most "Optional: nil disables" branches never run. Remove them, make the staterpc assertions in buildDaemon direct, assign ModelEgress only when setup succeeds (today a failed setup leaves a non-nil interface over a zero struct), build the reaction consumer/publisher at construction, log the discarded ack in submitNATSTask, and move methods into one file per cluster with narrow orgResolver/repoHub interfaces between them.

Done when daemon nil checks cover only ContainerPool/Storage and each cluster lives in its own file.

Production sets every Daemon dependency except ContainerPool/Storage, so most "Optional: nil disables" branches never run. Remove them, make the staterpc assertions in buildDaemon direct, assign ModelEgress only when setup succeeds (today a failed setup leaves a non-nil interface over a zero struct), build the reaction consumer/publisher at construction, log the discarded ack in submitNATSTask, and move methods into one file per cluster with narrow orgResolver/repoHub interfaces between them. Done when daemon nil checks cover only ContainerPool/Storage and each cluster lives in its own file.
sam added the chorehigh labels 2026-11-12 16:35:18 +00:00
Author
Owner

Done in 63a17509: nil checks remain only for ContainerPool, Storage and ModelEgress; buildDaemon assigns the State Store client directly; reactions are wired in Startup; the unused retry knobs are constants; the discarded ack is logged; methods live in one file per cluster with orgResolver/repoHub seams. daemon.go is 335 lines. ModelEgress was already a true nil on failed setup. task check passed.

Done in 63a17509: nil checks remain only for ContainerPool, Storage and ModelEgress; buildDaemon assigns the State Store client directly; reactions are wired in Startup; the unused retry knobs are constants; the discarded ack is logged; methods live in one file per cluster with orgResolver/repoHub seams. daemon.go is 335 lines. ModelEgress was already a true nil on failed setup. task check passed.
sam closed this issue 2026-11-12 17:08:55 +00:00
sam added a new dependency 2026-11-13 02:50:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1929