Files
AutopilotMonitor/src
Oliver Kieselbach b215602737 feat(backend,mcp): server-side fields= projection for paginated config/all
Follow-up to opt-in pagination: fields= was a client-side trim in the MCP tool,
so it did not round-trip across pages — following nextLink returned the full
safe-field set again, and the shape differed page 1 vs 2+.

Move the projection server-side (matching query_raw_sessions):
- TenantConfigProjection: keep-list intersection — only the 9 non-sensitive
  fields can ever be emitted; requested keys are intersected (fields=teamsWebhookUrl
  yields nothing), tenantId always included. ParseFields is case-insensitive.
- TenantConfigPagination: parse fields=; BuildNextLink echoes it so the projection
  carries across every page. fields is NOT in the continuation fingerprint (it is a
  projection, not a filter — changing it mid-stream keeps the cursor valid).
- GetAllTenantConfigurationsFunction projects via TenantConfigProjection.ProjectAll.
- MCP list_tenants passes fields to the backend (followNextLink params) and drops the
  client-side projectTenantFields; extractTenantList stays as defense-in-depth.

Now every page returns exactly the requested columns and the backend sends less over
the wire. Tests: TenantConfigProjection (incl. secret-cannot-be-requested) +
pagination fields-echo; backend 24/24, MCP vitest 52/52.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 19:39:02 +02:00
..
2026-05-27 18:02:24 +02:00
2026-05-27 18:02:24 +02:00