You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extend node "all" fan-out to more read-only tools #158
forNodes works for any read-only tool, but only nodeStatus, piStatus and serviceHealth use it.
Where
mcp-server/src/utils/fan-out.ts:24-61
mcp-server/src/prompts.ts:20
Details
Fleet questions ("which nodes have pending upgrades, stale backups, expiring certs, full disks") still need one call per node. The morning-health-check prompt walks one node.
Impact
Multi-node users get fleet views for three tools only.
Suggested fix
Switch nodeParam to nodeOrAllParam and wrap with forNodes in backupStatus, aptUpgradable, certList, diskUsage, ufwStatus, kernelInfo and healthCheck. Give the morning-health-check prompt an all-nodes variant. Add a registration test that every fan-out tool accepts all.
Open question: cap concurrency for larger fleets (today Promise.allSettled is unbounded)?
How to run tests: cd mcp-server && npm install && npm test (and npm run typecheck); structure tests: pip install -r requirements-test.txt && pytest tests/ -v
Conventions: see CLAUDE.md and CONTRIBUTING.md
Filed by repo-audit/full-audit at 636fefb. Severity: medium. Effort: S. audit-key: enhancement|mcp-server/src/utils/fan-out.ts|forNodes
Fixed in 729248c: new fanOut() helper wraps each tool's existing single-node handler (single node unchanged, so tool-specific error hints stay; "all" gives one section per node, isError counts as failed). backupStatus, aptUpgradable, certList, diskUsage, ufwStatus, kernelInfo and healthCheck use it; morning-health-check has a fleet variant for node "all"; a registration test checks that exactly the read-only fan-out tools offer "all". The concurrency cap stays out of scope (still Promise.allSettled). Verified with handler tests (mixed and all-failed fleet, named-node passthrough), the prompt test and the registration test; build, typecheck, Vitest and structure tests pass.
Activity
TMHSDigital commentedon Nov 19, 2026
Fixed in 729248c: new fanOut() helper wraps each tool's existing single-node handler (single node unchanged, so tool-specific error hints stay; "all" gives one section per node, isError counts as failed). backupStatus, aptUpgradable, certList, diskUsage, ufwStatus, kernelInfo and healthCheck use it; morning-health-check has a fleet variant for node "all"; a registration test checks that exactly the read-only fan-out tools offer "all". The concurrency cap stays out of scope (still Promise.allSettled). Verified with handler tests (mixed and all-failed fleet, named-node passthrough), the prompt test and the registration test; build, typecheck, Vitest and structure tests pass.