Skip to content

chore: switch canonical to pagent.vercel.app + auto-alias workflow#15

Merged
alextnetto merged 1 commit into
mainfrom
chore/canonical-pagent-url
May 11, 2026
Merged

chore: switch canonical to pagent.vercel.app + auto-alias workflow#15
alextnetto merged 1 commit into
mainfrom
chore/canonical-pagent-url

Conversation

@alextnetto
Copy link
Copy Markdown
Member

Summary

Drops `agent-ui-session.vercel.app` entirely, makes `pagent.vercel.app` the only canonical URL.

Out-of-tree changes (already applied)

In-tree changes

  • Sweep replace `agent-ui-session.vercel.app` → `pagent.vercel.app` across:
    • `README.md`, `docs/RELEASING.md`, `docs/openapi.yaml`
    • `requests.prod.http`
    • `.claude-plugin/marketplace.json`, `.claude-plugin/plugin.json`
    • `apps/web/home.ts` (terminal mockup URL)
    • `apps/api/schemas.ts` (error message examples), `apps/api/schemas.test.ts` (test fixtures), `apps/api/app.ts` (a comment), `apps/api/.env.example`
  • New `.github/workflows/vercel-alias-pagent.yml`: on push to main, waits for the new production deployment to be READY then re-aliases `pagent.vercel.app` onto it.

Why the workflow

`pagent.vercel.app` is owned at the project-domain layer by another team's project (Vercel API responds with `owned-on-other-team` when we try to bind it as ours). We can serve from it via deployment aliases — that's what the workflow does — but Vercel won't auto-track it for us the way it auto-tracks a project-owned domain.

⚠️ One manual step needed to enable auto-alias

Add a `VERCEL_TOKEN` repository secret with read+alias scope on the `ful` Vercel team. Until that's set, the workflow skips with a warning (does not fail). Generate at https://vercel.com/account/tokens, scope to the `ful` team, then add at Settings → Secrets and variables → Actions.

Test plan

Per follow-up: drop agent-ui-session.vercel.app entirely, make
pagent.vercel.app the only canonical URL.

Done out-of-tree:
- Removed agent-ui-session.vercel.app alias from the pagent Vercel
  project (now 404s).
- Updated Railway env on the pagent api service: PUBLIC_URL and
  ALLOWED_ORIGINS now point at https://pagent.vercel.app. Confirmed
  end-to-end: POST /new from the new origin returns 200 with
  `url: https://pagent.vercel.app/{id}` and the right CORS header.

Repo changes:
- Sweep replace agent-ui-session.vercel.app → pagent.vercel.app
  across README, docs, openapi spec, plugin manifests, requests.http,
  api defaults / .env.example, schemas error messages / tests, and
  the home page terminal mock.
- Added .github/workflows/vercel-alias-pagent.yml: on push to main,
  waits for the production deployment to be READY then re-aliases
  pagent.vercel.app onto it. Required because pagent.vercel.app is
  owned at the project-domain layer by another team's project, so
  Vercel rejects adding it as our project's auto-tracking domain.
  We can keep serving from it via deployment aliases — this workflow
  just re-points the alias on every prod deploy. Workflow no-ops
  loudly until a VERCEL_TOKEN repo secret is added (one-time setup).
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

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

Project Deployment Actions Updated (UTC)
pagent Ready Ready Preview, Comment May 11, 2026 1:39am

Request Review

@alextnetto alextnetto merged commit 1a52357 into main May 11, 2026
3 checks passed
@alextnetto alextnetto deleted the chore/canonical-pagent-url branch May 11, 2026 01:41
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a0b028c415

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +50 to +54
"https://api.vercel.com/v6/deployments?projectId=$VERCEL_PROJECT_ID&teamId=$VERCEL_TEAM_ID&target=production&limit=1")
STATE=$(echo "$JSON" | jq -r '.deployments[0].state // "unknown"')
URL=$(echo "$JSON" | jq -r '.deployments[0].url // ""')
echo "attempt $i: state=$STATE url=$URL"
if [ "$STATE" = "READY" ] && [ -n "$URL" ]; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Filter aliased deployment to current push SHA

This loop aliases whichever deployment is currently returned by target=production&limit=1, but it never verifies that deployment belongs to the commit that triggered this run. On a fast push to main, the new Vercel deployment may not exist yet, so the API can return the previous production deployment in READY state, causing the job to exit successfully while re-pointing pagent.vercel.app to stale code. Please gate on a deployment field tied to ${{ github.sha }} (or wait until that SHA appears) before accepting READY.

Useful? React with 👍 / 👎.

alextnetto added a commit that referenced this pull request May 15, 2026
`pagent.link` is the auto-tracking production domain on the Vercel
project (set 2026-05-15), so future pushes to `main` auto-alias
without any GitHub Action. This workflow has been silently no-op'ing
on the missing `VERCEL_TOKEN` secret since #15 anyway; removing it
cleans up a confusing CI signal and one less file to maintain.

If we ever want a belt-and-suspenders auto-alias job, the path is to
add the `VERCEL_TOKEN` secret to GitHub Actions and re-introduce the
workflow with `ALIAS: pagent.link`. Reference implementation lives in
this commit's parent.
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.

1 participant