Appearance
MathType Artifact Browser Smoke
Scope
make test-mathtype-artifact-browser-local-postgres proves the non-default Teacher MathType to Word Equation candidate end to end. It creates disposable PostgreSQL databases for IAM, Document, and Import, starts fresh loopback instances of IAM, document-service, docx-import-service, API Gateway, and Teacher Web, then removes the whole runtime on exit.
The proof uses the read-only Go Formula runtime at http://127.0.0.1:8095 unless GO_FORMULA_DOCX_URL is supplied. It never changes the default Gateway route table, legacy source, or a shared database.
Run
bash
MATHTYPE_ARTIFACT_BROWSER_LOCAL_POSTGRES_CONFIRM=local-postgres \
HOCTAPAZ_DOCX_CORPUS_DIR=/Users/velikho/Desktop/test-hoctapaz \
make test-mathtype-artifact-browser-local-postgresThe harness selects the Math DOCX by normalized filename (MON TOAN) or uses HOCTAPAZ_MATHTYPE_BROWSER_FIXTURE when an explicit fixture is required. It copies those bytes to an ASCII filename only for browser download-header stability; conversion input remains the real corpus bytes.
Browser Assertions
The Playwright runner opens:
text
/teacher/exams/mathtype-word-equation?teacherExamUtilityGateway=nativeIt uses only visible Teacher UI controls and verifies Gateway headers for:
POST /api/teacher/import-sourcesasteacher-import-source-uploadandnative_write, with the returnedsourceAssetIdandsourceKind=mathtype-equation.POST /api/exam-import/mathtype/jobsasexam-import-mathtype-createandnative_write, carrying the opaque asset id and no rawstorageKey.- Timer-driven
GET /api/exam-import/jobs/{id}asexam-import-job-detailandnative_read. The UI accepts the native raw job detail as well as the usual{ data }envelope so completion exposes the download control. GET /api/exam-import/mathtype/jobs/{id}/downloadasexam-import-mathtype-downloadandnative_read, with DOCX attachment headers, a browser download event, and saved ZIP bytes.
The harness also registers a second Teacher in the same organization and requires 404 MATHTYPE_JOB_NOT_FOUND for that actor's download and reprocess. It posts a raw storageKey through the candidate Gateway and requires 400 MATHTYPE_SOURCE_REQUIRED.
Structural Result
The successful local recheck on 2026-07-15 wrote:
output/qa/mathtype-artifact-browser-local-postgres-20260715114359/
Its downloaded artifact was a 489,407-byte DOCX with these structural counts:
| Metric | Source | Downloaded Word Equation DOCX |
|---|---|---|
word/document.xml w:object | 198 | 81 |
word/document.xml m:oMath | 10 | 127 |
| Deterministic converted formulas | - | 117 |
| Unresolved formulas | - | 0 |
unzip -t passed. The job detail held only opaque generated-artifact metadata and its scoped download API, never a storage key. The Teacher completion screen is captured at:
output/qa/mathtype-artifact-browser-local-postgres-20260715114359/browser/completed-before-download.png
This is candidate-route local evidence. It does not establish Microsoft Word visual equivalence, billing/usage settlement, public/default-route promotion, or a persistent deployment claim. Nineteen linear-OMML fallback warnings remain review-required in the job result.