Files
gstack/test/ceo-completion-handoff-m.test.ts
T
garrytan 6415690a18 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.
2026-09-29 06:08:49 +00:00

44 lines
2.2 KiB
TypeScript

import { describe, expect, test } from 'bun:test';
import * as fs from 'node:fs';
import * as os from 'node:os';
import * as path from 'node:path';
import { hasNativePlanTerminal,
nativePlanCallFingerprint } from './helpers/claude-pty-runner';
import type { NativePlanQuestionCall } from './helpers/plan-count-transcript';
import captured from './fixtures/ceo-completion-handoff-m-call.json';
import nextStepCapture from './fixtures/ceo-handoff-n-calls.json';
const calls = () => structuredClone(captured.calls) as NativePlanQuestionCall[];
const handoff = () => calls().at(-1)!;
const fingerprint = (call: NativePlanQuestionCall) => nativePlanCallFingerprint(call, 0, false);
describe('CEO completion described by a native navigation choice', () => {
});
describe('native next-review navigation with a resolved CEO recap', () => {
const retryCalls = () => structuredClone(captured.distinctRetry.calls) as NativePlanQuestionCall[];
const retryHandoff = () => retryCalls().at(-1)!;
});
describe('CEO completed next-step identity in native option order', () => {
const input = () => structuredClone(nextStepCapture.calls) as NativePlanQuestionCall[];
const actual = () => input().at(-1)!;
test('the actual report precedes handoff but the captured absent Exit remains incomplete', () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'ceo-native-next-step-'));
const report = path.join(dir, 'plan.md');
try {
fs.writeFileSync(report, nextStepCapture.report.content);
const written = Date.parse(nextStepCapture.report.successfulUpdateAt) / 1000;
fs.utimesSync(report, written, written);
const calls = input();
expect(Date.parse(calls.at(-2)!.answeredAt!)).toBeLessThan(written * 1000);
expect(Date.parse(calls.at(-1)!.answeredAt!)).toBeGreaterThan(written * 1000);
const transcript = { status: 'ready' as const, calls, assistantMessages: [],
planReadyRequests: structuredClone(nextStepCapture.planReadyRequests) };
const admin = new Set([fingerprint(calls.at(-1)!).signature]);
expect(hasNativePlanTerminal(transcript, report, Date.parse('2026-09-09T01:06:22Z'), 'plan_ready', admin)).toBe(false);
} finally {
fs.rmSync(dir, { recursive: true, force: true });
}
});
});