Appearance
Admin Operations Owner Snapshot Route Rehearsal
Status: Non-default Gateway, real owner endpoint, and admin-web browser proof; not default-route promotion or dashboard metric parity.
This rehearsal exposes only read-only owner-source map and snapshot status to the admin operations UI. It does not migrate /api/admin/operations* default traffic, support moderation, queue commands, or dashboard aggregation.
Route Boundary
The shared deploy/gateway/routes.json was not changed. It keeps broad /api/admin traffic on legacy_proxy.
The current admin-web client also keeps normal /admin/operations navigation on its fixture checklist. It sends the snapshot request only when the explicit candidate URL is used:
text
/admin/operations?adminOperationsGateway=nativeUse that URL only with one of the dedicated non-default route tables below. This prevents a normal client session from sending the native-only request to the default legacy-proxied Gateway route.
The dedicated tables are:
deploy/gateway/routes.admin-owner-source-native-example.jsonfor Compose.deploy/gateway/routes.admin-owner-source-native-localhost-example.jsonfor local proof.
Both tables expose only these exact GET routes before the broad admin route:
| Gateway path | Native owner path | Role |
|---|---|---|
/api/admin/operations/source-map | /v1/admin/operations/source-map | ADMIN |
/api/admin/operations/source-snapshots | /v1/admin/operations/source-snapshots | ADMIN |
All writes, nested paths, health, queue, retry/clear, metrics, imports, outbox, and fallback traffic remain legacy-proxied.
Current Runtime And Browser Proof (2026-07-12)
A temporary admin-service ran on :8094 with ADMIN_OPERATIONS_SOURCE_TARGETS configured only for ai.providers=http://127.0.0.1:8103/v1/ai/providers/status. The existing Compose ai-classifier-service on :8103 was the real owner endpoint and returned status=ok.
A temporary Gateway on :18094 used only the localhost owner-source route table. An anonymous snapshot request returned 401. A disposable HS256 token with type=access, role=ADMIN, and a full name received 200 with:
X-Hoctapaz-Gateway-Route: admin-operations-source-snapshotsX-Hoctapaz-Gateway-Route-State: native_readai.providers=ok,HTTP 200, and a measured owner latency of2 msin the direct runtime call.
The admin Vite app ran on :5201 with VITE_API_BASE_URL=http://127.0.0.1:18094. The historical browser rehearsal requested only /api/admin/operations/source-snapshots through Gateway. It rendered 17 owner-source statuses, including AI provider status as ready with HTTP 200 and 4 ms; the remaining unconfigured owner sources remained explicitly unconfigured rather than being shown as synthetic totals. Console error count was zero and admin.operations.source_snapshots.load measured 28.7 ms.
Visual artifacts:
output/playwright/admin-owner-source-desktop-20260712.pngoutput/playwright/admin-owner-source-mobile-20260712.png
At 390x844, scrollWidth=390, so the owner-source rows remained inside the mobile viewport. The temporary browser, Gateway, admin-service, and Vite processes are stopped after this rehearsal.
The current client guard is covered by apps/admin-web/src/App.test.tsx: normal /admin/operations makes no request, while the explicit candidate URL issues the authenticated Gateway request. The historical runtime capture proves the non-default Gateway response shape, not default admin operations parity.
Verification
bash
GOTOOLCHAIN=go1.25.11 go test ./services/api-gateway/internal/gateway -run AdminOperationsOwnerSource -count=1
GOTOOLCHAIN=go1.25.11 go test ./services/admin-service/... -count=1
make test-admin-owner-source-routes
pnpm --filter @hoctapaz/admin-web test
pnpm --filter @hoctapaz/admin-web buildRollback
Switch GATEWAY_ROUTE_TABLE back to deploy/gateway/routes.json and remove the non-default owner-source tables from the rehearsal. Clear ADMIN_OPERATIONS_SOURCE_TARGETS if an owner status endpoint becomes incompatible. Do not promote the default admin route until response parity, tenant behavior, browser evidence, and rollback review cover the full intended operations surface.