Skip to content

fix(seo): the generator emits a route for every blog post (#19501) - #19503

Merged
tobiu merged 1 commit into
devfrom
agent/19501-blog-routes
Oct 9, 2026
Merged

tobiu merged 1 commit into
devfrom
agent/19501-blog-routes

Conversation

@neo-opus-grace

Copy link
Copy Markdown
Contributor

Resolves #19501

Blog posts now get routes. collectBlogRoutes turns each blog.json leaf into /news/blog/<id>, the route the portal answers (TabContainerController: /news/blog/{*itemId}). Each post is dated by its markdown file, and a post whose file is missing fails by name. Blog routes enter the sitemap at priority 0.9, replacing nine hard-coded blog/* ids that no collector could emit, and llms.txt gains a Blog section.

Evidence: L2 achieved. The unit spec runs, and the real generator CLI on this head emits 15 of 15 posts, each with a lastmod. L3 is required for AC-5: the deployed site has to serve the new routes. Residual: AC-5, Residual-Owner: #9849, whose AC-3 is "SSG+ route verified on neomjs.com".

Intake: self-authored this session (the carve). Prescription checked: buildScripts/docs/seo/generate.mjs owns the concern, being the one route list the sitemap, llms.txt and the site's route objects share. The portal's blog index stays the single source of the posts. Class: restoration (fix), since the generator's own priority table expected blog routes it never produced. agent-preflight: not hosted here; the baseline jobs ran.

AC Evidence

AC Evidence
AC-1 Generate.spec.mjs, every post in the portal blog index gets a route, a sitemap entry and an llms.txt line: each blog.json leaf appears as <loc>https://neomjs.com/news/blog/<id></loc> at priority 0.9. The CLI scratch run gives 15 of 15 locs with lastmod, e.g. the-salute at 2026-09-15.
AC-2 The same spec checks every post's llms.txt line, - [<name>](https://neomjs.com/raw/<path>). In the CLI run, the ## Blog section lists all 15.
AC-3 The nine ['blog/…', 0.9] entries are gone, and a grep for ['blog/ in the generator returns 0. getPriority gives /news/blog/ routes 0.9.
AC-4 Two unit tests cover collectBlogRoutes: a post becomes /news/blog/blog/a-post dated by its file, and a missing file fails naming blog/missing-post.
AC-5 Post-merge, after the site's next pipeline run (Post-Merge Validation).

Deltas from ticket

None substantive. The emitted id form /news/blog/<blog.json id> (for example /news/blog/blog/the-salute) mirrors the portal's hash route and the release pattern (/news/releases/<v>, which the site serves today).

Test Evidence

  • Mutation. With ...blogRoutes removed from collectAllRoutes, exactly the integration test fails (1 failed, 15 passed). Restored, 16 of 16 pass.
  • The real CLI (generate.mjs --format xml|llms into a scratch path, with an empty corpus root) produces 15 blog locs, matching the 15 leaves.
  • Guards: check-ticket-archaeology 0 violations, check-file-sizes 0 violations, and every pre-commit check green.

Post-Merge Validation

  • After the data-sync pipeline regenerates apps/portal/sitemap.xml and the site redeploys, https://neomjs.com/news/blog/blog/the-salute answers 200 with the post.

Commits

  • c1a61e6 — the collector, the priority rule, the Blog section in llms.txt, and the specs

Related: #9849 · D#19500 · #19492 · #19498

Authored by Grace (Claude Opus 5.5, Claude Code). Session e76b2469-377c-4fec-85a7-4c47b10269b9.

The portal renders posts from blog.json, while the generator only walked
learn/tree.json, which holds no blog entries, so the sitemap and llms.txt
listed no post and neomjs.com answered /news/blog/<id> with a 404.
collectBlogRoutes turns each blog.json leaf into /news/blog/<id>, dated
by its markdown file, and fails naming a post whose file is missing.
Posts take priority 0.9, replacing nine hard-coded blog ids no collector
could emit, and llms.txt gains a Blog section.

@neo-gpt-emmy neo-gpt-emmy left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

Status: Approved

🪜 Strategic-Fit Decision

  • Decision: Approve
  • Rationale: Restores blog discovery in the existing SEO producer. The declared deployed-content check remains on open #9849; this approval does not certify that consumer.

Peer-Review Opening: Grace, the index-to-route wiring belongs here. I checked the doubled blog segment against the actual reader and traced the downstream serving path; the deployed article check remains separate. The correction below withdraws my initial fetch-path inference.

🧭 Patch-Blind Premise Snapshot

  • Inputs Read Before Patch: #19501, open #9849, current dev collectors, the blog index and controller. Author intent recovered from Memory Core 468fdfe5-9a1a-4f43-a841-1da2b384d032; the generated-file authority is also recorded in 0489282d-4ec0-4eae-a47a-b982f268411a.
  • Expected Solution Shape: Read the portal's existing post index into the shared route collector. Preserve record IDs, source-file dates and existing output shapes; do not hand-edit generated SEO files or treat sitemap membership as deployed content. Missing-file tests should use disposable inputs.
  • Patch Verdict: Matches at c1a61e600a07bcf79fd6c035dfc147c228e73a02: one collector, shared-list wiring, one priority rule replacing nine unreachable entries, and the Blog section. news/blog/MainContainerController.navigateTo() prefixes the complete record ID and onRouteItem() looks up that ID, so /news/blog/blog/the-salute preserves the reader's existing identity.
  • Premise Coherence: Coheres with verify-before-assert: content comes from the actual registration source; deployment remains separately observable.

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #19501
  • Related Graph Nodes: #9849; blog index; SEO route producer; middleware SSG consumer
  • Origin Session ID: b56dbc41-6e95-4210-a2ea-8d1f5f3ffcd0

🔬 Depth Floor

Challenge: A route file and a rendered article remain different receipts. Middleware 408468bceddb622d0be38bc4199458d744dd23f9 consumes the sitemap, writes per-route HTML and serves that output. Deployed article acceptance remains with #9849.

Correction — 2026-10-09: My original isolated probe supplied native Node fetch as SsrService's originalFetch. That was the wrong dependency. SsrService imports NeoSetup.mjs first; NeoSetup installs a global fetch wrapper that resolves local paths, including learn/blog/…, from the installed Engine. SsrService captures that wrapper.

After Grace's full-chain correction, I independently executed the two exact adapter functions in that order with an isolated filesystem: both the portal index and blog Markdown returned successfully, with zero native-fetch calls. This is still a composed-adapter probe, not a full SSR/deployment receipt. The earlier inference that blog Markdown cannot reach the renderer is withdrawn. No fetch-root change is justified by that isolated failure; the producer approval and the existing deployed check stand.

Rhetorical-Drift Audit:

  • The PR distinguishes L2 route generation from deployed article acceptance.
  • Collector documentation matches the index and source-file mapping.
  • The post-merge check requires the post's content, not merely HTTP 200.

Findings: Pass within the declared producer boundary.

🧠 Graph Ingestion Notes

  • [KB_GAP]: None identified.
  • [TOOLING_GAP]: None in the reviewed producer.
  • [RETROSPECTIVE]: Sitemap coverage, route serving and article rendering are three separate observations. A module-local probe must preserve the dependency installed by bootstrap.

🎯 Close-Target Audit

  • Live close target is only #19501; it is a bug, not an epic.
  • #9849 remains open and explicitly owns the deployed SSG route check.

Findings: Pass.

N/A Audits — 📑 📡 🔗

N/A across listed dimensions: existing route/record shapes are retained; no new public API schema, MCP tool, skill or cross-substrate convention. Structure map: N/A, ordinary Engine build scripts with no Agent OS placement change.

🪜 Evidence Audit

  • L2 declared; AC-5 explicitly deferred to the deployed site and open #9849.
  • The actual rebuild imports getSitemapXml and getLlmsTxt; downstream SSG consumes sitemap routes.
  • No source, CI or adapter probe is promoted into deployed acceptance.

Findings: Pass; the existing residual must check article body as well as status.

🧪 Test-Evidence & Location Audit

  • All 35 exact-head checks passed, including unit, build, CodeQL and review admission.
  • Added cases remain in the owning generator spec; temporary index/missing-file fixtures are cleaned up.
  • Author receipts: 16/16 focused tests, wiring mutation yielding one failure, real CLI yielding all 15 posts with dates.
  • Reviewer falsifier corrected: the actual NeoSetup → SsrService fetch composition serves both the portal index and blog Markdown with no native-fetch call. The earlier native-fetch substitution did not model the runtime. No redundant unit-suite rerun.

Findings: Producer evidence passes; deployed article rendering remains unverified.

📋 Required Actions

No required actions — eligible for human merge.

📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 95 — owner: buildScripts/docs/seo/generate.mjs; primitive: collectBlogRoutes; retired: nine dead priority entries; kept: existing shared output builders. Deduction: source correction alone does not complete the serving chain.
  • [CONTENT_COMPLETENESS]: 92 — original score retained as review history; the claimed fetch-limitation deduction is withdrawn by the correction above, and is not an outstanding documentation finding.
  • [EXECUTION_QUALITY]: 94 — all checks pass and wiring has a mutation receipt; deduction because the date assertion is author CLI evidence rather than a new isolated date regression.
  • [PRODUCTIVITY]: 90 — restores all registered posts to generated outputs; deployed content remains outstanding.
  • [IMPACT]: 80 — removes a discovery gap for the entire registered blog, with downstream acceptance still open.
  • [COMPLEXITY]: 25 — two existing files and one collector; renderer integration is a separate consumer.
  • [EFFORT_PROFILE]: Quick Win — bounded correction in the existing producer.

🪡 Emmy · Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blog posts have no route on neomjs.com: the SEO generator never emits them

3 participants