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
Three items from round-1 review on PR #692:
- Claude bot P1 / recursion storm: with cookie forwarding now
letting peer calls succeed, a symmetric --keyvizFanoutNodes
configuration (every node lists every other) would generate
O(N^2) HTTP calls per browser poll as each peer recursively
fanned out. Add a marker header X-Admin-Fanout-Peer that the
fetcher sets on every peer request; KeyVizHandler.ServeHTTP
short-circuits its own fan-out when the header is present.
TestKeyVizHandlerSkipsFanoutForPeerCall pins this with a peer
stub that fails the test if dialled.
- Gemini security-medium / cookie whitelist: forward only
admin_session and admin_csrf to peers, not every inbound cookie.
Operators may have unrelated cookies on the same domain
(analytics, feature flags, other-app sessions); blasting those
across the internal network needlessly widens the data exposure.
attachAdminCookies helper centralises the whitelist.
TestKeyVizFanoutRunForwardsCookies extended to assert
unrelated_app_session is dropped while admin_session and
admin_csrf pass through verbatim.
- Claude bot P2 / nil-guard the test: TestKeyVizFanoutRunForwardsCookies
now require.NotNil(merged.Fanout) and require.Len(Nodes, 2)
before indexing Nodes[1], so a regression that produced a nil
Fanout block surfaces with a precise assertion failure rather
than a generic nil-pointer panic.
Design doc 3 updated with the whitelist + recursion-guard
behavior; the Phase 2-C MVP now matches what the code actually
does.
0 commit comments