feat: Implement workflow phases for test generation and execution

- Added Phase 1: Session Start to detect input mode and create test workflow session.
- Added Phase 2: Test Context Gather to gather test context via coverage analysis or codebase scan.
- Added Phase 3: Test Concept Enhanced to analyze test requirements using Gemini and generate multi-layered test requirements.
- Added Phase 4: Test Task Generate to create test-specific tasks based on analysis results.
- Added Phase 5: Test Cycle Execute to manage iterative test execution and fix cycles with adaptive strategies.
- Introduced BottomPanel component for terminal dashboard with Queue and Inspector tabs.
This commit is contained in:
catlog22
2026-02-14 21:35:55 +08:00
parent 0d805efe87
commit d535ab4749
27 changed files with 2004 additions and 2363 deletions

View File

@@ -2062,6 +2062,7 @@ export function normalizeTask(raw: Record<string, unknown>): NormalizedTask {
const rawFlowControl = raw.flow_control as FlowControl | undefined;
const rawMeta = raw.meta as LiteTask['meta'] | undefined;
const rawConvergence = raw.convergence as NormalizedTask['convergence'] | undefined;
const rawModPoints = raw.modification_points as Array<{ file?: string; target?: string; change?: string }> | undefined;
// Description: new flat field first, then join old context.requirements, then old details/scope
const rawRequirements = rawContext?.requirements;
@@ -2075,6 +2076,25 @@ export function normalizeTask(raw: Record<string, unknown>): NormalizedTask {
: undefined)
|| (raw.scope as string | undefined);
// Normalize files: new flat files > flow_control.target_files > modification_points
const normalizedFiles = normalizeFilesField(raw.files)
|| rawFlowControl?.target_files
|| (rawModPoints?.length
? rawModPoints.filter(m => m.file).map(m => ({ path: m.file!, name: m.target, change: m.change }))
: undefined);
// Normalize focus_paths: top-level > context > files paths
const focusPaths = (raw.focus_paths as string[])
|| rawContext?.focus_paths
|| (normalizedFiles?.length ? normalizedFiles.map(f => f.path).filter(Boolean) : undefined)
|| [];
// Normalize acceptance: convergence > context.acceptance > top-level acceptance
const rawAcceptance = raw.acceptance as string[] | undefined;
const convergence = rawConvergence
|| (rawContext?.acceptance?.length ? { criteria: rawContext.acceptance } : undefined)
|| (rawAcceptance?.length ? { criteria: rawAcceptance } : undefined);
return {
// Identity
task_id: (raw.task_id as string) || (raw.id as string) || 'N/A',
@@ -2089,15 +2109,13 @@ export function normalizeTask(raw: Record<string, unknown>): NormalizedTask {
// Promoted from context (new first, old fallback)
depends_on: (raw.depends_on as string[]) || rawContext?.depends_on || [],
focus_paths: (raw.focus_paths as string[]) || rawContext?.focus_paths || [],
convergence: rawConvergence || (rawContext?.acceptance?.length
? { criteria: rawContext.acceptance }
: undefined),
focus_paths: focusPaths,
convergence,
// Promoted from flow_control (new first, old fallback)
pre_analysis: (raw.pre_analysis as PreAnalysisStep[]) || rawFlowControl?.pre_analysis,
implementation: (raw.implementation as (ImplementationStep | string)[]) || rawFlowControl?.implementation_approach,
files: normalizeFilesField(raw.files) || rawFlowControl?.target_files,
files: normalizedFiles,
// Promoted from meta (new first, old fallback)
type: (raw.type as string) || rawMeta?.type,