mirror of
https://github.com/morluto/rea.git
synced 2026-11-15 03:02:56 +00:00
* 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
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { expect, it } from "vitest";
|
|
|
|
import { projectAnalysisError } from "../domain/analysisErrorProjection.js";
|
|
import { captureJadxFailure } from "./JadxFailure.js";
|
|
import { jadxOperationTimeoutGuidance } from "./JadxOperationTimeout.js";
|
|
|
|
it("names REA_JADX_OPERATION_TIMEOUT_MS when the operation deadline elapses", () => {
|
|
const timeout = AbortSignal.abort(new Error("deadline"));
|
|
const present = captureJadxFailure({
|
|
cause: timeout.reason,
|
|
request: {
|
|
operation: "inspect_android_package",
|
|
input: { path: "/targets/app.apk" },
|
|
},
|
|
timeout,
|
|
timeoutMs: 1500,
|
|
signal: undefined,
|
|
session: undefined,
|
|
});
|
|
const projected = projectAnalysisError(present());
|
|
const guidance = jadxOperationTimeoutGuidance(1500);
|
|
expect(projected.message).toBe(guidance.userMessage);
|
|
expect(projected.remediation.action).toBe(guidance.remediationAction);
|
|
expect(projected.details).toMatchObject({
|
|
limit: {
|
|
setting: "jadx.operation_timeout_ms",
|
|
effective_value: 1500,
|
|
unit: "ms",
|
|
minimum: 1,
|
|
maximum: 2_147_483_647,
|
|
applies_at: "next_operation",
|
|
agent_editable: true,
|
|
scope: "rea-runtime",
|
|
rea_restart_required: false,
|
|
},
|
|
});
|
|
expect(projected).toMatchObject({
|
|
code: "provider_timeout",
|
|
details: { timeout_ms: 1500 },
|
|
});
|
|
});
|