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
Two Copilot review findings on the original capability-aware filter:
1. Doc inaccuracy: the example agent-gear list included "services",
but the agent has no `services` gear (the /api/v1/services
endpoint is served by the `metrics` gear). Replace with the
correct list and call out that some dashboard gears (services,
alerts, bx) don't have agent counterparts and shouldn't be
filtered via this helper.
2. O(N * fetchTimeout) cold-cache latency: synchronous fetches
could stall a page render to N × fetchTimeout when multiple
agents are unreachable. Parallelize across boxes with one
goroutine per box and a sync.WaitGroup join, so cold-cache
renders pay one round of timeout at most. Warm-cache renders
hit the cache's read-lock and stay sub-millisecond. Box order
is preserved by writing into a positional `keep []bool` and
compacting after the wait.
`go test -race` clean on services/handler/agent/haproxy packages.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments