feat(tools,www): drive www nav/locale/link/SEO truth from owned sources with fail-closed gates (#1159, B2.4) - #1305
Merged
Merged
Conversation
Deploying openelement with
|
| Latest commit: |
8fa53df
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9cc03907.lessjs.pages.dev |
| Branch Preview URL: | https://kimi-v044-b24-1159-web-truth.lessjs.pages.dev |
Closed
8 tasks
Contributor
|
APIError: Insufficient Balance |
8 tasks
Contributor
|
APIError: Insufficient Balance |
SisyphusZheng
force-pushed
the
kimi/v044-b24-1159-web-truth
branch
from
September 4, 2026 03:36
ef2cd8f to
8320b18
Compare
Contributor
|
APIError: Insufficient Balance |
added 2 commits
September 4, 2026 11:54
…es with fail-closed gates (#1159, B2.4) - tools/check-www-links.ts + tools/lib/www-links.ts: built-output internal link/fragment gate over www/dist (every internal href/src resolves to a built file; every #fragment anchors; every sitemap.xml URL resolves) plus per-page SEO invariants (exactly one <title>, non-trivial meta description, og:title). Wired into the build task so the CI build gate fails on broken links. First run found and this change fixes real broken links: CHANGELOG.md's repository-relative links are now projected onto the canonical GitHub tree at the changelog route's render seam. - tools/check-www-truth.ts: the remaining hand-maintained surfaces must mechanically agree with owned truth — _generated-nav.ts byte-identical regeneration of route meta + vite.config headerNav (read through the TS AST), headerNav hrefs resolve to scanned routes, bilingual locale availability (orphan/missing zh and byte-identical en/zh pairs fail), and the CURRENT roadmap entry names the package version tag. - tools/check-content-examples.ts: ts/tsx guide examples importing @openelement/* type-check against the real framework sources (en/zh duplicates deduped); only documented snippet elision (consumer-project imports, elided app names, implicit any, the uninferred loader-data generic) is suppressed — framework-surface errors fail closed. - AutoFlow policy: www:check-truth and content:examples-check registered (ci + release tiers); the build gate's triggers cover the link checker. Version constants and release-state agreement were already pinned by docs:check-version-anchors / release:truth:check; this composes with them instead of duplicating. Scheduled external link checks stay deferred to Beta.3 under #1156 (workflow cap 8 — no ninth workflow added).
Clean CI checkouts do not carry the gitignored .tmp directory, so
Deno.makeTempDir({ dir: '.tmp' }) failed closed (NotFound) in
content:examples-check and its tests. Create it recursively first.
SisyphusZheng
force-pushed
the
kimi/v044-b24-1159-web-truth
branch
from
September 4, 2026 03:54
8320b18 to
8fa53df
Compare
Contributor
|
APIError: Insufficient Balance |
3 tasks
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.
Part of #1159 (B2.4, stage #1288). Follows #1157 (PR #1303) and #1158 (PR #1304).
Problem
After B2.3 rebuilt the website, several public surfaces were still hand-maintained with no fail-closed gate: built-output internal links/fragments, generated nav freshness, bilingual locale availability, roadmap↔package version agreement, per-page SEO invariants, and guide code examples (never compiled against the real framework).
Owner
B2.4 / #1159 — website navigation, releases, i18n, SEO and link truth.
Before
_generated-nav.tsand the vite.config headerNav could drift from route truth silently.@openelement/*code examples were never type-checked.After
tools/check-www-links.ts+tools/lib/www-links.ts: built-output internal link/fragment gate (resolves every internal href/src against www/dist, anchors every #fragment, resolves every sitemap.xml URL) + per-page SEO invariants (exactly one<title>, non-trivial meta description, og:title). Wired intodeno task build→ the CI build gate fails closed.www/app/routes/changelog.tsx: repo-relative CHANGELOG.md links project onto the canonical GitHub tree at the render seam (source stays GitHub-native).tools/check-www-truth.ts(deno task www:check-truth): nav freshness (byte-identical regeneration of route meta + headerNav via the adapter's own scanner/writer, headerNav read through the TS AST), headerNav hrefs resolve to scanned routes, locale availability (orphan zh, missing zh, byte-identical en/zh all fail), roadmap CURRENT entry == package version tag.tools/check-content-examples.ts(deno task content:examples-check): ts/tsx guide examples importing@openelement/*compile against the real framework via the TS compiler API (en/zh duplicates deduped). Only documented snippet elision is suppressed (consumer-project imports, elided app names, implicit any, the uninferred loader-data generic, the adapter-virtual@openelement/generated/*namespace); unknown framework modules/exports, argument errors, syntax/JSX errors fail closed.buildgate's triggers cover the link checker.Why-not-second-owner
No package source or workflow changes; the adapter's nav scanner/writer and route scanner are consumed as libraries. Scheduled external link checks stay deferred to Beta.3 under #1156 (workflow cap 8; no ninth workflow added).
Evidence
deno run tools/check-www-links.ts— first run RED with 14 real broken-link findings; after fixes, green over 150 built pages; sitemap.xml URLs all resolve.deno task www:check-truth— green on current truth; nav freshness proven by regenerating via the adapter scanner/writer and byte-comparing the committed module.deno task content:examples-check— green; RED proof in tests (unknown@openelementmodule → TS2307 fail; unknown export → TS2305 fail; suppression boundary unit-tested).deno task test— full suite (see checks);deno task build— green including the embedded link gate;deno fmt/lint/lint:markdown/typecheck— clean.Scope
New: 3 checkers + 1 lib + 3 test files. Modified: deno.json (tasks + build wiring), tools/autoflow/policy.ts (gates), www/app/routes/changelog.tsx (link projection). No frozen paths, no packages, no workflows.
Risk / recorded scope cuts (stage ruling)
definePagehead metadata is static per route module while the same module serves both locales, so emitting locale-correct canonical/alternate links needs an adapter feature. What landed instead is mechanical validation: per-page title/description/og invariants over built output, locale availability truth, and zero-broken-link enforcement. The cut is recorded here and on [0.44 beta.2] Drive website navigation, releases, i18n, SEO, and links from owned truth #1159 for the Beta.3 hostile audit.