mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 09:55:46 +00:00
feat(mcp): support runtime analysis limit recovery (#7049)
* feat(mcp): support runtime analysis limit recovery * refactor(config): remove unused limit re-exports * fix(android): keep fixture release metadata dependency-free * fix(settings): preserve provider budgets and recovery facts * fix(tests): resolve lint plugins from their repository owner * refactor(mcp): verify guidance delivery without frozen wording * fix(android): align availability with runtime timeout * test(recovery): assert limit facts instead of frozen wording * fix(mcp): share runtime settings with the default JADX provider * test(mcp): bound acknowledgements and release held work on failure * fix(catalog): declare runtime settings tools as MCP-only
This commit is contained in:
1 parent
ab720b4216
commit
f3ed1657f8
120 files changed
+2899
-884
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { analysisSettingLimit } from "../../domain/analysisSettingDefinitions.js";
|
||||
import { WorkerFrameSignal } from "../../process/WorkerFrameSignal.js";
|
||||
import type { JavaScriptSemanticProjectionCapacity } from "../../domain/javascript/javascriptSemanticFileProjection.js";
|
||||
import { createHash, randomUUID } from "node:crypto";
|
||||
@@ -778,6 +779,11 @@ export class JavaScriptAnalysisWorker {
|
||||
this.#limits(),
|
||||
{
|
||||
capturedOutput: this.#captured(),
|
||||
limit: analysisSettingLimit(
|
||||
"javascript.max_heap_mb",
|
||||
this.limits.heapMb,
|
||||
undefined,
|
||||
),
|
||||
remediationAction: javaScriptWorkerHeapRemediation(this.limits.heapMb),
|
||||
},
|
||||
);
|
||||
@@ -972,6 +978,11 @@ export class JavaScriptAnalysisWorker {
|
||||
return this.#projectPrimaryFailure(path);
|
||||
return deadline.interruption === "timeout"
|
||||
? new AnalysisTimeoutError(OPERATION, this.limits.timeoutMs, {
|
||||
limit: analysisSettingLimit(
|
||||
"javascript.analysis_timeout_ms",
|
||||
this.limits.timeoutMs,
|
||||
undefined,
|
||||
),
|
||||
capturedOutput: this.#captured(),
|
||||
userMessage: `JavaScript source analysis reached its ${String(this.limits.timeoutMs)}ms per-source server/provider deadline (analysis_timeout_ms), not the MCP client deadline.`,
|
||||
remediationAction:
|
||||
@@ -1000,6 +1011,15 @@ export class JavaScriptAnalysisWorker {
|
||||
this.#limits(),
|
||||
{
|
||||
capturedOutput: this.#captured(),
|
||||
...(WORKER_HEAP_FLAGS_ENFORCED
|
||||
? {
|
||||
limit: analysisSettingLimit(
|
||||
"javascript.max_heap_mb",
|
||||
this.limits.heapMb,
|
||||
undefined,
|
||||
),
|
||||
}
|
||||
: {}),
|
||||
remediationAction: recovery.remediationAction,
|
||||
},
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user