Repository navigation
ci(site): test the pages in a real browser, check the live site, widen the em-dash check - #71
Merged
Merged
Conversation
…n the em-dash check scripts/smoke_site.mjs serves the assembled site at /plumbline/, as Pages does, and drives the runner's own Chrome over the DevTools protocol with Node 22's built-in WebSocket, so the site workflow still installs nothing. It checks the flows a reader uses: the explainer's result card and derived example, an invalid input's message and aria-invalid, a calculator run writing its inputs into the address, a link carrying them reproducing the result, and search from a doc page. It fails on any console error, uncaught exception, or CSP violation on every page. Checked against a copy of the build with the old "[object Object]" bug and an inline script put back: it names both. A live job after deploy runs check_site_links.mjs against the Pages URL, which is the only way to see that a missing path really returns the 404 page with a 404 status. It retries once, since the CDN can lag a deploy. The em-dash check now covers site/, scripts/, and .github/, and the HTML entity and JS escape spellings, written with bracketed characters so the workflow does not match itself. The quickstart's traceback guard used grep -qv, which succeeds on any multi-line output, so it could never fail. It now fails when the word appears (fixes #49). Part of #54. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are the parts of #54 that were still open, plus #49, which sits in the same workflow file.
Fixes #49. Part of #54.
A browser smoke test that installs nothing (
scripts/smoke_site.mjs)/plumbline/, as Pages does, and drives the runner's own Chrome over the DevTools protocol. It uses Node 22's built-in WebSocket, which the runner already has (v22.23 in the last run), so the site workflow keeps its no-install rule.aria-invalid;[object Object]bug put back and an inline script added to a doc page, it reported all three: the wrong status text, Chrome's CSP error, and the recorded violation.site.yml's docs job, against the same unpacked archive the deploy publishes.A check of the live site after deploy
livejob, which needsdeploy, runscheck_site_links.mjsagainst the Pages URL. Only the live site can show that a missing path gets the 404 page with a 404 status.A wider em-dash check
site/,scripts/and.github/as well as the markdown andsrc/.datasets/public/andsite/vendor/stay excluded, since both hold vendored files.—,—and—matched all three.#49
grep -qv Traceback, which succeeds on any output with more than one line, so it could never fail. It now fails when the word appears. I checked it fires on a real traceback.Left open in #54
Whether
--as prose punctuation should be banned too. It stands in for an em dash in 22 places, including METHODOLOGY and one report string inloader.py. Changing the report string means regenerating the example report, so that is better as its own decision.🤖 Generated with Claude Code