fix: correct documented vs actual behavior discrepancies from subworker audit
- Fix verify.md --changed exit code (0 → 2) - Add 'deep' as alias for 'thorough' in generation profile resolution - Fix PLUGIN_CONTRACTS_SPEC status: Partially implemented (registry done, runner pending) - Fix OUTBOUND_CONTRACT_MOCKING_SPEC status: Implemented (Phase 1) - Fix cli.md environment matrix to match actual code granularity - Fix chaos.md: document delay handler is currently a no-op - Fix getting-started.md warning: note APOPHIS does not proactively detect nondeterminism - Add variants section to getting-started.md - Build: clean | Tests: 849 pass, 0 fail
This commit is contained in:
@@ -10,7 +10,12 @@ export class GenerationProfileResolutionError extends Error {
|
||||
}
|
||||
|
||||
function isBuiltInProfile(value: string): value is ResolvedGenerationProfile {
|
||||
return value === 'quick' || value === 'standard' || value === 'thorough'
|
||||
return value === 'quick' || value === 'standard' || value === 'thorough' || value === 'deep'
|
||||
}
|
||||
|
||||
function normalizeProfile(value: string): ResolvedGenerationProfile {
|
||||
if (value === 'deep') return 'thorough'
|
||||
return value as ResolvedGenerationProfile
|
||||
}
|
||||
|
||||
export function resolveGenerationProfileOverride(
|
||||
@@ -22,13 +27,13 @@ export function resolveGenerationProfileOverride(
|
||||
}
|
||||
|
||||
if (isBuiltInProfile(rawProfile)) {
|
||||
return rawProfile
|
||||
return normalizeProfile(rawProfile)
|
||||
}
|
||||
|
||||
const aliases = config.generationProfiles
|
||||
if (!aliases) {
|
||||
throw new GenerationProfileResolutionError(
|
||||
`Unknown generation profile "${rawProfile}". Use one of: quick, standard, thorough, or define an alias in config.generationProfiles.`,
|
||||
`Unknown generation profile "${rawProfile}". Use one of: quick, standard, deep, or define an alias in config.generationProfiles.`,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,16 +41,16 @@ export function resolveGenerationProfileOverride(
|
||||
if (!alias) {
|
||||
const available = Object.keys(aliases).join(', ') || 'none'
|
||||
throw new GenerationProfileResolutionError(
|
||||
`Unknown generation profile "${rawProfile}". Built-ins: quick, standard, thorough. Config aliases: ${available}.`,
|
||||
`Unknown generation profile "${rawProfile}". Built-ins: quick, standard, deep. Config aliases: ${available}.`,
|
||||
)
|
||||
}
|
||||
|
||||
const target = typeof alias === 'string' ? alias : alias.base
|
||||
if (!isBuiltInProfile(target)) {
|
||||
throw new GenerationProfileResolutionError(
|
||||
`Invalid generation profile alias "${rawProfile}". Alias must resolve to quick, standard, or thorough.`,
|
||||
`Invalid generation profile alias "${rawProfile}". Alias must resolve to quick, standard, or deep.`,
|
||||
)
|
||||
}
|
||||
|
||||
return target
|
||||
return normalizeProfile(target)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user