Skip to content

Align Pilot buy-path fidelity: HTML GET /v1/gateway/pilot now redirects to /buy#pilot - #19

Draft
cabbageandtea with Copilot wants to merge 2 commits into
masterfrom
copilot/audit-and-push-pilot-buy-path-fidelity
Draft

Align Pilot buy-path fidelity: HTML GET /v1/gateway/pilot now redirects to /buy#pilot#19
cabbageandtea with Copilot wants to merge 2 commits into
masterfrom
copilot/audit-and-push-pilot-buy-path-fidelity

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown

This addresses the remaining Pilot lock-path fidelity gap: browser-style requests to GET /v1/gateway/pilot were returning API-style paywall JSON instead of routing humans to the buy funnel. The change preserves unpaid API semantics while aligning HTML navigation to the intended CTA path.

  • Pilot endpoint behavior

    • Updated GET /v1/gateway/pilot to branch on HTML Accept and return 302 to ${BASE_URL}/buy#pilot.
    • Kept non-HTML behavior unchanged (402 PAYMENT_REQUIRED challenge when payments are configured; existing fallback otherwise).
  • Audit guardrail for regression prevention

    • Extended scripts/align-audit.mjs to assert:
      • GET /v1/gateway/pilot with Accept: text/html returns 302
      • Location points to /buy#pilot
router.get("/v1/gateway/pilot", (req, res) => {
  const base = config.BASE_URL.replace(/\/$/, "");
  if (wantsHtml(req.headers.accept)) {
    res.redirect(302, `${base}/buy#pilot`);
    return;
  }
  // existing JSON paywall behavior remains
});

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sqlguard Error Error Jul 30, 2026 10:10pm

Copilot AI changed the title [WIP] Audit and push pilot buy path fidelity Align Pilot buy-path fidelity: HTML GET /v1/gateway/pilot now redirects to /buy#pilot Jul 30, 2026
Copilot AI requested a review from cabbageandtea July 30, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@copilot audit+push: Pilot buy path fidelity (402/CTA/deploy)

2 participants