Appearance
AI Classification Job Live Smoke
Purpose
make test-ai-classification-job-live is an opt-in live gateway smoke for the AI classification job surface. Today it is intentionally a read-only legacy route guard: public /api/questions/ai-classify/jobs*, /api/questions/ai-classify/suggestions, /api/questions/ai-generation*, and /api/questions/ai-solutions* must stay behind the broad legacy questions proxy until native job SSE/cancel/provider parity has explicit promotion evidence.
This smoke complements make test-ai-classification-job-route-guard, which is static. The live smoke proves the running gateway route table and response headers still match the conservative cutover state.
Command
bash
cd go-platform
AI_CLASSIFICATION_JOB_LIVE_CONFIRM=legacy-job-routes \
AI_CLASSIFICATION_JOB_AUTHORIZATION='Bearer <token>' \
make test-ai-classification-job-liveOptional route-header check for an existing job SSE endpoint:
bash
AI_CLASSIFICATION_JOB_ID=<legacy-job-id> \
AI_CLASSIFICATION_JOB_LIVE_CONFIRM=legacy-job-routes \
AI_CLASSIFICATION_JOB_AUTHORIZATION='Bearer <token>' \
make test-ai-classification-job-liveSet AI_CLASSIFICATION_JOB_ORGANIZATION_ID=<org-id> when the live legacy route requires tenant scope. Set AI_CLASSIFICATION_JOB_ARTIFACT_DIR=<dir> to keep route table, headers, and body files.
Assertions
GET /v1/routesincludes broadquestionsandfallbackroutes aslegacy_proxy.- No active public route targets internal AI service paths such as
/v1/ai-classifier*or/v1/ai/*. - Job, suggestion, generation, and solution public route prefixes are not in
native_read,shadow_read,native_write_shadow_validate, ornative_write. GET /api/questions/ai-classify/jobs?limit=1reports:X-Hoctapaz-Gateway-Route: questionsX-Hoctapaz-Gateway-Route-State: legacy_proxy
- When
AI_CLASSIFICATION_JOB_IDis supplied, the SSE route/api/questions/ai-classify/jobs/{id}/eventsreports the same legacy route headers. The script allows curl timeout after headers because SSE streams may stay open.
The smoke does not call cancel routes because cancel is a write. Cancel route promotion requires a future native target plus explicit disposable fixture and rollback evidence.
Self-Test
The hermetic self-test validates route-table and header assertions without a running gateway:
bash
AI_CLASSIFICATION_JOB_SELF_TEST=1 make test-ai-classification-job-liveRollback
No route table changes are made by the smoke. If a non-default route table accidentally promotes AI job routes, return GATEWAY_ROUTE_TABLE to deploy/gateway/routes.json or remove the specific native entries before retrying.