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:
Garry Tan
2026-08-15 16:49:39 -07:00
parent 9e5fbd0a6a
commit ff83c17947
4 changed files with 49 additions and 17 deletions
+17
View File
@@ -105,6 +105,23 @@ describe('touchfiles-data.ts literal-only tripwire', () => {
expect(sawBacktick, explain).toBe(false);
expect(code, explain).not.toContain('${');
});
test('no duplicate keys within any map block', () => {
// JS object evaluation silently keeps the LAST duplicate — the earlier
// dep list becomes dead weight an editor can update to no effect, and
// no runtime assertion can see the collapsed key. Scan the source.
const blocks = src.split(/export const /).slice(1);
const dupes: string[] = [];
for (const block of blocks) {
const name = block.slice(0, block.indexOf(' '));
const seen = new Set<string>();
for (const match of block.matchAll(/^\s{2}'([^']+)':/gm)) {
if (seen.has(match[1])) dupes.push(`${name}: '${match[1]}'`);
seen.add(match[1]);
}
}
expect(dupes, 'duplicate keys collapse silently — the earlier entry is dead').toEqual([]);
});
});
describe('facade export parity', () => {