mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-18 10:52:24 +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:
@@ -107,7 +107,19 @@ describe('getChangedFiles union', () => {
|
||||
|
||||
test('missing base ref → throws naming EVALS_ALL and the failing command', () => {
|
||||
expect(() => getChangedFiles('no-such-ref', repo)).toThrow(/EVALS_ALL=1/);
|
||||
expect(() => getChangedFiles('no-such-ref', repo)).toThrow(/git diff --name-only no-such-ref\.\.\.HEAD/);
|
||||
expect(() => getChangedFiles('no-such-ref', repo)).toThrow(/diff --name-only no-such-ref\.\.\.HEAD/);
|
||||
});
|
||||
|
||||
test('non-ASCII filenames come back as raw UTF-8, not C-escaped (core.quotePath=false)', () => {
|
||||
const name = 'résumé-fixture.md';
|
||||
fs.writeFileSync(path.join(repo, name), 'x');
|
||||
try {
|
||||
const files = getChangedFiles('base', repo);
|
||||
expect(files).toContain(name);
|
||||
expect(files.every((f) => !f.includes('\\303'))).toBe(true);
|
||||
} finally {
|
||||
fs.rmSync(path.join(repo, name), { force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test('injected spawn failure → throws with stderr in the message', () => {
|
||||
|
||||
Reference in New Issue
Block a user