Skip to content

Conversation

@mafreud
Copy link
Contributor

@mafreud mafreud commented Oct 30, 2025

  • Created a new wrangler.jsonc file with basic configuration for the Cloudflare Worker, including observability settings and placeholders for bindings and assets.
  • Addressed an error indicating that the Cargo.toml manifest path does not exist, ensuring the project structure is correctly set up for Rust analysis.

Summary by CodeRabbit

リリースノート

  • チョア
    • GitHub Appsの自動デプロイメントシステムをリプレースしました。Firebase Functionsベースのシステムから、Cloudflare Workersベースの新しいインフラストラクチャに移行しました。

- Created a new `wrangler.jsonc` file with basic configuration for the Cloudflare Worker, including observability settings and placeholders for bindings and assets.
- Addressed an error indicating that the Cargo.toml manifest path does not exist, ensuring the project structure is correctly set up for Rust analysis.
@linear
Copy link

linear bot commented Oct 30, 2025

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

Firebase FunctionsベースのProbot GitHubアプリとHetznerランナープロビジョニング実装を削除し、Cloudflare Workersベースの新しいセットアップに移行しました。GitHubアクションデプロイメントワークフローも併せて削除されました。

Changes

Cohort / File(s) Summary
GitHub Actionsワークフロー削除
.github/workflows/github-apps-cd.yml, .github/workflows/reusable-deploy-firebase-functions.yml
Firebase Functions展開用のGitHub Actionsワークフロー(CI/CD定義、デプロイジョブ、シークレット参照)を削除しました。
Firebase設定削除
openci-runner/firebase/.firebaserc, openci-runner/firebase/.gitignore, openci-runner/firebase/firebase.json
Firebase プロジェクト設定、.gitignore、firebase.json をすべて削除しました。
Firebase Functions実装削除
openci-runner/firebase/functions/...
Probot GitHubアプリケーション(github.ts, hetzner.ts, index.ts)、package.json、tsconfig.json、テストファイル、およびテストフィクスチャを削除しました。
TypeScript設定削除
openci-runner/firebase/functions/tsconfig.json
Firebase Functions 用の TypeScript 設定を削除しました。
Cloudflare Workersセットアップ追加
openci-runner/package.json, openci-runner/tsconfig.json, openci-runner/vitest.config.mts, openci-runner/wrangler.jsonc
Cloudflare Workers プロジェクト設定(Wrangler、Vitest、TypeScript)を追加しました。
Cloudflare Workers実装追加
openci-runner/src/index.ts, openci-runner/test/index.spec.ts, openci-runner/test/env.d.ts, openci-runner/test/tsconfig.json
Hello World レスポンスを返す基本的な Cloudflare Worker 実装とそのテストスイートを追加しました。
プロジェクト設定更新
openci-runner/.gitignore, biome.jsonc, openci.code-workspace
新しいプロジェクト .gitignore を追加し、biome.jsonc に TypeScript 宣言ファイル除外ルールを追加、VSCode ワークスペース設定を更新しました。

Sequence Diagram(s)

sequenceDiagram
    participant Old as Firebase<br/>Functions (削除)
    participant New as Cloudflare<br/>Workers (追加)
    
    rect rgb(200, 220, 255)
    note over Old: Probot + Hetzner実装
    Old->>+Old: GitHub Webhook受信<br/>(workflow_job.queued)
    Old->>Old: Hetzner APIで<br/>サーバ作成
    Old->>Old: SSH接続確立<br/>(再試行ロジック)
    Old->>Old: JIT Config取得
    Old->>Old: ランナー起動
    end
    
    rect rgb(220, 255, 220)
    note over New: Cloudflare Workers実装
    New->>+New: HTTP Fetch受信
    New->>New: "Hello World!"<br/>レスポンス返却
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

