# Fix Dedicated Statements storage target

## Background

Statement V2 proxy support now exists, but current Clinic UI requests still use the V1 list, plans, and detail endpoints. The Dedicated V1 loader builds its storage prefix from the current DBaaS project ID, while historical O11Y storage keeps the original project-independent application identity after project migration.

## Goal and target contract

- Resolve Dedicated V1 Statements storage by provider, physical region, tenant, and cluster application ID.
- Omit the current DBaaS project from the O11Y lookup and include deleted historical records.
- Require one complete `StorageInfo[statements]` target and fail closed otherwise.
- Apply the canonical bucket/prefix to V1 list, plans, and detail.
- Preserve the exact `data_source=v2` proxy behavior and all non-target tier behavior.

## Affected modules and routes

- Root Go module: `pkg/o11y/urls` and `pkg/ngm/statements`.
- NGM routes `/statements/list`, `/statements/plans`, and `/statements/plan/detail` when V1 Dedicated is selected.
- Executable/image/workflow: `cmd/ngm_api`, `ngm_api`, `.github/workflows/build_ngm_api.yml`.
- app-delivery application/workload: `ngm` / `ng-monitoring` StatefulSet; component `ngm-api`.

## Implementation

1. Extend `ResolveStorageTarget` with a Dedicated lookup using the existing project-independent Dedicated O11Y request.
2. Keep serverless lookup behavior intact and reject unrelated deploy types.
3. Resolve and inject the canonical Statements bucket/prefix for all three V1 Dedicated operations while leaving `SharedTier=false`.
4. Add trace-aware resolution and completion logs with counts and safe identifiers only.
5. Add resolver tests and endpoint tests that assert the exact O11Y request and the parameters delivered to the local query implementation.

## Compatibility and exclusions

- No public request/response schema changes.
- Statement V2 routing and Clinic UI migration are explicit non-goals.
- Premium, NextGen, and BYOC proxy behavior is unchanged.
- No database or app-delivery configuration change is required.

## Validation and release boundary

- Run focused `pkg/o11y/urls`, `pkg/ngm/statements`, and `cmd/ngm_api` tests, formatting, and `git diff --check`.
- In staging run the `ngm-api` workflow, verify `ng-monitoring`, then exercise Dedicated V1 list/plans/detail and V2 regression requests.
- Keep changes uncommitted, unpushed, and undeployed pending review.
