mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-03 01:46:55 +02:00
- 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.
43 lines
2.2 KiB
TypeScript
43 lines
2.2 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
||
import fs from 'node:fs';
|
||
import path from 'node:path';
|
||
import { capturePlanCountQuestion, matchesNativePlanQuestion } from './helpers/claude-pty-runner';
|
||
import type { NativePlanQuestionCall } from './helpers/plan-count-transcript';
|
||
import completed from './fixtures/ceo-approach-z-call.json';
|
||
|
||
const screen = fs.readFileSync(path.join(import.meta.dir, 'fixtures/ceo-approach-z-screen.txt'), 'utf8');
|
||
function pending(): NativePlanQuestionCall {
|
||
// No pending-only version survived the live capture. This is an explicit
|
||
// projection for replay, not evidence of metadata availability at input time.
|
||
const { answers, answeredAt, unansweredQuestionIndices, ...call } = structuredClone(completed);
|
||
return { ...call, answered: false, failed: false };
|
||
}
|
||
|
||
describe('native question truncated before its routing id', () => {
|
||
test('changed or incomplete panels cannot borrow pending metadata', () => {
|
||
for (const visible of [
|
||
screen.replace('☐ Approach', '☐ Other'),
|
||
screen.replace('SQL injection bug', 'different defect'),
|
||
screen.replace('Dela…', 'Different…'),
|
||
screen.replace('Dela…', 'Dela'),
|
||
screen.replace('B — Proper Integration (recommended)', 'B — Different Integration (recommended)'),
|
||
screen.replace('3. C — Reject and Redesign', '3. Changed choice'),
|
||
screen.replace('4. Type something.', '4. Extra operation'),
|
||
screen.replace('↑/↓ to navigate', '↑/↓ to navigte'),
|
||
screen.replace(' · Esc to cancel', ''),
|
||
screen + '\nA later question?',
|
||
'Quoted earlier menu:\n' + screen,
|
||
screen.slice(screen.indexOf('❯ 1.')),
|
||
screen.replace(/\n\n│[\s\S]*?\n\n❯/, '\n\n│ Which approach…\n\n❯'),
|
||
screen.replace('☐ Approach', '← ☐ Approach ☐ Other ✔ Submit →'),
|
||
]) {
|
||
expect(visible).not.toBe(screen);
|
||
const call = pending();
|
||
expect(matchesNativePlanQuestion(visible, call), visible).toBe(false);
|
||
expect(capturePlanCountQuestion(visible, new Set(), 0, true, call)?.nativeCall).toBeUndefined();
|
||
}
|
||
const packet = pending(); packet.questions.push(structuredClone(packet.questions[0]!));
|
||
expect(matchesNativePlanQuestion(screen, packet)).toBe(false);
|
||
});
|
||
});
|