Add free Page Source Check with bounded HTML input - #58
Open
offflinerpsy wants to merge 1 commit into
Open
Conversation
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.
A user can paste a public page’s HTML or choose an HTML file, receive deterministic observations and a concrete correction, then compare fresh source without signing in. The editable example starts with an empty title; the corrected example changes its title finding from Review to Observed.
This is the accepted source-only fallback for the proposed single-page readiness check. Arbitrary live URL retrieval remains incomplete: the current native-fetch stack does not establish the required connection-time public-IP/DNS-rebinding guarantee. The optional URL is resolution context only. HTTP status, redirects, X-Robots-Tag, robots.txt and indexing remain Unknown; URL-only API requests receive a useful unsupported response.
POST /api/page-readiness/v1handler using native HTMLRewriter, streamed request limits (320 KiB body / 256 KiB HTML / five seconds), the existing rate-limit binding and zero target requests. No LLM, storage, analytics payload or new infrastructure./tools/page-readiness/and scoped CSS/JS through one additive builder hunk. The router changes by one import and one exact branch; it passes only the rate-limit capability. Existing auth, endpoints and Tools Studio templates are preserved.cloudflare/base2026-worker/PAGE_SOURCE_CHECK.md. Discoverability/sitemap integration and production release remain release-owner work.Validation: 35 real Workers HTMLRewriter tests; 645 existing public Worker tests; 13 member tests; TypeScript; 32 builder tests; JavaScript syntax; publication audit and diff checks. Local HTTPS Worker/browser QA verified title before/after, file input without URL, hostile source inertness, zero target resource fetches, clear behavior, one header/footer/H1, no storage and no horizontal overflow at 390px. Final member-enabled synthetic artifact and Wrangler dry-run passed. Synthetic fixtures and screenshots are excluded from Git.
This PR is a reviewed source candidate, not a production deployment or evidence of real-user activation. Release must use the current verified account/bindings and retained production artifact, preserving the member build flag and adjacent-tool/privacy smoke checks.