verify: --redact-paths always widens to the full suite, with a misleading reason
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- node.js, typescript
Línea de trabajo
Start with the observe calls in packages/diffci-cli/src/client/verify.ts, then trace how selectedTests, proposedCommands, and executableSelection are handled in observe.ts and verify.ts. Reproduce the reported --changed --no-checks --redact-paths --json case and inspect the tests covering redacted selection. Done means selected verification stays targeted with redacted paths in the receipt, or any widening clearly reports its redaction cause; pull request #276 is already open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What went wrong?
diffci verify --redact-paths never runs a selected set of tests. Every redacted run widens to the full suite, and the reason it gives is misleading.
There are two parts:
-
Every redacted run widens to the full suite.
verifyChanged,verifyRange(andverifyScoped, throughverifyChangedSnapshot) passredactPathstoobserve(packages/diffci-cli/src/client/verify.ts, theobserve({...})calls inverifyChangedSnapshotandverifyCommitRange).observethen returnsselectedTestsas sha256-12 digests (observe.ts,selectedTests.map(hashPath)), whileproposedCommandsstill carry the real paths.executableSelection(verify.ts) matches the real command against the digests.unmatchedNodeTeststherefore finds that no selected file matches, and the run falls back to the full test command. (For other runners,inferSelectedCommandreceives digests in place of paths.) -
The reason is misleading. It reads as if the selection could not be expressed as a command:
selected verification was not executable (node --test would not match 1 selected test file(s), such as 19e48d04740e); broadened to full verificationThe real cause is that the paths were redacted before planning. The digest in the message is not something the user can act on.
The documented purpose of --redact-paths is to keep file paths out of the report. Silently running the full suite on every redacted run defeats the purpose of verify's selection.
Question for maintainers: is the widening intended, for example as a deliberately conservative choice under redaction? Some code already turns features off under redaction on purpose (the coverage map and the first pass in executeWithPolicy, and the enforce global-risk fallback). If the widening is intended, the reason should still say that --redact-paths caused it.
DiffCI version
main at 40aa308
Command you ran
A repository with "test": "node --test", src/a.js and src/b.js, test/a.test.js and test/b.test.js (each test imports its own source), and an uncommitted change to src/a.js:
diffci verify --changed --no-checks --json
diffci verify --changed --no-checks --redact-paths --json
Environment
Linux, Node 24, npm.
Output
Without --redact-paths:
"selection": "selected",
"reason": "dependency impact",
"command": "node --test test/a.test.js",
"selected_tests": ["test/a.test.js"]
With --redact-paths:
"selection": "full",
"reason": "selected verification was not executable (node --test would not match 1 selected test file(s), such as 19e48d04740e); broadened to full verification",
"command": "npm test"
What you expected
With --redact-paths, the same selection should run (node --test test/a.test.js), and the receipt should carry digests in place of the paths (selected_tests: ["19e48d04740e"]). If widening under redaction is intended, the reason should say that the selection was widened because of --redact-paths.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 4
- Merge medio
- 18 h 41 min
- PR fusionados (30 d)
- 48
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 DiffCI/core
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at randomPosiblemente ocupada @FredApps la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Agent tools: changed_files lists only the new path of a renamed filePosiblemente ocupada @FredApps la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
DiffCI/core#243 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
adapter good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
Todos los issues de DiffCI/core
Issues similares
-
agent-ready area: ui-server priority: p3 type: test
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
schlessera/brain-kit#4249 ·
Los mantenedores suelen responder en 1 día
-
documentation tool triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
can1357/oh-my-pi#19608 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
dependencies tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
bcgov/nr-waste-plus#1549 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
blixvip/solana-tx-parse#18 ·