Skip to content

OBJ-87 — Playwright headless Chromium in runtime image - #33

Merged
objectgyan merged 1 commit into
mainfrom
objectgyan/obj-87-m61-playwright-headless-chromium-in-runtime-image
May 17, 2026
Merged

objectgyan merged 1 commit into
mainfrom
objectgyan/obj-87-m61-playwright-headless-chromium-in-runtime-image

Conversation

@objectgyan

Copy link
Copy Markdown
Owner

Summary

  • Add Microsoft.Playwright 1.50.0 NuGet reference to DocumentBuilder.Infrastructure
  • Implement IPlaywrightLauncher singleton: lazy Chromium browser init, request-scoped IBrowserContext per call
  • Add GET /api/debug/pdf-smoke endpoint returning { status: "ok", launchMs: NNN } (no auth required per review-rules)
  • Wire Playwright browser cache (~/.cache/ms-playwright) + playwright.ps1 install chromium steps into CI build-test job
  • Add README "Playwright / PDF Setup" section with cold-start budget table (≤5s warm, ≤30s cold)

Test plan

  • dotnet build passes with 0 warnings
  • 159 unit tests pass (Category!=Integration)
  • scripts/validate-obj-87.ps1 exits 0: cold launchMs=2801ms, warm launchMs=215ms
  • validation/obj-87-api.txt — GET /api/debug/pdf-smoke returned 200 with launchMs
  • validation/obj-87-db.txt — n/a (no DB changes)
  • plans/.../OBJ-87-outcome.md — VERDICT: PASS

- Add Microsoft.Playwright 1.50.0 to DocumentBuilder.Infrastructure
- Implement IPlaywrightLauncher singleton (lazy browser init, request-scoped contexts)
- Add GET /api/debug/pdf-smoke endpoint returning {status, launchMs}
- Wire Playwright browser cache + install steps in CI workflow
- Add README "Playwright / PDF Setup" section with cold-start budget table
- Add scripts/validate-obj-87.ps1; cold=2801ms, warm=215ms on local run
@linear-code

linear-code Bot commented May 17, 2026 •

Copy link
Copy Markdown
OBJ-87 M6.1 — Playwright headless Chromium in runtime image

Milestone: M6 — PDF export · Wave: 2

Summary

Provision Microsoft.Playwright for .NET. Add dotnet playwright install to local + CI bootstrap. Document cold-start budget.

Acceptance

  • Playwright package referenced; browsers installed in CI artifact cache
  • A throwaway endpoint launches Chromium, opens about:blank, returns 200
  • Cold-start time documented in README

Validation

  • DB check: N/A
  • Live API check: GET /api/debug/pdf-smoke returns 200 + ms timing
  • Script: scripts/validate-obj-NNN.ps1

Branch / PR

Branch from main; target main. No trailers/footer.

Review in Linear

@objectgyan
objectgyan merged commit 9db10f5 into main May 17, 2026
2 of 3 checks passed
objectgyan added a commit that referenced this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant