Repository navigation
AR-20261104-1: one URL per docs page (trailing slash) + slash-agnostic legacy redirects - #990
warp-agent-staging[bot] wants to merge 8 commits into
Conversation
…c legacy redirects
- vercel.json: trailingSlash: true so /page 308s to /page/ (files and
/.well-known are untouched by Vercel's rule).
- Legacy literal redirect sources now match both slash forms ('(/?)');
:param* sources get '/' twins. Removes 22 duplicates and 3 no-slash
sources that would shadow live pages, resolves the building-a-slackbot
conflict, collapses 2 chains, adds fragment-free twins for 2
fragment-only sources, and canonicalizes /api destinations to /api/.
- scripts/redirect-slashes.test.mjs replays vercel.json through
@vercel/routing-utils (npm run test:redirect-slashes, wired into CI).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This PR was generated with Warp. Comment |
- 59 internal links in 13 MDX pages (incl. 12 to /api) now use the slash form, so in-site navigation never costs a 308. Anchors kept; code blocks and external links untouched. - New test: internal links in docs content use the canonical slash URL. - Replace the Accept: text/markdown test, which asserted nothing when the rewrite never matched, with the property this PR guarantees: no redirect or rewrite turns a page URL (slash or no-slash) into a /.md path.
|
Autoresearch gates: all passed (AR-20261104-1).
Preview links: /agent-platform (lands on /agents/) · /factories (308 → /factories/) · /platform (now /platform/, was /agents/) Posted by a Warp agent |
… re-apply one-URL-per-page redirects and slash links) Co-Authored-By: Warp <agent@warp.dev>
With "trailingSlash": true in vercel.json, Vercel answers /platform with a 308 to /platform/ itself, so the explicit rule this check expected is redundant (and a self-redirect would loop). The check still rejects any /platform rule that points elsewhere, a redirect chain at /platform/, and a missing /platform/ page. Co-Authored-By: Warp <agent@warp.dev>
|
2026-11-18 / 975839d: CI green (10 pass, 2 skipped). Final preview: all 421 sitemap no-slash URLs take one redirect to slash + 200; required probes pass. /platform validator mismatch fixed. Bulk legacy HTTP sweep remains inconclusive (429). Evidence and unchanged 21-day metric in body. Posted by a Warp agent |
…oken Matches the bearerAuth scheme in developers/agent-api-openapi.yaml. The test now also accepts the slash-agnostic /developers/cli(/?) source that #990 introduces. Co-Authored-By: Warp <agent@warp.dev>
Resolution: take main's vercel.json routing (markdown negotiation moved to routing middleware in #1053) and keep trailingSlash: true; take main's link-list copy and re-apply canonical slash URLs; normalise three new /api links added on main. scripts/redirect-slashes.test.mjs: 9/9 pass.
|
Merged current Preview check: |
|
Status 2026-11-25: up to date with main (d3768f8). The merge keeps main's 6 new redirect sources and its content edits, and the only dropped entries are /agents and /platform, which Premise on production today, from
Preview (
Posted by a Warp agent |
Scope negotiation to built canonical pages, flatten known error aliases, and verify middleware/redirect journeys with repeatable live checks. Co-Authored-By: Warp <agent@warp.dev>


Problem
AR-20261104-1 normalizes slash/no-slash HTML page addresses to the slash form and makes legacy redirects work for HTML and Markdown requests. Direct
.mdrepresentations andindex.htmlaliases remain available.Premise reconfirmed 2026-11-18 on production with curl, following redirects separately:
/factoriesand/factories/both return 200, while/agent-platformreturns 404./agent-platform/redirects to/agents/. The duplicate-URL and legacy-source premises still hold.Change
vercel.jsontrailingSlash: true: extensionless pages redirect with 308; files and/.well-known/*remain unredirected./platformand/agents). Headers and rewrites remain unchanged from main.7230cace5d1c383b3c5e25ca79226851d911b8e7; retain main's content and retired-page deletion. Astro'strailingSlashremains unset: Vercel owns this redirect behavior.Hypothesis
Consolidating duplicate URLs makes crawlers and answer engines retrieve and cite one URL per page. Google treats redirects as the strongest canonicalization signal (Consolidate duplicate URLs). Bing's webmaster guidelines name trailing-slash duplicates as reducing confidence for grounding and citations (Bing Webmaster Guidelines).
Metric and prediction:
Verification — refreshed 2026-11-27
Commit:
8b74cc463953fbeddcda379b281b9a7f47f1630d. Exact-head Vercel preview, deployment8118993755, succeeded on 2026-11-27. This section supersedes the older-head checks and preview previously recorded here.Live HTTP verification
Reproduce under Node 22:
node scripts/verify-live-routing.mjs https://docs-9ubw3l01n-warpdotdev.vercel.app --sitemap. The verifier uses sequential GET requests with a 150 ms pause, records redirect statuses, destinations, and final content types, and stops as incomplete on HTTP 429.Run from 20:45:43Z to 20:54:52Z on 2026-11-27: 890 checks passed, 0 failures, no rate limiting.
index.htmlalias, and a genuine 404./errors/authentication_requirednow takes two 308s to the final hyphenated error page for HTML and Markdown. The slash form takes one. The old preview took three hops for HTML and returned a Markdown-request 404./agent-platformnow takes two 308s to/agents/for HTML and Markdown. The slash form takes one. The old preview returned 404 for Markdown./api/returns HTML 200 for both Accept headers instead of rewriting Markdown requests to nonexistent/api.md./factories.md,/llms.txt, and/.well-known/ard.jsonretain their content types without redirects.utm_sourceis preserved;trkcleanup remains a 301./retrievetakes one 308 to/retrieve/, then returns JSON 400 when the requiredqparameter is intentionally omitted. This verifies routing and deterministic input validation without querying the retrieval backend.The same representative verifier recorded 21 passes and 12 failures on the previous preview, versus 33 passes after the fix. Local JSONL logs are
/tmp/pr990-routing-before.jsonl,/tmp/pr990-routing-after.jsonl, and/tmp/pr990-routing-sitemap.jsonl; these local files are not shared artifacts. The checked-in verifier makes the checks reproducible.Repository checks and CI
Local Node
22.23.5checks passed: typecheck (0 errors), heading-vars (5/5), build (430 HTML files, 428 Markdown twins), heading TOCs (3,736 entries), homepage JSON-LD, redirect-slashes (11/11), Markdown negotiation (8/8), generated routing (32 modeled journeys), tracking middleware (6/6), tracking routes, retrieval proxy (11/11), Markdown serialization (12/12), redirect-checker unit tests (7/7), platform migration, and article-retirement validators. Internal links: 5,313 checked, 0 broken.git diff --checkpassed.Trunk is not installed locally; no Trunk pass is claimed. Existing build warnings about chunk size, i18n, the 404 route, and Fontconfig did not fail the build.
Exact-head CI passed: build/link/audit, editorial quality, and technical references. CodeQL analyses, Vercel, and CLA passed. Engineering-review automation was skipped. Existing reviewers were not changed.
Scope and remaining limits
.mdrepresentations andindex.htmlaliases remain available./retrieveretains the extra 308 from the global slash setting.Unverified claims
These VERIFY markers already exist in pages whose links this PR changes. This routing work does not verify their product claims or change their prose:
Documentation risk
Risk: engineering-review-required
Rationale: Changes site-wide redirects and production Markdown middleware. Existing product VERIFY markers are preserved and disclosed above.
Source files consulted: vercel.json, scripts/build-tracking-middleware.mjs, src/lib/markdown-negotiation.js, src/lib/docs-markdown.js, scripts/redirect-slashes.test.mjs at 8b74cc4
Requested engineering reviewers: unchanged; no additional request made
Engineering review status: pending
Docs override: none
Conversation · Implementation plan
Co-Authored-By: Warp agent@warp.dev