Skip to content

Conversation

@mafreud
Copy link
Contributor

@mafreud mafreud commented Nov 2, 2025

Summary by CodeRabbit

  • 新機能

    • キューされたワークフロージョブでインストレーションIDを検証し、GitHub App経由でランナーのJIT設定を生成して返却する処理を追加しました。
  • Chores

    • GitHub Appクライアント用の依存を追加しました。
    • PEMファイルを無視するルールを .gitignore に追加しました。
    • observability設定に head_sampling_rate: 1 を追加しました。
    • CI設定にGitHub App関連の環境変数を追加しました。
  • Tests

    • Octokit/Appの挙動をモックするテストを追加・拡張し、400/500ケースを検証するテストを追加しました。
  • Style

    • linter設定の冗長ルールを整理しました。

@linear
Copy link

linear bot commented Nov 2, 2025

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

GitHub App 認証を導入し、workflow_jobqueued ハンドラで installationId を検証して installation-scoped Octokit を取得し、octokit.rest.actions.generateRunnerJitconfigForRepo を呼び出す処理を追加した。.gitignore**/*.pem を追加し、@octokit/app@octokit/rest を依存に追加、テストを Octokit モックで拡張し、wrangler.jsonc に観測サンプリング設定を追加した。biome.jsonc の一部ルールを削除し、CI ワークフローで環境変数を準備する変更を行った。

Changes

Cohort / File(s) Summary
Git設定
openci-runner/.gitignore
**/*.pem を追加して PEM ファイルを除外
依存関係
openci-runner/package.json
@octokit/app (^16.1.2) と @octokit/rest (^22.0.1) を dependencies に追加
ワークフロー・ジョブ処理
openci-runner/src/index.ts
workflow_jobqueued 分岐で installationId を検証、環境変数 GH_APP_ID/GH_APP_PRIVATE_KEY を確認、App を初期化して getInstallationOctokit(installationId) を取得し、octokit.rest.actions.generateRunnerJitconfigForRepo を呼び出すロジック(try/catch と 400/201/500 応答)を追加
テスト
openci-runner/test/index.spec.ts
@octokit/app / Octokit のモック追加、generateRunnerJitconfigForRepo の成功/失敗ケースと installation 欠如・環境変数不足の 400/500 系テストを追加、afterEach リセット導入
リンター設定
biome.jsonc
linter.rules.correctnesssuspicious.noConsole ブロックを削除(recommended: true のみ維持)
ランタイム観測
openci-runner/wrangler.jsonc
observability.head_sampling_rate: 1 を追加
CI / シークレット準備
.github/workflows/test.yaml
Prepare CF secrets の .env 生成に GH_APP_IDGH_APP_PRIVATE_KEY を追加

Sequence Diagram(s)

sequenceDiagram
    participant Webhook as Webhook Event
    participant Handler as index.ts Handler
    participant App as @octokit/app
    participant InstOct as Installation Octokit
    participant GH as GitHub API

    Webhook->>Handler: workflow_job (queued)
    Note right of Handler: payload から installationId を取得
    alt installationId missing
        Handler-->>Webhook: 400 Bad Request
    else installationId present
        Handler->>Handler: 環境変数 GH_APP_ID / GH_APP_PRIVATE_KEY を検証
        alt env missing
            Handler-->>Webhook: 500 Internal Server Error
        else env present
            Handler->>App: new App({ appId, privateKey, Octokit })
            App->>InstOct: getInstallationOctokit(installationId)
            InstOct->>GH: actions.generateRunnerJitconfigForRepo(params)
            GH-->>InstOct: JIT config response
            InstOct-->>Handler: response data
            Handler-->>Webhook: 201 Created + message
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

注意して確認すべき箇所:

  • openci-runner/src/index.ts の環境変数(GH_APP_PRIVATE_KEY)の読み取りとログ出力での機密情報漏洩防止
  • generateRunnerJitconfigForRepo に渡すパラメータ(labels、name、owner、repo、runner_group_id、work_folder)の正当性と型
  • テストモックが実際の Octokit レスポンス形状とエラー挙動に忠実かどうか
  • CI ワークフローで追加したシークレットの取り扱いと .env 生成の安全性

