mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 03:33:25 +00:00
feat(analysis): make resource budgets recoverable across CLI and MCP (#9706)
* refactor(analysis): centralize resource budgets and recovery facts * feat(analysis): expose ASAR and Ghidra runtime admission controls * feat(artifacts): expose reader admission and preserve limited recognition * feat(javascript): expose recoverable semantic precision budgets * feat(web): add recoverable source-map budgets and compact retained views * feat(web): make historical capture decoding budgets recoverable * fix(desktop): enforce selected view policies across capture and export * feat(runtime): make Frida and LLDB retention budgets selectable * feat(native): expose diagnostic budgets and preserve exhaustion causes * feat(managed): expose recoverable snapshot and representation budgets * feat(metadata): make Go and Rust inspection budgets recoverable * feat(wasm): expose representation and producer admissions * feat(evm): expose per-call worker resource budgets * feat(android): make resource and string-pool omissions recoverable * feat(producers): expose command and recorded-capture budgets * docs(analysis): record recovery contracts and integrated validation * fix(docs): link calibration oracle from published verification pages * fix(docs): restore desktop task anchors and receipt links * test(analysis): align fixtures with selectable budget contracts * fix(analysis): remove source-location projector dependency cycle * test(analysis): refresh budget recovery and verifier regressions * test(analysis): preserve format and publication recovery expectations * test(windows): align conformance with owned runtime admission * fix(desktop): preserve selected alias kinds in exported state * test(analysis): align provider fixtures with recoverable budgets * test(desktop): validate emitted alias metadata structurally * fix(ghidra): classify bounded Windows endpoint refusals * test(cli): assert selectable artifact admission recovery * fix(cli): preserve capture provenance in environment builds
This commit is contained in:
1 parent
55b6d2ca20
commit
cb4e5cfbff
515 files changed
+21066
-3637
No files matched your search
@@ -22,6 +22,32 @@ import { managedMembersInputSchema } from "../contracts/managed/managedToolContr
|
||||
import { localPathStringSchema } from "../domain/localPath.js";
|
||||
import { withCommandCancellation } from "./commandCancellation.js";
|
||||
import { finishAnalysisCommand } from "./finishAnalysisCommand.js";
|
||||
import { managedInspectionBudgetShape } from "../domain/managed/managedInspectionLimits.js";
|
||||
import { cliDecimalField } from "./options.js";
|
||||
|
||||
const managedBudgetOptions = {
|
||||
maxSnapshotBytes: cliDecimalField(
|
||||
managedInspectionBudgetShape.max_snapshot_bytes,
|
||||
),
|
||||
maxMetadataRepresentationBytes: cliDecimalField(
|
||||
managedInspectionBudgetShape.max_metadata_representation_bytes,
|
||||
),
|
||||
};
|
||||
|
||||
const managedBudgetParameters = (options: {
|
||||
readonly maxSnapshotBytes?: number | undefined;
|
||||
readonly maxMetadataRepresentationBytes?: number | undefined;
|
||||
}) => ({
|
||||
...(options.maxSnapshotBytes === undefined
|
||||
? {}
|
||||
: { max_snapshot_bytes: options.maxSnapshotBytes }),
|
||||
...(options.maxMetadataRepresentationBytes === undefined
|
||||
? {}
|
||||
: {
|
||||
max_metadata_representation_bytes:
|
||||
options.maxMetadataRepresentationBytes,
|
||||
}),
|
||||
});
|
||||
|
||||
export const registerManagedCommands = (
|
||||
cli: CliInstance,
|
||||
@@ -49,12 +75,13 @@ const registerInspectManagedArtifact = (
|
||||
"Managed PE executable or assembly path",
|
||||
),
|
||||
}),
|
||||
run: ({ args }) =>
|
||||
options: z.object(managedBudgetOptions),
|
||||
run: ({ args, options }) =>
|
||||
logCliCommand(logger, "inspect-managed-artifact", () =>
|
||||
runProviderAnalysis(
|
||||
args.path,
|
||||
"inspect_managed_artifact",
|
||||
{},
|
||||
managedBudgetParameters(options),
|
||||
logger,
|
||||
).then(projectCliAnalysisResult),
|
||||
),
|
||||
@@ -75,6 +102,7 @@ const registerInspectManagedMembers = (
|
||||
),
|
||||
}),
|
||||
options: z.object({
|
||||
...managedBudgetOptions,
|
||||
type: managedMembersInputSchema.shape.type_names.describe(
|
||||
"Inspect only members declared by this exact type full name, and the string literals they load, such as System.Threading.Monitor; a nested type is named by its bare name, which selects every nested type of that name (repeatable)",
|
||||
),
|
||||
@@ -93,7 +121,12 @@ const registerInspectManagedMembers = (
|
||||
runProviderAnalysis(
|
||||
args.path,
|
||||
"inspect_managed_members",
|
||||
options.type === undefined ? {} : { type_names: options.type },
|
||||
{
|
||||
...managedBudgetParameters(options),
|
||||
...(options.type === undefined
|
||||
? {}
|
||||
: { type_names: options.type }),
|
||||
},
|
||||
logger,
|
||||
signal,
|
||||
{
|
||||
@@ -123,12 +156,13 @@ const registerInspectManagedNativeBoundaries = (
|
||||
"Managed PE executable or assembly path",
|
||||
),
|
||||
}),
|
||||
run: ({ args }) =>
|
||||
options: z.object(managedBudgetOptions),
|
||||
run: ({ args, options }) =>
|
||||
logCliCommand(logger, "inspect-managed-native-boundaries", () =>
|
||||
runProviderAnalysis(
|
||||
args.path,
|
||||
"inspect_managed_native_boundaries",
|
||||
{},
|
||||
managedBudgetParameters(options),
|
||||
logger,
|
||||
).then(projectCliAnalysisResult),
|
||||
),
|
||||
@@ -153,6 +187,7 @@ const registerCompareManagedMembers = (
|
||||
"Compare managed PE/CLI member inventories by exact declared type, name, and signature; names alone never form a match",
|
||||
args: compareManagedMemberArgs,
|
||||
options: z.object({
|
||||
...managedBudgetOptions,
|
||||
type: managedMembersInputSchema.shape.type_names.describe(
|
||||
"Compare only members declared by this exact type full name on both sides, as selected by inspect-managed-members --type; use it when a whole-assembly comparison exceeds capacity (repeatable)",
|
||||
),
|
||||
@@ -167,6 +202,15 @@ const registerCompareManagedMembers = (
|
||||
{
|
||||
leftPath: args.leftPath,
|
||||
rightPath: args.rightPath,
|
||||
...(options.maxSnapshotBytes === undefined
|
||||
? {}
|
||||
: { maxSnapshotBytes: options.maxSnapshotBytes }),
|
||||
...(options.maxMetadataRepresentationBytes === undefined
|
||||
? {}
|
||||
: {
|
||||
maxRepresentationBytes:
|
||||
options.maxMetadataRepresentationBytes,
|
||||
}),
|
||||
...(options.type === undefined
|
||||
? {}
|
||||
: { typeNames: options.type }),
|
||||
|
||||
Reference in new issue
Block a user