@haystackeditor/cli 0.30.1 → 0.30.2
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.
|
@@ -390,12 +390,16 @@ function age(ms) {
|
|
|
390
390
|
: [Math.floor(minutes / 1_440), 'day'];
|
|
391
391
|
return count === 0 ? 'just now' : `${count} ${unit}${count === 1 ? '' : 's'} ago`;
|
|
392
392
|
}
|
|
393
|
-
/** Rule 17 (
|
|
393
|
+
/** Rule 17 (amendments 32 and 39): an onboarding the independent review skipped, as the sentence every result shows, saying why
|
|
394
|
+
* for each reason the contract names (a reason this CLI does not know yet is still shown, as the reason the server gave); none
|
|
395
|
+
* otherwise. */
|
|
394
396
|
export function reviewNotes(review) {
|
|
395
397
|
if (review?.verdict !== 'skipped')
|
|
396
398
|
return [];
|
|
397
|
-
|
|
398
|
-
|
|
399
|
+
const why = review.reason === 'internal-test-tenant' ? 'is turned off for this team'
|
|
400
|
+
: review.reason === 'internal-test-requester' ? 'is turned off for onboardings Haystack\'s own people or automation start'
|
|
401
|
+
: 'did not run';
|
|
402
|
+
return [`This onboarding was NOT reviewed: the independent review that checks the setup did not cheat ${why} (${review.reason}).`];
|
|
399
403
|
}
|
|
400
404
|
/** Rule 15(g), amendment 3: a stand-in gap as the sentence every result shows. */
|
|
401
405
|
export function standInGapNotes(gaps) {
|
package/dist/commands/verify.js
CHANGED
|
@@ -687,12 +687,13 @@ function staleCrawl(found, identity) {
|
|
|
687
687
|
return found.mode === 'prepare' || found.status === 'prepared' ? 'prepare-only' : null;
|
|
688
688
|
}
|
|
689
689
|
function staleWords(found, stale) {
|
|
690
|
+
const kind = found.mode === 'prepare' ? 'preparation' : 'crawl';
|
|
690
691
|
switch (stale) {
|
|
691
|
-
case 'retitled': return `The last
|
|
692
|
-
case 'other-time': return `The last
|
|
693
|
-
case 'cancelled': return `This change's last
|
|
694
|
-
case 'incomplete': return `This change's last
|
|
695
|
-
case 'cancelling': return `This change's
|
|
692
|
+
case 'retitled': return `The last ${kind} of this code ran under another title, "${safe(found.changeTitle)}" (${found.runId})`;
|
|
693
|
+
case 'other-time': return `The last ${kind} of this code was asked for ${timeWords(found.budgetMs)} (${found.runId})`;
|
|
694
|
+
case 'cancelled': return `This change's last ${kind} was cancelled (${found.runId})`;
|
|
695
|
+
case 'incomplete': return `This change's last ${kind} stopped before finishing (${found.runId})`;
|
|
696
|
+
case 'cancelling': return `This change's ${kind} is being cancelled (${found.runId})`;
|
|
696
697
|
case 'prepare-only': return found.status === 'prepared'
|
|
697
698
|
? `Your change was built and frozen ahead of time (${found.runId})`
|
|
698
699
|
: `Your change is being built and frozen ahead of time (${found.runId})`;
|
|
@@ -728,7 +729,7 @@ async function submitCapture(capture, token, found) {
|
|
|
728
729
|
if (found === null) {
|
|
729
730
|
return { runId: crawl.runId, onboarding: null, line: crawl.status === 'queued'
|
|
730
731
|
? `No crawl existed for this change yet; ${preparing ? 'started preparing it' : 'started one'} (${crawl.runId}).`
|
|
731
|
-
: `The service already had a
|
|
732
|
+
: `The service already had a check for this change (${crawl.runId}).` };
|
|
732
733
|
}
|
|
733
734
|
if (!anotherCrawl(found.stale) && crawl.runId === found.view.runId) {
|
|
734
735
|
return { runId: crawl.runId, onboarding: null, line: found.stale === 'prepare-only'
|