mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-04 02:16:56 +02:00
test: delete tests of dead eval code (A)
- A1: the retired Eng lexical oracle (evaluateEngSeedCoverage, isEngSeedDecisionAUQ), the completion-handoff detector and the retained corpus had no paid caller since v1.87.6; delete their 26 replay files, ~2.6k helper LOC and fixtures, and the dead blocks in 8 mixed files (live hasNativePlanTerminal / batching assertions stay). - A2: dead viewport approvers in autoplan-artifact-permission and their 11 replay files + fixtures; recorder/launcher cases stay. - A3: never-wired oracles and seeders (autoplan-phase-order, eng-finding-fixture, ceo-paired-fixture, design-ui-scope, plan-skill-completion, pty-current-screen, required-reads, transcript-section-logger); plan-seed-submission now decodes through the production createPtyScreen; section manifests name their actual guard. - A4: zero-reference helper exports, plus execGit and invokeAndObserve found by the reachability pass. - 52 fixtures orphaned by the deletions; touchfile and selection-table entries for every deleted path.
This commit is contained in:
1 parent
5ec930d569
commit
5d032ef299
156 files changed
+107
-32055
No files matched your search
@@ -1,11 +1,7 @@
|
||||
import {expect,test} from 'bun:test';
|
||||
import batching from './fixtures/eng-batching-saved-ledger-b176.json';
|
||||
import completion from './fixtures/eng-count-c6fc-public.json';
|
||||
import native from './fixtures/eng-native-packets-b955.json';
|
||||
import {createEngBatchingIssueCounter,evaluateEngSeedCoverage} from './helpers/eng-seeded-coverage';
|
||||
import {isEngCompletionHandoff} from './helpers/eng-completion-handoff';
|
||||
import {engSetupAUQ,nativePlanCallFingerprint} from './helpers/claude-pty-runner';
|
||||
import type {NativePlanQuestionCall,PlanCountTranscript} from './helpers/plan-count-transcript';
|
||||
import {createEngBatchingIssueCounter} from './helpers/eng-seeded-coverage';
|
||||
import {engSetupAUQ} from './helpers/claude-pty-runner';
|
||||
|
||||
// Change placement only. Indented History states remain historical, and invalid
|
||||
// duplicate current states are preserved rather than silently reconciled.
|
||||
@@ -17,33 +13,6 @@ function resolutionBlock(plan:string):string {
|
||||
return record.replace(/^State:.*\n/gm,'').replace(/^Actual answer:/m,states.join('')+'Actual answer:');
|
||||
}).join('\n');
|
||||
}
|
||||
const calls=completion.transcript.calls as NativePlanQuestionCall[];
|
||||
const handoff=(plan:string)=>isEngCompletionHandoff(nativePlanCallFingerprint(calls.at(-1)!,1,false),plan,calls.slice(0,-1));
|
||||
// The same explicit synthetic reconciliation used by the existing completion
|
||||
// controls. It never changes the historical paid cancellation's verdict.
|
||||
const approved=completion.report.split(/\n(?=### R[1-9]\d*:)/).map(record=>record.includes('\nState: pending\n')
|
||||
?record.replace('\nState: pending\n','\n').replace('History: none','History: superseded pre-answer state\n State: pending'):record).join('\n');
|
||||
|
||||
test('completed owned ledger permits State immediately before its actual answer',()=>{
|
||||
expect(handoff(approved)).toBe(true);
|
||||
expect(handoff(resolutionBlock(approved))).toBe(true);
|
||||
expect(completion.actualOutcome).toBe('CANCELLED');
|
||||
});
|
||||
test('relocating State cannot approve pending, missing, duplicate or conflicting records',()=>{
|
||||
for(const bad of [completion.report,
|
||||
approved.replace('State: approved','State: pending'),
|
||||
approved.replace('State: approved\n',''),
|
||||
approved.replace('State: approved','State: approved\nState: approved'),
|
||||
approved.replace('State: approved','State: approved\nState: pending'),
|
||||
approved.replace('State: approved','State: rejected'),
|
||||
]) {expect(handoff(bad)).toBe(false);expect(handoff(resolutionBlock(bad))).toBe(false);}
|
||||
});
|
||||
test('native seed coverage preserves the complete captured report result after relocation',()=>{
|
||||
const h=native.held6bd,t=h.transcript as PlanCountTranscript;
|
||||
const check=(plan:string)=>evaluateEngSeedCoverage(t,plan,h.startedAt,h.finishedAt);
|
||||
const original=check(h.plan);expect(original.ok).toBe(true);
|
||||
expect(check(resolutionBlock(h.plan))).toEqual(original);
|
||||
});
|
||||
test('saved native Header and Options remain scoped before the resolution fields',()=>{
|
||||
for(const index of [3,4,5,6,7,8,9]) {
|
||||
const f=batching.frames[index]!;
|
||||
|
||||
Reference in new issue
Block a user