mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 03:33:25 +00:00
feat(errors): name a deadline's parameter or environment control in details.limit (#11172)
This commit is contained in:
1 parent
2d4a97b405
commit
863d82e370
16 files changed
+159
-50
No files matched your search
@@ -19,6 +19,7 @@ import {
|
||||
providerStartupTimeoutSchema,
|
||||
} from "../config/providerStartupTimeout.js";
|
||||
import { MAX_NODE_TIMER_DELAY_MS } from "../domain/analysisResourceLimits.js";
|
||||
import type { AnalysisControlLimit } from "../domain/analysisSettings.js";
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
import { ProviderCleanupError } from "../domain/providerCleanupError.js";
|
||||
import { AnalysisCleanupRelease } from "../domain/analysisCleanupRelease.js";
|
||||
@@ -197,6 +198,7 @@ export class DarwinProcessOwnershipInspectionError extends Error {
|
||||
readonly timeoutMs: number;
|
||||
readonly userMessage: string;
|
||||
readonly remediationAction: string;
|
||||
readonly limit: AnalysisControlLimit;
|
||||
}
|
||||
| undefined {
|
||||
const outcome = this.compilerOutcome;
|
||||
@@ -206,6 +208,16 @@ export class DarwinProcessOwnershipInspectionError extends Error {
|
||||
timeoutMs: outcome.timeoutMs,
|
||||
userMessage: `The macOS process ownership helper compiler reached its REA_SWIFTC_COMPILE_TIMEOUT_MS deadline of ${String(outcome.timeoutMs)} ms.`,
|
||||
remediationAction: swiftcCompileTimeoutRecovery(outcome.timeoutMs),
|
||||
limit: {
|
||||
control_kind: "environment",
|
||||
environment: "REA_SWIFTC_COMPILE_TIMEOUT_MS",
|
||||
effective_value: outcome.timeoutMs,
|
||||
unit: "ms",
|
||||
minimum: 1,
|
||||
maximum: MAX_NODE_TIMER_DELAY_MS,
|
||||
default_value: DEFAULT_SWIFTC_COMPILE_TIMEOUT_MS,
|
||||
applies_at: "next_startup",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
type ResourceConstraintRecovery,
|
||||
} from "../domain/analysisErrorCore.js";
|
||||
import type { JsonValue } from "../domain/jsonValue.js";
|
||||
import type { AnalysisSettingLimit } from "../domain/analysisSettings.js";
|
||||
import type { AnalysisLimit } from "../domain/analysisSettings.js";
|
||||
import type { ProviderOutcome } from "./ProviderOutcome.js";
|
||||
import type { ProviderProcessSnapshot } from "./ProviderProcess.js";
|
||||
import {
|
||||
@@ -55,8 +55,8 @@ export interface ProviderOutcomeContext {
|
||||
readonly userMessage?: string;
|
||||
/** The setting or action that changes that deadline. */
|
||||
readonly remediationAction?: string;
|
||||
/** The analysis setting that selected the deadline, when one did. */
|
||||
readonly limit?: AnalysisSettingLimit;
|
||||
/** The setting, parameter or environment control that selected the deadline. */
|
||||
readonly limit?: AnalysisLimit;
|
||||
};
|
||||
readonly outputLimit: {
|
||||
/** The budget that was exceeded, when the generic report is not enough. */
|
||||
|
||||
Reference in new issue
Block a user