Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

check:affected: a changed test file must run the test-file size ratchet

オープン
#3,787 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@thymikee がすでに取り組んでいます。

2026年10月18日 から。

  • #3804 @thymikee による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
testing, tooling

調査の方向性

Read the selection rules in scripts/check-affected/model.ts and the existing ratchet test, scripts/tests/test-file-size-ratchet.test.ts. Find where the measured file patterns and roots are defined, then check how other text-read gates declare selection reasons. Add a model.test.ts case and run it: a changed measured test file should select the ratchet with its path in the reason, while a non-test change should not.

索引モデルが issue の本文から書いたものです。

説明

bug in-progress ready-for-agent

Purpose

pnpm check:affected --run passed on #3732 at 63c6a66, but CI Coverage failed scripts/__tests__/test-file-size-ratchet.test.ts: packages/platform-apple/src/lifecycle.test.ts grew from 970 to 1,006 lines, past the 1,000-line tripwire. The local gate selects tests through Vitest's module graph (vitest related). The ratchet doesn't import the files it measures; it walks the tree and reads line counts. So no change to a test file ever selects it, and the failure reaches CI one review round late.

Required behavior

  • When a change adds or modifies a file the ratchet measures (*.test.ts, *.test.tsx or *.test.mjs under src/, packages/, test/ or scripts/, excluding node_modules, dist, dist-types and .tmp), the affected plan selects the ratchet test, with a reason that names the triggering file.
  • Express it as a selection rule in scripts/check-affected/model.ts, the same way other text-read gates are declared there. Don't special-case it in run.ts.
  • Keep a single definition of which files the ratchet measures. The selection rule and the ratchet test must read the same pattern and roots, so they can't drift. Put the shared definition where both can import it.
  • A change that touches no test file doesn't select the ratchet.

Completion

  • A model.test.ts case: a changed test file selects the ratchet check and gives the triggering reason, and a non-test change doesn't. It fails before the change and passes after.
  • Planting a 1,001-line new test file in a scratch checkout makes pnpm check:affected --run fail locally on the ratchet.
  • pnpm check:affected --run --head <sha> passes on the final commit.
主要言語
TypeScript
スター
5k
フォーク
334
平均マージ
12時間 2分
マージ済み PR(30日)
706

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/agent-device のほかの issue

callstack/agent-device の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。