chore: switch canonical to pagent.vercel.app + auto-alias workflow#15
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 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".
| "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 |
There was a problem hiding this comment.
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 👍 / 👎.
`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.
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
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.
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