requires: declare commands that must resolve, and report where each landed
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- cli, testing-qa
Línea de trabajo
Empieza rastreando cómo front matter gestiona path: y cómo llega el PATH compuesto a las sesiones; después, inspecciona el comportamiento existente de expansión de env: y el ejecutor de pruebas golden. Añade la resolución de requires: antes de la primera sesión, respetando PATHEXT e indicando los directorios buscados en caso de fallo. Informa sobre cada comando resuelto, su ruta, el número de archivos y el número de sesiones, para que una ejecución muestre qué se ejercitó realmente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
tryscript resolves a command through PATH and says nothing about where it landed. For a
golden suite, that is the difference between a proven result and a green check.
A golden test's whole claim is that a particular program produced particular bytes.
path: prepends to the inherited PATH rather than replacing it, so if a declared entry
fails to resolve — variable unset, build directory cleaned, a typo, a cross-compiled
layout — lookup continues into the inherited PATH and finds whatever is installed there.
The suite then passes while exercising a build nobody selected, with no diagnostic.
That is not hypothetical. It happened in fdu: every golden selected its build with
path: - $TRYSCRIPT_GIT_ROOT/target/debug, and whenever that failed to resolve the
sessions silently fell through to ~/.cargo/bin/fdu — the developer's installed copy —
and passed.
Proposal
requires:
- fdu
Named commands must resolve before the first session runs. If one does not, abort with a
message naming the command and the directories searched, rather than letting a hundred
confusing diffs appear later.
And report where each landed:
resolved fdu -> /…/target/debug/fdu (12 files, 129 sessions)
The reporting half is the one that matters. It makes a run legible rather than merely
correct — the same reason a good test harness says what it ran, not just whether it
passed. Today the only way to know which binary a suite exercised is to reason about
PATH composition and hope.
Notes
- Lookup should respect
PATHEXTon Windows rather than assuming a bare name. - Resolution should use the same composed
PATHthe sessions get, includingpath:
entries, so it answers the question the sessions will actually ask. - Worth failing rather than warning: a suite that runs without the program it is about
does not produce a weaker result, it produces a meaningless one.
Context
fdu worked around this by naming the binary's directory through a variable and
preflighting it in an external runner script before invoking tryscript. That works, but it
is machinery every project would otherwise have to build for itself, and it cannot report
what tryscript itself resolved.
Related: jlevy/tryscript#51, which made env: expand variables the way path: already
did — the same family of "front matter should be able to say what it means about which
program runs".
- Lenguaje dominante
- TypeScript
- Estrellas
- 13
- Forks
- 1
- Merge medio
- 3 h 38 min
- PR fusionados (30 d)
- 3
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de jlevy/tryscript
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de jlevy/tryscript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
copse-dev/agent-pane#2953 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Abiertobug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Client support matrix inclusion Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
calcite-components needs triage refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Esri/calcite-design-system#15203 ·