{"record":{"id":"fbc461593c3ba05d","repo":"JuliusBrussee/caveman","slug":"postgres-resolver-isolation-incomplete-s","errorCode":null,"errorMessage":"postgres: resolver isolation incomplete: %s","messagePattern":"postgres: resolver isolation incomplete: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/postgresconfig/postgresconfig.go","lineNumber":756,"sourceCode":"\t\t\tJOIN pg_attribute org_col ON org_col.attrelid=c.oid\n\t\t\t  AND org_col.attname='organization_id' AND NOT org_col.attisdropped\n\t\t\tWHERE n.nspname='public' AND c.relkind IN ('r','p')\n\t\t\t  AND has_table_privilege(rr.role_name, c.oid, 'SELECT,INSERT,UPDATE,DELETE')\n\t\t\t  AND NOT EXISTS (\n\t\t\t    SELECT 1 FROM pg_policy policy\n\t\t\t    WHERE policy.polrelid=c.oid\n\t\t\t      AND role.oid=ANY(policy.polroles)\n\t\t\t      AND policy.polqual IS NOT NULL\n\t\t\t      AND policy.polwithcheck IS NOT NULL\n\t\t\t  )\n\t\t)\n\t\tSELECT coalesce(string_agg(violation, '; ' ORDER BY violation), '') FROM violations\n\t`).Scan(&violations)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"postgres: inspect resolver schema: %w\", err)\n\t}\n\tif violations != \"\" {\n\t\treturn fmt.Errorf(\"postgres: resolver isolation incomplete: %s\", violations)\n\t}\n\treturn nil\n}\n\n// WithOrg runs fn inside a transaction whose tenant GUC is transaction-local.\n// Empty scopes are rejected: tenant work must never degrade to an unscoped\n// query when RLS is the hard boundary.\nfunc WithOrg(ctx context.Context, pool *pgxpool.Pool, orgID string, fn func(pgx.Tx) error) error {\n\torgID = strings.TrimSpace(orgID)\n\tif orgID == \"\" {\n\t\treturn errors.New(\"postgres: organization scope is required\")\n\t}\n\ttx, err := pool.Begin(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() { _ = tx.Rollback(ctx) }()\n\tif _, err := tx.Exec(ctx, `SELECT set_config('app.current_organization_id', $1, true)`, orgID); err != nil {","sourceCodeStart":738,"sourceCodeEnd":774,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/postgresconfig/postgresconfig.go#L738-L774","documentation":"Error \"postgres: resolver isolation incomplete: %s\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/postgresconfig/postgresconfig.go:756 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Complete resolver isolation as described."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}