Skip to content

feat(ruby): M6a — ast-grep parity lanes - #2858

Draft
filip-michalsky wants to merge 2 commits into
filipmichalsky/ruby-sdk-m5from
filipmichalsky/ruby-sdk-m6a-parity
Draft

feat(ruby): M6a — ast-grep parity lanes#2858
filip-michalsky wants to merge 2 commits into
filipmichalsky/ruby-sdk-m5from
filipmichalsky/ruby-sdk-m6a-parity

Conversation

@filip-michalsky

Copy link
Copy Markdown
Collaborator

Part of the AP-2857 parity stack:

Stack: #2820 (spike) ← #2854 (M1–M2) ← #2855 (M3) ← #2851 (M4) ← #2857 (M5) ← this PR (M6a)

Adds @ast-grep/lang-ruby and Ruby lanes to the cross-language drift checks, holding the Ruby SDK to the same bar as Python/Go:

  • rpc-parity — lifecycle capabilities (send/on_request/on_notification/receive/close), JSON-RPC error codes, notification buffer bound
  • cdp-parity — transport lifecycle, page.on / CDPSubscription#unsubscribe, extension discovery + runtime bridging tokens
  • example-parity — example inventory equality with TS/Python/Go, per-example public SDK operation lists, lifecycle checks
  • sdk-parity — a dedicated Ruby section: references all 77 registered operations; outbound set == extension router and inbound == TS inbound; notification coverage; per-class RPC-backed operations, public callable surface, and Stagehand accessors compared against TypeScript; and params-model + result-descriptor validation at every RPC call site. (Ruby has no in-source type annotations — RBS covers that — so the typed-parameter checks intentionally remain TS/Python/Go.)

SDK changes the lanes forced (real parity findings)

  • Inlined @rpc_client.send("<wire.method>", …) per public method, removing the navigate/void helpers — wire methods are now statically visible per method, matching how the sibling SDKs are written.
  • Removed Client#context — TS/Python deliberately do not expose context on Stagehand (the accessor lane rejects it).
  • The canonical 11 examples are now self-contained (inventory + operations parity); Ruby-only walkthroughs moved to examples/extras/ with the shared helper.

Not in this PR

sdk-field-pipeline and sdk-client-schema-parity Ruby lanes land with the docs tabs (M6b) — those suites also validate documentation pages.

Verification

  • All 9 ast-grep suites green: 52 tests (up from 42)
  • Ruby suite still green: 120 runs / 803 assertions + RBS validation
  • Live on local Chrome after the send-inlining: batch.rb, file_upload.rb, extras/context_and_response.rb

🤖 Generated with Claude Code

Adds @ast-grep/lang-ruby (0.0.7) and Ruby lanes to the cross-language
parity suites:

- rpc-parity: lifecycle capabilities (send/on_request/on_notification/
  receive/close), error codes (underscore-separated literals), buffer bound
- cdp-parity: transport lifecycle, page.on / CDPSubscription#unsubscribe,
  extension discovery + runtime bridging tokens
- example-parity: inventory equality, per-example public SDK operations,
  and lifecycle checks against the TS examples
- sdk-parity: dedicated Ruby section — references all 77 registered
  operations, outbound == extension router / inbound == TS inbound,
  notification coverage, per-class RPC-backed operations + public callable
  surface + Stagehand accessors vs TypeScript, and params-model/result-
  descriptor validation at every RPC boundary. Ruby has no in-source types
  (RBS covers that), so the typed-parameter checks stay TS/Python/Go.

SDK changes the lanes forced:
- inline @rpc_client.send per public method (removed the navigate/void
  helpers) so wire methods are statically visible, matching the siblings
- remove Client#context (TS/Python deliberately do not expose context on
  Stagehand)
- examples: the canonical 11 are now self-contained (inventory and ops
  parity with TS/Python/Go); Ruby-only walkthroughs moved to
  examples/extras/ with the shared helper

sdk-field-pipeline and sdk-client-schema-parity Ruby lanes land with the
docs tabs (they validate docs pages too).

Verified: all 9 ast-grep suites green (52 tests), Ruby suite 120 runs /
803 assertions + RBS, batch.rb/file_upload.rb/extras live-checked on
local Chrome.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c1a73be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​ast-grep/​lang-ruby@​0.0.7751008182100

View full report

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant