Skip to content

AR-20261104-2: canonical Link headers and frontmatter for docs Markdown twins - #989

Open
warp-agent-staging[bot] wants to merge 7 commits into
mainfrom
factory/ar-20261104-2-docs-md-canonical
Open

warp-agent-staging[bot] wants to merge 7 commits into
mainfrom
factory/ar-20261104-2-docs-md-canonical

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

AR-20261104-2: give generated documentation Markdown twins the same canonical URL as their HTML page, through an HTTP Link header and YAML frontmatter. Production was rechecked on 2026-11-18: https://docs.warp.dev/factories.md returns 200 text/markdown with no Link header, and its body starts with # Warp Factories overview rather than frontmatter.

Metric and prediction

  • ora docs markdown-frontmatter: 0/1 → 1/1 on the first production audit after deployment. This is an emerging-tier check with 0 score points for this experiment; no overall ora score movement is predicted.
  • Peec share of docs.warp.dev citations on .md URLs: at or below the 14-day pre-merge baseline over the 21 days after deployment. A higher share falsifies the prediction. The intended direction is consolidation onto HTML canonical URLs; no numerical citation improvement is claimed before measurement.

Changes

  • Generate canonical Link: <https://docs.warp.dev/<path>/>; rel="canonical" headers only for real, advertised .md twins. /index.md points to https://docs.warp.dev/.
  • Keep the postbuild canonical-route script independent: after tracking middleware generation, it inserts bounded, case-sensitive, continuing header routes before Vercel's filesystem phase. It does not depend on the separate agent-readiness branch.
  • Start each twin with YAML frontmatter containing title, canonical, and description when present. Quote scalars safely and preserve the Markdown body.
  • Strip frontmatter from the Copy page result so the existing copied content remains unchanged.
  • Cover route matching and exclusions, serialization and copy behavior, and built-output canonical/frontmatter agreement. Preserve main's AFDocs changes, test:agent-doc-outputs, and existing CI steps.

Related issues

Experiment AR-20261104-2, weekly AEO/SEO autoresearch refresh of 2026-11-18.

Validation

Head 21384bafd119624422c8c38e6d434ff48be8af34 includes a merge of main, with 0 commits behind main when checked. No rebase or force-push. Existing PR state is unchanged; no reviewer requested.

Repository checks

CI run 44344838027 passed. The full suite was executed by CI, not locally in this verification run:

  • npm run typecheck: pass, 0 errors.
  • npm run test:heading-vars: 5/5.
  • npm run test:docs-markdown: 16/16.
  • npm run test:markdown-canonical: 5/5.
  • AFDocs audit, tracking redirect middleware, and agent-discovery unit tests: pass.
  • npm run build: pass; 421 twins, 6 canonical-header routes.
  • npm run test:heading-tocs: pass, 3,666 entries across 423 HTML files.
  • npm run test:homepage-json-ld: pass.
  • npm run test:markdown-twins: pass, 421 twins with matching frontmatter and exactly one canonical header each; 14 non-twin paths without one.
  • npm run test:llms-txt: pass, 1,280 canonical-page entries across 14 files.
  • npm run test:agent-doc-outputs: pass, 14 documentation sets.
  • Tracking routes, page-title order, migrated references, retired articles, internal links, redirect invariants, remaining CI script tests, editorial checks, and production dependency audit: pass.

All non-skipped checks are green: Build/link-check/audit; Docs editorial quality; Docs technical references; CodeQL; Analyze (actions); Analyze (javascript-typescript); Analyze (python); Vercel; Vercel Preview Comments; CLA. Request engineering review and Agent docs review are skipped.

Deployed structural checks

Immutable head preview: https://docs-24c7iu8uo-warpdotdev.vercel.app (deployment).

  • curl -sSIL https://docs-24c7iu8uo-warpdotdev.vercel.app/factories.md: 200, content-type: text/markdown; charset=utf-8, link: <https://docs.warp.dev/factories/>; rel="canonical".
  • curl -sSL https://docs-24c7iu8uo-warpdotdev.vercel.app/factories.md: starts with --- and title, description, and canonical frontmatter.
  • Curl-based assertions passed on 23/23 twins: homepage, factories, agents, and 20 deterministic sitemap samples (seed 989). Each GET and HEAD had exactly one canonical header, and parsed frontmatter canonical matched the HTML canonical.
  • 14/14 non-twin paths had no Link header: reserved/missing/case-variant .md paths, HTML / and /factories/, /llms.txt, /sitemap-0.xml, /openapi.yaml, /openapi.json, and /api/.
  • /llms.txt is byte-identical to production (SHA-256 ea33f4009428221d4a0daf8971a3903886373d349ff42b77d0553e182463903a).

Fast verifier and ora

Verifier source: aeo-factory/autoresearch/verify_site.py at aeo-autoresearch/verifiers in warpdotdev/factory-dev (#1116).

Commands run:

  • python3 verify_site.py --base https://docs.warp.dev --out prod.json
  • python3 verify_site.py --base https://docs-24c7iu8uo-warpdotdev.vercel.app --host-as docs.warp.dev --out preview.json
  • python3 verify_site.py --compare prod.json preview.json

Raw comparison exits 1 for exactly five new robots restrictions ['noindex'] findings, one per sampled HTML page. Vercel adds X-Robots-Tag: noindex to this preview. No other regressions were reported. A separate comparison using a copy of the report with only those five observed x_robots_tag values cleared exits 0, with an empty regressions list. Raw evidence is retained; the preview is not claimed to be indexable.

npx -y @ora-ai/ax@0.5 audit https://docs-24c7iu8uo-warpdotdev.vercel.app --json completed against contract 1.42.0, scan 608411. markdown-frontmatter passes 1/1: title, description, and canonical detected on /agents.md. The preview's total 54 is not comparable with production's 69: the preview has noindex, is not the indexed product domain, and its sitemap/canonical URLs identify production. This is structural verification, not evidence of an overall score improvement. The pinned CLI warns that its built-in contract is older than the server contract.

Follow-ups

  • After merge/deployment, run the production ora audit and measure the Peec citation share over the stated window. Citation consolidation cannot be verified before deployment.
  • Human review is still required. In particular, review Vercel route behavior alongside any later merge of the independent agent-readiness postbuild script.

Experiment AR-20261104-2 · Original conversation · Original run · Refresh run

@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 27, 2026 8:37pm UTC

Request Review

@cla-bot cla-bot Bot added the cla-signed label Nov 4, 2026
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-staging-factory on this PR to send it follow-up work.

@warp-agent-staging warp-agent-staging Bot added the factory:aeo-factory Label associated to the "aeo-factory" factory label Nov 4, 2026
Replace the vercel.json catch-all, which also labelled 404 responses for
any other .md request, with exact case-sensitive routes written into
.vercel/output/config.json after the build. Tighten the twin validator and
drop the transitive @vercel/routing-utils import.
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

Autoresearch gates: all passed (AR-20261104-2).

  • Metric (G1): ora docs markdown-frontmatter should go 0/1 → 1/1 on the first production audit after deploy. Peec share of docs.warp.dev citations landing on .md URLs should stay at or below its 14-day pre-merge baseline over 21 days. The experiment is falsified if that share rises.
  • Fast verifier (G2) on the preview at head d01c41f:
    • 20/20 random sitemap twins return 200 with a Link canonical exactly equal to the HTML page's own canonical, and the same URL in frontmatter.
    • /index.md → https://docs.warp.dev/.
    • 11/11 non-twin paths (404 .md files, uppercase, /assets, /_astro, /.well-known, HTML pages, llms.txt, sitemaps) carry no Link header.
    • 0 /404/ links in llms-full.txt and llms-small.txt.
    • Copy page output is identical to production.
    • ora on the preview vs a main-based control preview: 59 → 59, markdown-frontmatter 0/1 → 1/1, no check regressed.
  • CI and review (G3): CI green. The adversarial review's one blocking finding (the catch-all .md rule put a canonical header on 404 non-twin paths) is fixed. Header routes are now generated at build time for the 409 real twins only. Both non-blocking items are done: the validator is stricter, and the transitive-dependency import is removed.
  • Second confirmation (G4): production /factories.md returns 200 with no Link header and no frontmatter.
  • Merges cleanly together with docs#990.

Preview links: /factories.md (see the frontmatter at the top; curl -sI shows the Link header) · /llms-full.txt

Posted by a Warp agent

… /404 exclusion; keep canonical Link + twin frontmatter checks)
@warp-agent-staging warp-agent-staging Bot changed the title AR-20261104-2: canonical Link header + frontmatter on docs .md twins; drop /404/ from llms files AR-20261104-2: canonical Link headers and frontmatter for docs Markdown twins Nov 18, 2026
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