Possibly related PRs

Poem

🐇 小道で鍵をかくして、ぴょん、
queued の声で僕は跳ねる。
App を抱いて Octokit 呼べば、
小さなランナー道ができるよ。
ピョンと届け、CI の春。

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed プルリクエストのタイトル「JIT configを作成」は、変更セットの主な変更内容と完全に関連しています。openci-runner/src/index.tsの主要な変更は、generateRunnerJitconfigForRepoを呼び出してランナーのJIT設定を生成する新しいロジックの追加であり、タイトルはこの中心的な機能を正確に表現しています。タイトルは簡潔で明確であり、開発者の視点から最も重要な変更を強調しており、リポジトリ履歴をスキャンするチームメンバーが主な変更を理解できる十分な具体性があります。

📜 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 aa07bcb and 4844053.

📒 Files selected for processing (3)
  • .github/workflows/test.yaml (1 hunks)
  • openci-runner/src/index.ts (2 hunks)
  • openci-runner/test/index.spec.ts (4 hunks)

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

@mafreud mafreud changed the title Add Octokit integration for GitHub App webhook handling and update de… JIT configを作成 Nov 2, 2025
@cloudflare-workers-and-pages
Copy link
Contributor

cloudflare-workers-and-pages bot commented Nov 2, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
openci-runner-dev 4844053 Commit Preview URL

Branch Preview URL
Nov 02 2025, 08:45 AM

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: 1

📜 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 decc44a and cb0286f.

⛔ Files ignored due to path filters (1)
  • openci-runner/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • openci-runner/.gitignore (1 hunks)
  • openci-runner/package.json (1 hunks)
  • openci-runner/src/index.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
openci-runner/src/index.ts (2)
openci-runner/worker-configuration.d.ts (1)
  • env (9024-9024)
openci-runner/test/index.spec.ts (1)
  • webhookSecret (100-119)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: openci-runner-dev

Comment on lines 43 to 54
const { data } =
await octokit.rest.actions.generateRunnerJitconfigForRepo({
labels: ["openci-runner-beta-dev"],
name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
owner: payload.repository.owner.login,
repo: payload.repository.name,
runner_group_id: 1,
work_folder: "_work",
});