重点確認事項:

  • Firebase Functions から Cloudflare Workers への大規模な移行(アーキテクチャ変更)
  • Probot/Hetzner ランナープロビジョニング実装の完全削除と機能喪失の影響
  • 新しい Cloudflare Workers ベースのセットアップが実際に必要な機能を代替しているか
  • GitHub Actions ワークフロー削除による CI/CD パイプラインへの影響
  • テストカバレッジの大幅削減(Probot テストから Hello World テストへ)

Possibly related PRs

Poem

🐰 Firebase の関数は去りゆきて、
Cloudflare のワーカー新しく舞う
Hetzner サーバの夢も消え、
"Hello World" 一行の道を選びて
✨ シンプルなる未来へ

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive PRタイトル「Add initial Wrangler configuration and fix manifest path error」のうち、「Add initial Wrangler configuration」の部分は raw_summary に明確に対応しており、openci-runner/wrangler.jsonc ファイルの追加が実装されています。一方、「fix manifest path error」の部分については、PR objectives には「Cargo.toml manifest path did not exist」という言及がありますが、raw_summary では当該変更に対応する具体的な修正内容が明記されていません。biome.jsonc への「!openci-runner/worker-configuration.d.ts」除外パターンの追加が関連している可能性がありますが、これが manifest path error の直接的な修正であることは raw_summary からは確認できません。 raw_summary において「fix manifest path error」に対応する具体的な変更内容(特に Cargo.toml 関連の修正)を確認することで、タイトルの完全性を検証することをお勧めします。また、biome.jsonc の変更が manifest path error の修正と直接関連しているかどうかを明確にすることが有効です。
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch op-341

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e65344f and 349e3b2.

