Skip to content

refactor: model gateway lifecycle state - #425

Merged
thewilloftheshadow merged 1 commit into
mainfrom
kevin/gateway-lifecycle-state
Oct 13, 2026
Merged

thewilloftheshadow merged 1 commit into
mainfrom
kevin/gateway-lifecycle-state

Conversation

@kevinatbuape

Copy link
Copy Markdown
Collaborator

Summary

  • add explicit GatewayConnectionState and GatewaySessionState models
  • centralize GatewayPlugin lifecycle transitions behind connection/session helpers
  • preserve compatibility for public isConnected and sequence reads while reducing direct boolean state mutation
  • add mocked gateway lifecycle tests for connecting, connected, and reconnecting transitions

Testing

  • pnpm exec vitest run packages/carbon/tests/plugins/gateway-lifecycle.test.ts
  • pnpm exec biome check packages/carbon/src/plugins/gateway/GatewayPlugin.ts packages/carbon/src/plugins/gateway/types.ts packages/carbon/tests/plugins/gateway-lifecycle.test.ts .changeset/gateway-lifecycle-state.md --write
  • pnpm --filter @buape/carbon build

Closes #414

This is intentionally a focused first pass on the lifecycle representation rather than a giant gateway rewrite; please review the transition model carefully before merge.


Requested by @rubyrunsstuff at #414

@kevinatbuape
kevinatbuape requested a review from a team as a code owner September 19, 2026 19:41
@changeset-bot

changeset-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 546f100

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@buape/carbon Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the package: carbon The carbon package label Sep 19, 2026
@thewilloftheshadow
thewilloftheshadow added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 72c9063 Oct 13, 2026
9 checks passed
@thewilloftheshadow
thewilloftheshadow deleted the kevin/gateway-lifecycle-state branch October 13, 2026 08:01
@buapebot buapebot mentioned this pull request Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: carbon The carbon package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify GatewayPlugin lifecycle state representation

2 participants