Codex task 16: fix every smoke-test failure before the interview¶
The interview is at noon CT on 2026-11-13. Time box: 90 minutes. Commit each fix yourself as soon as its check passes; never wait for a review chair. Push the branch at the end of each fix.
The independent smoke worker ran 264 Playwright tests at commit 0dc8a20 on the static snapshot (:4180 demo, :4181 Forge Studio). The result: 1,109 PASS / 87 FAIL, which comes down to the six defects below. The full report is at C:\Users\fives\source\repos\fhir-pipeline-demo-smoke\smoke\SMOKE-REPORT.md, with screenshots beside it. Read it first.
The same bar applies as in pass 11: NUnit/Moq/AutoFixture/Bogus for .NET, Vitest for the web, and a Playwright regression test for each fix that fails before the fix and passes after it. Never edit applied EF migrations.
Repos and branches¶
- Demo: work on branch
wt/WT-dc65/smoke-fixesin THIS worktree (fhir-pipeline-demo-wt-WT-dc65-smokefix). It was cut fromwt/WT-dc65/fhir-demoat 37aea0b (pass 9). Do NOT touchwt/WT-dc65/fhir-demo: another worker (pass 14, then pass 12) owns it and will merge your branch. Keep your commits small and focused so that merge is easy. - Forge Studio:
wt/WT-dc65/forge-studio, worktreeC:\Users\fives\source\repos\forge-studio-wt-WT-dc65, if it exists. Otherwise create it withgit worktree addfromorigin/wt/WT-dc65/forge-studio. Another worker (Forge pass 3) may be running in that worktree. If acodex.exeprocess has that path on its command line, do NOT edit Forge files. Write the Forge fixes intodocs/FORGE-FIXES-PENDING.mdon the demo branch instead.
Fixes (in priority order)¶
- The OpenAPI link is broken on the static site.
- On the snapshot server,
/openapi/v1.jsonreturns HTTP 500 locally. On the live Cloudflare Pages site (https://fhir-pipeline-demo.pages.dev/openapi/v1.json), the SPA fallback answers with HTML. - Fix: in snapshot mode, export the real OpenAPI document as a static file at build time (
web/public/openapi/v1.json), generated from the API withMicrosoft.AspNetCore.OpenApi, not hand-written. - Add a viewer route (
/api-reference) that renders it as an endpoint list grouped by tag, showing method, path, summary, and request and response schemas. Point the footer link there, with a raw JSON link beside it. - Add a Pages
_redirects/_routesrule so*.jsonis never rewritten toindex.html. -
Test: the static
/openapi/v1.jsonparses as JSON, itspathscount matches the live API's count, and the viewer lists every path. -
The "Pinned original" evidence links return 404. All 11 point at the GitHub repo, which is private, so an unauthenticated viewer gets a 404 page.
- Fix: every "Pinned original" link must point to an in-app copy of the pinned file (served from the static bundle with its SHA-256 shown), plus an optional secondary "source on GitFront" link. Read that link from one config value,
VITE_SOURCE_BROWSER_BASE, which is empty by default, and hide the link when the value is empty. - Grep both repos for
Pinned originaland forgithub.com/andrewjonesdev. -
Test: no rendered link in either app points to
github.comunless that base is configured. -
Clicking the already-active Overview clears the dashboard.
- Fix: re-selecting the active nav item must be a no-op, or must re-render the same content. It must never blank the content or swap the heading.
-
Test: click Overview twice, then assert the metrics and patient tiles are still present.
-
The patient chart opens empty on first load.
- Fix: on first open, select the first patient in the cohort by default, and keep the selection in the URL (
?patient=). -
Test: on a fresh load, choosing Chart shows a patient heading and clinical content.
-
The Markdown documents are not responsive on a phone.
- Fix: render the demo's three Markdown documents and Forge's eleven local text copies with a real Markdown renderer (sanitized, with no raw HTML), inside a responsive container (
max-width: 100%, wrappedpre/code blocks, tables that scroll horizontally inside their own box). -
Test: at 390x844 the page
scrollWidthis at most the viewport width. -
A long untrusted summary overflows its card in Way 2.
- Fix: apply
overflow-wrap: anywhereandmin-width: 0to the card's summary, detail and source text. It must stay inert text, with no HTML rendering. - Test: the stress fixture at 390x844 makes the page no wider than the viewport.
Then¶
- Re-run the full smoke suite (
node web/node_modules/@playwright/test/cli.js test -c smoke/playwright.config.ts) from the smoke worktree, or copysmoke/into this worktree, against freshly rebuilt:4180/:4181snapshots of YOUR tip. - Report PASS/FAIL counts.
- The only acceptable remaining failures are documented host-contention timeouts, and each must have a re-run that passes.
- Run the full .NET suite (
dotnet test FhirDemo.slnx) and the web unit tests. Paste the counts intodocs/VERIFY.md, under a "Pass 16" heading. - If the migration guide
docs/MIGRATION.mdnow exists (pass 9 wrote it), remove the Story manifest'sNOT DONE: docs/MIGRATION.md is absentlabel and link the guide. - Commit, push, and finish with a short report: what was fixed, the test counts, and anything NOT DONE.