fix(grants): add DEFAULT PRIVILEGES for authenticated/anonymous + polling error logging#99
Merged
devin-ai-integration[bot] merged 2 commits intoJun 14, 2026
Conversation
…or logging - Add ALTER DEFAULT PRIVILEGES for authenticated (SELECT, INSERT, UPDATE, DELETE) and anonymous (SELECT only) on constructive_compute_public and constructive_platform_function_graph_public schemas - Update standalone_schema_access.sql to grant anonymous role USAGE + SELECT on all public schemas (for unauthenticated GraphQL requests) - Add console.error logging to pollExecutionStatus catch blocks so GraphQL failures are visible in browser dev tools instead of silently swallowed - Regenerate sql/ packages for constructive-compute, constructive-platform- function-graph, and constructive-infra-seed
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Anonymous grants are pointless — standalone mode sets anon_role='authenticated' so all requests (even unauthenticated) use the authenticated role. Only the authenticated DEFAULT PRIVILEGES are needed.
41f33c6
into
feat/flows-panel-ui
3 checks passed
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
The execution overlay UI was stuck on "executing..." forever because
pollExecutionStatussilently caught all GraphQL errors — thecatch {}blocks swallowed failures andnsRowsstayed empty, causingoverallStatusto always evaluate to'running'.Two fixes:
DEFAULT PRIVILEGES for future tables —
constructive_compute_publicandconstructive_platform_function_graph_publicnow grant:authenticated: SELECT, INSERT, UPDATE, DELETE on all future tablesanonymous: SELECT on all future tablesThis ensures any tables created after the initial
GRANT ... ON ALL TABLESstill get proper permissions.standalone_schema_access.sqlgrants for anonymous — adds USAGE + SELECT for theanonymousrole on all public schemas. Previously onlyauthenticatedhad explicit grants; now PostGraphile can serve unauthenticated requests (GraphQL explorer) without permission errors.Error logging in
pollExecutionStatus— all threecatchblocks now log viaconsole.errorso GraphQL failures are visible in browser dev tools:Root cause analysis: The grants from
standalone_schema_access.sqluseGRANT ... ON ALL TABLES IN SCHEMAwhich only covers tables existing at execution time. TheALTER DEFAULT PRIVILEGESensures tables created afterward (e.g. by future migrations or partition management) are also covered.Link to Devin session: https://app.devin.ai/sessions/b2291a8e333e445aa125a2efd1996206
Requested by: @pyramation