LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-julia
createdAtNov 14, 2026, 1:22 AM
updatedAtNov 14, 2026, 1:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/20915
authorneo-gemini-julia
commentsCount0
parentIssue20671
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 14, 2026, 1:54 PM

Decouple archive sitemaps, bake git lastmod, and prune sitemap-core bloat

Closed v14.0.0/archive-v14-0-0-chunk-2 documentationenhancementaibuildportal
neo-gemini-julia
neo-gemini-julia commented on Nov 14, 2026, 1:22 AM

Context

Google Search Console (sc-domain:neomjs.com, inspected 2026-11-14) shows 181 of 471 routes (38.4%) in sitemap-core.xml stuck in Discovered - currently not indexed (Last crawled: N/A) — including 7/7 (/learn/comparisons/*), 9/9 (/learn/gettingstarted/*), 6/6 (/learn/tutorials/*), 44/57 (/learn/guides/*), and 14/20 technical /news/blog/* articles — while 122 historical v8–v12 release notes occupy 51.3% of the 238 indexed core pages.

Ownership: self-assigned to @neo-gemini-julia as Steward of #20671 (good first issue / help wanted omitted: active urgent Engine v14 crawl-unblock lane).

The Problem

Three compounding defects in buildScripts/docs/seo/generate.mjs and buildScripts/docs/seo/seoJson.mjs (neomjs/neo origin/dev @ a07f581f13, deployed in neomjs/pages @ b0014738a6) starve crawl budget on neomjs.com:

  1. sitemap.xml submits 20,002 noindex URLs (98.2% of sitemap-archive.xml): middleware-v2#48 added X-Robots-Tag: noindex, follow to /news/tickets/* and /news/pulls/*, yet generate.mjs:742-744,779-781,1044-1049 still bundles 12,759 ticket routes and 7,243 PR routes alongside 365 indexable /news/discussions/* routes inside sitemap-archive.xml and links sitemap-archive.xml from sitemap.xml because middleware-v2/src/build.mjs:413-424 (fetchDynamicRoutes) consumes sitemap.xml as its SSG build manifest.
  2. Zero <lastmod> tags in neomjs/pages/sitemap-core.xml (0 of 480 <url> entries): generate.mjs:241,378 (hasReliableGitHistory) returns false when neomjs/pages/buildScripts/enhanceSeo.mjs executes inside node_modules/neo.mjs (npm tarball without .git), dropping all <lastmod> elements.
  3. sitemap-core.xml bloat and canonical mismatches:
    • Emits /home (TOP_LEVEL_ROUTES) instead of / even though /home canonicalizes to https://neomjs.com/, and includes /apps/portal/index.html (generate.mjs:543).
    • Emits 4 hidden: true learn/tree.json entries (guides/specificfeatures/MultiWindow, guides/specificfeatures/TearOutPortabilityMatrix, guides/specificfeatures/Mixins, tutorials/RSP) and 5 <500 B type: redirect moved-ADR stubs (0020, 0032, 0034, 0037, 0038).
    • Emits all 172 /news/releases/* notes (v8.1.0–v13.4.0), relying on <priority> decay (RELEASE_PRIORITY_BY_DELTA) which Google's sitemap parser ignores.
    • apps/portal/resources/data/seo.json on origin/dev @ a07f581f13 is missing /news/blog/json-ld-xss-json-stringify-in-a-script-tag (present in blog.json).

Instrument receipts (origin/dev @ a07f581f13 & neomjs/pages @ b0014738a6):

  • neomjs/pages/sitemap-archive.xml (b0014738a6, regex <loc> count by prefix): 20,367 <url>s (12,759 /news/tickets/*, 7,243 /news/pulls/*, 365 /news/discussions/*), 0 <lastmod> tags in neomjs/pages/sitemap-core.xml (480 <loc>s; positive control: <loc> matches 480).
  • origin/dev @ a07f581f13 learn/tree.json (JSON.parse filter n.hidden === true): 4 nodes (MultiWindow, TearOutPortabilityMatrix, Mixins, RSP); learn/agentos/decisions/*.md frontmatter type: redirect: 5 files (0020–0038).

The Architectural Reality

Design authority: "Recency-tiered priority for /news/releases/ routes, indexed by delta from the newest release-note major... so the sitemap <priority> stays a useful crawl-budget hint instead of a flat wall of release notes." (buildScripts/docs/seo/generate.mjs:140-144, 132-134). Google Search documentation specifies that Google ignores <priority> and <changefreq> while consuming <lastmod>; relying on <priority> left 122 historical patch notes dominating sitemap-core.xml indexing while 0 <lastmod> tags survived tarball installation.

The Fix

  1. Split indexable discussions from noindex SSG archive routes (buildScripts/docs/seo/generate.mjs, rebuildContentIndexesAndSeo.mjs, copy.mjs, verify.mjs):
    • Emit indexable /news/discussions/* routes into sitemap-discussions.xml and reference ['sitemap-core.xml', 'sitemap-discussions.xml'] in getSitemapIndexXml() (sitemap.xml), removing sitemap-archive.xml (noindex tickets/PRs) from public sitemap.xml.
    • Emit apps/portal/resources/data/ssg-archive-routes.json alongside unlinked sitemap-archive.xml on disk so middleware-v2 SSG rendering continues uninterrupted.
  2. Pre-bake git <lastmod> metadata (seoJson.mjs, generate.mjs):
    • Persist per-route lastmod (YYYY-MM-DD) in apps/portal/resources/data/seo.json during git-backed rebuildContentIndexesAndSeo.mjs runs, and fall back to seo.json[route].lastmod in generate.mjs when hasReliableGitHistory(root) returns false.
  3. Prune sitemap-core.xml & mark non-canonical stubs noindex, follow (seoJson.mjs, generate.mjs, verify.mjs):
    • Replace /home with / in sitemap-core.xml (TOP_LEVEL_ROUTES), exclude /apps/portal/index.html from collectExampleRoutes, filter node.hidden === true and frontmatter type: redirect stubs out of sitemap-core.xml (setting robots: 'noindex, follow' in seo.json), keep only current + previous major (>= maxReleaseMajor - 1, i.e. v13+ / v14+) in sitemap-core.xml while setting robots: 'noindex, follow' on older v8–v12 patch notes in seo.json, and regenerate seo.json (picking up /news/blog/json-ld-xss-json-stringify-in-a-script-tag).

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
sitemap.xml (getSitemapIndexXml) buildScripts/docs/seo/generate.mjs:861 Lists sitemap-core.xml and sitemap-discussions.xml only (0 noindex ticket/PR child sitemaps) Custom sitemaps option preserved JSDoc in generate.mjs Unit spec
sitemap-discussions.xml (getSitemapDiscussionsXml) buildScripts/docs/seo/generate.mjs:821 Emits indexable /news/discussions/* <urlset> disjoint from sitemap-core.xml and sitemap-archive.xml; copied by copy.mjs Valid empty <urlset> when corpus has 0 discussions JSDoc in generate.mjs Unit spec + verify.mjs
ssg-archive-routes.json (getSsgArchiveRoutes) buildScripts/docs/seo/generate.mjs:624 Emits deterministic sorted { routes: string[] } for /news/tickets/* and /news/pulls/* SSG pre-rendering Unlinked sitemap-archive.xml retained on disk JSDoc in generate.mjs Unit spec + verify.mjs
sitemap-core.xml (getSitemapXml) buildScripts/docs/seo/generate.mjs:659 Emits /, excludes /home, /apps/portal/index.html, hidden leaves, type: redirect stubs, and < maxMajor - 1 releases; carries <lastmod> even without .git Git history when present, else seo.json lastmod JSDoc in generate.mjs Unit spec + verify.mjs
apps/portal/resources/data/seo.json (getSeoJson) buildScripts/docs/seo/seoJson.mjs:968 Includes lastmod (YYYY-MM-DD) per route, robots: 'noindex, follow' on historical releases / hidden & redirect stubs, and all blog.json leaves Preserves existing seo.json lastmod when .git is absent JSDoc in seoJson.mjs Unit spec + verify.mjs

Decision Record impact: none.

Acceptance Criteria

  • sitemap.xml references sitemap-core.xml and sitemap-discussions.xml and no longer advertises noindex /news/tickets/* or /news/pulls/* routes to crawlers.
  • Running generate.mjs against a directory without .git (hasReliableGitHistory === false) still emits <lastmod> tags on sitemap-core.xml routes via packaged seo.json metadata.
  • sitemap-core.xml contains / (not /home), excludes /apps/portal/index.html, excludes hidden: true learn/tree.json entries and type: redirect moved-ADR stubs, and restricts /news/releases/* entries to >= maxReleaseMajor - 1.
  • apps/portal/resources/data/seo.json includes /news/blog/json-ld-xss-json-stringify-in-a-script-tag and marks excluded historical releases and redirect stubs with robots: 'noindex, follow'.
  • verify.mjs enforces these invariants and unit tests under test/playwright/unit/buildScripts/docs/seo/ pass.

Out of Scope

  • neomjs/middleware-v2 server redirects and SsrService changes (tracked in companion middleware-v2 ticket).
  • Rewriting /learn/* or / <title> / <h1> copy (tracked in sibling #20671 leaf).

Avoided Traps

  • Deleting sitemap-archive.xml on disk before middleware-v2 switches fetchDynamicRoutes(): Keep ssg-archive-routes.json / unlinked sitemap-archive.xml emitted on disk until middleware-v2 consumes the new SSG manifest so scheduled builds never drop archive snapshots.

Related

Parent: #20671 · Related: #20774, #20688, neomjs/middleware-v2#48, neomjs/pages#56

Live latest-open + closed sweep: checked latest 25 open issues in neomjs/neo (#20790–#20913) + closed search (sitemap seo lastmod sidenav, Out of Scope / Avoided Traps read on #20774, #20688) at 2026-11-14T00:17Z; no equivalent or prior exclusion found. Backlog: 46 open, orange band (filed as leaf under existing parent epic #20671). A2A in-flight claim sweep: latest 30 messages across all read-states checked at 2026-11-14T00:17Z; no competing claim on buildScripts/docs/seo/*. MC sweep: query_raw_memories on "Discovered currently not indexed sitemap-core lastmod sidenav byte offset 0 non-brand clicks neomjs.com", 5 results, no prior decision found. Own-assignment sweep: 1 open in neomjs/neo (#20671 parent epic, body read), none overlapping at leaf level. Structure map: N/A (ai:structure-map is Brain-hosted; this ticket touches buildScripts/docs/seo/* and apps/portal/resources/data/* only).

Origin Session ID: b9b9352c-8f99-497f-abc6-d323f2353fdc Retrieval Hint: "sitemap-core.xml Discovered currently not indexed hasReliableGitHistory lastmod sitemap-archive noindex"

tobiu referenced in commit e447fce - "feat(seo): decouple archive sitemaps, bake git lastmod, and prune core bloat (#20915) (#20922)" on Nov 14, 2026, 1:54 PM
tobiu closed this issue on Nov 14, 2026, 1:54 PM