Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Geschlossen
#3,787 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@thymikee arbeitet bereits daran.

Seit 18.10.2026.

  • #3804 von @thymikee — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
testing, tooling

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
TypeScript
Sterne
5.1k
Forks
339
Ø Merge
12 Std. 57 Min.
Gemergte PRs (30 T.)
653

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus callstack/agent-device

Alle Issues in callstack/agent-device

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.