Repository navigation
[AR-20261021-1] Redirect ?fallback and ?slug copies to the clean docs URL - #942
Conversation
|
This PR was generated with Warp. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Verification on the preview (
Review follow-up (latest commit):
Posted by a Warp agent |
|
Ready for review. All gates pass: CI is green, including the two new tracking steps; the preview redirects as intended; ora shows no change against a control preview; the crawler-eye comparison shows 0 regressions; and the independent review found nothing blocking (its one fix is in). What this should move: ChatGPT's share of clean retrievals for the docs homepage, from 1.5% (1 of 68, Oct 14–20) to at least 70% within 14 days of deploy, read in Peec. Below 30% counts as no effect. It's the same mechanism as #885, which took the Factories docs pages from 2% to 96% clean in 11 days. Posted by a Warp agent |
|
@warp-agent-staging[bot] I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR extends the existing tracking-redirect middleware from trk to a shared stripped-parameter list covering trk, fallback, and slug, updates the Vercel route generation to emit one query route per stripped key, and adds CI coverage for both middleware behavior and generated route placement.
Concerns
- No blocking correctness, security, comment-quality, test-quality, or spec-alignment concerns found in the annotated diff.
spec_context.mdreports that no approved or repository spec context was found for this PR.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /warp-agent-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
@vikvang, automation “Auto-fix flaky tests” in factory “concierge-factory” couldn’t start a run. The Warp account linked to your GitHub account isn’t on team “Growth”.
|


Summary
Experiment: AR-20261021-1
Extends the existing
?trk=redirect middleware (AR-20261009-7, #885) to two more parameters,fallbackandslug. Any docs URL carrying one of them now gets a 301 to the same path without it. Every other query parameter, includingutm_*, is kept. Nothing in the repo reads either parameter.Why: ChatGPT has moved almost all of its docs homepage retrievals onto two parameter copies, which return 200 with only a canonical tag pointing at
/. In Peec, Oct 14–20:https://docs.warp.dev?fallback=true: 36 retrievals, 0.28 citations per retrievalhttps://docs.warp.dev?slug=university: 31 retrievals, 0.29https://docs.warp.dev/(clean): 1 retrievalFrom Sep 30 to Oct 13 the clean URL had 116 retrievals at 0.75. The same fix for
?trk=moved ChatGPT's share of clean retrievals on the Factories docs from 2% to 96% and raised their citation rate from 0.48 to 0.63 within 11 days.Metric and prediction: Peec ChatGPT clean share of docs homepage retrievals goes from 1.5% (1/68, Oct 14–20) to at least 70% within 14 days of deploy. Falsified below 30%. Secondary: docs homepage ChatGPT citation rate from 0.28 to at least 0.5.
Implementation:
STRIPPED_PARAMSinsrc/lib/tracking-redirect.jsis the single list. The postbuild script emits one Vercel routing entry per key, because entries inside onehasarray are AND-ed. Requests without any listed parameter never invoke the middleware.Related issues
Follows #885 (AR-20261009-7). No issue.
Validation
node --test scripts/tracking-redirect.test.mjs: 6 tests pass. New cases cover each parameter alone, both together, all three plusutm_sourcein one hop, a non-homepage path, and no redirect when onlyutm_*is present.scripts/build-tracking-middleware.mjsagainst a stub.vercel/output/config.json: it emits three routes (trk,fallback,slug) ahead of the filesystem handler and copies the function.Screenshots
None (no visual change).
Follow-ups
None.