mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-04 10:26:52 +02:00
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:
1 parent
53e7f3212f
commit
6415690a18
317 files changed
+315
-54111
No files matched your search
@@ -1,38 +1,11 @@
|
||||
import { expect, test } from 'bun:test';
|
||||
import { createHash } from 'node:crypto';
|
||||
import captured from './fixtures/eng-d2-truncated-border-0bcd.json';
|
||||
import { capturePlanCountQuestion, matchesNativePlanQuestion, planCountQuestionInput } from './helpers/claude-pty-runner';
|
||||
import { pickEngCountQuestion } from './helpers/eng-count-question-policy';
|
||||
import { capturePlanCountQuestion, matchesNativePlanQuestion } from './helpers/claude-pty-runner';
|
||||
import type { NativePlanQuestionCall } from './helpers/plan-count-transcript';
|
||||
|
||||
const screen = captured.screen;
|
||||
const pending = (): NativePlanQuestionCall => structuredClone(captured.call);
|
||||
const withoutBorder = screen.slice(screen.indexOf('\n') + 1);
|
||||
|
||||
test('actual pending Eng D2 truncated pane binds across its native top border', () => {
|
||||
expect(createHash('sha256').update(screen).digest('hex')).toBe(captured.provenance.screenSha256);
|
||||
const call = pending();
|
||||
expect(call.answered).toBe(false);
|
||||
expect(call.failed).toBe(false);
|
||||
expect(call.toolUseId).toBe('toolu_019jkxRPCtRvqqU7NjFk4dJp');
|
||||
expect(call.answers).toBeUndefined();
|
||||
// Pinned native pF renders es(question) with the default 2,000-character
|
||||
// cap. This exact retained prefix ends before the question's native tail.
|
||||
const body = withoutBorder.slice(withoutBorder.indexOf('\n') + 1, withoutBorder.indexOf('❯ 1.'))
|
||||
.replace(/^[ \t]*[│┃] ?|[│┃][ \t]*$/gm, '').trim();
|
||||
expect(body.replace(/\s+/g, '')).toBe((call.questions[0]!.question.slice(0, 2000) + '…').replace(/\s+/g, ''));
|
||||
expect(call.questions[0]!.question.length).toBeGreaterThan(2000);
|
||||
expect(matchesNativePlanQuestion(screen, call)).toBe(true);
|
||||
const active = capturePlanCountQuestion(screen, new Set(), 0, true, call)!;
|
||||
expect(active.nativeCall).toBe(call);
|
||||
expect(active.nativeQuestionIndex).toBe(0);
|
||||
expect(active.promptSnippet).toBe(`${call.questions[0]!.header} ${call.questions[0]!.question}`);
|
||||
expect(active.options.map(option => option.label)).toEqual(call.questions[0]!.options.map(option => option.label));
|
||||
const choice = pickEngCountQuestion(call.questions[0]!);
|
||||
expect(choice).toBe(1);
|
||||
expect(planCountQuestionInput(screen, active, choice)).toBe('1'); // computed only; no native key sent
|
||||
});
|
||||
|
||||
test('removing only native top chrome preserves the previously supported complete prefix', () => {
|
||||
expect(screen.endsWith(withoutBorder)).toBe(true);
|
||||
expect(matchesNativePlanQuestion(withoutBorder, pending())).toBe(true);
|
||||
@@ -68,15 +41,3 @@ for (const [name, mutate] of negatives) test(`native border cannot authorize ${n
|
||||
expect(matchesNativePlanQuestion(changed, call)).toBe(false);
|
||||
expect(capturePlanCountQuestion(changed, new Set(), 0, true, call)?.nativeCall).toBeUndefined();
|
||||
});
|
||||
|
||||
test('native state and exact author commitment still guard the current answer', () => {
|
||||
for (const call of [{ ...pending(), answered: true }, { ...pending(), failed: true }])
|
||||
expect(capturePlanCountQuestion(screen, new Set(), 0, true, call)?.nativeCall).toBeUndefined();
|
||||
const altered = pending();
|
||||
altered.questions[0]!.options[0]!.description += ' Also add cross-request coordination.';
|
||||
expect(() => pickEngCountQuestion(altered.questions[0]!)).toThrow('author-owned');
|
||||
const seen = new Set<string>(), call = pending();
|
||||
const first = capturePlanCountQuestion(screen, seen, 0, true, call);
|
||||
expect(first?.nativeCall).toBe(call);
|
||||
expect(capturePlanCountQuestion(screen, seen, 1, true, call)).toBeNull();
|
||||
});
|
||||
Reference in new issue
Block a user