return new Response(`Successfully created OpenCI runner: ${data}`, {
status: 201,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

レスポンス本文が [object Object] になってしまいます
generateRunnerJitconfigForRepo が返す data はオブジェクトなので、テンプレートリテラルで連結すると実際のレスポンスは "Successfully created OpenCI runner: [object Object]" になります。現行テスト(openci-runner/test/index.spec.ts Line 111 付近)も "Successfully created OpenCI runner" を期待しており、この変更で確実に失敗しますし、クライアント側も生成された JIT 設定を取得できません。

-					return new Response(`Successfully created OpenCI runner: ${data}`, {
-						status: 201,
-					});
+					return new Response(JSON.stringify(data), {
+						status: 201,
+						headers: { "content-type": "application/json" },
+					});

必要なら成功メッセージを付けたい場合は { message: "...", data } のように JSON を組み立てるのが良さそうです。

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const { data } =
await octokit.rest.actions.generateRunnerJitconfigForRepo({
labels: ["openci-runner-beta-dev"],
name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
owner: payload.repository.owner.login,
repo: payload.repository.name,
runner_group_id: 1,
work_folder: "_work",
});
return new Response(`Successfully created OpenCI runner: ${data}`, {
status: 201,
const { data } =
await octokit.rest.actions.generateRunnerJitconfigForRepo({
labels: ["openci-runner-beta-dev"],
name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
owner: payload.repository.owner.login,
repo: payload.repository.name,
runner_group_id: 1,
work_folder: "_work",
});
return new Response(JSON.stringify(data), {
status: 201,
headers: { "content-type": "application/json" },
});
🤖 Prompt for AI Agents
In openci-runner/src/index.ts around lines 43 to 54, the code returns a template
string including the object `data`, which becomes "[object Object]" in the
response; change the response to return JSON: build an object like { message:
"Successfully created OpenCI runner", data } and return it as a JSON body
(serialize with JSON.stringify) and set Content-Type: application/json so the
client receives the actual JIT config object; update the response status to 201
as-is and adjust tests if they assert on plain string.

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: 1

♻️ Duplicate comments (1)
openci-runner/src/index.ts (1)

55-57: レスポンス本文が [object Object] になります

過去のレビューコメントで指摘された通り、data オブジェクトをテンプレートリテラルで連結すると "Successfully created OpenCI runner: [object Object]" となり、実際の JIT 設定が取得できません。また、テスト (openci-runner/test/index.spec.ts:117) は "Successfully created OpenCI runner" を期待しているため、このままではテストが失敗します。

-					return new Response(`Successfully created OpenCI runner: ${data}`, {
+					return new Response(JSON.stringify({
+						message: "Successfully created OpenCI runner",
+						data
+					}), {
 						status: 201,
+						headers: { "content-type": "application/json" },
 					});

テストも JSON レスポンスを期待するように更新する必要があります。

🧹 Nitpick comments (1)
openci-runner/src/index.ts (1)

35-39: 環境変数のバリデーションを追加してください

GH_APP_IDGH_APP_PRIVATE_KEY が未設定の場合、より明確なエラーメッセージを返すための事前バリデーションを追加することを推奨します。

+					if (!env.GH_APP_ID || !env.GH_APP_PRIVATE_KEY) {
+						return new Response("GitHub App credentials not configured", {
+							status: 500,
+						});
+					}
+
 					const app = new App({
 						appId: env.GH_APP_ID,
 						Octokit: Octokit,
 						privateKey: env.GH_APP_PRIVATE_KEY,
 					});
📜 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 cb0286f and cdd1229.

📒 Files selected for processing (1)
  • openci-runner/src/index.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: open-ci-io/openci PR: 0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: Conventional Commits(feat(scope): msg / fix(scope): msg)を用い、Issue を参照(例: #391)
🧬 Code graph analysis (1)
openci-runner/src/index.ts (2)
openci-runner/worker-configuration.d.ts (1)
  • env (9024-9024)
openci-runner/test/index.spec.ts (2)
  • webhookSecret (100-119)
  • webhookSecret (121-140)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: openci-runner-dev
🔇 Additional comments (2)
openci-runner/src/index.ts (2)

1-2: LGTM: 必要なインポートが追加されています

GitHub App 認証と REST API 呼び出しに必要な依存関係が正しくインポートされています。


28-34: LGTM: Installation ID のバリデーションが適切です

installationId が存在しない場合に 400 エラーを返す実装は適切です。オプショナルチェーンも正しく使用されています。

Comment on lines 43 to 53
const runnerLabel = "openci-runner-beta-dev";

const { data } =
await octokit.rest.actions.generateRunnerJitconfigForRepo({
labels: [runnerLabel],
name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
owner: payload.repository.owner.login,
repo: payload.repository.name,
runner_group_id: 1,
work_folder: "_work",
});
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

ハードコードされた値を環境変数に移行し、エラーハンドリングを追加してください

以下の問題があります:

  1. runner_group_id: 1 がハードコードされています - すべての GitHub インストールで runner group ID 1 が存在するとは限らず、実行時エラーの原因になります
  2. runnerLabelwork_folder もハードコードされています - 環境ごとに変更できるべきです
  3. API 呼び出しのエラーハンドリングがありません - ネットワークエラーや API エラーが発生した場合、500 エラーとして適切に処理されません
 					const octokit = await app.getInstallationOctokit(installationId);
 
-					const runnerLabel = "openci-runner-beta-dev";
+					const runnerLabel = env.RUNNER_LABEL || "openci-runner-beta-dev";
 
-					const { data } =
-						await octokit.rest.actions.generateRunnerJitconfigForRepo({
-							labels: [runnerLabel],
-							name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
-							owner: payload.repository.owner.login,
-							repo: payload.repository.name,
-							runner_group_id: 1,
-							work_folder: "_work",
-						});
+					try {
+						const { data } =
+							await octokit.rest.actions.generateRunnerJitconfigForRepo({
+								labels: [runnerLabel],
+								name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
+								owner: payload.repository.owner.login,
+								repo: payload.repository.name,
+								runner_group_id: env.RUNNER_GROUP_ID ? Number(env.RUNNER_GROUP_ID) : 1,
+								work_folder: env.RUNNER_WORK_FOLDER || "_work",
+							});
+					} catch (error) {
+						console.error("Failed to generate runner JIT config:", error);
+						return new Response("Failed to generate runner JIT config", {
+							status: 500,
+						});
+					}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const runnerLabel = "openci-runner-beta-dev";
const { data } =
await octokit.rest.actions.generateRunnerJitconfigForRepo({
labels: [runnerLabel],
name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
owner: payload.repository.owner.login,
repo: payload.repository.name,
runner_group_id: 1,
work_folder: "_work",
});
const runnerLabel = env.RUNNER_LABEL || "openci-runner-beta-dev";
let data;
try {
const result =
await octokit.rest.actions.generateRunnerJitconfigForRepo({
labels: [runnerLabel],
name: `OpenCIランナーβ(開発環境)-${Date.now()}`,
owner: payload.repository.owner.login,
repo: payload.repository.name,
runner_group_id: env.RUNNER_GROUP_ID ? Number(env.RUNNER_GROUP_ID) : 1,
work_folder: env.RUNNER_WORK_FOLDER || "_work",
});
data = result.data;
} catch (error) {
console.error("Failed to generate runner JIT config:", error);
return new Response("Failed to generate runner JIT config", {
status: 500,
});
}

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: 1

♻️ Duplicate comments (2)
openci-runner/src/index.ts (2)

41-54: エラーハンドリングの追加とハードコード値の環境変数化が必要です

以下の問題があります:

  1. API 呼び出しのエラーハンドリングがありません - getInstallationOctokitgenerateRunnerJitconfigForRepo はネットワークエラーや API エラーで失敗する可能性があります
  2. runner_group_id: 1 がハードコードされています - すべての GitHub installation で runner group ID 1 が存在するとは限りません
  3. runnerLabelwork_folder もハードコードされています - 環境ごとに変更可能にすべきです

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

-					const octokit = await app.getInstallationOctokit(installationId);
-
-					const runnerLabel = "openci-runner-beta-dev";
-					const runnerName = "OpenCIランナーβ(開発環境)";
-
-					const { data } =
-						await octokit.rest.actions.generateRunnerJitconfigForRepo({
-							labels: [runnerLabel],
-							name: `${runnerName}-${Date.now()}`,
-							owner: payload.repository.owner.login,
-							repo: payload.repository.name,
-							runner_group_id: 1,
-							work_folder: "_work",
-						});
+					const runnerLabel = env.RUNNER_LABEL || "openci-runner-beta-dev";
+					const runnerName = env.RUNNER_NAME || "OpenCIランナーβ(開発環境)";
+
+					let octokit;
+					let data;
+					try {
+						octokit = await app.getInstallationOctokit(installationId);
+						const response =
+							await octokit.rest.actions.generateRunnerJitconfigForRepo({
+								labels: [runnerLabel],
+								name: `${runnerName}-${Date.now()}`,
+								owner: payload.repository.owner.login,
+								repo: payload.repository.name,
+								runner_group_id: env.RUNNER_GROUP_ID
+									? Number(env.RUNNER_GROUP_ID)
+									: 1,
+								work_folder: env.RUNNER_WORK_FOLDER || "_work",
+							});
+						data = response.data;
+					} catch (error) {
+						console.error("Failed to generate runner JIT config:", error);
+						return new Response("Failed to generate runner JIT config", {
+							status: 500,
+						});
+					}

Based on learnings


56-61: JIT 設定データをレスポンスに含める必要があります

encoded_jit_config を抽出していますが、レスポンスに含めていないため、クライアントは実際のランナー設定を取得できません。これではランナーを起動できません。

以下の diff を適用してレスポンスを JSON 形式にしてください:

-					// biome-ignore lint/correctness/noUnusedVariables: <Use this later>
-					const { encoded_jit_config } = data;
-
-					return new Response(`Successfully created OpenCI runner`, {
+					return new Response(
+						JSON.stringify({
+							message: "Successfully created OpenCI runner",
+							encoded_jit_config: data.encoded_jit_config,
+						}),
+						{
-						status: 201,
+							status: 201,
+							headers: { "content-type": "application/json" },
+						},
 					);

注意: この変更により、テスト (openci-runner/test/index.spec.ts の Line 117 付近) も更新が必要になります。

🧹 Nitpick comments (1)
openci-runner/src/index.ts (1)

29-34: installationId の型チェックを厳密にしてください

payload.installation?.idundefined だけでなく null0 の可能性もあります。より厳密なチェックを推奨します。

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

-					const installationId = payload.installation?.id;
-					if (installationId === undefined) {
+					const installationId = payload.installation?.id;
+					if (!installationId) {
 						return new Response("Installation ID not found in payload", {
 							status: 400,
 						});
 					}
📜 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 cdd1229 and 97db258.

📒 Files selected for processing (1)
  • openci-runner/src/index.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: open-ci-io/openci PR: 0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: Conventional Commits(feat(scope): msg / fix(scope): msg)を用い、Issue を参照(例: #391)
📚 Learning: 2025-09-04T06:33:41.049Z
Learnt from: CR
Repo: open-ci-io/openci PR: 0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: DATABASE_URL, OPENCI_PORT, RUST_LOG, GITHUB_WEBHOOK_SECRET を適切に設定する

Applied to files:

  • openci-runner/src/index.ts
🧬 Code graph analysis (1)
openci-runner/src/index.ts (2)
openci-runner/worker-configuration.d.ts (1)
  • env (9024-9024)
openci-runner/test/index.spec.ts (2)
  • webhookSecret (100-119)
  • webhookSecret (121-140)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: openci-runner-dev
🔇 Additional comments (2)
openci-runner/src/index.ts (2)

1-2: LGTM!

GitHub App 認証に必要な import が正しく追加されています。


77-79: LGTM!

定数定義が適切で、as const による型安全性も確保されています。

@sentry
Copy link

sentry bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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: 1

📜 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 97db258 and aa07bcb.

📒 Files selected for processing (4)
  • biome.jsonc (1 hunks)
  • openci-runner/src/index.ts (2 hunks)
  • openci-runner/test/index.spec.ts (3 hunks)
  • openci-runner/wrangler.jsonc (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • openci-runner/src/index.ts
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: open-ci-io/openci PR: 0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: Conventional Commits(feat(scope): msg / fix(scope): msg)を用い、Issue を参照(例: #391)
📚 Learning: 2025-10-12T04:41:44.311Z
Learnt from: mafreud
Repo: open-ci-io/openci PR: 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
🧬 Code graph analysis (1)
openci-runner/test/index.spec.ts (1)
openci-runner/worker-configuration.d.ts (1)
  • env (9024-9024)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: openci-runner-dev
🔇 Additional comments (6)
biome.jsonc (1)

25-25: LGTM!

recommended: true の配置が正しくなりました。Biome の公式ドキュメントに従い、linter.rules 直下に配置することで、すべてのグループの推奨ルールが有効になります。

Based on learnings

openci-runner/wrangler.jsonc (1)

11-12: 本番環境でのサンプリングレートを確認してください。

head_sampling_rate: 1 は 100% サンプリングを意味し、開発環境には適していますが、本番環境では高コストになる可能性があります。本番環境用の設定では、より低い値(例: 0.1)の使用を検討してください。

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

7-7: LGTM!

モック機能に必要な vi のインポートが正しく追加されています。


126-137: LGTM!

テストペイロードが GitHub App の webhook ペイロード構造に正しく更新されています。installationrepositoryworkflow_job の必須フィールドが含まれています。


177-206: LGTM!

installationId が欠落している場合の 400 エラーケースが適切にテストされています。エラーハンドリングのカバレッジが向上しました。


208-240: LGTM!

GitHub API 障害時の 500 エラーケースが適切にテストされています。mockRejectedValueOnce を使用することで、このテストのみに影響を限定しています。

@mafreud mafreud merged commit fa34268 into develop Nov 2, 2025
5 checks passed
@mafreud mafreud deleted the op-356 branch November 2, 2025 09:47
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