Skip to content

Move to actioncable-client v2 - #485

Merged
jeremy merged 2 commits into
mainfrom
actioncable-client-v2
Oct 1, 2026
Merged

jeremy merged 2 commits into
mainfrom
actioncable-client-v2

Conversation

@jeremy

@jeremy jeremy commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

basecamp/actioncable-go was renamed to basecamp/actioncable-client and became a multi-language repository. The Go client now lives in go/ as the module github.com/basecamp/actioncable-client/go/v2. This moves us from github.com/basecamp/actioncable-go v1.1.0 to github.com/basecamp/actioncable-client/go/v2 v2.0.2.

API changes absorbed

None needed at call sites. Between v1.1.0 and v2.0.2 the exported API only grew:

  • added ErrMessageTooBig, *HandshakeError, *CloseError, the StatusCloser interface, and a Version constant
  • nothing removed or renamed; the package is still actioncable

The imports now carry an explicit actioncable name, because the path ends in go/v2 and goimports (in make lint) asks for it.

Behavior verified

client.go, options.go, dispatcher.go and subscription.go are byte-identical between v1.1.0 and v2.0.2. That means WithStopOnError, which stops reconnecting on an authentication failure (#466, actioncable-client#9), works exactly as before.

  • TestAuthenticationFailureStopsAReconnect and TestOnlyAuthenticationFailuresStopReconnects pass against v2.0.2 with -race -count=1. With the WithStopOnError line removed, the first test fails with "client kept reconnecting after authentication failed", so it really does test the library's behavior.
  • make check passes.

The v2 behavior changes are all in the built-in WebSocket transport, and none of them affects us:

  • a refused upgrade returns *HandshakeError, with the same message as before
  • a server close frame returns *CloseError; a close frame with no code now gives *CloseError{Code: 1005} where it used to give io.EOF
  • a message that is too big wraps ErrMessageTooBig
  • the default User-Agent is actioncable-client, but we set our own in the header func

Nothing here compares transport errors to io.EOF or to message strings.

nix/package.nix: the vendorHash is updated to the hash the nix-build job computed for the new module.

Docs: the link in AGENTS.md (which was missing its scheme) and the two API-COVERAGE.md rows now point to actioncable-client.

Overlap with open PRs

Two open PRs change nearby lines: #473 changes the hey-sdk line in go.mod, which is right next to this one, and #344 and #185 change AGENTS.md in other sections. Whichever lands second may need a one-line rebase. None of them conflicts in the code.

Copilot AI balanced review requested due to automatic review settings September 22, 2026 22:05
@jeremy
jeremy requested a review from a team as a code owner September 22, 2026 22:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T00:10:34.461277Z c4d95a6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The dependency bump leaves the Nix vendor hash stale, causing the required Nix build to fail.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Migrates Action Cable to its renamed v2 Go module while preserving existing watch behavior.

Changes:

  • Updates dependency/import paths to actioncable-client/go/v2.
  • Updates tests and Action Cable documentation.
  • Leaves the required Nix vendorHash update outstanding.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
internal/​cmd/​watch.go Updates Action Cable import.
internal/​cmd/​watch_test.go Updates test import.
internal/​cmd/​watch_new_test.go Updates new-mail test import.
internal/​cmd/​watch_calendar.go Updates calendar watch import.
internal/​cmd/​tui_watch.go Updates TUI watch import.
internal/​cmd/​tui_watch_test.go Updates TUI watch test import.
internal/​cable/​cable.go Migrates cable client import.
internal/​cable/​cable_test.go Migrates cable tests.
go.mod Replaces the v1 module with v2.
go.sum Updates module checksums.
API-COVERAGE.md Renames the documented client.
AGENTS.md Updates the project link and module description.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread go.mod
@jeremy

jeremy commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

@codex review

Copilot AI previously approved these changes Sep 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approved

The new module exists, preserves the consumed API, updates every import, and includes synchronized checksum and Nix metadata.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: f33fe8bd46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@robzolkos robzolkos added the CLI Only Can be completed entirely within hey-cli label Sep 27, 2026
@jeremy
jeremy force-pushed the actioncable-client-v2 branch from f33fe8b to e61bb27 Compare September 30, 2026 01:31
@jeremy
jeremy requested a balanced review from Copilot September 30, 2026 01:31
@jeremy

jeremy commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

Copilot AI dismissed their stale review, a newer Copilot review was requested September 30, 2026 01:31
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: e61bb27ffd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI previously approved these changes Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approved

The migration is complete, the target version exists, and all imports, checksums, Nix metadata, tests, and documentation are aligned.

Review effort: Balanced
Findings: None

@jeremy
jeremy force-pushed the actioncable-client-v2 branch from e61bb27 to 1a723f6 Compare September 30, 2026 01:34
@jeremy
jeremy requested a balanced review from Copilot September 30, 2026 01:34
@jeremy

jeremy commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

Copilot AI dismissed their stale review, a newer Copilot review was requested September 30, 2026 01:34
Copilot AI previously approved these changes Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approved

The migration is complete, API-compatible, documented, and includes a CI-verified Nix vendor hash.

Review effort: Balanced
Findings: None

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 1a723f68e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

basecamp/actioncable-go was renamed to basecamp/actioncable-client and its
Go module now lives at github.com/basecamp/actioncable-client/go/v2. Switch
the import path and require to v2.0.2.

The exported API is a superset of v1.1.0 and client.go is unchanged, so
WithStopOnError keeps stopping reconnects on an authentication failure.
@jeremy
jeremy requested a balanced review from Copilot October 1, 2026 00:08
@jeremy
jeremy force-pushed the actioncable-client-v2 branch from 1a723f6 to c4d95a6 Compare October 1, 2026 00:08
@jeremy

jeremy commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

@codex review

Copilot AI dismissed their stale review, a newer Copilot review was requested October 1, 2026 00:08
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: c4d95a6e0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approved

The module version exists, all legacy imports were replaced, and dependency metadata and Nix packaging were updated consistently.

Review effort: Balanced
Findings: None

@jeremy
jeremy merged commit 98c1ef7 into main Oct 1, 2026
37 checks passed
@jeremy
jeremy deleted the actioncable-client-v2 branch October 1, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI Only Can be completed entirely within hey-cli commands deps docs tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants