Hi Vercel team,
I’m seeing reproducible behavior where a branch-scoped Preview environment variable is not overriding a global Preview variable with the same key.
Project
Project: apollo-restaurant-ai Project ID: prj_AQsbxMIATcFXUSiq8aAP4AW47HTK Team ID: team_rtfpWrfN9VNFQGyd0aNXWTwQ
Environment variable
Key: MERCADO_PAGO_WEBHOOK_SECRET_TEST
Global Preview definition:
Variable ID: HYwsc7vb793v8M50 Environment: Preview Branch scope: none Type: Sensitive
Branch-scoped definition:
Variable ID: ZsVj15gZeskgMWC2 Environment: Preview Git branch: codex/phase-5b-lifecycle Type: Sensitive
The branch-scoped definition was created using Vercel CLI 59.25.4 with env add ... preview --git-branch codex/phase-5b-lifecycle --sensitive.
Reproduction
A fresh Git Preview deployment was created after the branch-scoped definition existed:
Deployment ID: dpl_27mQvXaQWZAb7hFTvfdyBjdUMt6H Environment: Preview Git branch: codex/phase-5b-lifecycle Status: READY
We verified which value reached the runtime without exposing either secret, using only value length and a truncated SHA-256 fingerprint.
Expected branch-scoped value:
length: 189 SHA-256 prefix: 4ebf3441b95b
Actual runtime value:
length: 64 SHA-256 prefix: fbdda16a3c23
The runtime therefore appears to be receiving the global Preview value instead of the branch-scoped Preview value.
We also deleted and recreated the branch-scoped variable through the CLI and reproduced the same behavior with a fresh Git deployment.
The Vercel Support Agent confirmed that branch-scoped Preview variables are expected to override global Preview variables for deployments on the matching Git branch and recommended technical investigation.
Is there anything else that can cause the global Preview definition to take precedence despite the deployment metadata showing the exact matching Git branch?
I can provide additional metadata if needed. I will not post secret values, access tokens, .env files, or full hashes.