📒 Files selected for processing (2)
  • openci-runner/tsconfig.json (1 hunks)
  • openci.code-workspace (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • openci-runner/tsconfig.json
  • openci.code-workspace

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
openci-runner/package.json (1)

2-7: バージョン制約の一貫性を確認してください。

依存関係のバージョン制約が混在しています(^~)。vitest のみが ~3.2.0(パッチバージョンのみ更新)を使用し、他は ^(マイナーバージョンまで更新)を使用しています。意図的な場合は問題ありませんが、一貫性を持たせることを検討してください。

openci-runner/test/index.spec.ts (1)

10-12: 一時的な型定義の回避策

コメントが示すように、これは一時的な回避策です。将来的により良い型定義が利用可能になった際に、この回避策を削除できるよう追跡することをお勧めします。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 09062bd and e65344f.

⛔ Files ignored due to path filters (3)
  • openci-runner/firebase/functions/package-lock.json is excluded by !**/package-lock.json
  • openci-runner/firebase/functions/test/fixtures/mock-cert.pem is excluded by !**/*.pem
  • openci-runner/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (26)
  • .github/workflows/github-apps-cd.yml (0 hunks)
  • .github/workflows/reusable-deploy-firebase-functions.yml (0 hunks)
  • biome.jsonc (1 hunks)
  • openci-runner/.gitignore (1 hunks)
  • openci-runner/firebase/.firebaserc (0 hunks)
  • openci-runner/firebase/.gitignore (0 hunks)
  • openci-runner/firebase/firebase.json (0 hunks)
  • openci-runner/firebase/functions/.gitignore (0 hunks)
  • openci-runner/firebase/functions/package.json (0 hunks)
  • openci-runner/firebase/functions/probot/github.ts (0 hunks)
  • openci-runner/firebase/functions/probot/hetzner.ts (0 hunks)
  • openci-runner/firebase/functions/probot/index.ts (0 hunks)
  • openci-runner/firebase/functions/src/index.ts (0 hunks)
  • openci-runner/firebase/functions/test/fixtures/issues.opened.json (0 hunks)
  • openci-runner/firebase/functions/test/index.test.ts (0 hunks)
  • openci-runner/firebase/functions/tsconfig.json (0 hunks)
  • openci-runner/package.json (1 hunks)
  • openci-runner/src/index.ts (1 hunks)
  • openci-runner/test/env.d.ts (1 hunks)
  • openci-runner/test/index.spec.ts (1 hunks)
  • openci-runner/test/tsconfig.json (1 hunks)
  • openci-runner/tsconfig.json (1 hunks)
  • openci-runner/vitest.config.mts (1 hunks)
  • openci-runner/wrangler.jsonc (1 hunks)
  • openci.code-workspace (1 hunks)
  • target/rust-analyzer/flycheck0/stderr (1 hunks)
💤 Files with no reviewable changes (14)
  • openci-runner/firebase/.firebaserc
  • openci-runner/firebase/functions/probot/github.ts
  • openci-runner/firebase/functions/probot/index.ts
  • openci-runner/firebase/functions/src/index.ts
  • openci-runner/firebase/functions/probot/hetzner.ts
  • openci-runner/firebase/functions/package.json
  • openci-runner/firebase/.gitignore
  • openci-runner/firebase/functions/test/fixtures/issues.opened.json
  • openci-runner/firebase/functions/tsconfig.json
  • openci-runner/firebase/functions/.gitignore
  • openci-runner/firebase/firebase.json
  • openci-runner/firebase/functions/test/index.test.ts
  • .github/workflows/reusable-deploy-firebase-functions.yml
  • .github/workflows/github-apps-cd.yml
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-12T04:41:44.311Z
Learnt from: mafreud
PR: open-ci-io/openci#505
File: biome.jsonc:12-17
Timestamp: 2025-10-12T04:41:44.311Z
Learning: In Biome configuration (biome.json or biome.jsonc), `recommended: true` can be placed under `linter.rules` to enable recommended rules for all groups. This is a valid configuration according to the official Biome documentation at https://biomejs.dev/ja/reference/configuration/#linterrulesrecommended

Applied to files:

  • biome.jsonc
📚 Learning: 2025-09-04T06:33:41.049Z
Learnt from: CR
PR: open-ci-io/openci#0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: Applies to packages/openci-controller/**/Cargo.toml : Rust 2021 エディションを使用する(edition = "2021" を設定)

Applied to files:

  • target/rust-analyzer/flycheck0/stderr
📚 Learning: 2025-09-04T06:33:41.049Z
Learnt from: CR
PR: open-ci-io/openci#0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: Applies to packages/openci-controller/**/*.rs : プッシュ前に cargo fmt --all と cargo clippy --all-targets -- -D warnings を実行して整形・Lintを通す

Applied to files:

  • target/rust-analyzer/flycheck0/stderr
🧬 Code graph analysis (1)
openci-runner/test/index.spec.ts (1)
openci-runner/worker-configuration.d.ts (1)
  • env (9022-9022)
🔇 Additional comments (12)
openci-runner/.gitignore (1)

1-167: 適切な gitignore 設定です。

Node.js プロジェクトの標準的な無視パターンと Wrangler 固有のパターン(.dev.vars*, .env*, .wrangler/)が適切に含まれており、新しい Cloudflare Worker プロジェクトに適しています。

biome.jsonc (1)

13-14: 生成ファイルの除外設定が適切です。

worker-configuration.d.ts は Wrangler によって生成される型定義ファイルであるため、Biome の処理対象から除外するのは正しい設定です。

openci-runner/package.json (1)

10-16: スクリプト設定が適切です。

Wrangler と Vitest の統合に必要なスクリプトが適切に定義されています。cf-typegen コマンドで型定義を生成し、devdeploy で開発とデプロイを実行できます。

openci-runner/src/index.ts (1)

14-18: 初期実装として適切です。

シンプルな "Hello World!" ハンドラーは初期セットアップとして適切です。未使用のパラメータに _ を使用するのは TypeScript で一般的な慣例です。satisfies ExportedHandler<Env> により型安全性が確保されています。

openci-runner/test/env.d.ts (1)

1-3: 適切なテスト環境の型定義です。

Cloudflare Workers のテスト環境用の ambient 型定義が正しく設定されています。ProvidedEnvEnv を拡張することで、Vitest pool workers での型安全性が確保されます。

openci-runner/test/tsconfig.json (1)

1-13: テスト用の TypeScript 設定が適切です。

親の tsconfig.json を継承し、Vitest pool workers の型定義を含めています。worker-configuration.d.tswrangler types コマンドで生成されるため、include に含めるのは正しい設定です。

openci-runner/wrangler.jsonc (2)

7-7: 互換性日付を確認してください。

compatibility_date が "2025-10-29" に設定されていますが、現在の日付は 2025-10-30 です。通常、互換性日付は現在またはそれ以前の日付を使用します。この日付が意図的なものか確認してください。


5-43: JSON 構造が不正です。

メインオブジェクトの閉じ括弧が欠落しています。Line 12 で observability オブジェクトが閉じられていますが、Line 5 で開始されたメインオブジェクトの閉じ括弧がありません。Lines 13-43 のコメントはオブジェクトの外側に配置されているようです。

以下の修正を適用してください:

 	"observability": {
 		"enabled": true
-	}
+	},
 	/**
 	 * Smart Placement
 	 * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
 	 */
 	// "placement": { "mode": "smart" }
 	/**
 	 * Bindings
 	 * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
 	 * databases, object storage, AI inference, real-time communication and more.
 	 * https://developers.cloudflare.com/workers/runtime-apis/bindings/
 	 */
 	/**
 	 * Environment Variables
 	 * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
 	 */
 	// "vars": { "MY_VARIABLE": "production_value" }
 	/**
 	 * Note: Use secrets to store sensitive data.
 	 * https://developers.cloudflare.com/workers/configuration/secrets/
 	 */
 	/**
 	 * Static Assets
 	 * https://developers.cloudflare.com/workers/static-assets/binding/
 	 */
 	// "assets": { "directory": "./public/", "binding": "ASSETS" }
 	/**
 	 * Service Bindings (communicate between multiple Workers)
 	 * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
 	 */
 	// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
 }

