Skip to content

chore: mark non-spec service accessors with @oagen-ignore-start/end#354

Merged
gjtorikian merged 2 commits intomainfrom
hand-maintain-non-spec-accessors
Apr 14, 2026
Merged

chore: mark non-spec service accessors with @oagen-ignore-start/end#354
gjtorikian merged 2 commits intomainfrom
hand-maintain-non-spec-accessors

Conversation

@gjtorikian
Copy link
Copy Markdown
Contributor

Previously, oagen-emitters generated methods for APIs not in the OpenAPI spec—stuff like Vault, PKCE, etc. This was kind of gross and unnecessary, so I removed the functionality in workos/oagen-emitters@7b0bab4 and am just tagging the relevant code sections with oagen-ignore, so that they do not get removed upon regeneration.

@gjtorikian gjtorikian requested review from a team as code owners April 14, 2026 16:35
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 14, 2026

Greptile Summary

This PR protects hand-maintained, non-spec service properties and accessors in lib/WorkOS.php from being removed by the oagen code generator by wrapping them with @oagen-ignore-start/end markers. It also bumps the PHPStan memory limit to 512M in both composer.json and script/ci for consistency.

Confidence Score: 5/5

  • This PR is safe to merge — all changes are purely additive comments and tooling flags with no logic modifications.
  • All changes are non-functional: annotation comments that don't affect runtime behaviour, a matched memory-limit flag added to two places, and a manifest timestamp update. No logic, no schema, no security surface is altered.
  • No files require special attention.

Important Files Changed

Filename Overview
.oagen-manifest.json Timestamp-only update to generatedAt field reflecting when the manifest was last regenerated — no functional changes.
composer.json Adds --memory-limit=512M to the PHPStan typecheck script command, matching the same change made to script/ci.
lib/WorkOS.php Wraps non-spec, hand-maintained service properties and accessor methods with @oagen-ignore-start/end markers so the code-generator does not remove them on regeneration. Markers are correctly paired.
script/ci Adds --memory-limit=512M to the PHPStan analyse invocation in the CI script, in sync with the matching change in composer.json.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[oagen code generator runs] --> B{Scan WorkOS.php}
    B --> C[Encounter @oagen-ignore-start]
    C --> D[Skip section until @oagen-ignore-end]
    D --> E[Continue scanning]
    E --> F[Regenerate only spec-backed code]

    subgraph Protected["Protected (hand-maintained)"]
        G[Passwordless property/accessor]
        H[Vault property/accessor]
        I[WebhookVerification property/accessor]
        J[Actions property/accessor]
        K[SessionManager property/accessor]
        L[PKCEHelper property/accessor]
    end

    D -.->|preserves| Protected
Loading

Reviews (1): Last reviewed commit: "update typecheck memory limit" | Re-trigger Greptile

@gjtorikian gjtorikian merged commit 084d0d1 into main Apr 14, 2026
8 checks passed
@gjtorikian gjtorikian deleted the hand-maintain-non-spec-accessors branch April 14, 2026 16:41
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.

1 participant