Skip to content

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-fixes in THIS worktree (fhir-pipeline-demo-wt-WT-dc65-smokefix). It was cut from wt/WT-dc65/fhir-demo at 37aea0b (pass 9). Do NOT touch wt/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, worktree C:\Users\fives\source\repos\forge-studio-wt-WT-dc65, if it exists. Otherwise create it with git worktree add from origin/wt/WT-dc65/forge-studio. Another worker (Forge pass 3) may be running in that worktree. If a codex.exe process has that path on its command line, do NOT edit Forge files. Write the Forge fixes into docs/FORGE-FIXES-PENDING.md on the demo branch instead.

Fixes (in priority order)

  1. The OpenAPI link is broken on the static site.
  2. On the snapshot server, /openapi/v1.json returns HTTP 500 locally. On the live Cloudflare Pages site (https://fhir-pipeline-demo.pages.dev/openapi/v1.json), the SPA fallback answers with HTML.
  3. 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 with Microsoft.AspNetCore.OpenApi, not hand-written.
  4. 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.
  5. Add a Pages _redirects / _routes rule so *.json is never rewritten to index.html.
  6. Test: the static /openapi/v1.json parses as JSON, its paths count matches the live API's count, and the viewer lists every path.

  7. 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.

  8. 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.
  9. Grep both repos for Pinned original and for github.com/andrewjonesdev.
  10. Test: no rendered link in either app points to github.com unless that base is configured.

  11. Clicking the already-active Overview clears the dashboard.

  12. 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.
  13. Test: click Overview twice, then assert the metrics and patient tiles are still present.

  14. The patient chart opens empty on first load.

  15. Fix: on first open, select the first patient in the cohort by default, and keep the selection in the URL (?patient=).
  16. Test: on a fresh load, choosing Chart shows a patient heading and clinical content.

  17. The Markdown documents are not responsive on a phone.

  18. 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%, wrapped pre/code blocks, tables that scroll horizontally inside their own box).
  19. Test: at 390x844 the page scrollWidth is at most the viewport width.

  20. A long untrusted summary overflows its card in Way 2.

  21. Fix: apply overflow-wrap: anywhere and min-width: 0 to the card's summary, detail and source text. It must stay inert text, with no HTML rendering.
  22. 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 copy smoke/ into this worktree, against freshly rebuilt :4180/:4181 snapshots 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 into docs/VERIFY.md, under a "Pass 16" heading.
  • If the migration guide docs/MIGRATION.md now exists (pass 9 wrote it), remove the Story manifest's NOT DONE: docs/MIGRATION.md is absent label and link the guide.
  • Commit, push, and finish with a short report: what was fixed, the test counts, and anything NOT DONE.