test: retire the finding-count cluster and trim its helpers (C)

- C0/C1: the five never-green evals (skill-e2e-autoplan-chain and
  skill-e2e-plan-{ceo,eng,design,devex}-finding-count) failed on harness and
  budget, never on skill behavior; delete them, their touchfile/tier ids,
  AUTOPLAN_CHAIN_BUDGET and the dedicated eighth periodic slice (--slices 7).
- C2: delete the helper groups whose only paid consumers were those files
  (11 modules), trim claude-pty-runner and eng-seeded-coverage to the paid
  closure, and delete the free replay tests whose assertions exercised only
  that dead code (89 files, 135 orphaned fixtures). Blocks that used dead code
  only as input for a live subject keep their assertions: the multiSelect
  default moved to plan-review-decisions, runner PTY tests use inline caller
  policies, and the timer-safe budget checks moved to eng-finding-retry-budget.
- The eight production-touching files stay except ceo-current-decision-record
  (its template read only feeds the retired counter).
- CARVE_GUARDS.autoplan is behavioral 'none'; TODOS records the lost chain
  and per-finding cadence coverage with their re-entry tests.
This commit is contained in:
garrytan committed 2026-09-29 06:08:49 +00:00
1 parent 53e7f3212f
commit 6415690a18
317 files changed
+315 -54111

No files matched your search