Refreshed at 21384baf: main merged, 0 behind; all 10 active checks pass (2 review jobs skipped). CI: 421 twins valid; unit tests 16/16 + 5/5. Preview: 23/23 twins, 14 exclusions, unchanged llms.txt. Ora frontmatter passes; no score gain claimed. Fast compare flags only Vercel preview noindex (5 pages); excluding that header yields 0 regressions. Title/body now cover canonical headers + frontmatter only; Peec measurement remains post-deploy.

Responding as aeo-factory: Open session · View in factory

Posted by a Warp agent

Both PRs used to replace the same postbuild value, so merging the second one
would conflict and could silently drop a route writer. Both branches now carry
the same postbuild line and the same scripts/run-route-writers.mjs, which runs
each writer present in the checkout.

Co-Authored-By: Warp <agent@warp.dev>
warp-agent-staging Bot added a commit that referenced this pull request Nov 18, 2026
Both PRs used to replace the same postbuild value, so merging the second one
would conflict and could silently drop a route writer. Both branches now carry
the same postbuild line and the same scripts/run-route-writers.mjs, which runs
each writer present in the checkout.

Co-Authored-By: Warp <agent@warp.dev>
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

Review follow-up (route-writer composition): this PR and #1058 both used to replace the same postbuild value, so whichever merged second would conflict and could silently drop a route writer. Both branches now carry an identical postbuild (node scripts/build-tracking-middleware.mjs && node scripts/run-route-writers.mjs) and an identical scripts/run-route-writers.mjs that runs each writer present in the checkout.

Verified locally by merging main + #989 + #1058 (no conflicts) and running npm run build: build-markdown-negotiation-routes: 421 twins, 12 routes and build-markdown-canonical-routes: 421 twins, 6 header routes. All 18 generated routes sit before handle: filesystem (index 21 of 24).

Posted by a Warp agent

# Conflicts:
#	.github/workflows/ci.yml
#	src/lib/docs-markdown.js
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

Status 2026-11-25: up to date with main (d3768f8). The merge keeps all of main's CI steps and #1053's retrieval code, and adds only stripFrontmatter() to docs-markdown.js. Build, link-check (which runs the new tests), editorial and Vercel checks pass. CodeQL failed only at its results upload with a GitHub Server Error, so an empty commit re-runs it.

Production today: curl -I https://docs.warp.dev/agents.md returns no Link header, and the body has no frontmatter.

Preview: /agents.md, /factories.md, /agents/capabilities/skills.md, /terminal/appearance/prompt.md and /factories/api-and-sdk/quickstart.md all return a rel="canonical" Link to the slash-form page plus frontmatter (title, description, canonical). Accept: text/markdown on /agents/ gets the same.

Posted by a Warp agent

This branch was successfully deployed

1 active deployment
Preview — fbb190b3 Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed factory:aeo-factory Label associated to the "aeo-factory" factory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant