@haystackeditor/cli 0.22.0 → 0.22.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.
|
@@ -437,26 +437,10 @@ export function normalModeFailure(error) {
|
|
|
437
437
|
}
|
|
438
438
|
function printResult(result) {
|
|
439
439
|
const { outcome, runId, walker, crawl } = result;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
console.log(chalk.green('Precompute result is already cached.'));
|
|
445
|
-
}
|
|
446
|
-
else if (outcome === 'existing') {
|
|
447
|
-
console.log(chalk.green('A matching precompute request already exists.'));
|
|
448
|
-
}
|
|
449
|
-
if (walker?.status === 'queued')
|
|
450
|
-
console.log(`Walker queued (${walker.runId}).`);
|
|
451
|
-
else if (walker?.status === 'existing')
|
|
452
|
-
console.log(`A matching walker run already exists (${walker.runId}).`);
|
|
453
|
-
else if (walker?.status === 'unavailable')
|
|
454
|
-
console.log(walker.reason === 'runner-unavailable'
|
|
455
|
-
? 'Walker unavailable: no runner is available for this repository.'
|
|
456
|
-
: 'Walker unavailable: the enqueue request failed.');
|
|
457
|
-
else
|
|
458
|
-
console.log('Walker status was not reported by the service.');
|
|
459
|
-
// Amendment 12: this capture builds and freezes the app only; `haystack verify` crawls it.
|
|
440
|
+
// What the change's check depends on comes first and alone (amendment 12: this capture builds and freezes the app;
|
|
441
|
+
// `haystack verify` crawls it). A coding agent reads this output: the background requests below follow it, marked as
|
|
442
|
+
// background, so neither their run ids nor an "unavailable" walker reads as the check failing (2026-10-02: a run id taken
|
|
443
|
+
// from the first line was the front-half request's, and "Walker unavailable" looked like an error).
|
|
460
444
|
if (crawl?.status === 'queued')
|
|
461
445
|
console.log(`Building and freezing the app for this change (${crawl.runId}); run \`haystack verify\` to check it.`);
|
|
462
446
|
else if (crawl?.status === 'existing')
|
|
@@ -471,6 +455,15 @@ function printResult(result) {
|
|
|
471
455
|
console.log(blockLines(crawl.block).join('\n'));
|
|
472
456
|
else
|
|
473
457
|
console.log('Crawl status was not reported by the service.');
|
|
458
|
+
const front = outcome === 'enqueued' ? `front-half precompute queued${runId ? ` (${runId})` : ''}`
|
|
459
|
+
: outcome === 'cached' ? 'front-half precompute already cached'
|
|
460
|
+
: outcome === 'existing' ? 'front-half precompute already requested' : null;
|
|
461
|
+
const walk = walker?.status === 'queued' ? `repository walk queued (${walker.runId})`
|
|
462
|
+
: walker?.status === 'existing' ? `repository walk already running (${walker.runId})`
|
|
463
|
+
: walker?.status === 'unavailable' ? (walker.reason === 'runner-unavailable'
|
|
464
|
+
? 'repository walk not started (no walker runner for this repository)' : 'repository walk not started (its request failed)')
|
|
465
|
+
: 'repository walk status not reported';
|
|
466
|
+
console.log(chalk.dim(`Background, not needed by the check above: ${[front, walk].filter(Boolean).join('; ')}.`));
|
|
474
467
|
}
|
|
475
468
|
/** The hook, an explicit precompute and `haystack verify` all capture here.
|
|
476
469
|
* The repository defaults to origin's, as the hook's does. */
|