feat(www,tools): remediate hostile-audit content-truth findings (#1307) - #1308
Merged
Conversation
Major: - /apilist renders the generated API + custom-element reference: 167 per-export entries and 10 per-element detail rows with the generated anchors; the built-output link gate now asserts every generated searchRecord anchor exists in both locales (pagefind skip documented). - /zh/contributing ships a real zh translation instead of hard-coded English; the www:check-truth locale gate now covers route-level content records (en without zh fails closed) and requires every blog post to declare its original language via frontmatter lang. Blog routes mark locale-mismatched renders with an explicit notice and a truthful lang attribute instead of masquerading. Minor: - Per-route, locale-appropriate title/description/og/canonical/hreflang derived from the content graph (content routes) + an authored bilingual route map (www/app/seo.ts), applied to the built shell by tools/apply-www-seo.ts (fail-closed) before Pagefind indexing; findSeoFailures strengthened beyond presence-only (boilerplate-title rejection, canonical/hreflang presence, per-locale title uniqueness, no English boilerplate description on zh pages). - Sitemap generator excludes locale-prefixed 404 pages symmetrically (/zh/404 leak fixed). - Changelog copy now names the withdrawn npm beta.1-beta.3 artifacts as the 0.41.0-era line; CHANGELOG.md gains reconciling 0.43.x and 0.44.0-beta.1 entries deferring to docs/release/. - content-examples gate: typescript/js fence aliases are type-checked, TS2304 suppression no longer covers documented framework exports (caught a real import-elided openElement() call in the configuration guide), blog exclusion documented with rationale. Also fixes the content-graph blog adapter to derive slugs/routes through the blog plugin's own collection options (date-prefix transform), so graph routes match the served routes.
Contributor
|
APIError: Insufficient Balance |
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.
Problem
The Beta.2 hostile website/content-truth audit (report on stage #1288) found that the derive-from-source machinery is genuine but had coverage gaps (#1307):
_generated-api-reference.ts: 167 exports + 10 custom elements + 177 search records) was never rendered:/apilistprojected only package chips, so all 177/apilist#api-…/#ce-…anchors were dead./zh/contributingshipped hard-coded English underlang="zh", invisible to the locale gate (scoped to content collections only);/zh/blog/<english-only-post>had the same masquerade with no marking rule.<title>openElement</title>, English description/og tags, no canonical/hreflang; the sitemap leaked/zh/404; the changelog "withdrawn beta.1–beta.3" copy contradicted the "v0.44.0-beta.1 — Current" stamp and the rendered CHANGELOG body stopped at 0.42.0; the content-examples gate had bypass lanes (fence aliases, blog exclusion, TS2304 suppression).Owner
Single owner: www content-truth remediation (kimi implementer stream, v044 dispatch packet for #1307).
Before / After
/apilistcontent.enhard-codedcontentrecordslang="zh"over English body, no markinglang: en|zh(gated); mismatched renders show an explicit notice + truthfullangattribute; blog index bilingualized with a standing original-language notewww:apply-seobefore Pagefind); strengthened SEO gatetypescript/js fences unchecked; TS2304 blanket-suppressed; blog exclusion undocumentedopenElement()call in the configuration guide); blog exclusion documented with rationaleWhy not a second owner
All findings are the same class — www surfaces diverging from owned truth — and share the same machinery (content graph, generated API reference, www-truth/links gates, autoflow wiring). Splitting would serialize gate changes that interact (the SEO plan consumes the content graph; the link gate consumes the generated anchors).
Adjudications
headdescriptor is static per route module andpackages/app/src/authoring.tsis frozen under ADR-0122, so locale-appropriate metadata cannot flow through the descriptor without an amendment ADR. Adjudicated: a www-owned, fail-closed build step (tools/apply-www-seo.ts) derives the plan from the drift-gated content graph +www/app/seo.tsand rewrites the built shell documents before Pagefind indexing. No frozen path touched (freeze:semantics:checkgreen).langfrontmatter, a mismatch notice, truthful bodylang, and a bilingual index note. Translating 42 historical dispatches is not closure scope; excluding them from the zh sitemap would hide pages that legitimately exist./apilistnow renders generated JSDoc summaries that legitimately quote historical prerelease versions (e.g. 0.42.0-alpha.13); it joins the existing history-surface exemption (blog/changelog/migration) for the retired-prerelease rule, with a comment.Evidence
deno task build→ exit 0 (SSG +www:apply-seo"applied to 150 page(s)" + pagefind + artifact-truth +www:check-linksgreen, incl. 177 generated anchors in en+zh apilist)deno task test→ exit 0: 1863 passed (105 steps), 0 failed; starter 150 passed, 0 faileddeno task test:e2e(chromium, full) → 316 passed; 4 failed, all exactly*-mobile-architecture-islands-deepvisual baselines — the known local-only macOS drift explicitly excluded from this packetOPEN_VISUAL_REGRESSION=1baselines regenerated only for intentionally changed pages (blog index ×8, zh blog post ×4, contributing en/zh ×8 replacing the 4 shared); duplicate-baseline gate green (240 unique)deno task pack:dry-run→ exit 0;deno task package-artifacts:check→ exit 0www:check-truth(incl. new route-locale + blog-language checks, RED-proven before the fixes),content-graph:check,api-reference:check,content:examples-check,interface:snapshot,docs:truth,www:check-current-truth,www:check-artifact-truth,www:check-theme-tokens,graph:check,package-surface:check,export-files:check,arch:check,repo:hygiene,text-integrity:check,validation:boundary-check,freeze:semantics:check,check:static-output-freeze --self-check,www:dev-smoke,deno lint,deno fmt --checkaudit:citations:checkfails identically on cleanorigin/dev(14 drifted citations indocs/audit/2026-08-26-…-audit.mdagainst request-time fixtures; verified in a detached worktree of 2b2756a)Scope
In: www routes/components/styles, blog content frontmatter, guide configuration snippet, CHANGELOG.md, tools gates (www-truth, www-links + new www-seo, content-examples, docs-truth artifact exemption, content-graph adapters), adapter-vite blog pipeline (
langpassthrough) + sitemap generator, autoflow policy wiring, e2e specs + baselines.Out: Bun overclaim (owned by B2.5 #1228); no visual redesign (rows reuse the registry/chip design language); no framework
headchanges (frozen seam).Risk
buildgate (autoflow triggers updated).configuration.md).langfrontmatter is additive/optional in the adapter schema; the www gate requires it for www content only.Closes #1307
Part of #1155. Stage #1288.