Appearance
Import Route Proof Bundle
Status: accepted-bounded-next-slice-not-complete.
This proof closes the SVC-012-import-route-proof-bundle contract slice for import-service, implemented by docx-import-service, while keeping the default import routes legacy-safe.
Evidence
| Requirement | Evidence | Result |
|---|---|---|
| Matching import route proof | make test-import-status-routes test-import-approval-routes and make test-import-review-roundtrip-routes validate the non-default status, approval, detail, review-save, and combined roundtrip tables. | Passed |
| Live/browser proof | On 2026-07-13, the real Teacher editor loaded, saved, and reloaded a completed 28-question Physics job through the isolated non-default Gateway. output/playwright/import-review-browser-isolated-20260713/ captures both native route headers, the review payload, persisted manual markers, and a screenshot. | Passed locally |
| Rollback proof | Default deploy/gateway/routes.json remains active; docs/qa/import-route-rehearsals.md records switching back to it and rerunning static guards. | Passed bounded notes |
Ownership Boundary
docx-import-serviceowns import jobs, parser output, preview/draft state, review edits, approval orchestration, queue/failure projections, and organization-scoped list pagination.- Approved canonical questions and exam snapshots remain owned by
question-bank-serviceandexam-servicerespectively. document-serviceowns stored bytes and materialized object reads; import-service uses its API boundary.- PDF/OCR/MathType adapters, quota, AZ Credits, billing, wallet, and usage decisions remain separate bounded slices.
Verification
bash
GOTOOLCHAIN=go1.25.11 go test ./services/docx-import-service/... -count=1
make test-import-status-routes test-import-approval-routes
make test-import-review-roundtrip-routes test-import-review-roundtrip-live
IMPORT_REVIEW_ROUNDTRIP_SELF_TEST=1 make test-import-review-roundtrip-liveThe service tests, route guards, self-test harness, and isolated real browser rehearsal passed. The browser rehearsal is not default-route promotion evidence.
Route State
- Default
/api/exam-import*routes remain legacy-proxied indeploy/gateway/routes.json. - Native status, approval, detail, and review routes remain non-default rehearsals.
- Import route promotion requires matching route, live, browser, and rollback proof.
- Rollback is switching
GATEWAY_ROUTE_TABLEtodeploy/gateway/routes.json, removing the rehearsal entries, and rerunning the matching route and smoke checks.
Remaining Work
- Capture a rollback-after-candidate rehearsal in the deployment environment before any default route change.
- Keep the default table legacy-proxied until promotion is explicitly approved.