Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/lib/agent/agent-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
} from '@utils/debug';
import { createBenchmarkPipeline } from '@lib/middleware/benchmark';
import { wizardAbort, WizardError, registerCleanup } from '@utils/wizard-abort';
import { isNonInteractiveEnvironment } from '@utils/environment';
import { formatScanReport, writeScanReport } from '@lib/yara-hooks';
import { detectNodePackageManagers } from '@lib/detection/package-manager';
import type { PackageManagerDetector } from '@lib/detection/package-manager';
Expand Down Expand Up @@ -279,12 +280,17 @@ async function bootstrapProgram(

await getUI().showBlockingOutage(readiness);

await wizardAbort({
message:
'Cannot start — external services are down:\n' +
blockingLabels.map((l) => ` - ${l}`).join('\n') +
'\n\nPlease try again later.',
});
// The TUI lets the user continue past an outage; non-interactive runs
// (CI) do the same automatically — the degraded services are reported
// above, but we proceed rather than aborting on a transient upstream blip.
if (!isNonInteractiveEnvironment()) {
await wizardAbort({
message:
'Cannot start — external services are down:\n' +
blockingLabels.map((l) => ` - ${l}`).join('\n') +
'\n\nPlease try again later.',
});
}
} else if (readiness.decision === WizardReadiness.YesWithWarnings) {
getUI().setReadinessWarnings(readiness);
}
Expand Down
6 changes: 4 additions & 2 deletions src/ui/logging-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class LoggingUI implements WizardUI {
}

showBlockingOutage(result: WizardReadinessResult): Promise<void> {
console.log(`▲ Service health issues detected — blocking outage.`);
console.log(`▲ Service health issues detected.`);
const blockingKeys = getBlockingServiceKeys(result.health);
if (blockingKeys.length > 0) {
console.log(`│`);
Expand All @@ -131,7 +131,9 @@ export class LoggingUI implements WizardUI {
for (const reason of result.reasons) {
console.log(`│ ${reason}`);
}
console.log(`│ The wizard cannot start while these services are down.`);
console.log(
`│ Continuing anyway — health checks are advisory in non-interactive runs.`,
);
return Promise.resolve();
}

Expand Down
Loading