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

Abierto
#3,538 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
git, typescript
Área
testing, tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
143k
Forks
21k
Merge medio
5 h 25 min
PR fusionados (30 d)
791

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de garrytan/gstack

Todos los issues de garrytan/gstack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.