Skip to content

chore(ruby): move the mesh-v2 lambda and ruby images to ruby 4.0 - #1265

Merged
smalruby3-editor-bot[bot] merged 1 commit into
developfrom
security/ruby-4.0
Oct 30, 2026
Merged

smalruby3-editor-bot[bot] merged 1 commit into
developfrom
security/ruby-4.0

Conversation

@smalruby3-editor-bot

Copy link
Copy Markdown

Summary

リポジトリの Ruby を最新の 4.0 系(4.0.9)にそろえます。#1263(Regexp の CVE 修正版への更新)の続きで、#1263 のブランチを base にしています。#1263 がマージされると base は自動で develop に切り替わります。

Changes Made

  • mesh-v2 の Lambda: ランタイムを ruby4.0 にした。
    • 今の aws-cdk-lib 2.232.1 には RUBY_4_0 定数が無い(2.251〜2.254 で追加)。CDK の更新は全プロジェクトを同じ版に保つ決まりがあり security: remaining npm advisories that need major upgrades or replacements (2026-10) #1264 で扱うため、ここでは new lambda.Runtime('ruby4.0', lambda.RuntimeFamily.RUBY) と書いた。CDK を上げたら定数に置き換える。
    • Lambda のコードが使うのは securerandom / time / ランタイムに同梱の aws-sdk-dynamodb だけ。Ruby 4.0 で gem から外れたライブラリ(ostruct / logger など)は使っていない。
  • mesh-v2 の開発・CI: .ruby-version を 4.0.9 に、StandardRB の対象を 4.0 にした。CI(rspec / standardrb / bundler-audit)はこの .ruby-version を読む。
  • Docker イメージ
  • ドキュメント: mesh-v2 の docs、.claude/rules/infra/*、.vscode/cargo.env.example の Ruby 3.4 を 4.0 に直した。

変えていないもの

  • gem の CI 行列(3.3 / 3.4 / 4.0)と gem-build-check の既定値 3.4。gem は 3.3 以上を対応範囲にしているので、Ruby の更新ではなく対応範囲の決定になるため。

Test Coverage

  • npx cdk synth --context stage=stg が通り、テンプレートの Lambda が "Runtime": "ruby4.0" になることを確かめた。
  • mesh-v2 の jest と tsc は通る。
  • Ruby 4.0 での rspec / standardrb / bundler-audit は CI で確認する(この開発コンテナには Ruby が無い)。
  • deploy-stg ラベルで stg に出し、Lambda が担う GraphQL(createDomain など)が動くことを確かめる。
  • Docker のビルドはコンテナに docker が無いので未確認。

🤖 Generated with Claude Code

- mesh-v2: .ruby-version 4.0.9, standardrb target 4.0, Lambda runtime
  ruby4.0 (spelled out because aws-cdk-lib 2.232.1 has no RUBY_4_0)
- infra/Dockerfile: Ruby 4.0.9; ruby/smalruby3/Dockerfile: ruby:4.0-slim-bookworm
- docs and rules: Ruby 3.4 -> 4.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@smalruby3-editor-bot smalruby3-editor-bot Bot added the deploy-stg この PR の infra 変更を stg にデプロイする (#1162) label Oct 30, 2026
@github-actions github-actions Bot removed the deploy-stg この PR の infra 変更を stg にデプロイする (#1162) label Oct 30, 2026
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed: https://smalruby.jp/smalruby3-editor/security/ruby-4.0/

Base automatically changed from security/runtime-and-deps-2026-10 to develop October 30, 2026 15:25
@smalruby3-editor-bot smalruby3-editor-bot Bot added the deploy-stg この PR の infra 変更を stg にデプロイする (#1162) label Oct 30, 2026
@github-actions

Copy link
Copy Markdown

🚀 stg にデプロイしました: smalruby-mesh-v2

項目 値
commit b0f799960788b42d5defdcb2f80f8795b425a366
branch security/ruby-4.0
run https://github.com/smalruby/smalruby3-editor/actions/runs/41080857394

stg は共有環境です。この SHA が載っている前提で 動作確認してください。
別の PR があとからデプロイすると上書きされます。

deploy-stg ラベルはこの run の完了時に自動で外れます。もう一度 stg に載せたいときはラベルを付け直してください。

@github-actions github-actions Bot removed the deploy-stg この PR の infra 変更を stg にデプロイする (#1162) label Oct 30, 2026
@smalruby3-editor-bot

Copy link
Copy Markdown
Author

stg での確認結果

deploy-stg で stg に出したあと、確かめました。

  • Lambda MeshV2-GraphQL-stg のランタイムは ruby4.0(LastUpdateStatus: Successful)。
  • stg の GraphQL エンドポイントで、Ruby の Lambda が担う mutation を順に呼び、どれもエラーなしで期待どおりの結果が返った。
    • createDomain → ドメイン文字列が返る
    • createGroup → グループが返る(ID・ドメイン・期限)
    • dissolveGroup → 作ったグループを解散できる。確認に使ったグループは、これで片付いている。
  • CI はすべて成功した。Ruby 4.0 での mesh-v2 の rspec と standardrb、smalruby3 gem の 3.3 / 3.4 / 4.0 も含む。

人間のレビューをお願いします。

🤖 Generated with Claude Code

@smalruby3-editor-bot smalruby3-editor-bot Bot added the deploy-stg この PR の infra 変更を stg にデプロイする (#1162) label Oct 30, 2026
@github-actions

Copy link
Copy Markdown

🚀 stg にデプロイしました: smalruby-mesh-v2

項目 値
commit b0f799960788b42d5defdcb2f80f8795b425a366
branch security/ruby-4.0
run https://github.com/smalruby/smalruby3-editor/actions/runs/41085531569

stg は共有環境です。この SHA が載っている前提で 動作確認してください。
別の PR があとからデプロイすると上書きされます。

deploy-stg ラベルはこの run の完了時に自動で外れます。もう一度 stg に載せたいときはラベルを付け直してください。

@github-actions github-actions Bot removed the deploy-stg この PR の infra 変更を stg にデプロイする (#1162) label Oct 30, 2026
@smalruby3-editor-bot

Copy link
Copy Markdown
Author

DoD(stg・Ruby 4.0)

deploy-stg で出し直し、MeshV2-GraphQL-stg が ruby4.0(Successful)になったことを確認してから行いました。手順は .claude/rules/scratch-gui/mesh.md のデグレ確認で、headless で実行しています。

  • Step 2〜4(MeshV2Service で host と node を作る): 22/22 OK
    • 接続前: testWebSocket / createDomain / listGroups
    • WebSocket: createGroup / joinGroup、subscription とタイマーの構成、データ同期(score=42)、イベント 3 件が順序どおり届く、leaveGroup / 解散
    • Polling: 上と同じ項目。イベントは Ruby の Lambda の recordEventsByNode を通る。polling では periodic-sync を起動しないことも確認
    • 同じスクリプトは、デプロイ前の Ruby 3.4 でも 22/22 だった(比較用)。
  • tools/playwright-verify/mesh-v2-classroom-binding.mjs: all checks passed
    • 先生と生徒の 2 タブで、参加コードと mesh のドメインが一致する。
    • 接続画面の入力欄が disabled になる。
    • 退出・ログアウトで元のドメインに戻る。
  • stg の Lambda のエラー数は 0(CloudWatch)。

人間の承認とあわせ、develop にマージして prod に出します。

🤖 Generated with Claude Code

@smalruby3-editor-bot
smalruby3-editor-bot Bot merged commit f15ce54 into develop Oct 30, 2026
48 of 49 checks passed
@smalruby3-editor-bot
smalruby3-editor-bot Bot deleted the security/ruby-4.0 branch October 30, 2026 16:03
github-actions Bot pushed a commit that referenced this pull request Oct 30, 2026
…y-4.0

chore(ruby): move the mesh-v2 lambda and ruby images to ruby 4.0

This branch was previously deployed

1 inactive deployment
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