pregate: removed-test waiver misses Markdown links and tracked symlinks

Aperta
#3,538 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
git, typescript
Ambito
testing, tooling

Direzione di ricerca

Start with namedBy in lib/pregate/lane-selection.ts and trace how removedPath handles removed files. Read the GSTA-137 decision trail and adversarial repro scripts at commit 9c2821a to understand the known limits and compare with base 6f27f0c. Done means Markdown references are counted only when relevant tests check their link targets, and tracked symlinks pointing to removed paths are detected without reintroducing broad test selection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

S3

Problem

PR #3534 lets pregate waive a removed test file when nothing still in the tree names it. Two kinds of reference are invisible to that check (namedBy in lib/pregate/lane-selection.ts), so the removal is waived with no tests selected while a remaining test still depends on the removed file.

  1. Markdown references. namedBy excludes *.md and *.mdx. If a doc links to the removed test (for example [alpha](../test/alpha.test.js)) and another test link-checks that doc, the removal is waived and the link-check test fails afterwards. main refuses the same diff with PREGATE_NO_LANE.
  2. Tracked symlinks. git grep never reads mode-120000 entries, so a tracked symlinked test that points at the removed test (test/current.test.js -> alpha.test.js) is not seen. It dangles after the removal and the runner fails on it.

gstack has no live instance of either today: no test checks Markdown link targets against the filesystem, and its one tracked symlink does not point at a test.

Why it is a known limit rather than a fix in #3534

108 tracked Markdown files name a test. If a Markdown namer's tests had to run, then removing any test that CHANGELOG.md mentions would select 396 tests (CLAUDE.md 362, TODOS.md 335). Refusing on any Markdown mention would bring back most of the original bug. The Captain recorded both as known limits for #3534 (GSTA-137, decision trail rows 38-39).

Possible fixes

  • Markdown: count a Markdown file as a namer only when one of its tests reads it by literal path and checks link targets.
  • Symlinks: in removedPath, refuse (or select tests) when a tracked 120000 entry's target resolves to a removed path (git ls-files -s, then git cat-file -p :<path>, joined against the link's directory).

Repro scripts: the GSTA-137 adversarial pass at 9c2821a (JS and Python fixtures, compared with base 6f27f0c).

Related: #3529, #3534, #3535, #3536, #3537.

Lingua principale
TypeScript
Stelle
143k
Fork
21k
Merge medio
5h 25m
PR unite (30g)
791

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di garrytan/gstack

Tutte le issue di garrytan/gstack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.