@vibe-validate/core 0.14.2 → 0.15.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +24 -0
  2. package/dist/index.d.ts +9 -3
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +7 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/output-capture-schema.d.ts +144 -0
  7. package/dist/output-capture-schema.d.ts.map +1 -0
  8. package/dist/output-capture-schema.js +52 -0
  9. package/dist/output-capture-schema.js.map +1 -0
  10. package/dist/process-utils.d.ts +85 -1
  11. package/dist/process-utils.d.ts.map +1 -1
  12. package/dist/process-utils.js +176 -1
  13. package/dist/process-utils.js.map +1 -1
  14. package/dist/result-schema.d.ts +1352 -88
  15. package/dist/result-schema.d.ts.map +1 -1
  16. package/dist/result-schema.js +114 -57
  17. package/dist/result-schema.js.map +1 -1
  18. package/dist/run-output-parser.d.ts +47 -0
  19. package/dist/run-output-parser.d.ts.map +1 -0
  20. package/dist/run-output-parser.js +109 -0
  21. package/dist/run-output-parser.js.map +1 -0
  22. package/dist/runner.d.ts +36 -3
  23. package/dist/runner.d.ts.map +1 -1
  24. package/dist/runner.js +199 -172
  25. package/dist/runner.js.map +1 -1
  26. package/dist/schema-utils.d.ts +57 -0
  27. package/dist/schema-utils.d.ts.map +1 -0
  28. package/dist/schema-utils.js +67 -0
  29. package/dist/schema-utils.js.map +1 -0
  30. package/dist/scripts/generate-result-schema.d.ts +1 -1
  31. package/dist/scripts/generate-result-schema.js +3 -3
  32. package/dist/scripts/generate-result-schema.js.map +1 -1
  33. package/dist/types.js +5 -1
  34. package/dist/types.js.map +1 -1
  35. package/package.json +6 -5
  36. package/validate-result.schema.json +245 -0
  37. package/dist/types.d.ts +0 -138
  38. package/dist/types.d.ts.map +0 -1
  39. package/validation-result.schema.json +0 -100
package/dist/runner.js CHANGED
@@ -9,57 +9,14 @@
9
9
  *
10
10
  * @packageDocumentation
11
11
  */
12
- import { spawn } from 'child_process';
13
- import { writeFileSync, appendFileSync } from 'fs';
14
- import { tmpdir } from 'os';
15
- import { join } from 'path';
12
+ import { writeFileSync, appendFileSync } from 'node:fs';
13
+ import { tmpdir } from 'node:os';
14
+ import { join } from 'node:path';
16
15
  import stripAnsi from 'strip-ansi';
17
16
  import { getGitTreeHash } from '@vibe-validate/git';
18
17
  import { autoDetectAndExtract } from '@vibe-validate/extractors';
