# NGM serverless storageInfo routing

## Current Design

Slow query and statements local readers compute object storage bucket and prefix from request headers. Metrics and logs routing is centralized behind `pkg/o11y/urls.ClusterURLsResolver`, but PR #1524 added a separate direct O11Y client lookup for serverless `storageInfo`.

## Risks

- A separate storage lookup entrypoint can drift from metrics/log routing.
- Legacy bucket and prefix construction is still required for non-serverless and fallback paths.
- O11Y `storageInfo` entries are only usable when both `bucketName` and `objectPath` are present.

## Target Contract

- Starter/Essential slowquery and statements local reads resolve `storageInfo` through `ClusterURLsResolver.ResolveStorageTarget`.
- Slowquery/statements readers receive only resolved bucket/prefix overrides.
- Non-serverless behavior keeps the existing local bucket/prefix rules and proxy paths.
- Missing or ambiguous serverless storageInfo is an explicit resolver error.

## Implementation Steps

1. Parse O11Y cluster `storageInfo` into typed storage locations.
2. Add `StorageTarget` resolution under `pkg/o11y/urls`.
3. Pass resolved bucket/prefix overrides through slowquery and statements params/loaders.
4. Add focused tests for resolver behavior and storage override path construction.

## Verification Checklist

- `go test ./pkg/o11y/urls`
- `go test ./pkg/ngm/slowquery`
- `go test ./pkg/ngm/statements/load`
- `go test ./pkg/ngm/statements/...`
