Skip to content

refactor!: Remove legacy FGA package#1559

Merged
gjtorikian merged 2 commits intomainfrom
at-remove-legacy-fga-package
Apr 17, 2026
Merged

refactor!: Remove legacy FGA package#1559
gjtorikian merged 2 commits intomainfrom
at-remove-legacy-fga-package

Conversation

@atainter
Copy link
Copy Markdown
Contributor

Description

Remove references to legacy FGA API

@atainter atainter requested review from a team as code owners April 15, 2026 21:27
@atainter atainter requested a review from dandorman April 15, 2026 21:27
@atainter atainter changed the title Remove legacy FGA package refactor : Remove legacy FGA package Apr 15, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 15, 2026

Greptile Summary

This PR removes the legacy FGA (Fine-Grained Authorization) package that was previously marked @deprecated in favour of src/authorization/authorization.ts. All FGA source files, serializers, interfaces, utilities, and tests are deleted, the fga property is removed from WorkOS, public exports are cleaned up, and the /fga/ path prefix is dropped from the HTTP retry allowlist.

Confidence Score: 5/5

Safe to merge — clean removal of a fully deprecated module with no remaining references in the codebase.

All FGA files, exports, and retry-path registrations are consistently removed. A grep across src/ confirms zero lingering references. The only functional change to shared code (isPathRetryable) is a straightforward deletion of the /fga/ prefix and does not affect other modules. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
src/workos.ts Removed FGA import and readonly fga = new FGA(this) property; no other changes.
src/common/net/http-client.ts Removed /fga/ prefix from isPathRetryable; vault and audit_logs paths correctly retained.
src/index.ts Removed export * from './fga/interfaces'; remaining exports are unchanged.
src/index.worker.ts Removed export * from './fga/interfaces'; mirrors the main index cleanup.
src/common/net/fetch-client.spec.ts Removed four FGA-specific test cases and updated remaining retry tests to use /vault/v1/kv.
src/fga/fga.ts Deleted — entire deprecated FGA class removed.

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class WorkOS {
        +actions: Actions
        +apiKeys: ApiKeys
        +auditLogs: AuditLogs
        +authorization: Authorization
        +directorySync: DirectorySync
        +events: Events
        +featureFlags: FeatureFlags
        +mfa: Mfa
        +organizations: Organizations
        +vault: Vault
        +webhooks: Webhooks
        -fga REMOVED
    }

    note for WorkOS "FGA removed (was deprecated)\nAuthorization module is the replacement"

    class Authorization {
        +check()
        +checkBatch()
        +query()
    }

    WorkOS --> Authorization : authorization
Loading

Reviews (2): Last reviewed commit: "Update http-client.ts" | Re-trigger Greptile

@atainter atainter changed the title refactor : Remove legacy FGA package refactor: Remove legacy FGA package Apr 15, 2026
@gjtorikian gjtorikian changed the title refactor: Remove legacy FGA package refactor!: Remove legacy FGA package Apr 15, 2026
@gjtorikian gjtorikian merged commit 8cdd668 into main Apr 17, 2026
10 of 11 checks passed
@gjtorikian gjtorikian deleted the at-remove-legacy-fga-package branch April 17, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants