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
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user