mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-16 18:05:31 +02:00
fix(evals): selection under-selection fixes — duplicate keys, self-paths, quotePath
Three under-selection holes: (1) duplicate E2E_TOUCHFILES keys (ship-plan-completion/-verification) — JS keeps the LAST duplicate, so the earlier dep lists were dead; pair deleted and a duplicate-key scan added to the literal-only tripwire. (2) The five rehomed e2e files didn't list themselves in their own dep lists, so editing the test never selected it. (3) git C-escapes non-ASCII paths without core.quotePath=false, so an accented filename matched no glob and deselected its tests. Also updates the stale --retry cost comment.
This commit is contained in:
@@ -116,16 +116,21 @@ export function getChangedFiles(
|
||||
cwd: string,
|
||||
spawnImpl: typeof spawnSync = spawnSync,
|
||||
): string[] {
|
||||
const committed = runGitOrThrow(['diff', '--name-only', `${baseBranch}...HEAD`], cwd, spawnImpl)
|
||||
// core.quotePath=false: without it git C-escapes non-ASCII bytes
|
||||
// ("docs/r\303\251sum\303\251.md"), the escaped string matches no glob,
|
||||
// and the dependent test is silently DESELECTED — under-selection, the
|
||||
// exact direction selection must fail away from.
|
||||
const noQuote = ['-c', 'core.quotePath=false'];
|
||||
const committed = runGitOrThrow([...noQuote, 'diff', '--name-only', `${baseBranch}...HEAD`], cwd, spawnImpl)
|
||||
.trim().split('\n').filter(Boolean);
|
||||
const uncommitted = runGitOrThrow(['diff', '--name-only', 'HEAD'], cwd, spawnImpl)
|
||||
const uncommitted = runGitOrThrow([...noQuote, 'diff', '--name-only', 'HEAD'], cwd, spawnImpl)
|
||||
.trim().split('\n').filter(Boolean);
|
||||
const untracked = runGitOrThrow(['status', '--porcelain', '--untracked-files=all'], cwd, spawnImpl)
|
||||
const untracked = runGitOrThrow([...noQuote, 'status', '--porcelain', '--untracked-files=all'], cwd, spawnImpl)
|
||||
.split('\n')
|
||||
.filter(line => line.startsWith('?? '))
|
||||
.map(line => {
|
||||
let p = line.slice(3);
|
||||
// git quotes paths containing special characters
|
||||
// residual quoting (embedded quote/newline) — strip the wrapper
|
||||
if (p.startsWith('"') && p.endsWith('"')) p = p.slice(1, -1);
|
||||
return p;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user