Repository navigation
web: markdown stubs give way to the HTML page; dates that are data survive extraction (board #129, #131) - #376
Merged
Merged
Conversation
…ta survive extraction Board #129: a markdown answer under 50 words can be a stub of a page a script draws (bundlephobia answers the markdown Accept with 7 words). The URL is fetched again with a browser Accept; HTML takes extraction and, if thin, rendering, and replaces the markdown when it has over twice the markdown's words. A page short in both formats stays the markdown its site wrote. Live: bundlephobia [email protected] goes from the 7-word stub to the rendered page with its sizes (6.5 kB minified, 2.5 kB gzip). Board #131: Defuddle 0.19.6's content-pattern pass drops a short dated block above the prose as an article's byline unless its text opens with one of seven labels and a colon, and near the content's edges cuts a <time> out of its line. A date labeled by a heading, dt or th just before it, or by a short "Label:" opening its line, is now hidden from Defuddle's date patterns (U+2063 between its characters, removed from the output), and a <time> inside a longer line hands the line its text. deps.dev keeps "Published / May 22, 2023" and its two "metadata as of" dates; across 50 saved documents only deps.dev, PostgreSQL's release notes ("Release date:") and RFC 9000's references change, by exactly the restored dates. web 0.1.1; the decisions and evidence are in the design's Decision Log. Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)
Two defects the branch review found in the date pre-pass:
- Shielding a date beside the page's title hid it from Defuddle's
`published`, which it reads from text there when no tag carries the
date: `<h1>Release Notes</h1><p>Published: May 3, 2024</p>` lost its
published date. The first h1, the three elements either side of it and
their dates are now left to Defuddle, untouched.
- Moving a hidden <time>'s text out of it put hidden text on the page
("released May 3, 2024yesterday"). A <time> with any mark of hiding now
keeps its text, and only a <time> in a line (a block of text and inline
elements) gives its text up.
The 50-document before/after comparison is unchanged: still only
deps.dev, PostgreSQL's release notes and RFC 9000's references differ.
Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 25, 2026
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.
Two fixes to the
webplugin's clipper, board #129 and board #131, at web 0.1.1. The decisions and their evidence are in the design's Decision Log (docs/doperpowers/specs/2026-10-25-web-fetch-design.md).What behaves differently
Markdown stubs (board #129). When a server answers the markdown-first
Acceptwith markdown whose body is under 50 words, the clipper fetches the URL again with a browser'sAccept. An HTML answer goes through extraction and, if thin, rendering, and replaces the markdown when it has over twice the markdown's words. Otherwise the markdown stays, with any rendering note attached. bundlephobia's [email protected] page was saved as its 7-word stub; it now comes back rendered, with the sizes (6.5 kB minified, 2.5 kB gzip).Dates that are data (board #131). Defuddle 0.19.6's content-pattern pass drops a short dated block above the prose as an article's byline. It keeps such a block only when its text opens with one of seven labels and a colon (
date|published|updated|posted|from|to|subject:). Near the content's edges it also cuts a<time>out of its sentence. The clipper now protects two kinds of date before Defuddle runs:dtorthjust before the date, or aLabel:of up to three words at the start of its line.<time>in a line (a block holding only text and inline elements) moves its text out next to it, so the date stays in the sentence. The emptied element keeps itsdatetime, sopublishedin the frontmatter does not change.deps.dev's requests 2.31.0 page now keeps "Published / May 22, 2023", and "Package/Project metadata as of …" keep their dates.
Decisions and alternatives
removeContentPatterns: falseturns off every pattern rule, so read times, newsletter boxes and bylines would come back. Adding a colon to a heading label reaches Defuddle's own guard only for its seven label words. That guard also misses relative dates, the<time>boundary rule, and the rule that drops a dated block right after the h1.<time>keeps its text, so Defuddle removes it along with the element.Verified
bash web/tests/run.shon the final HEAD (5f8e579): exit 0. That covers 110 clipper tests with 0 skipped (the Chromium tests ran), the bundle matching its source, the mod's 48 tests, and the eval scripts' 55 tests. Two earlier local runs each went red on a load-sensitive flake in code this branch does not touch: once the eval harness'stest_a_process_deaf_to_the_interrupt_is_killed(which failed 1 of 6 times when run alone), and once a Chromium render test that hit the 30 s render limit (it passed on rerun). The machine's load average was about 220 at the time. Both are logged in the friction tracker (Friction tracker (moved to ~/.claude/friction-tracker/doperpowers/) #304).ci-gateon 5f8e579: GREEN (shell-lint, repo-checks, mods-types, web): https://github.com/SSFSKIM/doperpowers/actions/runs/40231234227publishedwhen the date was given only as text.<time>leaked its text onto the page.Round 2 (the same commits before the rebase): no material findings.
<time>test.--refreshand its own cache:</time>as a word.Not verified
Residue for the board
<html>/<body>extracts to nothing. rfc-editor's htmlized RFCs (rfc8439.html, eval code-3) start with<pre>. linkedom makes that<pre>the document element and leaves the body empty, so Defuddle finds 0 words. Only the render saves the page, which means a host without Chromium gets an empty page. WithWEB_CHROME=nonethe clipper returns 0 words; wrapping the document in<html><body>before parsing gives 14,648 words, the same as the render.startedbefore its limit starts, and the render tests should allow more than 30 s under load.<time>is the only inline element protected. A date in an inline<span>inside a sentence near the top can still be cut out.Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)