-175
View File
@@ -40,8 +40,6 @@ import {
stripAnsi,
auqFingerprint,
COMPLETION_SUMMARY_RE,
MODE_RE,
findModeOption,
classifyPlanCountFrame,
capturePlanCountQuestion,
matchesNativePlanQuestion,
@@ -54,7 +52,6 @@ import {
engSetupAUQ,
engFirstReviewAUQ,
designStep0Boundary,
designFirstReviewAUQ,
planCountQuestionPhase,
nativePlanCallFingerprint,
devexStep0Boundary,
@@ -88,74 +85,6 @@ describe('saved preference annotation', () => {
});
describe('mode option rendering', () => {
test('letter-prefixed native mode labels retain their actual target indices', () => {
const options = ['C — HOLD SCOPE (Recommended)', 'B — SELECTIVE EXPANSION', 'A — SCOPE EXPANSION', 'D — SCOPE REDUCTION']
.map((label, i) => ({ index: i + 1, label }));
expect(options.every(option => MODE_RE.test(option.label))).toBe(true);
for (const [mode, index] of [['HOLD SCOPE', 1], ['SELECTIVE EXPANSION', 2], ['SCOPE EXPANSION', 3], ['SCOPE REDUCTION', 4]] as const) {
expect(findModeOption(options, mode)?.index).toBe(index);
}
expect(findModeOption(options.filter(option => option.index !== 3), 'SCOPE EXPANSION')).toBeUndefined();
});
test('letter-prefixed matching excludes prose, unrelated choices and unsupported framing', () => {
for (const label of ['Choose C — HOLD SCOPE', 'Approach C — HOLD SCOPE', 'C — Keep this approach\nHOLD SCOPE',
'B — Ideal Architecture (Recommended)', 'A — Fix-Only (Minimal Viable)', 'CC — HOLD SCOPE', 'E — HOLD SCOPE',
'1 — HOLD SCOPE', 'C: HOLD SCOPE', 'C - HOLD SCOPE', 'C — SCOPE EXPANSIONIST']) {
expect(MODE_RE.test(label), label).toBe(false);
expect(findModeOption([{ index: 1, label }], 'HOLD SCOPE'), label).toBeUndefined();
}
expect(findModeOption([{ index: 1, label: 'C — HOLD SCOPE\nPrefer this over A — SCOPE EXPANSION.' }], 'SCOPE EXPANSION')).toBeUndefined();
});
test('parenthesized native modes preserve capture group and actual target indices', () => {
const options = ['A) SCOPE EXPANSION', 'B) SELECTIVE EXPANSION (recommended)', 'C) HOLD SCOPE', 'D) SCOPE REDUCTION']
.map((label, i) => ({ index: i + 1, label }));
for (const [mode, index] of [['SCOPE EXPANSION', 1], ['SELECTIVE EXPANSION', 2], ['HOLD SCOPE', 3], ['SCOPE REDUCTION', 4]] as const) {
expect(MODE_RE.exec(options[index - 1]!.label)?.[1]).toBe(mode);
expect(findModeOption(options, mode)?.index).toBe(index);
}
expect(findModeOption(options.filter(option => option.index !== 1), 'SCOPE EXPANSION')).toBeUndefined();
expect(findModeOption([{ index: 3, label: '**C) HOLD SCOPE**' }], 'HOLD SCOPE')?.index).toBe(3);
});
test('parenthesized mode recognition rejects prose, descriptions and unrelated framing', () => {
for (const label of ['Discuss C) HOLD SCOPE', 'Approach C) HOLD SCOPE', 'C) Keep this approach\nHOLD SCOPE',
'B) Ideal Architecture (Recommended)', 'A) Fix-Only (Minimal Viable)', 'CC) HOLD SCOPE', 'E) HOLD SCOPE',
'1) HOLD SCOPE', '(C) HOLD SCOPE', 'C: HOLD SCOPE', 'C - HOLD SCOPE', 'C) SCOPE EXPANSIONIST']) {
expect(MODE_RE.test(label), label).toBe(false);
expect(findModeOption([{ index: 1, label }], 'HOLD SCOPE'), label).toBeUndefined();
}
expect(findModeOption([{ index: 1, label: 'C) HOLD SCOPE\nPrefer this over A) SCOPE EXPANSION.' }], 'SCOPE EXPANSION')).toBeUndefined();
});
test('selects the actual collapsed-space mode from the failed periodic menu', () => {
const options = [
{ index: 1, label: 'HOLDSCOPE(recommended)\rMake the reliability wave bulletproof.' },
{ index: 2, label: 'SELECTIVEEXPANSION\rKeep the current scope as the baseline.' },
{ index: 3, label: 'SCOPEREDUCTION\rFind the minimum subset.' },
{ index: 4, label: 'SCOPEEXPANSION\rDream up adjacent reliability improvements.' },
{ index: 5, label: 'Type something.' },
{ index: 6, label: 'Chat about this\rUser answered → HOLD SCOPE (recommended)' },
];
expect(options.slice(0, 4).every(option => MODE_RE.test(option.label))).toBe(true);
expect(findModeOption(options, 'SCOPE EXPANSION')?.index).toBe(4);
expect(findModeOption(options, 'HOLD SCOPE')?.index).toBe(1);
});
test('retains ordinary, wrapped, and emphasized mode labels', () => {
for (const label of ['SCOPE EXPANSION (Recommended)', 'scope\t expansion', 'SCOPE\r\nEXPANSION', '**SCOPE EXPANSION**']) {
expect(findModeOption([{ index: 2, label }], 'SCOPE EXPANSION')?.index).toBe(2);
}
});
test('an omitted target remains missing, including when another mode mentions it', () => {
const options = [
{ index: 1, label: 'HOLD SCOPE\rPrefer this over SCOPE EXPANSION.' },
{ index: 2, label: 'SELECTIVE EXPANSION' },
{ index: 3, label: 'SCOPE REDUCTION' },
{ index: 4, label: 'Chat about this\rSCOPEEXPANSION (old screen)' },
];
expect(findModeOption(options, 'SCOPE EXPANSION')).toBeUndefined();
expect(MODE_RE.test(options[3]!.label)).toBe(false);
expect(MODE_RE.test('Scope expansionist')).toBe(false);
});
});
describe('isPermissionDialogVisible', () => {
@@ -1213,10 +1142,6 @@ describe('parseQuestionPrompt', () => {
expect(prompt).toStartWith('Reviewfocus');
expect(prompt).toContain('design completeness');
expect(prompt).not.toContain('Planning:');
expect(designStep0Boundary({
signature: 'captured-design-scope', promptSnippet: prompt,
options: parseNumberedOptions(visible), observedAtMs: 0, preReview: true,
})).toBe(true);
});
test('keeps the captured devex persona header when cursor spacing collapses', () => {
@@ -1228,10 +1153,6 @@ describe('parseQuestionPrompt', () => {
].join('\n');
const prompt = parseQuestionPrompt(visible);
expect(prompt).toStartWith('Targetpersona');
expect(devexStep0Boundary({
signature: 'captured-devex-persona', promptSnippet: prompt,
options: parseNumberedOptions(visible), observedAtMs: 0, preReview: true,
})).toBe(true);
});
test('retains a multiline question while excluding the preceding CLI divider', () => {
@@ -2112,54 +2033,6 @@ describe('Step0BoundaryPredicate per-skill', () => {
fingerprint.promptSnippet = question.slice(0, 240);
return fingerprint;
};
test('FIRES on the current template Step 0D focus-area question', () => {
expect(focusTemplate).toContain('Want me to focus on specific areas instead of all 7?');
const question = focusQuestion('hierarchy, spacing, contrast');
expect(question.length).toBeLessThanOrEqual(240);
expect(designStep0Boundary(fp(question, focusOptions))).toBe(true);
});
test('reads the owned full focus question when its gap list exceeds the diagnostic snippet', () => {
const question = focusQuestion('primary-action hierarchy, inconsistent vertical rhythm, inaccessible error contrast, label-size drift, absent loading feedback, and missing recovery states');
const fingerprint = nativeFocus(question);
expect(fingerprint.promptSnippet).not.toContain('Want me to focus');
expect(question.length).toBeGreaterThan(240);
expect(designStep0Boundary(fingerprint)).toBe(true);
});
test.each([
"I've rated this plan 4/10 on design completeness. Should we add a loading state?",
'Want me to focus on specific areas instead of all 7?',
"I've rated the error message 4/10 on design completeness. Want me to focus on specific areas instead of all 7?",
"I've rated this plan 4/10 on design completeness. Should we focus on correcting error contrast?",
])('does NOT turn a later finding into setup from a partial focus match: %s', question => {
expect(designStep0Boundary(nativeFocus(question))).toBe(false);
});
test('does NOT combine partial focus matches across separate native question tabs', () => {
const fingerprint = nativeFocus("I've rated this plan 4/10 on design completeness. Should we add a loading state?");
const call = fingerprint.nativeCall!;
const secondQuestion = 'Want me to focus on specific areas instead of all 7?';
call.questions.push({ ...call.questions[0]!, question: secondQuestion });
call.answers![secondQuestion] = focusOptions[0]!;
expect(designStep0Boundary(fingerprint)).toBe(false);
});
test('FIRES on design system / posture mention', () => {
const f = fp('Pick a design posture for this review', ['Polish', 'Triage', 'Expansion']);
expect(designStep0Boundary(f)).toBe(true);
});
test('FIRES on first-dimension prompt', () => {
const f = fp('First dimension: visual hierarchy. Score?', ['7', '8', '9']);
expect(designStep0Boundary(f)).toBe(true);
});
test('does NOT fire on later dimension AUQs', () => {
const f = fp('Spacing dimension score?', ['7', '8', '9']);
expect(designStep0Boundary(f)).toBe(false);
});
});
describe('design review begins without an optional focus question', () => {
@@ -2174,57 +2047,9 @@ describe('Step0BoundaryPredicate per-skill', () => {
'☐DEIGN.md TODO │D6 — TODO: Create a DESIGN.md file codifying the5 decisions mdein this revew <gstack-qid:plan-design-review-todo-designmd>',
'☐PartialfailTODO │D7—TODO:Specifythepartial-failurestate—whatdoestheuserseeifSavesucceedsforsomefieldsbutfailsfor others? <gstack-qid:plan-design-review-todo-partialfail>',
];
test('counts the first captured finding and every subsequent finding', () => {
let reviewStarted = false;
const phases = questions.map(question => {
const phase = planCountQuestionPhase(fp(question, ['Apply', 'Defer']), reviewStarted,
designStep0Boundary, designFirstReviewAUQ);
reviewStarted = phase.reviewStarted;
return phase.preReview;
});
expect(phases).toEqual([false, false, false, false, false, false, false]);
});
test('keeps the observed focus gate separate when it is emitted', () => {
const focus = fp("☐ Focus areas │ I've rated this plan2/10 on design completeness. Review all7 dimensions?", ['All7dimensions', 'Priority gaps']);
const setup = planCountQuestionPhase(focus, false, designStep0Boundary, designFirstReviewAUQ);
expect(setup).toEqual({ preReview: true, reviewStarted: true });
expect(planCountQuestionPhase(fp(questions[0], ['Apply', 'Defer']), setup.reviewStarted,
designStep0Boundary, designFirstReviewAUQ)).toEqual({ preReview: false, reviewStarted: true });
});
test('requires review identity, not just a D1 label or setup question ID', () => {
for (const question of [
'☐ Setup │D1—Enable cross-project learnings?',
'☐ Review target │D1—Which plan should I review?<gstack-qid:plan-design-review-scope>',
'☐ Focus │D1—What should this design review focus on?<gstack-qid:plan-design-review-focus-areas>',
'☐ Scope │I will review Pass1 through Pass7 after setup. Proceed?',
]) expect(designFirstReviewAUQ(fp(question, ['Yes', 'No']))).toBe(false);
expect(designFirstReviewAUQ(fp('☐ Page structure │ Pass1 — Information Architecture: what page structure should this use?', ['Standard', 'Sidebar']))).toBe(true);
});
test('leaves callers without a first-review predicate unchanged', () => {
expect(planCountQuestionPhase(fp(questions[0], ['Apply', 'Defer']), false, designStep0Boundary))
.toEqual({ preReview: true, reviewStarted: false });
});
});
describe('devexStep0Boundary', () => {
test('FIRES on developer persona selection', () => {
const f = fp('Pick the target persona for this review', ['Senior backend', 'Junior frontend', 'Other']);
expect(devexStep0Boundary(f)).toBe(true);
});
test('FIRES on TTHW target prompt', () => {
const f = fp('What is the TTHW target for first run?', ['<5 min', '<15 min', '<30 min']);
expect(devexStep0Boundary(f)).toBe(true);
});
test('does NOT fire on review-section AUQs', () => {
const f = fp('Friction point: 5-min CI wait. Address?', ['Now', 'Defer', 'Skip']);
expect(devexStep0Boundary(f)).toBe(false);
});
});
});