Files
reverse-engineering-anything/tests/conformance/contracts/targetContentProvenance.test.ts
T
morluto f3ed1657f8 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
2026-10-25 09:45:26 +08:00

57 lines
1.7 KiB
TypeScript

import { describe, expect, it } from "vitest";
import { TOOL_CONTRACTS } from "../../../src/contracts/toolContracts.js";
import { TARGET_CONTENT_FREE_TOOLS } from "../../../src/contracts/toolEffects.js";
describe("target-content provenance audit", () => {
it("marks every tool except the audited content-free exceptions", () => {
const names = new Set<string>(TOOL_CONTRACTS.map(({ name }) => name));
expect(
[...TARGET_CONTENT_FREE_TOOLS].filter((name) => !names.has(name)),
).toEqual([]);
for (const contract of TOOL_CONTRACTS)
expect({
name: contract.name,
returnsTargetContent: contract.returnsTargetContent,
}).toEqual({
name: contract.name,
returnsTargetContent: !TARGET_CONTENT_FREE_TOOLS.has(contract.name),
});
expect([...TARGET_CONTENT_FREE_TOOLS].sort()).toEqual([
"export_evidence_bundle",
"inspect_analysis_settings",
"record_unknown",
"update_analysis_settings",
]);
});
it.each([
"procedure_pseudo_code",
"list_strings",
"search_strings",
"batch_decompile",
"inspect_web_page",
"analyze_web_bundle",
"export_web_scripts",
"inspect_web_network_capture",
"read_adb_logcat",
"list_adb_directory",
"decompile_jeb_item",
"inspect_artifact",
"analyze_javascript_application",
"capture_process_scenario",
"get_evidence_bundle",
"inspect_analysis_view",
"binary_session",
"close_binary",
"inspect_adb_client",
"inspect_apktool_client",
"update_unknown",
])("marks %s as returning target content", (name) => {
expect(
TOOL_CONTRACTS.find((contract) => contract.name === name)
?.returnsTargetContent,
).toBe(true);
});
});