19
- import { stopProcessGroup } from './process-utils.js';
20
- /**
21
- * Legacy function - REMOVED in favor of @vibe-validate/git package
22
- *
23
- * Use `getGitTreeHash()` from '@vibe-validate/git' instead.
24
- * This provides deterministic, content-based tree hashing.
25
- *
26
- * @deprecated Removed in v0.9.11 - Use @vibe-validate/git instead
27
- */
28
- /**
29
- * Calculate extraction quality score based on extractor output
30
- *
31
- * Scores extraction quality from 0-100 based on:
32
- * - Number of errors extracted
33
- * - Field completeness (file, line, message)
34
- * - Actionability (can an LLM/human act on this?)
35
- *
36
- * @param formatted - Extractor output
37
- * @returns Quality score (0-100)
38
- *
39
- * @internal
40
- */
41
- function calculateExtractionQuality(formatted) {
42
- let score = 0;
43
- // Error extraction (0-60 points)
44
- const errorCount = formatted.errors?.length || 0;
45
- if (errorCount > 0) {
46
- score += Math.min(60, errorCount * 12); // Max 60 points for 5+ errors
47
- }
48
- // Field completeness (0-40 points)
49
- const errors = formatted.errors || [];
50
- if (errors.length > 0) {
51
- const firstError = errors[0];
52
- let fieldScore = 0;
53
- if (firstError.file)
54
- fieldScore += 10;
55
- if (firstError.line !== undefined)
56
- fieldScore += 10;
57
- if (firstError.message)
58
- fieldScore += 20;
59
- score += fieldScore;
60
- }
61
- return Math.min(100, score);
62
- }
18
+ import { stopProcessGroup, spawnCommand } from './process-utils.js';
19
+ import { parseVibeValidateOutput } from './run-output-parser.js';
63
20
  /**
64
21
  * Parse test output to extract specific failures
65
22
  *
@@ -94,17 +51,92 @@ export function parseFailures(output) {
94
51
  failures.push(...vitestFailures.slice(0, 10)); // Limit to first 10
95
52
  }
96
53
  // TypeScript errors - extract file:line
54
+ // eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses TypeScript compiler output (controlled tool output), not user input
97
55
  const tsErrors = output.match(/[^(]+\(\d+,\d+\): error TS\d+:.+/g);
98
56
  if (tsErrors) {
99
57
  failures.push(...tsErrors.slice(0, 10).map(e => e.trim()));
100
58
  }
101
59
  // ESLint errors - extract file:line
60
+ // eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses ESLint output (controlled linter output), not user input
102
61
  const eslintErrors = output.match(/\S+\.ts\(\d+,\d+\): .+/g);
103
62
  if (eslintErrors) {
104
63
  failures.push(...eslintErrors.slice(0, 10).map(e => e.trim()));
105
64
  }
106
65
  return failures;
107
66
  }
67
+ /**
68
+ * Process developer feedback for failed step
69
+ *
70
+ * Analyzes extraction quality and provides feedback for improving extractors.
71
+ * Only called when developerFeedback mode is enabled.
72
+ *
73
+ * @param stepResult - Step result to augment with extraction quality data
74
+ * @param stepName - Name of the validation step
75
+ * @param formatted - Formatted extractor output
76
+ * @param log - Logging function for output
77
+ * @param isWarning - Helper to check if error is a warning
78
+ * @param isNotWarning - Helper to check if error is not a warning
79
+ *
80
+ * @internal
81
+ */
82
+ function processDeveloperFeedback(_stepResult, formatted, log, _isWarning, _isNotWarning) {
83
+ // Use extraction metadata from extractors package
84
+ const detectedTool = formatted.metadata?.detection?.extractor ?? 'unknown';
85
+ const confidence = formatted.metadata?.confidence ?? 0;
86
+ const completeness = formatted.metadata?.completeness ?? 0;
87
+ // Map confidence to level (0-100 → high/medium/low)
88
+ let confidenceLevel;
89
+ if (confidence >= 80) {
90
+ confidenceLevel = 'high';
91
+ }
92
+ else if (confidence >= 50) {
93
+ confidenceLevel = 'medium';
94
+ }
95
+ else {
96
+ confidenceLevel = 'low';
97
+ }
98
+ // Log extraction quality for developer feedback (not added to result)
99
+ log(` 📊 Extraction quality: ${detectedTool} (${confidenceLevel} confidence: ${confidence}%, completeness: ${completeness}%)`);
100
+ // Alert on poor extraction quality (for failed steps)
101
+ if (confidence < 50) {
102
+ log(` ⚠️ Poor extraction quality (${confidence}%) - Extractors failed to extract failures`);
103
+ log(` 💡 vibe-validate improvement opportunity: Improve ${detectedTool} extractor for this output`);
104
+ }
105
+ }
106
+ /**
107
+ * Handle fail-fast process coordination
108
+ *
109
+ * Kills all other running processes when fail-fast is enabled and a step fails.
110
+ * Thread-safe due to JavaScript's single-threaded event loop.
111
+ *
112
+ * @param enableFailFast - Whether fail-fast mode is enabled
113
+ * @param firstFailure - Reference to first failure tracking object
114
+ * @param step - The failed step
115
+ * @param output - Output from failed step
116
+ * @param processes - Array of all running processes
117
+ * @param log - Logging function for output
118
+ * @param ignoreStopErrors - Callback to ignore already-stopped process errors
119
+ * @returns Updated firstFailure reference
120
+ *
121
+ * @internal
122
+ */
123
+ function handleFailFast(enableFailFast, firstFailure, step, output, processes, log, ignoreStopErrors) {
124
+ // RACE CONDITION SAFE: While multiple processes could fail simultaneously,
125
+ // JavaScript's single-threaded event loop ensures atomic assignment.
126
+ // Even if multiple failures occur, only one will be firstFailure, which is acceptable.
127
+ if (enableFailFast && !firstFailure) {
128
+ const failure = { step, output };
129
+ log(`\n⚠️ Fail-fast enabled: Killing remaining processes...`);
130
+ // Kill all other running processes
131
+ for (const { proc: otherProc, step: otherStep } of processes) {
132
+ if (otherStep !== step && otherProc.exitCode === null) {
133
+ stopProcessGroup(otherProc, otherStep.name).catch(ignoreStopErrors);
134
+ }
135
+ }
136
+ return failure;
137
+ }
138
+ return firstFailure;
139
+ }
108
140
  /**
109
141
  * Run validation steps in parallel with smart fail-fast
110
142
  *
@@ -149,27 +181,23 @@ export async function runStepsInParallel(steps, phaseName, enableFailFast = fals
149
181
  const stepResults = [];
150
182
  const processes = [];
151
183
  let firstFailure = null;
184
+ // Helper functions (extracted to reduce nesting depth)
185
+ const isWarning = (e) => e.severity === 'warning';
186
+ const isNotWarning = (e) => e.severity !== 'warning';
187
+ const ignoreStopErrors = () => { };
152
188
  const results = await Promise.allSettled(steps.map(step => new Promise((resolve, reject) => {
153
189
  const paddedName = step.name.padEnd(maxNameLength);
154
190
  log(` ⏳ ${paddedName} → ${step.command}`);
155
191
  const startTime = Date.now();
156
- // SECURITY: shell: true required for shell operators (&&, ||, |) and cross-platform compatibility.
157
- // Commands from user config files only (same trust as npm scripts). See SECURITY.md for full threat model.
158
- // NOSONAR - Intentional shell execution of user-defined commands
159
- const proc = spawn(step.command, [], {
160
- stdio: 'pipe',
161
- shell: true, // Cross-platform: cmd.exe on Windows, sh on Unix
162
- // detached: true only on Unix - Windows doesn't pipe stdio correctly when detached
163
- detached: process.platform !== 'win32',
164
- env: {
165
- ...process.env,
166
- ...env,
167
- }
192
+ const proc = spawnCommand(step.command, {
193
+ env,
168
194
  });
169
195
  // Track process for potential kill
170
196
  processes.push({ proc, step });
171
197
  let stdout = '';
172
198
  let stderr = '';
199
+ // spawnCommand always sets stdio: ['ignore', 'pipe', 'pipe'], so stdout/stderr are guaranteed non-null
200
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- spawnCommand always pipes stdout/stderr
173
201
  proc.stdout.on('data', data => {
174
202
  const chunk = data.toString();
175
203
  // Strip ANSI escape codes to make output readable for humans and LLMs
@@ -187,6 +215,7 @@ export async function runStepsInParallel(steps, phaseName, enableFailFast = fals
187
215
  }
188
216
  }
189
217
  });
218
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- spawnCommand always pipes stdout/stderr
190
219
  proc.stderr.on('data', data => {
191
220
  const chunk = data.toString();
192
221
  // Strip ANSI escape codes from stderr as well
@@ -197,81 +226,90 @@ export async function runStepsInParallel(steps, phaseName, enableFailFast = fals
197
226
  process.stderr.write(chunk); // Keep colors for terminal viewing
198
227
  }
199
228
  });
200
- proc.on('close', code => {
229
+ // eslint-disable-next-line sonarjs/cognitive-complexity -- Complex handler for step completion, extraction, and fail-fast coordination
230
+ proc.on('close', exitCode => {
201
231
  const durationMs = Date.now() - startTime;
202
- const durationSecs = parseFloat((durationMs / 1000).toFixed(1));
232
+ const durationSecs = Number.parseFloat((durationMs / 1000).toFixed(1));
203
233
  const output = stdout + stderr;
204
234
  outputs.set(step.name, output);
235
+ // Normalize exit code (null means abnormal termination, treat as failure)
236
+ const code = exitCode ?? 1;
205
237
  const status = code === 0 ? '✅' : '❌';
206
238
  const result = code === 0 ? 'PASSED' : 'FAILED';
207
239
  log(` ${status} ${step.name.padEnd(maxNameLength)} - ${result} (${durationSecs}s)`);
208
- // Create base step result
209
- const stepResult = {
210
- name: step.name,
211
- passed: code === 0,
212
- durationSecs,
213
- };
214
- // Only run extractors on FAILED steps (code !== 0)
215
- // Rationale: Passing tests have no failures to extract, extraction would always produce
216
- // meaningless results (score: 0, no errors). Skipping saves CPU and reduces output noise.
240
+ // Extract errors ONLY from FAILED steps (code !== 0)
241
+ // Rationale: Passing tests have no failures to extract. Including empty extraction
242
+ // objects wastes tokens in LLM context. Only extract when there's value to provide.
243
+ let extraction;
244
+ let isCachedResult;
245
+ let outputFiles;
246
+ // eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- Explicit null/undefined/empty check is clearer than optional chaining
217
247
  if (code !== 0 && output && output.trim()) {
218
- const formatted = autoDetectAndExtract(step.name, output);
219
- // Extract structured failures/tests
220
- stepResult.failedTests = formatted.errors?.map(error => {
221
- const location = error.file
222
- ? `${error.file}${error.line ? `:${error.line}` : ''}`
223
- : 'unknown';
224
- return `${location} - ${error.message || 'No message'}`;
225
- }) || [];
226
- // Only include extraction quality metrics when developerFeedback is enabled
227
- // This is for vibe-validate contributors to identify extraction improvement opportunities
228
- if (developerFeedback) {
229
- // Detect tool from step name (heuristic until extractors returns this)
230
- const detectedTool = step.name.toLowerCase().includes('typescript') || step.name.toLowerCase().includes('tsc')
231
- ? 'typescript'
232
- : step.name.toLowerCase().includes('eslint')
233
- ? 'eslint'
234
- : step.name.toLowerCase().includes('test') || step.name.toLowerCase().includes('vitest')
235
- ? 'vitest'
236
- : 'unknown';
237
- // Calculate extraction quality metrics
238
- const score = calculateExtractionQuality(formatted);
239
- stepResult.extractionQuality = {
240
- detectedTool,
241
- confidence: score >= 80 ? 'high' : score >= 50 ? 'medium' : 'low',
242
- score,
243
- warnings: formatted.errors?.filter(e => e.severity === 'warning').length || 0,
244
- errorsExtracted: formatted.errors?.filter(e => e.severity !== 'warning').length || formatted.errors?.length || 0,
245
- actionable: (formatted.errors?.length || 0) > 0,
248
+ // Try parsing vibe-validate YAML output (from nested run commands)
249
+ // Uses shared parser that handles both RunResult and ValidationResult formats
250
+ const parsed = parseVibeValidateOutput(output);
251
+ if (parsed) {
252
+ // Use extraction from nested vibe-validate command
253
+ // This preserves the actual meaningful summary instead of generic "X error(s) from nested command"
254
+ extraction = parsed.extraction;
255
+ isCachedResult = parsed.isCachedResult;
256
+ outputFiles = parsed.outputFiles;
257
+ // Log cache hit status if available (nested run was cached)
258
+ if (parsed.isCachedResult && verbose) {
259
+ log(` ⚡ Step used cached result (${parsed.type} command)`);
260
+ }
261
+ }
262
+ else {
263
+ // No vibe-validate YAML detected - use standard extraction
264
+ const rawExtraction = autoDetectAndExtract(output);
265
+ // Strip empty optional fields to save tokens
266
+ extraction = {
267
+ summary: rawExtraction.summary,
268
+ totalErrors: rawExtraction.totalErrors,
269
+ errors: rawExtraction.errors,
270
+ ...(rawExtraction.guidance?.trim() ? { guidance: rawExtraction.guidance } : {}),
271
+ ...(rawExtraction.errorSummary?.trim() ? { errorSummary: rawExtraction.errorSummary } : {}),
272
+ ...(rawExtraction.metadata ? { metadata: rawExtraction.metadata } : {}),
246
273
  };
247
- // Alert on poor extraction quality (for failed steps)
248
- if (score < 50) {
249
- log(` ⚠️ Poor extraction quality (${score}%) - Extractors failed to extract failures`);
250
- log(` 💡 vibe-validate improvement opportunity: Improve ${detectedTool} extractor for this output`);
274
+ }
275
+ }
276
+ else if (output?.trim()) {
277
+ // Passing step (code === 0) - check if it was cached
278
+ const parsed = parseVibeValidateOutput(output);
279
+ if (parsed) {
280
+ isCachedResult = parsed.isCachedResult;
281
+ outputFiles = parsed.outputFiles;
282
+ // Log cache hit status if available
283
+ if (parsed.isCachedResult && verbose) {
284
+ log(` ⚡ Step used cached result (${parsed.type} command)`);
251
285
  }
252
286
  }
253
287
  }
288
+ // If passing step (code === 0), extraction remains undefined (token optimization)
289
+ // Create step result - extends CommandExecutionSchema (v0.15.0+)
290
+ const stepResult = {
291
+ name: step.name,
292
+ command: step.command,
293
+ exitCode: code,
294
+ durationSecs,
295
+ passed: code === 0,
296
+ ...(isCachedResult !== undefined ? { isCachedResult } : {}), // Include cache status if available
297
+ ...(extraction ? { extraction } : {}), // Conditionally include extraction
298
+ ...(outputFiles ? { outputFiles } : {}), // Include output files for debugging (v0.15.1+)
299
+ };
300
+ // Only include extraction quality metrics when developerFeedback is enabled
301
+ // Skip if extraction already has metadata (from smart extractors) - that's more accurate
302
+ // This is for vibe-validate contributors to identify extraction improvement opportunities
303
+ if (developerFeedback && extraction && !extraction.metadata) {
304
+ processDeveloperFeedback(stepResult, extraction, log, isWarning, isNotWarning);
305
+ }
254
306
  stepResults.push(stepResult);
255
307
  if (code === 0) {
256
308
  resolve({ step, output, durationSecs });
257
309
  }
258
310
  else {
259
311
  // On first failure, kill other processes if fail-fast enabled
260
- // RACE CONDITION SAFE: While multiple processes could fail simultaneously,
261
- // JavaScript's single-threaded event loop ensures atomic assignment.
262
- // Even if multiple failures occur, only one will be firstFailure, which is acceptable.
263
- if (enableFailFast && !firstFailure) {
264
- firstFailure = { step, output };
265
- log(`\n⚠️ Fail-fast enabled: Killing remaining processes...`);
266
- // Kill all other running processes
267
- for (const { proc: otherProc, step: otherStep } of processes) {
268
- if (otherStep !== step && otherProc.exitCode === null) {
269
- stopProcessGroup(otherProc, otherStep.name).catch(() => {
270
- // Process may have already exited, ignore errors
271
- });
272
- }
273
- }
274
- }
312
+ firstFailure = handleFailFast(enableFailFast, firstFailure, step, output, processes, log, ignoreStopErrors);
275
313
  reject({ step, output, durationSecs });
276
314
  }
277
315
  });
@@ -285,6 +323,35 @@ export async function runStepsInParallel(steps, phaseName, enableFailFast = fals
285
323
  }
286
324
  return { success: true, outputs, stepResults };
287
325
  }
326
+ /**
327
+ * Append step outputs to log file
328
+ */
329
+ function appendStepOutputsToLog(logPath, outputs, failedStepName) {
330
+ for (const [stepName, output] of outputs) {
331
+ appendFileSync(logPath, `\n${'='.repeat(60)}\n`);
332
+ appendFileSync(logPath, `${stepName}${failedStepName === stepName ? ' - FAILED' : ''}\n`);
333
+ appendFileSync(logPath, `${'='.repeat(60)}\n`);
334
+ appendFileSync(logPath, output);
335
+ }
336
+ }
337
+ /**
338
+ * Create failed validation result
339
+ *
340
+ * Note: Error extraction now happens at step level
341
+ * Each failed step in phaseResults has its own extraction field with structured errors
342
+ */
343
+ function createFailedValidationResult(failedStep, currentTreeHash, logPath, phaseResults) {
344
+ // Field order optimized for LLM consumption
345
+ return {
346
+ passed: false,
347
+ timestamp: new Date().toISOString(),
348
+ treeHash: currentTreeHash,
349
+ summary: `${failedStep.name} failed`,
350
+ failedStep: failedStep.name,
351
+ phases: phaseResults,
352
+ fullLogFile: logPath,
353
+ };
354
+ }
288
355
  /**
289
356
  * Validation runner with state tracking and caching
290
357
  *
@@ -322,7 +389,6 @@ export async function runStepsInParallel(steps, phaseName, enableFailFast = fals
322
389
  * console.log('✅ Validation passed');
323
390
  * } else {
324
391
  * console.error(`❌ Failed at step: ${result.failedStep}`);
325
- * console.error(result.failedStepOutput);
326
392
  * }
327
393
  * ```
328
394
  *
@@ -336,7 +402,6 @@ export async function runValidation(config) {
336
402
  // (see packages/cli/src/commands/validate.ts and @vibe-validate/history)
337
403
  // Initialize log file
338
404
  writeFileSync(logPath, `Validation started at ${new Date().toISOString()}\n\n`);
339
- let failedStep = null;
340
405
  const phaseResults = [];
341
406
  // Run each phase
342
407
  for (const phase of phases) {
@@ -346,77 +411,35 @@ export async function runValidation(config) {
346
411
  const phaseStartTime = Date.now();
347
412
  const result = await runStepsInParallel(phase.steps, phase.name, enableFailFast, env, config.verbose ?? false, config.yaml ?? false, config.developerFeedback ?? false);
348
413
  const phaseDurationMs = Date.now() - phaseStartTime;
349
- const durationSecs = parseFloat((phaseDurationMs / 1000).toFixed(1));
414
+ const durationSecs = Number.parseFloat((phaseDurationMs / 1000).toFixed(1));
350
415
  // Append all outputs to log file
351
- for (const [stepName, output] of result.outputs) {
352
- appendFileSync(logPath, `\n${'='.repeat(60)}\n`);
353
- appendFileSync(logPath, `${stepName}${result.failedStep?.name === stepName ? ' - FAILED' : ''}\n`);
354
- appendFileSync(logPath, `${'='.repeat(60)}\n`);
355
- appendFileSync(logPath, output);
356
- }
416
+ appendStepOutputsToLog(logPath, result.outputs, result.failedStep?.name);
357
417
  // Record phase result
358
418
  const phaseResult = {
359
419
  name: phase.name,
360
- durationSecs,
361
420
  passed: result.success,
421
+ durationSecs,
362
422
  steps: result.stepResults,
363
423
  };
364
- // If phase failed, extract and include output (LLM-optimized, not raw)
365
- if (!result.success && result.failedStep) {
366
- const rawOutput = result.outputs.get(result.failedStep.name) || '';
367
- const extracted = autoDetectAndExtract(result.failedStep.name, rawOutput);
368
- phaseResult.output = extracted.cleanOutput.trim() || rawOutput;
369
- }
370
424
  phaseResults.push(phaseResult);
371
425
  if (onPhaseComplete) {
372
426
  onPhaseComplete(phase, phaseResult);
373
427
  }
374
- // If phase failed, stop here
428
+ // If phase failed, stop here and return failure result
375
429
  if (!result.success && result.failedStep) {
376
- failedStep = result.failedStep;
377
- const failedOutput = result.outputs.get(failedStep.name) || '';
378
- // Extract actionable failures from raw output (LLM-optimized, 5-10 lines instead of 100+)
379
- // This reduces git notes bloat and makes errors immediately actionable
380
- const extracted = autoDetectAndExtract(failedStep.name, failedOutput);
381
- // Use cleanOutput for storage (already formatted for YAML/JSON, stripped of ANSI codes)
382
- // Falls back to raw output if extraction fails
383
- const extractedOutput = extracted.cleanOutput.trim() || failedOutput;
384
- // Use structured errors from extractor (replaces deprecated parseFailures)
385
- const structuredFailures = extracted.errors.map(error => {
386
- const location = error.file
387
- ? `${error.file}${error.line ? `:${error.line}` : ''}`
388
- : 'unknown';
389
- return `${location} - ${error.message || 'No message'}`;
390
- });
391
- // IMPORTANT: Field order matches types.ts for YAML truncation safety
392
- // Verbose fields (phases, failedStepOutput) at the end
393
- const validationResult = {
394
- passed: false,
395
- timestamp: new Date().toISOString(),
396
- treeHash: currentTreeHash,
397
- failedStep: failedStep.name,
398
- rerunCommand: failedStep.command,
399
- failedTests: structuredFailures.length > 0 ? structuredFailures : undefined,
400
- fullLogFile: logPath,
401
- phases: phaseResults, // Contains verbose output - near end
402
- failedStepOutput: extractedOutput, // Most verbose - dead last
403
- };
404
- // State persistence moved to validate.ts via git notes (v0.12.0+)
405
- // The state file is deprecated - git notes are now the source of truth
406
- return validationResult;
430
+ return createFailedValidationResult(result.failedStep, currentTreeHash, logPath, phaseResults);
407
431
  }
408
432
  }
409
433
  // All steps passed!
410
- // IMPORTANT: Field order matches types.ts for YAML truncation safety
434
+ // Field order optimized for LLM consumption
411
435
  const validationResult = {
412
436
  passed: true,
413
437
  timestamp: new Date().toISOString(),
414
438
  treeHash: currentTreeHash,
439
+ summary: 'Validation passed',
440
+ phases: phaseResults,
415
441
  fullLogFile: logPath,
416
- phases: phaseResults, // May contain output - at end for safety
417
442
  };
418
- // State persistence moved to validate.ts via git notes (v0.12.0+)
419
- // The state file is deprecated - git notes are now the source of truth
420
443
  return validationResult;
421
444
  }
422
445
  /**
@@ -449,7 +472,11 @@ export function setupSignalHandlers(activeProcesses) {
449
472
  await Promise.all(cleanupPromises);
450
473
  process.exit(1);
451
474
  };
452
- process.on('SIGTERM', () => cleanup('SIGTERM'));
453
- process.on('SIGINT', () => cleanup('SIGINT'));
475
+ process.on('SIGTERM', () => {
476
+ void cleanup('SIGTERM');
477
+ });
478
+ process.on('SIGINT', () => {
479
+ void cleanup('SIGINT');
480
+ });
454
481
  }
455
482
  //# sourceMappingURL=runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":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AW,EAAE;QACnC,QAAQ,EAAE,eAAe;QACzB,OAAO,EAAE,mBAAmB;QAC5B,MAAM,EAAE,YAAY;QACpB,WAAW,EAAE,OAAO;KACrB,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,mBAAmB,CAAC,eAAkC;IACpE,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAiB,EAAE;QACtD,OAAO,CAAC,GAAG,CAAC,kBAAkB,MAAM,iBAAiB,eAAe,CAAC,IAAI,sBAAsB,CAAC,CAAC;QAEjG,4BAA4B;QAC5B,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAC7D,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAC1C,CAAC;QAEF,MAAM,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;QACzB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACxB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Zod Schema Utilities
3
+ *
4
+ * Shared validation helpers for consistent error handling across packages.
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+ import type { z } from 'zod';
9
+ /**
10
+ * Create a type-safe validator function from a Zod schema
11
+ *
12
+ * Provides consistent error formatting across all schema validations.
13
+ * Error messages include full path (e.g., "phases.0.steps.2.command: Required")
14
+ *
15
+ * @param schema - Zod schema to validate against
16
+ * @returns Safe validation function with success/error union type
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * const safeValidateResult = createSafeValidator(ValidationResultSchema);
21
+ *
22
+ * const result = safeValidateResult(data);
23
+ * if (result.success) {
24
+ * console.log(result.data); // Typed as ValidationResult
25
+ * } else {
26
+ * console.error(result.errors); // Array of formatted error messages
27
+ * }
28
+ * ```
29
+ */
30
+ export declare function createSafeValidator<T extends z.ZodType>(schema: T): (data: unknown) => {
31
+ success: true;
32
+ data: z.infer<T>;
33
+ } | {
34
+ success: false;
35
+ errors: string[];
36
+ };
37
+ /**
38
+ * Create a strict validator function from a Zod schema
39
+ *
40
+ * Throws on validation failure (useful when invalid data is a critical error).
41
+ *
42
+ * @param schema - Zod schema to validate against
43
+ * @returns Strict validation function that throws on error
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const validateResult = createStrictValidator(ValidationResultSchema);
48
+ *
49
+ * try {
50
+ * const result = validateResult(data); // Typed as ValidationResult
51
+ * } catch (error) {
52
+ * console.error('Invalid data:', error);
53
+ * }
54
+ * ```
55
+ */
56
+ export declare function createStrictValidator<T extends z.ZodType>(schema: T): (data: unknown) => z.infer<T>;
57
+ //# sourceMappingURL=schema-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-utils.d.ts","sourceRoot":"","sources":["../src/schema-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,IACnC,MAAM,OAAO,KACtC;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;CAAE,GACnC;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAezC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,IACzC,MAAM,OAAO,KAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAGpD"}