daemon: drop dead nil paths and group methods by cluster #1929
Notifications
Due Date
No due date set.
Blocks
#1920 Effective Go: critical paths
sam/archie
Reference: sam/archie#1929
Reference in new issue
Block a user
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.
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.