# TASK 4.1: Add Smoke Validation for the Runtime Read Path

## Summary

Add smoke validation proving that the runtime read path can query Redshift `curated` data loaded by the synthetic feed.

This task validates both migrated runtime consumers:

- anomaly detector data access tool path,
- `/warehouse/orders` API read path.

## Dependencies

- TASK 2.3 (data access prompt/tool descriptions)
- TASK 3.2 (`/warehouse/orders` endpoint migration)
- Redshift Synthetic Data Feed slice complete

## Files to Create or Modify

### 1. Tests or smoke command

Add tests or a CLI/dev smoke path that validates:

- tenant resolution,
- Redshift connection,
- curated discovery,
- curated query execution,
- migrated endpoint behavior.

Exact test project depends on existing project conventions.

## Required Behavior

Smoke validation must prove:

- runtime can resolve the default or explicit tenant,
- missing/inactive tenant mappings fail clearly,
- data access tools list or expose only approved source-mirror `curated` objects,
- data access tools can query approved KDS source-mirror tables such as `curated.kds_orders`,
- data access tools can query approved KDS source-mirror tables such as `curated.kds_items`,
- non-curated schema references are rejected,
- migrated `/warehouse/orders` endpoints return data from Redshift curated when synthetic data exists.

Recommended validation queries:

- count rows from `curated.kds_orders`,
- count rows from `curated.kds_items`,
- describe `curated.kds_orders`,
- describe `curated.kds_items`,
- attempt to reference `kdsdev.orders` and verify rejection.

## Status

Deferred.

The temporary CLI smoke command added during implementation was removed.
This task still needs a proper validation path.

## Acceptance Criteria

- [ ] Smoke validation covers tenant resolution
- [ ] Smoke validation covers missing or inactive tenant failure
- [ ] Smoke validation confirms curated-only schema discovery
- [ ] Smoke validation confirms query against approved source-mirror `curated` objects
- [ ] Smoke validation confirms non-curated schema rejection
- [ ] Smoke validation covers at least one migrated `/warehouse/orders` endpoint once that migration exists
- [ ] Smoke validation uses Redshift curated data loaded by slice 02
- [x] Monitor specs are not migrated in this task
- [x] Solution builds without errors

## Notes

- This is smoke validation, not the full monitor evaluation framework.
- If local Redshift is not available in normal test runs, keep integration tests clearly gated/configured.
- Do not require Athena, S3, `COPY`, or `UNLOAD`.