Likely an incorrect or invalid review comment.

openci-runner/test/index.spec.ts (2)

25-28: 統合テストの実装は適切です

SELF.fetch を使用した統合スタイルのテストは正しく実装されています。ユニットテストと統合テストの両方を提供することで、適切なテストカバレッジが確保されています。


14-23: ユニットテストの実装は正しく、検証完了です

worker ファイルの確認により、以下が検証されました:

  • ✓ worker ファイル(openci-runner/src/index.ts)が存在し、正しくデフォルトエクスポートされている
  • ✓ worker は "Hello World!" を返している(テストの期待値と一致)
  • ✓ テストファイルの imports は正しい(env、createExecutionContext、waitOnExecutionContext は cloudflare:test から正しくインポート)
  • ✓ テストロジックは Cloudflare Workers のテストパターンに適切に従っており、実行コンテキストを待機してからアサーションを実行している

コード変更の承認です。

openci-runner/tsconfig.json (1)

1-45: TypeScript 設定は概ね適切です

全体的な設定は Cloudflare Workers プロジェクトに適しています。strict モードが有効化されており、適切なモジュール解決戦略(Bundler)が使用されています。test ディレクトリの除外も適切です。

jsx 設定の確認以外は、変更の承認に問題ありません。

openci-runner/vitest.config.mts (1)

7-7: ファイルパスの確認完了 - 問題なし

configPath は Wrangler 設定ファイルへのパスであり、.toml と .json ファイルの両方を受け入れます。openci-runner/wrangler.jsonc ファイルが正常に存在し、設定は正しく解決されます。相対パス ./wrangler.jsonc は標準的で正確です。

@mafreud mafreud merged commit f6c8e59 into develop Oct 30, 2025
2 checks passed
@mafreud mafreud deleted the op-341 branch October 30, 2025 02:24
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