diff options
| author | John Pham <john.pham@vercel.com> | 2026-05-21 10:17:47 -0700 |
|---|---|---|
| committer | John Pham <john.pham@vercel.com> | 2026-05-21 10:17:47 -0700 |
| commit | 9e50dda5bd410bf77915c630b2b8e2a44697c5b2 (patch) | |
| tree | da74e4fbb1e333f22c15b52c0164a8bce684d370 /skills/vercel-optimize/scripts/deep-dive.mjs | |
| parent | 3296353bb7fff11269fff02e717350f05b721331 (diff) | |
fix: support user-owned vercel optimize scope checksjohnphamous/vercel-optimize-data-gap-reporting
Diffstat (limited to 'skills/vercel-optimize/scripts/deep-dive.mjs')
| -rwxr-xr-x | skills/vercel-optimize/scripts/deep-dive.mjs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/skills/vercel-optimize/scripts/deep-dive.mjs b/skills/vercel-optimize/scripts/deep-dive.mjs index 6363fc3..497d32a 100755 --- a/skills/vercel-optimize/scripts/deep-dive.mjs +++ b/skills/vercel-optimize/scripts/deep-dive.mjs @@ -73,6 +73,12 @@ async function main() { console.error(' Re-run collect-signals.mjs with the current skill so deep-dive queries use the same team as the broad pass.'); process.exit(2); } + const commandAccountId = commandScope.teamId ?? commandScope.userId ?? null; + if (commandAccountId && link.orgId && link.orgId !== commandAccountId) { + console.error('[deep-dive] FATAL: cwd .vercel/ links the project to a different Vercel scope than commandScope.'); + console.error(' Re-run with --cwd <dir-linked-to-the-collected-project>, or rerun collect-signals.mjs from the intended app directory.'); + process.exit(2); + } const scope = commandScope.cliScope || undefined; log(`command scope resolved (source=${commandScope.source}; scoped=${scope ? 'yes' : 'no'})`); |
