Repository navigation
feat(applyflow): explicit extension grant scopes for contacts (PR1) - #262
Merged
Merged
Conversation
Require reconnect consent for contacts:read/write; backfill legacy grants without contacts scopes and enforce Bearer capability checks end to end.
Require server DB preflight before seed, abort only on account switch, and never reconcile aborted requests into confirmed writes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…ailure Call the DB target classifier without passing ProcessEnv, which Next rejects during the ApplyFlow production build.
gustavomarques00
marked this pull request as ready for review
October 20, 2026 22:24
Keep the already-applied scopes migration unchanged and add a DEFAULT of the legacy set so old writers that omit the column do not fail or receive contacts.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
20261020210000_extension_grant_scopes_legacy_defaultsetsDEFAULTto that same legacy set so the pre-scopes writer, which omitsscopes, can still insert.Why the first migration file was not edited
20261020140000_extension_grant_scopesis already recorded in the local ApplyFlow Postgres on127.0.0.1:5434. That database was not reset.origin/mainororigin/production.Migration order
20261020140000_extension_grant_scopes— addscopes, backfill legacy scopes only,NOT NULL. No contacts.20261020210000_extension_grant_scopes_legacy_default—DEFAULTof the same legacy set. No contacts.Both must be applied before the production push of the app that selects
scopes. Neither migration was applied remotely by this PR.Launch plan and approvals
These are separate approvals. None of them is granted by this update.
main. Integrates code. ApplyFlow (devflow-applyflow, production branchproduction) gets a preview only. Portal, WhatsApp, and Financeiro use production branchmain, so the merge is a production git event for those projects. The ApplyFlow preview has noDATABASE_URLand does not prove persisted routes.production. Do not edit or reapply20261020140000if it is already present; apply only the pending DEFAULT migration. This approval does not publish the new binary and does not change flags.production. Fast-forward only after the migrations are applied and the full commit list is reviewed again. Today,origin/production..origin/mainis portal-only (0a56b491,f2113384,7e5fe247,cc8c47bb,afb5cd2e,160ee4d7,fbcbbc8c). After this PR merges, the same promotion also includes23d5b284,8dc2192e,ec8332e3, andf8b0e100. The Vercel project that deploys production from branchproductionisdevflow-applyflowonly. The git ref is not an ApplyFlow-only history.Failure of the first scopes deployment
There is no production deployment that already enforces scopes.
dpl_7AEKoUVxHRLf7bzLiZzzx7B16K5d(ab1c04caa1f2) is not a rollback target. Fix-forward with a build that still enforces scopes is recovery, not rollback. The current flag value was not reconfirmed and is not a guaranteed block. Any flag change or other remote containment needs its own approval.Tests on this HEAD
127.0.0.1:5439/applyflow_scopes_check(removed after the run). Existing127.0.0.1:5434/applyflowwas not reset.20261020140000: existing grant received only legacy scopes.20261020210000, an INSERT that omitsscopesreceived only legacy scopes.contacts:readandcontacts:write.GET /api/applyflow/v2/contactsreturned 403grant_capability_denied.prisma generatehit a local file lock (EPERMrenaming the query engine). Schema load started; CI generate is still required.E2E limits from the previous HEAD
The earlier browser E2E (
ec8332e3) is not re-run here. This change does not alter extension runtime behavior. Service-worker restart in that run was CDPstopAllWorkers, not a full browser restart.Out of scope
No merge, remote migration, production promotion, or flag changes. PR 2 is not started.