mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-25 21:19:38 +00:00
43a87ff747
Addresses a Codex review finding: the Phase 2b delegated config/all path loaded EVERY tenant config via GetAllConfigurationsAsync() (an O(all tenants) table scan + full-config materialization) and then filtered in memory. Because Phase 2b opened this endpoint to delegated MSP users, a caller scoped to a few tenants could trigger an all-tenants scan per request — response-bounded, not read-bounded. Now point-read ONLY the caller's managed tenants via the non-creating TryGetConfigurationAsync (cached; never writes a phantom default row), dropping ids with no config row (exists==false). A delegated MSP scoped to k tenants does k point reads instead of scanning n. The response is still filtered+redacted as defense in depth; the set fed to it is now itself bounded. Full Functions suite green (2464). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>