refactor: remove depth/generationProfile tiering, use explicit runs

- Replace TestDepth ('quick'|'standard'|'thorough') with explicit runs:number
- Remove GenerationProfile type and all generationProfile parameters
- schema-to-arbitrary.ts now uses fixed defaults (string≤128, array≤10, props≤6)
- Delete src/cli/core/generation-profile.ts
- Remove --generation-profile CLI flag from verify and qualify
- Remove depth field from PresetDefinition and all preset scaffolds
- Remove generationProfiles from Config interface
- Update all test files: depth:'quick' → runs:10
- Remove depth from all fixture configs
- Update builders.ts, mutation.ts, outbound-mock-runtime.ts
- Build: clean | Tests: 849 pass, 0 fail
This commit is contained in:
John Dvorak
2026-04-30 13:47:24 -07:00
parent 3e5758dd54
commit 6295c476dc
38 changed files with 130 additions and 526 deletions
+1 -1
View File
@@ -201,7 +201,7 @@ export interface ApophisTestDecorations {
// Forward declarations to avoid circular deps — these are defined in sibling modules
export interface TestConfig {
readonly depth?: import('./formula.js').TestDepth
readonly runs?: number
readonly scope?: string
readonly seed?: number
readonly timeout?: number
+10 -34
View File
@@ -7,11 +7,8 @@
// Test: Configuration
// ============================================================================
export type TestDepth = 'quick' | 'standard' | 'thorough' | { runs: number }
export interface TestConfig {
readonly depth?: TestDepth
readonly generationProfile?: GenerationProfile
readonly runs?: number
readonly scope?: string
readonly seed?: number
readonly timeout?: number
@@ -204,49 +201,28 @@ export interface ChaosConfig {
}
// ============================================================================
// Depth Configuration
// Test run configuration
// ============================================================================
export interface DepthConfig {
export interface RunConfig {
readonly contractRuns: number
readonly propertyRuns: number
readonly statefulRuns: number
readonly maxCommands: number
}
export type GenerationProfile = 'quick' | 'standard' | 'thorough'
const DEFAULT_RUNS = 50
export const DEPTH_CONFIGS: Record<'quick' | 'standard' | 'thorough', DepthConfig> = {
quick: { contractRuns: 10, propertyRuns: 50, statefulRuns: 5, maxCommands: 10 },
standard: { contractRuns: 50, propertyRuns: 100, statefulRuns: 20, maxCommands: 30 },
thorough: { contractRuns: 200, propertyRuns: 1000, statefulRuns: 100, maxCommands: 50 }
}
export function resolveDepth(depth: TestDepth): DepthConfig {
if (typeof depth === 'string') {
return DEPTH_CONFIGS[depth]
}
export function resolveRuns(runs: number | undefined): RunConfig {
const r = runs ?? DEFAULT_RUNS
return {
contractRuns: depth.runs,
propertyRuns: depth.runs,
statefulRuns: Math.max(1, Math.floor(depth.runs / 10)),
maxCommands: Math.max(5, Math.floor(depth.runs / 5)),
contractRuns: r,
propertyRuns: r * 2,
statefulRuns: Math.max(1, Math.floor(r / 10)),
maxCommands: Math.max(5, Math.floor(r / 2)),
}
}
export function resolveGenerationProfile(depth: TestDepth | undefined): GenerationProfile {
if (depth === undefined) {
return 'standard'
}
if (typeof depth === 'string') {
return depth
}
if (depth.runs <= 25) return 'quick'
if (depth.runs >= 250) return 'thorough'
return 'standard'
}
// ============================================================================
// Test: Results
// ============================================================================