mirror of
https://github.com/morluto/rea.git
synced 2026-12-02 17:19:45 +00:00
* feat(firmware): decode ARM M-profile and RISC-V mtvec interrupt vector tables * fix(firmware): name vector-table exceptions per ARM variant and report unbound SVD interrupts The architecture field now takes the ARM M-profile variant names REA uses for raw images (armv6-m through armv8.1-m.main) plus riscv. ARMv8-M Baseline gets ARMv6-M's exceptions; only Mainline names MemManage, BusFault, UsageFault, SecureFault and DebugMonitor. The old armv8-m value named Mainline faults on Cortex-M23 tables. vtor_aligned checks the 128-byte ARMv7-M/ARMv8-M minimum and is null on ARMv6-M, whose VTOR is optional and implementation-defined. Slots past the end of the 32-bit address space are no longer decoded with wrapped addresses, and an initial stack pointer that is not word-aligned is flagged. CMSIS-SVD interrupts without a name or with a non-integer value are reported as anomalies instead of skipped silently, and the expanded-name budget is charged once while parsing instead of twice with two formulas. likely_default_stub is removed: every shared-handler group set it to true. RISC-V limitations now cover vectored exceptions on slot 0, CLIC address tables and the mcause numbering assumed for SVD bindings. * fix(firmware): bound SVD anomaly diagnostics, RISC-V pair addresses, and shared budget recovery * fix(firmware): index SVD duplicates per peripheral and admit one-slot RISC-V tables Duplicate interrupt declarations were found by rebuilding a key that repeats the full peripheral name for every <interrupt>, so a long name repeated across many declarations cost name length times declaration count. Bound names are now indexed per peripheral name, looked up once per <peripheral>. The 8-byte minimum held for every architecture, but only an ARM table must start with InitialSP and Reset; a RISC-V Direct-mode table can be one instruction. max_entries and max_file_bytes now admit one slot. * refactor(firmware): hoist the SVD IRQ value patterns to module scope * fix(firmware): record RISC-V pair byte extent and attribute caller input errors * style(firmware): format the vector-table provider * fix(firmware): add summary delivery and analysis views for vector tables * test(firmware): check vector-table recoveries and budgets through their owners Recovery assertions compare the delivered action with the shared refusal formatter applied to the reported limit, instead of pinning sentences. The summary-delivery test set REA_AGENT_RESULT_MAX_BYTES, which nothing reads, and used a result large enough to exceed the default budget too; it now sets REA_AGENT_RESULT_BUDGET_BYTES, asserts the reported budget, and uses a result between the minimum and default budgets, checking that the default delivers it complete. The view counts active ARM entries and recognized RISC-V slots with a loop instead of filtered copies. * perf(firmware): count active vector slots once in the report producer The analysis view recounted active ARM entries and recognized RISC-V slots on every summary and page request. The producer already collects exactly those slots as handler targets, so the report now stores active_arm_entry_count and recognized_riscv_slot_count from them, and the view reads the stored fields. The service checks the stored counts against the slots once when it validates the provider's report. --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
192 lines
8.2 KiB
TypeScript
192 lines
8.2 KiB
TypeScript
import type { CAPABILITY_DECLARATIONS } from "../../src/composition/capabilityDeclarations.js";
|
|
|
|
/**
|
|
* The public-workflow conformance case for each declared provider capability.
|
|
* A case is a CLI, MCP or acceptance test that exercises one of the
|
|
* capability's operations; an exemption must say why no such case exists.
|
|
* `providerCapabilityConformance.test.ts` iterates the capability
|
|
* declarations, so a newly declared capability fails until it is listed here.
|
|
*/
|
|
export type ProviderCapabilityConformance =
|
|
| { readonly cases: readonly [string, ...string[]] }
|
|
| { readonly exempt: string };
|
|
|
|
export const PROVIDER_CAPABILITY_CONFORMANCE: Readonly<
|
|
Partial<
|
|
Record<keyof typeof CAPABILITY_DECLARATIONS, ProviderCapabilityConformance>
|
|
>
|
|
> = {
|
|
adbDevice: { cases: ["tests/boundary/mcp/adbDeviceProperties.test.ts"] },
|
|
analysisView: { cases: ["tests/boundary/cli/analysisViewCli.test.ts"] },
|
|
android: { cases: ["tests/boundary/cli/androidPackageViewCli.test.ts"] },
|
|
androidApplicationGraph: {
|
|
cases: ["tests/boundary/mcp/mobileApplicationGraphMcp.test.ts"],
|
|
},
|
|
apkSignature: {
|
|
cases: ["tests/acceptance/apkSignatureLimitsCliMcp.test.ts"],
|
|
},
|
|
apktool: { cases: ["tests/boundary/cli/apktoolCli.test.ts"] },
|
|
appleApplicationGraph: {
|
|
cases: ["tests/boundary/mcp/mobileApplicationGraphMcp.test.ts"],
|
|
},
|
|
appleIps: { cases: ["tests/acceptance/appleIpsArmJoinCli.test.ts"] },
|
|
applicationWorkflows: {
|
|
cases: [
|
|
"tests/acceptance/applications/applicationVersionMatchingCli.test.ts",
|
|
],
|
|
},
|
|
artifactGraph: {
|
|
cases: ["tests/acceptance/artifactAdmittedIdentityMcp.test.ts"],
|
|
},
|
|
binaryHardening: { cases: ["tests/acceptance/binaryHardeningCli.test.ts"] },
|
|
binaryLayout: { cases: ["tests/boundary/mcp/binaryDiagnosticsMcp.test.ts"] },
|
|
browserObservation: {
|
|
cases: ["tests/acceptance/browser/observationDurationCli.test.ts"],
|
|
},
|
|
browserScenarioCapture: {
|
|
cases: ["tests/acceptance/browser/browserScenarioCancellationCli.test.ts"],
|
|
},
|
|
byteEntropy: {
|
|
cases: ["tests/acceptance/byteEntropyWindowsIdentity.test.ts"],
|
|
},
|
|
cutter: { cases: ["tests/boundary/cli/cutterStatusAttributionCli.test.ts"] },
|
|
debPackage: { cases: ["tests/acceptance/debPackageCli.test.ts"] },
|
|
desktopApplication: {
|
|
cases: ["tests/boundary/cli/desktopApplicationCli.test.ts"],
|
|
},
|
|
devicetree: { cases: ["tests/acceptance/devicetreeCli.test.ts"] },
|
|
dwarfUnits: {
|
|
cases: [
|
|
"tests/acceptance/dwarfUnitsCli.test.ts",
|
|
"tests/boundary/mcp/dwarfUnitsMcp.test.ts",
|
|
],
|
|
},
|
|
electronActiveObservation: {
|
|
cases: ["tests/acceptance/applications/electronBlankPathCli.test.ts"],
|
|
},
|
|
electronFuses: { cases: ["tests/acceptance/electronFusesCli.test.ts"] },
|
|
electronObservation: { cases: ["tests/boundary/cli/electronCli.test.ts"] },
|
|
elfDebugLink: {
|
|
cases: [
|
|
"tests/acceptance/elfDebugLinkCli.test.ts",
|
|
"tests/boundary/mcp/elfDebugLinkMcp.test.ts",
|
|
],
|
|
},
|
|
elfNotes: { cases: ["tests/acceptance/elfNotesCli.test.ts"] },
|
|
elfDependencies: {
|
|
cases: [
|
|
"tests/acceptance/elfDependenciesCli.test.ts",
|
|
"tests/boundary/mcp/elfDependenciesMcp.test.ts",
|
|
],
|
|
},
|
|
elfUnwindRanges: { cases: ["tests/acceptance/elfUnwindRangesCli.test.ts"] },
|
|
erlangBeam: { cases: ["tests/acceptance/erlangBeamCli.test.ts"] },
|
|
espNvs: { cases: ["tests/boundary/mcp/espNvsMcpCli.test.ts"] },
|
|
evmInterface: { cases: ["tests/boundary/mcp/evmInterfaceMcp.test.ts"] },
|
|
firmwareAnalysis: { cases: ["tests/boundary/mcp/firmwareMcp.test.ts"] },
|
|
firmwareVectorTable: {
|
|
cases: ["tests/boundary/mcp/firmwareVectorTableMcpCli.test.ts"],
|
|
},
|
|
uefiAnalysis: { cases: ["tests/acceptance/uefiFirmware.test.ts"] },
|
|
flutter: { cases: ["tests/boundary/cli/flutterCli.test.ts"] },
|
|
fridaInstrumentation: { cases: ["tests/boundary/cli/fridaCli.test.ts"] },
|
|
gdbSessions: { cases: ["tests/boundary/cli/gdbStartupCleanupCli.test.ts"] },
|
|
ghidra: { cases: ["tests/boundary/mcp/ghidraInventoryMcp.test.ts"] },
|
|
goBinary: { cases: ["tests/acceptance/goBinaryCli.test.ts"] },
|
|
gpuCodeObjects: { cases: ["tests/acceptance/gpuCodeObjectsCli.test.ts"] },
|
|
harmonyApplicationGraph: {
|
|
cases: ["tests/boundary/mcp/mobileApplicationGraphMcp.test.ts"],
|
|
},
|
|
hopper: { cases: ["tests/boundary/cli/hopperLaunchFailureCli.test.ts"] },
|
|
ida: { cases: ["tests/boundary/cli/idaStartupAttributionCli.test.ts"] },
|
|
il2cppMetadata: { cases: ["tests/acceptance/il2cppMetadataCli.test.ts"] },
|
|
javascriptApplication: {
|
|
cases: [
|
|
"tests/acceptance/applications/analyzeJavaScriptDeliveryCli.test.ts",
|
|
],
|
|
},
|
|
javascriptRecovery: {
|
|
cases: ["tests/boundary/mcp/javascriptRecoveryMcp.test.ts"],
|
|
},
|
|
javascriptRuntimeObservation: {
|
|
cases: ["tests/boundary/mcp/javascriptRuntimeObservationMcp.test.ts"],
|
|
},
|
|
javascriptRuntimeReconciliation: {
|
|
cases: [
|
|
"tests/acceptance/applications/javascriptNodeTargetReconciliationCli.test.ts",
|
|
],
|
|
},
|
|
jeb: { cases: ["tests/boundary/cli/jebCli.test.ts"] },
|
|
kernelBuildConfig: {
|
|
cases: ["tests/acceptance/kernelBuildConfigCli.test.ts"],
|
|
},
|
|
kernelModule: { cases: ["tests/acceptance/kernelModuleCli.test.ts"] },
|
|
kuna: { cases: ["tests/boundary/mcp/kunaCloseRetryMcp.test.ts"] },
|
|
labviewArtifact: { cases: ["tests/boundary/cli/labviewRsrcCli.test.ts"] },
|
|
managedStatic: { cases: ["tests/acceptance/managedCliOutput.test.ts"] },
|
|
managedWorkflow: {
|
|
cases: ["tests/boundary/mcp/managedWorkflowUnknownIdentityMcp.test.ts"],
|
|
},
|
|
mavenGradleMetadata: {
|
|
cases: ["tests/acceptance/mavenGradleMetadataCli.test.ts"],
|
|
},
|
|
modelArtifact: { cases: ["tests/acceptance/modelArtifactCli.test.ts"] },
|
|
nativeExports: {
|
|
cases: [
|
|
"tests/acceptance/applications/nativeExportsDynamicSegment.test.ts",
|
|
],
|
|
},
|
|
nativeInitializers: {
|
|
cases: ["tests/acceptance/nativeInitializersCli.test.ts"],
|
|
},
|
|
nativeMacOS: {
|
|
cases: ["tests/acceptance/nativeMachoParenthesizedCli.test.ts"],
|
|
},
|
|
packetCapture: { cases: ["tests/boundary/mcp/packetCaptureMcp.test.ts"] },
|
|
pcap: { cases: ["tests/acceptance/pcapCredentialErrorsCliMcp.test.ts"] },
|
|
peCertificates: { cases: ["tests/acceptance/peCertificatesCli.test.ts"] },
|
|
peImports: { cases: ["tests/acceptance/peImportsCli.test.ts"] },
|
|
peLoadConfig: { cases: ["tests/acceptance/peLoadConfigCli.test.ts"] },
|
|
peUnwindRanges: { cases: ["tests/acceptance/peUnwindRangesCli.test.ts"] },
|
|
machoFunctionStarts: {
|
|
cases: ["tests/acceptance/machoFunctionStartsCli.test.ts"],
|
|
},
|
|
peOverlay: { cases: ["tests/acceptance/peOverlayCli.test.ts"] },
|
|
peResources: { cases: ["tests/acceptance/applications/peResources.test.ts"] },
|
|
nugetNupkg: { cases: ["tests/acceptance/nugetNupkgCli.test.ts"] },
|
|
vsixPackage: { cases: ["tests/acceptance/vsixPackageCli.test.ts"] },
|
|
ociImageLayout: { cases: ["tests/acceptance/ociImageLayoutCli.test.ts"] },
|
|
pythonPyc: { cases: ["tests/acceptance/pythonPycCli.test.ts"] },
|
|
recordedCrash: { cases: ["tests/boundary/mcp/recordedCrashMcp.test.ts"] },
|
|
releaseExposure: { cases: ["tests/acceptance/releaseExposureCli.test.ts"] },
|
|
reverseEngineering: {
|
|
cases: ["tests/boundary/mcp/reverseEngineeringEnvironmentMcp.test.ts"],
|
|
},
|
|
rizinDebugSessions: {
|
|
cases: ["tests/boundary/mcp/rizinDebuggerCancellationMcp.test.ts"],
|
|
},
|
|
rustBinary: { cases: ["tests/acceptance/rustBinaryCli.test.ts"] },
|
|
signalRecording: { cases: ["tests/boundary/mcp/signalRecordingMcp.test.ts"] },
|
|
sqliteDatabase: { cases: ["tests/acceptance/sqliteDatabaseCli.test.ts"] },
|
|
v8CodeCache: { cases: ["tests/acceptance/v8CodeCacheCli.test.ts"] },
|
|
wasmArtifact: { cases: ["tests/boundary/mcp/wasmArtifactMcp.test.ts"] },
|
|
webModuleTrace: { cases: ["tests/boundary/mcp/webModuleTraceMcp.test.ts"] },
|
|
webNetworkCapture: {
|
|
cases: ["tests/boundary/mcp/webNetworkCaptureMcp.test.ts"],
|
|
},
|
|
webRuntime: { cases: ["tests/acceptance/webRuntimeCli.test.ts"] },
|
|
webScriptExport: {
|
|
cases: ["tests/acceptance/applications/webScriptPortablePathsCli.test.ts"],
|
|
},
|
|
webSourceLocation: {
|
|
cases: ["tests/acceptance/webSourceLocationCli.test.ts"],
|
|
},
|
|
windowsShortcut: { cases: ["tests/acceptance/windowsShortcutCli.test.ts"] },
|
|
yaraMatches: {
|
|
cases: [
|
|
"tests/acceptance/yaraMatchesCli.test.ts",
|
|
"tests/boundary/mcp/yaraMatchesMcp.test.ts",
|
|
],
|
|
},
|
|
};
|