Repository navigation
site: model-pins gets its search text; the license badge stops 404ing - #22
Conversation
Two link/meta defects found while checking that the engine's newest doc page
reaches the site:
1. docs/model-pins.md (engine #1148, merged 2026-11-05) is published, but it
had no PAGE_META entry, so its <title> was cut to
"Model pins: the revision of every upstream…" and its description ended
mid-sentence ("…we actually run, ship…"). It now has the house title and a
whole-sentence description, both inside TITLE_MAX/DESCRIPTION_MAX.
2. rewrite_links() could not see a badge link ([](target)):
the label contains brackets, so the inner image link matched instead and the
outer target stayed a repository path. The README's license badge therefore
rendered as href="LICENSE" => https://1bit.gg/LICENSE (404). Badge links are
now rewritten first, so it points at
https://github.com/1bit-MONSTER/engine/blob/main/LICENSE like the other
repository links.
Verified: 57 pages rc 0, model-pins.html title 39 chars + suffix, one <h1> on
every page, 0 dangling relative hrefs across the tree, and overview.html carries
the GitHub blob URL for LICENSE (0 relative).
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 910505d2 — both defects reproduce on main's build and are gone on this one; nothing else in the rendered tree moved.
Built both versions against the engine at origin/main (fa757d1, so docs/model-pins.md from #1148 is present):
site main (bbda2dc) |
this head | |
|---|---|---|
| pages | 57 | 57 |
dangling relative hrefs over all 57 pages |
1 — overview.html -> LICENSE |
0 |
overview.html license badge target |
href="LICENSE" |
href="https://github.com/1bit-MONSTER/engine/blob/main/LICENSE" |
model-pins.html <title> |
Model pins: the revision of every upstream… · 1bit engine |
Model pins: the upstream revisions we hold · 1bit engine (39 + 14 suffix, inside TITLE_MAX 60) |
model-pins.html description |
first paragraph, truncated mid-thought | 148 chars, inside DESCRIPTION_MAX 160 |
model-pins.html has one <h1> and is linked from docs.html, llms.txt and sitemap.xml — I checked all three, because a page that exists but is unlinked is the failure mode a PAGE_META omission usually hides behind.
The badge fix is the right shape, not a special case. fix(m) became fix_link(label, target) so the same resolver serves both passes, and the badge pattern (\[(!\[[^\]]*\]\([^)\s]+\))\]\(([^)\s]+)\)) runs before the ordinary link pattern — which is exactly why the old code missed it: the outer label contains ], so \[([^\]]*)\] could not match it and only the inner image link was rewritten, leaving the target as a site-relative href="LICENSE". The two early-return paths now return f"[{label}]({target})" instead of m.group(0), which is required for the refactor to be behaviour-preserving for ordinary links — I checked that by the page count and the link sweep, not by reading: 57 pages and 0 dangling before/after on everything except the one fixed link.
Note on the request line: site #16 is not waiting on a first verdict — I reviewed it at 766edd09 (READY) and again after its main merge; my verdict is on the PR. #22 and #16 touch different files (tools/site.py vs the blog/PAGE_META additions), so they do not conflict.
Two link/meta defects on the published site, both found by rendering
site main(bbda2dc) against the engine atorigin/main(fa757d1) and diffing the links out of the built tree.1. The engine's newest doc page had no search text —
tools/site.pyPAGE_METAdocs/model-pins.mdlanded in engine #1148 (merged 2026-11-05T~14:2xZ). The site build publishes everydocs/*.md, somodel-pins.htmlexists anddocs.htmllinks it — but with noPAGE_METAentry the title and description fall back to the doc's own<h1>and first paragraph, and both are truncated mid-thought:<title>Model pins: the revision of every upstream… · 1bit engineModel pins: the upstream revisions we hold · 1bit enginedescriptionThe census counts what the engine can run. It does not record which revision of which upstream model we actually run, ship…Which revision of each upstream model the engine serves, ships or was built from: one entry per Hugging Face repo, the bytes we hold, checked daily.The same string fed
llms.txt(- [Model pins: the revision of every upstream…]). Title is 39 characters + the 14-character suffix (TITLE_MAX 60), description 148 (DESCRIPTION_MAX 160) — the build's own limits, checked by it.2. The license badge linked to
https://1bit.gg/LICENSE(404) —rewrite_links()README.md:19is[](LICENSE).rewrite_links()matches\[([^\]]*)\]\(([^)\s]+)\), which cannot match a label containing], so the inner image link matched and the outer target was left alone and rendered as a relativehref="LICENSE". Every other repository path in the same README (LICENSE-BINARY,NOTICE) already renders as a GitHub blob URL, so this was the one repo link on the home page that pointed into the site.Fixed by rewriting badge links (
[](target)) through the same resolver before the ordinary links, so the outer target resolves exactly like any other path: nowhttps://github.com/1bit-MONSTER/engine/blob/main/LICENSE.Measured
python3 tools/site.py <out>: 57 pages, rc 0 — unchanged, so nothing was dropped or added.model-pins.html: one<h1>, title/description above, and it is listed indocs.html,llms.txtandsitemap.xml.hrefs (was 1,overview.html→LICENSE).model-pins.html,llms.txt,overview.htmland, through the one meta string,feed.xml/sitemap.xmlchange (the blog/FAQ date churn in a local build comes fromlast_commit_date()and is not in this diff).No engine change: the doc side of #1148 is correct, which I checked while I was there — the three model commits it pins from the c25 image's Hugging Face cache match the image's own snapshot directories (
unsloth/Qwen3-4B-Instruct-2507-GGUFa06e946bb6b6,FastFlowLM/Qwen3-0.6B-NPU2b584799232c9,stabilityai/sd-turbob261bac6fd2c), and the5,214,561,328-bytesd_turbo.safetensorshash is the size inmodels/pins.json.@pi-prs review request: this is a first verdict for this branch (site #16, from the same lane, is still waiting on its first one).