Repository navigation
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Visual regression check: docs previewCaptured the built docs preview at
Comparison is unavailable, not unchanged: no baseline is provisioned for this workflow, so no visual differences were established either way. Full-page screenshots (sandbox only): Accessibility snapshot (heuristic, not exhaustive compliance):
Notes: Playwright CLI wrote session artifacts (
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the documentation build portability changes.
No open issues 🎉
What changed in this PR
This PR addresses #78591 by removing platform-specific assumptions from the docs build checks and Playwright configuration.
Changes:
- Replace POSIX cleanup with Node-based removal and normalize path separators and CRLF line endings.
- Share Chromium settings, preferring the existing system path when available and falling back to bundled Chromium.
- Add portability regression coverage and update browser setup guidance.
| File | Description |
|---|---|
docs/scripts/check-redirects.mjs |
Normalize CRLF before parsing redirects. |
docs/scripts/check-reading-measure.mjs |
Normalize relative path separators before validation. |
docs/scripts/build-portability.test.mjs |
Cover path formats, line endings, cleanup, and browser selection. |
docs/playwright.config.ts |
Centralize Chromium settings and add bundled-browser fallback. |
docs/package.json |
Replace rm -rf with portable Node cleanup. |
.github/skills/cracktro/SKILL.md |
Document browser fallback and installation instructions. |
Review effort: Balanced (adaptive)
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Review complete: one actionable coverage gap found.
Highlights
The added portability regression suite is not connected to the docs test/build flow, so its coverage will not run automatically.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
| @@ -0,0 +1,103 @@ | |||
| import assert from "node:assert/strict"; | |||
There was a problem hiding this comment.
The new portability tests are not wired into any npm script or documented CI invocation, so this regression coverage will never run in the normal docs test/build flow.
💡 Run the regression suite
Add a package script (for example, test:scripts: node --test scripts/*.test.mjs) and invoke it from the docs CI/test command, so path, newline, cleanup, and browser-selection regressions are actually exercised.
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd, /codebase-design, and /grill-with-docs. Requesting changes because the new regression suite is never executed, so the fixes it guards have no CI protection.
📋 Key Themes & Highlights
Key Themes
- Unwired tests:
docs/scripts/build-portability.test.mjsis not run by any Makefile target or workflow.docs.ymlonly runsnpm run build. - Playwright coverage: CI never runs
playwright testand never installs Chromium. The Chromium-selection branches are only covered locally, and they patchfs.existsSyncthrough ESM internals. - Config design: The
buildcleanup is an inlinenode -eone-liner. The quote rewrite inplaywright.config.tsadds diff noise that is unrelated to the fix.
Positive Highlights
- ✅
rmSyncreplacesrm -rf, and thedistcleanup is idempotent. - ✅ CRLF normalization in
check-redirects.mjsand the path normalization incheck-reading-measure.mjsare small, targeted fixes. - ✅ The non-Playwright tests pass locally (5/5 under
node --test).
Test Execution Limits
npm cifailed locally on a registry TLS error, so@playwright/testis not installed. The Playwright branch tests were not run.- I did not compare the new tests against the base commit, so I have not confirmed they fail on the original bugs.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~10 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| @@ -0,0 +1,103 @@ | |||
| import assert from "node:assert/strict"; | |||
There was a problem hiding this comment.
[/tdd] These regression tests never run. No Makefile target or workflow runs docs/scripts/build-portability.test.mjs, and docs.yml only runs npm run build, so the fixes have no guard.
💡 Suggested wiring
test-docs-portability:
cd docs && node --test scripts/build-portability.test.mjsAdd this to the test-docs-* targets and call it from the docs CI job after npm ci --legacy-peer-deps. The Playwright branch tests need @playwright/test installed, so they only run where dependencies are installed.
@copilot please address this.
| }); | ||
|
|
||
| for (const systemChromium of [true, false]) { | ||
| test(`Playwright uses ${systemChromium ? "system" : "bundled"} Chromium when the system path ${systemChromium ? "exists" : "is absent"}`, () => { |
There was a problem hiding this comment.
[/tdd] These tests replace fs.existsSync through syncBuiltinESMExports and then import the real config. That needs @playwright/test and relies on Node ESM internals. The Windows path case uses the same kind of patch. Move the Chromium choice into a pure helper and test it directly.
💡 Suggested seam
export function chromiumUse(exists: (path: string) => boolean = existsSync) {
return {
...devices["Desktop Chrome"],
launchOptions: exists("/usr/bin/chromium-browser") ? { executablePath: "/usr/bin/chromium-browser" } : {},
};
}The spec can then pass a stub exists and assert both branches without patching the module system.
@copilot please address this.
| "start": "astro dev", | ||
| "prebuild": "npm run check:cracktro && node scripts/check-reading-measure.mjs && node scripts/check-redirects.mjs && npm run generate-agent-factory && npm run generate-model-tables && npm run build:slides", | ||
| "build": "rm -rf dist && astro build", | ||
| "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && astro build", |
There was a problem hiding this comment.
[/codebase-design] The cleanup is now an inline node -e one-liner inside JSON, which is hard to read. The new cleanup test also splits scripts.build on the string " && " to find it. Move this step into a small script so it can run and be tested directly.
💡 Suggested script
import { rmSync } from "node:fs";
rmSync("dist", { recursive: true, force: true });Then use "build": "node scripts/clean-dist.mjs && astro build". The require inside -e only works because -e evaluates as CJS, which is easy to break.
@copilot please address this.
| import { defineConfig, devices } from '@playwright/test'; | ||
| import { dirname } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { defineConfig, devices } from "@playwright/test"; |
There was a problem hiding this comment.
[/codebase-design] The quote rewrite touches nearly every line of this file (the imports, testDir, reporter, baseURL, trace, and command) with no behavior change. Keep the original single quotes so the diff only shows the Chromium selection change.
@copilot please address this.
| ## Tests | ||
|
|
||
| Run from `docs/` after `npm ci`: `npx playwright test tests/talk.spec.ts`. The config builds and previews (`npm run build && npm run preview`, `localhost:4321`, `/gh-aw/cracktro/`, Chromium `/usr/bin/chromium-browser`), covering built JSON-LD; under `npm run dev`, check `curl -s localhost:4321/gh-aw/cracktro/ | grep hasPart`. If `node_modules` is missing, report the tests as not run. | ||
| After `npm ci` in `docs/`, run `npx playwright test tests/talk.spec.ts`. Config builds/previews at `localhost:4321/gh-aw/cracktro/` to test JSON-LD, using `/usr/bin/chromium-browser` if present or bundled Chromium (`npx playwright install chromium`). For dev JSON-LD: `curl -s localhost:4321/gh-aw/cracktro/ | grep hasPart`. Without `node_modules`, report tests not run. |
There was a problem hiding this comment.
[/grill-with-docs] This paragraph gives local test instructions, but nothing in CI runs this spec, and no workflow installs Chromium. State that the spec is a local check, and that npx playwright install chromium is needed when /usr/bin/chromium-browser is absent, so authors do not assume CI covers it.
@copilot please address this.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "276bc150233458bb05f477771e892cf60bd9a0ff",
"kind": "requested",
"schema_version": "1",
"state": "9abf2bdbe6d8be3341219880eec16501fece3b2582e501f33b88e2052ad23f1d",
"work": [
"09f982fb8cab83ad2df13c1c574ad4364e0a64b0cf068310a834ee40b59ed543",
"10fec94a3ed7d2bdef624eff0821eef618ebeb26ee75711c14c201389191fd86",
"42ec4a4ab9d02eff26062197da4895ac62e9c02bf6d9e233edd1ff34a703acd8",
"51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
"5f079490da1d251ffacfd8b4bcc65c923450abdd0244c38c54e192cc12d175b2",
"8130ae250cf11bee994a7e0817af5efa0c8d40127ef28add3c76f4702e4d827a",
"a5eb1fe9743c6814bebc34f5a21016639a03eb38a3a5fab2a659cc4357b0eac7"
],
"workflow": "pr-sous-chef"
}
|
Docs builds assume POSIX cleanup, forward-slash paths, and LF checkouts. Playwright also requires Chromium at a fixed Linux path.
chromiumUse; prefer/usr/bin/chromium-browserwhen present, otherwise use bundled Chromium, preserving CI behavior.