mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 11:43:20 +00:00
refactor(domain): name known coverage once and derive local coverage enums from it (#11428)
* refactor(domain): name known coverage once and derive six native coverage enums from it knownCoverageStatusSchema in src/domain/coverage.ts replaces the four per-domain coverageStatusSchema.exclude(["unknown"]) copies (Android, Flutter, GPU, model) and six plain ["complete", "partial"] enums in native reports (Apple IPS, PE certificates and imports, Windows shortcuts, native call observation, NativeAOT metadata recovery). Advertised schemas are unchanged. local-completeness-enum: 91 -> 85. * refactor(domain): use the shared known coverage schema for ADB device analysis * refactor(domain): derive pcap, firmware, Apktool, JEB and WASM interface coverage from known coverage (#11430) Each producer decides coverage from what it examined (dissected-field gaps, unpublished firmware entries, string-table facts, a short JEB unit page, a WABT budget stop), so none reports unknown. Advertised schemas are unchanged. local-completeness-enum: 85 -> 79. * refactor(domain): derive eleven checked coverage enums from known coverage (#11438) * refactor(domain): derive eleven checked coverage enums from known coverage * refactor(domain): derive coverage-plus-outcome enums from the coverage owner (#11440)
This commit is contained in:
1 parent
47c252f527
commit
62d6cfac92
45 files changed
+158
-141
No files matched your search
@@ -2,60 +2,28 @@
|
||||
"src/contracts/cutterToolContracts.ts": 1,
|
||||
"src/contracts/rizinDebugToolContracts.ts": 1,
|
||||
"src/cutter/CutterBridgeClient.ts": 2,
|
||||
"src/domain/analysisView/analysisViewResult.ts": 1,
|
||||
"src/domain/analysisView/browserScenarioViewSchemas.ts": 1,
|
||||
"src/domain/analysisView/goBinaryView.ts": 1,
|
||||
"src/domain/analysisView/rustBinaryView.ts": 1,
|
||||
"src/domain/analysisView/webNetworkCaptureView.ts": 1,
|
||||
"src/domain/android/androidManifestComponents.ts": 1,
|
||||
"src/domain/apiContract/graphqlContract.ts": 2,
|
||||
"src/domain/apktool/apktoolResourceAnalysis.ts": 2,
|
||||
"src/domain/apple/dylibResolution.ts": 1,
|
||||
"src/domain/artifactFormatMetadata.ts": 3,
|
||||
"src/domain/artifactGraph.ts": 2,
|
||||
"src/domain/bridgeCandidateProjection.ts": 1,
|
||||
"src/domain/commandObservation.ts": 2,
|
||||
"src/domain/evidenceRecordSummary.ts": 1,
|
||||
"src/domain/firmware/firmwareAnalysis.ts": 1,
|
||||
"src/domain/gpu/gpuCodeObjects.ts": 1,
|
||||
"src/domain/javascript/electronActiveObservation.ts": 1,
|
||||
"src/domain/javascript/javascriptExportShapeComparisonSchemas.ts": 2,
|
||||
"src/domain/javascript/javascriptFeatureTraceSchemas.ts": 2,
|
||||
"src/domain/javascript/javascriptRecovery.ts": 1,
|
||||
"src/domain/javascript/javascriptRouteInventory.ts": 2,
|
||||
"src/domain/javascript/javascriptSemanticGraphSchemas.ts": 3,
|
||||
"src/domain/javascript/javascriptSemanticQuerySchemas.ts": 1,
|
||||
"src/domain/javascript/javascriptExportShapeComparisonSchemas.ts": 1,
|
||||
"src/domain/javascript/javascriptRouteInventory.ts": 1,
|
||||
"src/domain/javascript/javascriptStaticCoverage.ts": 1,
|
||||
"src/domain/javascript/sourceToBundleComparisonSchemas.ts": 1,
|
||||
"src/domain/javascript/staticObservedEndpointSchemas.ts": 1,
|
||||
"src/domain/jeb/jebAnalysis.ts": 1,
|
||||
"src/domain/managed/managedArtifact.ts": 4,
|
||||
"src/domain/managed/managedArtifact.ts": 2,
|
||||
"src/domain/managed/managedMemberComparison.ts": 1,
|
||||
"src/domain/managed/managedNativeVerificationSchemas.ts": 1,
|
||||
"src/domain/managed/managedReconstruction.ts": 1,
|
||||
"src/domain/model/modelArtifact.ts": 1,
|
||||
"src/domain/native/appleIps.ts": 1,
|
||||
"src/domain/native/elfUnwindRanges.ts": 1,
|
||||
"src/domain/native/kernelBuildConfig.ts": 1,
|
||||
"src/domain/native/kernelModule.ts": 1,
|
||||
"src/domain/native/nativeCallObservation.ts": 1,
|
||||
"src/domain/native/nativeExports.ts": 1,
|
||||
"src/domain/native/nativeInitializers.ts": 1,
|
||||
"src/domain/native/nativeInvestigationGraph.ts": 1,
|
||||
"src/domain/native/nativeMetadataRecovery.ts": 2,
|
||||
"src/domain/native/objcSwiftMetadata.ts": 1,
|
||||
"src/domain/native/peCertificates.ts": 1,
|
||||
"src/domain/native/peImports.ts": 1,
|
||||
"src/domain/native/windowsShortcut.ts": 1,
|
||||
"src/domain/pcap/pcapAnalysis.ts": 1,
|
||||
"src/domain/reconstructionObligationLedgerSchemas.ts": 1,
|
||||
"src/domain/sqlite/sqliteDatabase.ts": 1,
|
||||
"src/domain/wasm/wasmArtifact.ts": 2,
|
||||
"src/domain/wasm/wasmInterface.ts": 1,
|
||||
"src/domain/webBundleAnalysis.ts": 2,
|
||||
"src/domain/webNetworkCapture.ts": 1,
|
||||
"src/domain/windows/ntfsMftAttributes.ts": 1,
|
||||
"src/ghidra/extensions/GhidraExtensions.ts": 1,
|
||||
"src/ghidra/extensions/nativeaot/NativeAotReport.ts": 1,
|
||||
"src/javascript/analysis/JavaScriptAnalysisWorkerSchemas.ts": 2
|
||||
"src/domain/wasm/wasmArtifact.ts": 1,
|
||||
"src/domain/windows/ntfsMftAttributes.ts": 1
|
||||
}
|
||||
@@ -5,11 +5,11 @@ import {
|
||||
childNodes,
|
||||
isManifestElement,
|
||||
} from "./AndroidManifestXml.js";
|
||||
import type { KnownCoverageStatus } from "../domain/coverage.js";
|
||||
import { createAndroidManifestDetailsReader } from "./AndroidManifestComponentDetails.js";
|
||||
import {
|
||||
ANDROID_COMPONENT_KINDS,
|
||||
type AndroidComponentKind,
|
||||
type AndroidCoverage,
|
||||
type AndroidManifestComponent,
|
||||
type AndroidManifestComponentInventory,
|
||||
} from "../domain/android/androidManifestComponents.js";
|
||||
@@ -150,7 +150,7 @@ const providerAuthorities = (
|
||||
*/
|
||||
export const parseAndroidManifestComponents = (
|
||||
manifestText: string,
|
||||
coverage: AndroidCoverage,
|
||||
coverage: KnownCoverageStatus,
|
||||
declaredTargetSdk: string | null = null,
|
||||
minimumSdk: string | null = null,
|
||||
): AndroidManifestComponentInventory => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
adbTransportIdSchema,
|
||||
} from "./adbTransportIdentity.js";
|
||||
import { z } from "zod";
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { localPathStringSchema } from "../localPath.js";
|
||||
import { IDENTIFIER_PATTERN } from "../stringPatterns.js";
|
||||
|
||||
@@ -483,7 +483,6 @@ export const adbRequestSchema = z.discriminatedUnion("operation", [
|
||||
* ADB results report known coverage: each operation counts the lines it could
|
||||
* not parse and the items it could not fetch, so it never reports `unknown`.
|
||||
*/
|
||||
const adbCoverageSchema = coverageStatusSchema.exclude(["unknown"]);
|
||||
|
||||
const client = z.strictObject({
|
||||
binary_path: z.string().min(1),
|
||||
@@ -659,7 +658,7 @@ export const adbResultSchemas = {
|
||||
}),
|
||||
),
|
||||
unparsed_lines: z.array(z.string().min(1)),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
pull_adb_package: z.strictObject({
|
||||
client,
|
||||
@@ -668,7 +667,7 @@ export const adbResultSchemas = {
|
||||
output_directory: z.string().min(1),
|
||||
artifacts: z.array(pulledArtifact),
|
||||
failures: z.array(pullFailure),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
read_adb_logcat: z.strictObject({
|
||||
client,
|
||||
@@ -678,7 +677,7 @@ export const adbResultSchemas = {
|
||||
pid: z.int().positive().nullable(),
|
||||
lines: z.array(z.string()),
|
||||
total_bytes: z.int().nonnegative(),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
inspect_adb_package: z.strictObject({
|
||||
client,
|
||||
@@ -699,7 +698,7 @@ export const adbResultSchemas = {
|
||||
pkg_flags: z.string().nullable(),
|
||||
requested_permissions_count: z.int().nonnegative().nullable(),
|
||||
numeric_issues: adbPackageNumericIssuesSchema,
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
pull_adb_file: z.strictObject({
|
||||
client,
|
||||
@@ -747,7 +746,7 @@ export const adbResultSchemas = {
|
||||
}),
|
||||
),
|
||||
unparsed_lines: z.array(z.string().min(1)),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
list_adb_directory: z.strictObject({
|
||||
client,
|
||||
@@ -766,7 +765,7 @@ export const adbResultSchemas = {
|
||||
}),
|
||||
),
|
||||
unparsed_lines: z.array(z.string().min(1)),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
list_adb_features: z.strictObject({
|
||||
client,
|
||||
@@ -778,7 +777,7 @@ export const adbResultSchemas = {
|
||||
}),
|
||||
),
|
||||
unparsed_lines: z.array(z.string().min(1)),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
list_adb_services: z.strictObject({
|
||||
client,
|
||||
@@ -790,7 +789,7 @@ export const adbResultSchemas = {
|
||||
}),
|
||||
),
|
||||
unparsed_lines: z.array(z.string().min(1)),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
inspect_adb_display: z.strictObject({
|
||||
client,
|
||||
@@ -808,7 +807,7 @@ export const adbResultSchemas = {
|
||||
physical_density: z.int().positive().nullable(),
|
||||
override_density: z.int().positive().nullable(),
|
||||
numeric_issues: adbDisplayNumericIssuesSchema,
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
inspect_adb_window: z.strictObject({
|
||||
client,
|
||||
@@ -848,7 +847,7 @@ export const adbResultSchemas = {
|
||||
),
|
||||
exact_match: z.boolean(),
|
||||
unparsed_lines: z.array(z.string().min(1)),
|
||||
coverage: adbCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
install_adb_package: z.strictObject({
|
||||
client,
|
||||
|
||||
@@ -177,6 +177,7 @@ import {
|
||||
nativeInventoryOperationSchema,
|
||||
} from "../native/nativeInventory.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import {
|
||||
browserScenarioSummarySchema,
|
||||
browserScenarioViewContextSchema,
|
||||
@@ -1492,7 +1493,7 @@ export const analysisViewResultSchema = z.discriminatedUnion("kind", [
|
||||
kind: z.literal("pcap"),
|
||||
view: pcapViewRequestSchema,
|
||||
page: pcapViewPageSchema,
|
||||
source_coverage: z.enum(["complete", "partial"]),
|
||||
source_coverage: knownCoverageStatusSchema,
|
||||
...viewResultBase,
|
||||
parent_operation: z.literal("inspect_pcap_capture"),
|
||||
}),
|
||||
|
||||
@@ -3,10 +3,8 @@ import {
|
||||
absoluteLocalPathStringSchema,
|
||||
localPathStringSchema,
|
||||
} from "../localPath.js";
|
||||
import {
|
||||
androidCoverageSchema,
|
||||
androidManifestComponentsSchema,
|
||||
} from "./androidManifestComponents.js";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { androidManifestComponentsSchema } from "./androidManifestComponents.js";
|
||||
import {
|
||||
androidViewRequestSchema,
|
||||
validateAndroidPackageDelivery,
|
||||
@@ -148,7 +146,7 @@ export const androidRequestSchema = z.discriminatedUnion("operation", [
|
||||
]);
|
||||
|
||||
const textCoverage = z.strictObject({
|
||||
status: androidCoverageSchema,
|
||||
status: knownCoverageStatusSchema,
|
||||
text: z.string(),
|
||||
reported_total_bytes: z.int().nonnegative().nullable(),
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
/** Component declarations, not effective installation or runtime state. */
|
||||
export const ANDROID_COMPONENT_KINDS = [
|
||||
@@ -17,8 +17,6 @@ export type AndroidComponentKind = (typeof ANDROID_COMPONENT_KINDS)[number];
|
||||
* a parse failure, truncation or detail limit the producer observed, so they
|
||||
* never report `unknown`.
|
||||
*/
|
||||
export const androidCoverageSchema = coverageStatusSchema.exclude(["unknown"]);
|
||||
export type AndroidCoverage = z.infer<typeof androidCoverageSchema>;
|
||||
|
||||
export const androidManifestLocationSchema = z.strictObject({
|
||||
line: z.int().positive(),
|
||||
@@ -49,7 +47,7 @@ export const androidIntentFilterSchema = z.strictObject({
|
||||
actions: z.array(z.string()),
|
||||
categories: z.array(z.string()),
|
||||
data: z.array(androidIntentDataSchema),
|
||||
coverage: androidCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
});
|
||||
export const androidComponentMetadataSchema = z.strictObject({
|
||||
name: z.string().nullable(),
|
||||
@@ -70,7 +68,7 @@ export const androidManifestComponentSchema = z.strictObject({
|
||||
foreground_service_type: z.string().nullable(),
|
||||
authorities: z.array(z.string()).nullable(),
|
||||
target_activity: z.string().nullable(),
|
||||
declaration_coverage: androidCoverageSchema,
|
||||
declaration_coverage: knownCoverageStatusSchema,
|
||||
declaration_index: z.int().nonnegative(),
|
||||
location: androidManifestLocationSchema.nullable(),
|
||||
enabled: z.boolean().nullable(),
|
||||
@@ -85,7 +83,7 @@ export type AndroidManifestComponent = Readonly<
|
||||
z.output<typeof androidManifestComponentSchema>
|
||||
>;
|
||||
export const androidManifestComponentsSchema = z.strictObject({
|
||||
status: z.enum(["complete", "partial", "unavailable"]),
|
||||
status: z.enum([...knownCoverageStatusSchema.options, "unavailable"]),
|
||||
items: z.array(androidManifestComponentSchema),
|
||||
limitations: z.array(z.string()),
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { digestSchema, prefixedDigestSchema } from "../digests.js";
|
||||
import { apiContractArtifactSchema } from "./apiContract.js";
|
||||
|
||||
@@ -125,9 +126,16 @@ export const graphqlContractSchema = z.strictObject({
|
||||
}),
|
||||
source_coverage: z.strictObject({
|
||||
status: z.enum(["complete-within-scope", "partial"]),
|
||||
schema_declarations: z.enum(["complete", "partial", "unavailable"]),
|
||||
schema_declarations: z.enum([
|
||||
...knownCoverageStatusSchema.options,
|
||||
"unavailable",
|
||||
]),
|
||||
schema_model: z.enum(["constructed", "unavailable"]),
|
||||
operations: z.enum(["complete", "partial", "unavailable", "not-supplied"]),
|
||||
operations: z.enum([
|
||||
...knownCoverageStatusSchema.options,
|
||||
"unavailable",
|
||||
"not-supplied",
|
||||
]),
|
||||
operation_validation: z.literal("field-resolution-only"),
|
||||
endpoint_behavior: z.literal("unknown"),
|
||||
}),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { timerDurationMsSchema } from "../analysisResourceLimits.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { localPathStringSchema } from "../localPath.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
|
||||
@@ -229,7 +230,7 @@ export const stringTableSchema = z.strictObject({
|
||||
.describe(
|
||||
"Selected valid-entry page, present for explicit string selection/budgets when the table was examined. next_offset is null at the end; otherwise retry that offset against the same APK digest and locale. If next_offset equals offset, raise max_total_strings or use string_tables_only before retrying. Table coverage still describes the entire table.",
|
||||
),
|
||||
coverage: z.enum(["complete", "partial"]),
|
||||
coverage: knownCoverageStatusSchema,
|
||||
});
|
||||
|
||||
export type StringTable = z.infer<typeof stringTableSchema>;
|
||||
@@ -278,7 +279,7 @@ export const apktoolResultSchemas = {
|
||||
"Selected decoded table facts, included when locales is supplied, string_tables_only is true, or an explicit string page or budget is requested. Empty when included with include_strings false.",
|
||||
),
|
||||
decoded_file_count: z.int().nonnegative(),
|
||||
coverage: z.enum(["complete", "partial"]),
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { machoArchitectureFamily } from "./machoCpuIdentity.js";
|
||||
import { cancelledBy } from "../analysisErrorCore.js";
|
||||
|
||||
@@ -229,7 +230,7 @@ export const dylibResolutionResultSchema = z.strictObject({
|
||||
edges: z.array(edgeSchema),
|
||||
findings: z.array(findingSchema),
|
||||
coverage: z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
unparsed_images: z.array(z.string()),
|
||||
roots_without_architecture: z.array(z.string()),
|
||||
}),
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "./coverage.js";
|
||||
|
||||
/** Coverage metadata for the bounded projection of candidate relationships. */
|
||||
export const bridgeCandidateCoverageSchema = z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
total_candidates: z.int().nonnegative(),
|
||||
emitted_candidates: z.int().nonnegative(),
|
||||
omitted_candidates: z.int().nonnegative(),
|
||||
|
||||
@@ -9,6 +9,15 @@ import { z } from "zod";
|
||||
export const coverageStatusSchema = z.enum(["complete", "partial", "unknown"]);
|
||||
export type CoverageStatus = z.infer<typeof coverageStatusSchema>;
|
||||
|
||||
/**
|
||||
* Coverage of a producer that always decides it from what it examined, so it
|
||||
* never reports `unknown`.
|
||||
*/
|
||||
export const knownCoverageStatusSchema = coverageStatusSchema.exclude([
|
||||
"unknown",
|
||||
]);
|
||||
export type KnownCoverageStatus = z.infer<typeof knownCoverageStatusSchema>;
|
||||
|
||||
/**
|
||||
* Fold the coverage of the inputs a result depends on. Unknown wins: one input
|
||||
* that cannot tell makes the whole unknown, even beside a known gap. Otherwise
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { timerDurationMsSchema } from "../analysisResourceLimits.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { jsonValueSchema, type JsonValue } from "../jsonValue.js";
|
||||
import { absoluteLocalPathStringSchema } from "../localPath.js";
|
||||
@@ -171,7 +172,7 @@ export const firmwareResultSchemas = {
|
||||
engine,
|
||||
selection,
|
||||
output_directory: z.string(),
|
||||
coverage: z.enum(["complete", "partial"]),
|
||||
coverage: knownCoverageStatusSchema,
|
||||
files: z.array(
|
||||
z.strictObject({
|
||||
// Producer-relative identity retains source spelling; `path` identifies
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import { maxCodePoints } from "../schemaConstraints.js";
|
||||
import { localPathStringSchema } from "../localPath.js";
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
|
||||
/** Full logical ZIP path budget, enforced by Flutter library inventory. */
|
||||
@@ -84,7 +84,6 @@ export const dartPoolPolicy = (
|
||||
* the failures, caps and disagreements it recorded, so it never reports
|
||||
* `unknown`.
|
||||
*/
|
||||
const flutterCoverageSchema = coverageStatusSchema.exclude(["unknown"]);
|
||||
|
||||
export const flutterInputSchemas = {
|
||||
identify_flutter_build: z.strictObject({
|
||||
@@ -194,7 +193,7 @@ export const flutterResultSchemas = {
|
||||
}),
|
||||
}),
|
||||
),
|
||||
coverage: flutterCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
inspect_dart_aot: z.strictObject({
|
||||
target: z.strictObject({
|
||||
@@ -204,7 +203,7 @@ export const flutterResultSchemas = {
|
||||
}),
|
||||
abi: z.string().min(1),
|
||||
libapp: z.strictObject({
|
||||
coverage: flutterCoverageSchema.describe(
|
||||
coverage: knownCoverageStatusSchema.describe(
|
||||
"Coverage of ELF symbols, independent data headers, AOT kind, extents and agreeing hashes",
|
||||
),
|
||||
bytes: z.int().nonnegative(),
|
||||
@@ -232,7 +231,7 @@ export const flutterResultSchemas = {
|
||||
}),
|
||||
string_pool: z.strictObject({
|
||||
policy: dartPoolPolicySchema.describe("Effective selection and budgets"),
|
||||
coverage: flutterCoverageSchema.describe(
|
||||
coverage: knownCoverageStatusSchema.describe(
|
||||
"Coverage of the bounded printable-run projection; independent of snapshot header validity",
|
||||
),
|
||||
/** Distinct package: source URIs, sorted, bounded. */
|
||||
@@ -246,6 +245,6 @@ export const flutterResultSchemas = {
|
||||
class_like_token_count_at_least: z.int().nonnegative(),
|
||||
printable_run_count: z.int().nonnegative(),
|
||||
}),
|
||||
coverage: flutterCoverageSchema,
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
} as const;
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import { createHash } from "node:crypto";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import {
|
||||
absoluteLocalPathStringSchema,
|
||||
localPathStringSchema,
|
||||
@@ -12,8 +12,6 @@ const count = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
||||
* producers derive `partial` from the gaps they recorded, so they never
|
||||
* report `unknown`.
|
||||
*/
|
||||
export const gpuCoverageSchema = coverageStatusSchema.exclude(["unknown"]);
|
||||
export type GpuCoverage = z.infer<typeof gpuCoverageSchema>;
|
||||
export const gpuLocationSchema = z.strictObject({
|
||||
container_id: z.string().nullable(),
|
||||
offset: count,
|
||||
@@ -48,7 +46,7 @@ export const gpuObjectSchema = z.strictObject({
|
||||
flags: z.string().regex(/^0x[0-9a-f]{8}$/u),
|
||||
processor: z.string().nullable(),
|
||||
header_location: gpuLocationSchema,
|
||||
note_coverage: gpuCoverageSchema.describe(
|
||||
note_coverage: knownCoverageStatusSchema.describe(
|
||||
"Complete only after all declared ELF note sections were examined within supported AMD metadata coverage; partial retains only examined facts.",
|
||||
),
|
||||
notes: z.array(
|
||||
@@ -181,8 +179,8 @@ export const gpuCodeObjectsObjectSchema = z.strictObject({
|
||||
discovery_scope: z.literal(
|
||||
"supported-section-names-and-standalone-formats",
|
||||
),
|
||||
discovery: gpuCoverageSchema,
|
||||
payloads: z.enum(["not-requested", ...gpuCoverageSchema.options]),
|
||||
discovery: knownCoverageStatusSchema,
|
||||
payloads: z.enum(["not-requested", ...knownCoverageStatusSchema.options]),
|
||||
examined_sections: count,
|
||||
unknown_section_names: count,
|
||||
}),
|
||||
@@ -367,7 +365,10 @@ export const gpuTargetSchema = z.strictObject({
|
||||
.string()
|
||||
.regex(/^(?:0|[1-9][0-9]*)$/u)
|
||||
.nullable(),
|
||||
kernel_coverage: z.enum(["not-requested", ...gpuCoverageSchema.options]),
|
||||
kernel_coverage: z.enum([
|
||||
"not-requested",
|
||||
...knownCoverageStatusSchema.options,
|
||||
]),
|
||||
by_kind: z.strictObject({
|
||||
ptx: count,
|
||||
cubin: count,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import { javascriptSourceRangeSchema } from "./javascriptSourceCoordinates.js";
|
||||
|
||||
@@ -266,7 +267,7 @@ export const javaScriptExportShapeComparisonChangeSchema = z.strictObject({
|
||||
|
||||
const inventoryPropertyCoverageSchema = z.strictObject({
|
||||
path: jsonPointerSchema,
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
});
|
||||
|
||||
const propertyInventorySchema = z.strictObject({
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import { evidenceSchema, providerSchema } from "../evidence.js";
|
||||
import { javascriptApplicationGraphSchema } from "./javascriptApplicationGraph.js";
|
||||
@@ -170,12 +171,7 @@ export const applicationFeatureTraceResultSchema = z.strictObject({
|
||||
semantic_discovery: z
|
||||
.strictObject({
|
||||
source_graph_id: prefixedDigestSchema("jsrg"),
|
||||
source_coverage: z.enum([
|
||||
"complete",
|
||||
"partial",
|
||||
"unknown",
|
||||
"unavailable",
|
||||
]),
|
||||
source_coverage: z.enum([...coverageStatusSchema.options, "unavailable"]),
|
||||
total: z.int().nonnegative(),
|
||||
offset: z.int().nonnegative(),
|
||||
limit: z.int().positive(),
|
||||
@@ -212,9 +208,7 @@ export const applicationFeatureTraceResultSchema = z.strictObject({
|
||||
coverage: z.strictObject({
|
||||
status: z.enum(["complete-within-source", "partial", "no-match"]),
|
||||
source_graph_status: z.enum([
|
||||
"complete",
|
||||
"partial",
|
||||
"unknown",
|
||||
...coverageStatusSchema.options,
|
||||
"unavailable",
|
||||
]),
|
||||
total_seed_matches: z.int().min(0),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { analyzeJavaScriptApplicationInputSchema } from "./javascriptApplicationAnalysis.js";
|
||||
import { absoluteLocalPathStringSchema } from "../localPath.js";
|
||||
@@ -65,7 +66,7 @@ export const javascriptRecoveryResultSchema = z.strictObject({
|
||||
rewrite_level:
|
||||
javascriptRecoveryInputSchema.shape.rewrite_level.removeDefault(),
|
||||
}),
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
detected_formats: z.array(z.string()),
|
||||
reported_safety: z.string(),
|
||||
reported_strategy: z.string(),
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
import {
|
||||
coverageStatusSchema,
|
||||
knownCoverageStatusSchema,
|
||||
} from "../coverage.js";
|
||||
import { javascriptSourceRangeSchema } from "./javascriptSourceCoordinates.js";
|
||||
import { digestCanonicalValue } from "../canonicalDigest.js";
|
||||
import { z } from "zod";
|
||||
@@ -104,7 +107,7 @@ const inventoryShape = z.strictObject({
|
||||
coverage: z.strictObject({
|
||||
scope: z.literal("provided-code-sources"),
|
||||
source_parsing: coverageStatusSchema,
|
||||
candidate_enumeration: z.enum(["complete", "partial"]),
|
||||
candidate_enumeration: knownCoverageStatusSchema,
|
||||
application_routes: z.literal("unknown"),
|
||||
}),
|
||||
statistics: z.strictObject({
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { z } from "zod";
|
||||
import {
|
||||
coverageStatusSchema,
|
||||
knownCoverageStatusSchema,
|
||||
} from "../coverage.js";
|
||||
|
||||
import { javascriptSourceRangeSchema } from "./javascriptSourceCoordinates.js";
|
||||
|
||||
@@ -313,7 +317,7 @@ const fingerprintComponentsSchema = z.strictObject({
|
||||
export const javaScriptSemanticFingerprintInputSchema = z.strictObject({
|
||||
function_node_id: semanticNodeIdSchema,
|
||||
algorithm: z.literal("rea.javascript-semantic-function"),
|
||||
status: z.enum(["complete", "partial", "unavailable"]),
|
||||
status: z.enum([...knownCoverageStatusSchema.options, "unavailable"]),
|
||||
components: fingerprintComponentsSchema,
|
||||
limitations: z.array(nonEmptyTextSchema),
|
||||
evidence: applicationGraphEvidenceSchema,
|
||||
@@ -329,14 +333,14 @@ export const javaScriptSemanticFingerprintSchema =
|
||||
|
||||
const familyCoverageSchema = z.strictObject({
|
||||
family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
|
||||
status: z.enum(["complete", "partial", "unknown", "unsupported"]),
|
||||
status: z.enum([...coverageStatusSchema.options, "unsupported"]),
|
||||
retained_relations: z.int().min(0),
|
||||
omitted_relations: z.int().min(0).nullable(),
|
||||
unknown_ids: z.array(semanticUnknownIdSchema),
|
||||
});
|
||||
|
||||
const graphCoverageSchema = z.strictObject({
|
||||
status: z.enum(["complete", "partial", "unknown", "unavailable"]),
|
||||
status: z.enum([...coverageStatusSchema.options, "unavailable"]),
|
||||
truncated: z.boolean(),
|
||||
omitted_unknown_occurrences:
|
||||
javaScriptSemanticUnknownOmissionsSchema.exactOptional(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import {
|
||||
JAVASCRIPT_SEMANTIC_NODE_KINDS,
|
||||
@@ -103,7 +104,7 @@ export const javaScriptSemanticQueryResultSchema = z.strictObject({
|
||||
relevant_unknowns: z.int().min(0),
|
||||
}),
|
||||
coverage: z.strictObject({
|
||||
status: z.enum(["complete", "partial", "unavailable"]),
|
||||
status: z.enum([...knownCoverageStatusSchema.options, "unavailable"]),
|
||||
}),
|
||||
limitations: z.array(z.string().min(1)),
|
||||
});
|
||||
|
||||
@@ -115,9 +115,7 @@ export const sourceToBundleComparisonResultSchema = z.strictObject({
|
||||
),
|
||||
reference_inventory_state: coverageStatusSchema,
|
||||
application_graph_status: z.enum([
|
||||
"complete",
|
||||
"partial",
|
||||
"unknown",
|
||||
...coverageStatusSchema.options,
|
||||
"unavailable",
|
||||
]),
|
||||
retained_source_files: z.int().min(0),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
import { digestSchema, prefixedDigestSchema } from "../digests.js";
|
||||
import { ROUTE_RULES } from "../analysisView/webNetworkRouteTemplates.js";
|
||||
|
||||
@@ -80,7 +81,7 @@ export const staticObservedEndpointComparisonSchema = z.strictObject({
|
||||
}),
|
||||
source_coverage: z.strictObject({
|
||||
application: z.strictObject({
|
||||
status: z.enum(["complete", "partial", "unknown", "unavailable"]),
|
||||
status: z.enum([...coverageStatusSchema.options, "unavailable"]),
|
||||
truncated: z.boolean(),
|
||||
omitted_count: z.int().nonnegative().nullable(),
|
||||
limit_count: z.int().nonnegative(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { localPathStringSchema } from "../localPath.js";
|
||||
|
||||
/**
|
||||
@@ -127,7 +128,7 @@ export const jebResultSchemas = {
|
||||
index: z.number().int().nonnegative(),
|
||||
count: z.number().int().positive(),
|
||||
units: z.array(unit),
|
||||
coverage: z.enum(["complete", "partial"]),
|
||||
coverage: knownCoverageStatusSchema,
|
||||
}),
|
||||
decompile_jeb_item: z.strictObject({
|
||||
engine,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import type { CoverageStatus } from "../coverage.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { managedFieldConstantSchema } from "./managedFieldConstant.js";
|
||||
@@ -12,8 +13,7 @@ const offsetSchema = z.int().min(0);
|
||||
* examined nothing of that kind, unlike `partial`, which records a known gap.
|
||||
*/
|
||||
export const managedInspectionStateSchema = z.enum([
|
||||
"complete",
|
||||
"partial",
|
||||
...knownCoverageStatusSchema.options,
|
||||
"unavailable",
|
||||
]);
|
||||
export type ManagedInspectionState = z.infer<
|
||||
@@ -581,7 +581,7 @@ export const managedMemberInspectionSchema = z
|
||||
// coverage. null means they were not examined, not that there were none.
|
||||
user_strings: z
|
||||
.object({
|
||||
state: z.enum(["complete", "partial"]),
|
||||
state: knownCoverageStatusSchema,
|
||||
literals: z.array(managedUserStringSchema),
|
||||
issues: z.array(managedParseIssueSchema),
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import { localPathStringSchema } from "../localPath.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { coverageStatusSchema } from "../coverage.js";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { jsonValueSchema } from "../jsonValue.js";
|
||||
|
||||
const count = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
||||
@@ -11,7 +11,6 @@ const decimal = z.string().regex(/^(?:0|[1-9][0-9]*)$/u);
|
||||
* the range and storage checks are derived from what was read, so they never
|
||||
* report `unknown`.
|
||||
*/
|
||||
const modelCoverageSchema = coverageStatusSchema.exclude(["unknown"]);
|
||||
|
||||
export const modelSourceSchema = z.strictObject({
|
||||
path: localPathStringSchema,
|
||||
@@ -82,8 +81,8 @@ export const modelArtifactObjectSchema = z.strictObject({
|
||||
header: z.literal("complete"),
|
||||
tensor_data: z.literal("not-interpreted"),
|
||||
array_values: z.enum(["complete", "preview"]),
|
||||
tensor_ranges: modelCoverageSchema,
|
||||
storage_sizes: modelCoverageSchema,
|
||||
tensor_ranges: knownCoverageStatusSchema,
|
||||
storage_sizes: knownCoverageStatusSchema,
|
||||
}),
|
||||
limitations: z.array(z.string()),
|
||||
});
|
||||
@@ -123,9 +122,9 @@ export const modelArtifactPartialSchema = z.strictObject({
|
||||
tensor_declarations: z.array(modelArtifactPartialTensorSchema),
|
||||
tensors: z.array(modelTensorSchema),
|
||||
coverage: z.strictObject({
|
||||
header: modelCoverageSchema,
|
||||
metadata: z.enum(["not-started", ...modelCoverageSchema.options]),
|
||||
tensors: z.enum(["not-started", ...modelCoverageSchema.options]),
|
||||
header: knownCoverageStatusSchema,
|
||||
metadata: z.enum(["not-started", ...knownCoverageStatusSchema.options]),
|
||||
tensors: z.enum(["not-started", ...knownCoverageStatusSchema.options]),
|
||||
}),
|
||||
limitations: z.array(z.string()),
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { FileSnapshotPartialObservation } from "../fileSnapshotObservation.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { absoluteLocalPathStringSchema } from "../localPath.js";
|
||||
@@ -264,7 +265,7 @@ const typeMismatchSchema = z.strictObject({
|
||||
});
|
||||
|
||||
const coverageSchema = z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
reason: z.string().min(1).nullable(),
|
||||
threads: uint,
|
||||
frames: uint,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { fixedTupleSchema } from "../fixedTupleSchema.js";
|
||||
@@ -274,7 +275,11 @@ export const kernelModuleSchema = z.strictObject({
|
||||
signature: signatureSchema.nullable(),
|
||||
coverage: z.strictObject({
|
||||
status: z
|
||||
.enum(["complete", "partial", "not_applicable", "unsupported"])
|
||||
.enum([
|
||||
...knownCoverageStatusSchema.options,
|
||||
"not_applicable",
|
||||
"unsupported",
|
||||
])
|
||||
.describe(
|
||||
"Whether the supported inspection examined the declared facts; omitted or undecodable facts make coverage partial.",
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import {
|
||||
nativeCallCaptureLimitsInputSchema,
|
||||
nativeCallCaptureLimitsSchema,
|
||||
@@ -234,7 +235,7 @@ export const nativeCallObservationResultSchema = z.strictObject({
|
||||
),
|
||||
events: z.array(nativeCallEventSchema),
|
||||
coverage: z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
event_limit_reached: z.boolean(),
|
||||
resource_limit_reached: z.boolean(),
|
||||
capture_limit: z.enum(["trace_bytes", "trace_frames"]).optional(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { isUtf8 } from "node:buffer";
|
||||
|
||||
import { absoluteLocalPathStringSchema } from "../localPath.js";
|
||||
@@ -108,7 +109,7 @@ const artifactSchema = z.strictObject({
|
||||
|
||||
const coverageSchema = z.strictObject({
|
||||
/** complete: every table entry was read; partial: issues name the gaps. */
|
||||
status: z.enum(["complete", "partial", "unsupported"]),
|
||||
status: z.enum([...knownCoverageStatusSchema.options, "unsupported"]),
|
||||
reason: z.string().min(1).nullable(),
|
||||
examined_entries: uint,
|
||||
exports: uint,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import {
|
||||
nativeMetadataEvidenceSchema,
|
||||
@@ -100,7 +101,11 @@ export type NativeInvestigationEdge = z.infer<
|
||||
/** Explicit inventory coverage so missing graph parts are not read as absent. */
|
||||
export const nativeInvestigationCoverageSchema = z.strictObject({
|
||||
facet: z.string().min(1),
|
||||
status: z.enum(["complete", "partial", "unsupported", "not_requested"]),
|
||||
status: z.enum([
|
||||
...knownCoverageStatusSchema.options,
|
||||
"unsupported",
|
||||
"not_requested",
|
||||
]),
|
||||
reason: z.string().nullable(),
|
||||
examined: z.int().nonnegative(),
|
||||
omitted: z.int().nonnegative(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { nativeAotReasonSchema } from "./nativeAotReason.js";
|
||||
|
||||
const address = z.string().regex(/^0x[0-9a-f]+$/u);
|
||||
@@ -9,7 +10,7 @@ export const nativeMetadataRecoverySchema = z.strictObject({
|
||||
format: z.literal("dotnet-nativeaot"),
|
||||
/** Identifies parser-only facts without claiming Ghidra defined a DataType. */
|
||||
source: z.enum(["analysis-database", "read-only-derived-overlay"]).optional(),
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
header_address: address,
|
||||
format_major: z.int().nonnegative(),
|
||||
format_minor: z.int().nonnegative(),
|
||||
@@ -51,7 +52,7 @@ export type NativeMetadataRecovery = z.infer<
|
||||
export const nativeMetadataRecoverySummarySchema = z.strictObject({
|
||||
format: z.literal("dotnet-nativeaot"),
|
||||
analysis_mode: z.literal("read-only-derived-overlay").optional(),
|
||||
status: z.enum(["complete", "partial", "not_applicable"]),
|
||||
status: z.enum([...knownCoverageStatusSchema.options, "not_applicable"]),
|
||||
// The read-only parser publishes a code. The optional Ghidra extension
|
||||
// still sends the historical string on not_applicable, unsupported, and
|
||||
// failed image summaries. Both shapes remain valid at this boundary.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { objcClassSymbol } from "../objcClassSymbol.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import {
|
||||
BINARY_ARCHITECTURES,
|
||||
type BinaryTarget,
|
||||
@@ -338,7 +339,11 @@ type SwiftSymbol = z.infer<typeof swiftSymbolSchema>;
|
||||
/** Per-facet coverage; empty arrays are meaningful only with this record. */
|
||||
export const nativeMetadataCoverageSchema = z.strictObject({
|
||||
facet: z.string().min(1),
|
||||
status: z.enum(["complete", "partial", "unsupported", "not_requested"]),
|
||||
status: z.enum([
|
||||
...knownCoverageStatusSchema.options,
|
||||
"unsupported",
|
||||
"not_requested",
|
||||
]),
|
||||
reason: z.string().nullable(),
|
||||
examined: z.int().nonnegative(),
|
||||
decoded: z.int().nonnegative(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { absoluteLocalPathStringSchema } from "../localPath.js";
|
||||
@@ -144,7 +145,7 @@ export const peCertificatesSchema = z.strictObject({
|
||||
.nullable(),
|
||||
entries: z.array(certificateEntrySchema),
|
||||
coverage: z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
examined_entries: uint,
|
||||
certificates: uint,
|
||||
}),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { absoluteLocalPathStringSchema } from "../localPath.js";
|
||||
@@ -113,7 +114,7 @@ const peImportIssueSchema = z.strictObject({
|
||||
});
|
||||
|
||||
const coverageSchema = z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
reason: z.string().min(1).nullable(),
|
||||
examined_dlls: uint,
|
||||
imports: uint,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { fixedTupleSchema } from "../fixedTupleSchema.js";
|
||||
@@ -291,7 +292,7 @@ const issueSchema = z.strictObject({
|
||||
});
|
||||
|
||||
const coverageSchema = z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
reason: z.string().min(1).nullable(),
|
||||
examined_id_list_items: uint,
|
||||
examined_extra_data_blocks: uint,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { localPathStringSchema } from "../localPath.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
|
||||
@@ -123,7 +124,7 @@ export const pcapResultSchemas = {
|
||||
unattributed_dns_addresses: z.array(z.string().min(1)),
|
||||
unattributed_dns_address_count: z.int().nonnegative(),
|
||||
unattributed_dns_packet_count: z.int().nonnegative(),
|
||||
coverage: z.enum(["complete", "partial"]),
|
||||
coverage: knownCoverageStatusSchema,
|
||||
diagnostics: z
|
||||
.strictObject({ capinfos_stderr: z.string(), tshark_stderr: z.string() })
|
||||
.optional(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "./coverage.js";
|
||||
|
||||
import { STABLE_IDENTIFIER_PATTERN } from "./stringPatterns.js";
|
||||
|
||||
@@ -310,7 +311,7 @@ export const reconstructionObligationLedgerSchema = z
|
||||
closure_digest: digestSchema,
|
||||
status: z.enum(["ready", "open", "failed", "unknown"]),
|
||||
coverage: z.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
}),
|
||||
summary: z.strictObject({
|
||||
total: z.int().min(0),
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
wasmInterfaceByteBudgetSchema,
|
||||
} from "./wasmInterface.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { createHash } from "node:crypto";
|
||||
import { constants as bufferConstants } from "node:buffer";
|
||||
import type { EvidenceSubjectTarget } from "../evidence.js";
|
||||
@@ -177,7 +178,7 @@ export const wasmArtifactSchema = z
|
||||
glue: z.array(
|
||||
z.strictObject({
|
||||
artifact,
|
||||
parse_status: z.enum(["complete", "partial", "failed"]),
|
||||
parse_status: z.enum([...knownCoverageStatusSchema.options, "failed"]),
|
||||
references: z.array(
|
||||
z.strictObject({
|
||||
value: z.string(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../coverage.js";
|
||||
import { constants as bufferConstants } from "node:buffer";
|
||||
|
||||
const kind = z.enum(["func", "table", "memory", "global", "tag", "unknown"]);
|
||||
@@ -48,7 +49,7 @@ const signature = z.discriminatedUnion("kind", [
|
||||
|
||||
/** Typed observations decoded once at the WABT producer boundary. */
|
||||
export const wasmInterfaceSchema = z.object({
|
||||
state: z.enum(["complete", "partial"]),
|
||||
state: knownCoverageStatusSchema,
|
||||
entries: z.array(
|
||||
z
|
||||
.object({
|
||||
|
||||
@@ -4,6 +4,7 @@ import { javaScriptSemanticPrecisionSchema } from "./javascript/javascriptSemant
|
||||
import { javaScriptRefusedPhaseSchema } from "./javascript/javascriptSemanticWorkAllowance.js";
|
||||
import { fetchedSourceMapLimitsSchema } from "./sourceMapLimits.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema, coverageStatusSchema } from "./coverage.js";
|
||||
import { browserExclusionSchema } from "./browserCompleteness.js";
|
||||
import { webPageInspectionSchema } from "./browserObservationSchemas.js";
|
||||
import { javaScriptRouteInventorySchema } from "./javascript/javascriptRouteInventory.js";
|
||||
@@ -493,7 +494,7 @@ export const webBundleAnalysisSchema = z.object({
|
||||
"Statically known own property names from the declared schema projection; a partial list may omit unresolved members.",
|
||||
),
|
||||
schema_property_names_coverage: z
|
||||
.enum(["complete", "partial", "unknown", "not_present"])
|
||||
.enum([...coverageStatusSchema.options, "not_present"])
|
||||
.describe(
|
||||
"Coverage of the schema property-name projection. Not a schema-validity result.",
|
||||
),
|
||||
@@ -533,7 +534,7 @@ export const webBundleAnalysisSchema = z.object({
|
||||
}),
|
||||
),
|
||||
completeness: z.object({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
parsed_scripts: z.int().min(0),
|
||||
parse_failures: z.int().min(0),
|
||||
visited_ast_nodes: z.int().min(0),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import { canonicalBase64Schema } from "./stringPatterns.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "./coverage.js";
|
||||
import {
|
||||
browserDeadlineIncrease,
|
||||
browserDeadlineRetry,
|
||||
@@ -311,7 +312,7 @@ export const webNetworkCaptureDecoderSchema = z.strictObject({
|
||||
/** Source coverage is shared by every offline decoder. */
|
||||
export const protobufCaptureCoverageSchema = z
|
||||
.strictObject({
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
selected_records: z.number().int().nonnegative(),
|
||||
inspected_records: z.number().int().nonnegative(),
|
||||
})
|
||||
|
||||
@@ -3,6 +3,7 @@ import { createHash } from "node:crypto";
|
||||
import { realpath, mkdir } from "node:fs/promises";
|
||||
import { isAbsolute, join } from "node:path";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../../domain/coverage.js";
|
||||
import type { AppConfig } from "../../config/types.js";
|
||||
import type { BinaryTarget } from "../../domain/binaryTargetTypes.js";
|
||||
import {
|
||||
@@ -43,8 +44,7 @@ export const ghidraExtensionResultSchema = z.strictObject({
|
||||
id: z.string().min(1),
|
||||
sha256: digest,
|
||||
status: z.enum([
|
||||
"complete",
|
||||
"partial",
|
||||
...knownCoverageStatusSchema.options,
|
||||
"not_applicable",
|
||||
"unsupported",
|
||||
"failed",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../../../domain/coverage.js";
|
||||
import type { GhidraExtensionResult } from "../GhidraExtensions.js";
|
||||
|
||||
const report = z
|
||||
@@ -8,8 +9,7 @@ const report = z
|
||||
source_revision: z.literal("effeb734fc570c32650f88b159608979dc7b423e"),
|
||||
source_revision_authority: z.literal("build-reported-unattested"),
|
||||
status: z.enum([
|
||||
"complete",
|
||||
"partial",
|
||||
...knownCoverageStatusSchema.options,
|
||||
"not_applicable",
|
||||
"unsupported",
|
||||
"failed",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { decodeStrictUtf8 } from "../domain/strictUtf8.js";
|
||||
import type { KnownCoverageStatus } from "../domain/coverage.js";
|
||||
import type {
|
||||
GpuCoverage,
|
||||
GpuCodeObjectsInput,
|
||||
GpuCodeObjects,
|
||||
GpuObject,
|
||||
@@ -66,7 +66,7 @@ export class GpuInventory {
|
||||
"Static declarations only; no GPU execution, SASS disassembly, host launch correlation or runtime compatibility was verified.",
|
||||
"Object IDs are positional identities scoped to artifact.sha256. Locations inside decoded objects name their containing object; they are not file offsets.",
|
||||
];
|
||||
discovery: GpuCoverage = "complete";
|
||||
discovery: KnownCoverageStatus = "complete";
|
||||
examined_sections = 0;
|
||||
unknown_section_names = 0;
|
||||
#factBytes = 0;
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
javaScriptSemanticEvidenceContextSchema,
|
||||
} from "../../domain/javascript/javascriptSemanticGraphSchemas.js";
|
||||
import { z } from "zod";
|
||||
import { knownCoverageStatusSchema } from "../../domain/coverage.js";
|
||||
import { digestSchema } from "../../domain/digests.js";
|
||||
import type { JavaScriptStaticAnalysis } from "../../domain/javascript/javascriptStaticAnalysisTypes.js";
|
||||
import { javaScriptRouteSourceFactsSchema } from "../../domain/javascript/javascriptRouteFacts.js";
|
||||
@@ -384,7 +385,7 @@ const referenceShape = {
|
||||
/** Exact producer facts recoverable before a later semantic worker failure. */
|
||||
export const javaScriptWorkerStaticAnalysisSchema = z
|
||||
.strictObject({
|
||||
parse_status: z.enum(["complete", "partial", "failed"]),
|
||||
parse_status: z.enum([...knownCoverageStatusSchema.options, "failed"]),
|
||||
analysis_coverage: javaScriptStaticCoverageSchema,
|
||||
routes: javaScriptRouteSourceFactsSchema.exactOptional(),
|
||||
parse_error_count: count,
|
||||
@@ -734,7 +735,7 @@ const callable = z.strictObject({
|
||||
),
|
||||
returnCoverage: z.strictObject({
|
||||
retainedCount: count,
|
||||
status: z.enum(["complete", "partial"]),
|
||||
status: knownCoverageStatusSchema,
|
||||
omittedCount: z.union([z.literal(0), z.null()]),
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user