Skip to content

Conversation

@chris-freeman-glean
Copy link
Contributor

Summary

Fixes the CI "Generate" workflow failures that have been occurring since #95 was merged.

Root cause: PR #95 added custom properties (excludeDeprecatedAfter, includeExperimental) directly to SDKOptions in src/lib/config.ts. However, this file is generated by Speakeasy and gets overwritten during SDK regeneration, removing the custom properties and causing TypeScript compilation errors.

Solution:

  • Create a separate XGleanOptions interface in src/hooks/x-glean-options.ts (the hooks directory is only generated once by Speakeasy, so files there persist across regenerations)
  • Update the hook to cast hookCtx.options to the new interface
  • Update tests to use intersection types (SDKOptions & XGleanOptions)
  • Remove the custom properties from config.ts (they would be removed during regeneration anyway)

Test plan

  • TypeScript compilation passes
  • Linting passes
  • All 11 X-Glean unit tests pass
  • Full build completes successfully
  • Verified changes survive speakeasy run regeneration locally

🤖 Generated with Claude Code

The X-Glean feature added in PR #95 placed custom properties directly
in src/lib/config.ts, which is regenerated by Speakeasy. This caused
CI failures when the Generate workflow ran, as the custom properties
were overwritten.

This fix:
- Creates a separate XGleanOptions interface in src/hooks/x-glean-options.ts
  (hooks directory is not regenerated after initial creation)
- Updates the hook to cast options to the new interface
- Updates tests to use intersection types for type safety
- Removes the custom properties from config.ts (they would be removed
  during regeneration anyway)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@chris-freeman-glean chris-freeman-glean marked this pull request as ready for review February 3, 2026 17:07
@chris-freeman-glean chris-freeman-glean requested a review from a team as a code owner February 3, 2026 17:07
@chris-freeman-glean chris-freeman-glean merged commit ebd1b32 into main Feb 3, 2026
3 checks passed
@chris-freeman-glean chris-freeman-glean deleted the cfreeman/fix-x-glean-sdk-options-regeneration branch February 3, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants