perf(schema): reduce retained integer validator allocations (#4360)

Construct integer formats directly while preserving bounds, refinements, metadata and current shared schema owners. Keep Incur-dependent CLI numeric coercion declarations unchanged.

Verify canonical advertisements, 126 numeric boundary cases, 974 actual CLI parser cases, broad source tests and real public-artifact SDK workflows. Record 72 normal tasks and 12 separate owned-inspector heap diagnostics with whole-family resource bounds; distinguish SDK spans and asymmetric audit overhead. Generate numerical report sections from receipts and reject stale tables through documentation conformance checks.

Closes #6236. Current-head CI and Greptile pass; actionable review findings are addressed. Codex review was unavailable due repository usage limits.
This commit is contained in:
郭立 Guo Li authored and GitHub committed 2026-10-22 05:11:08 +00:00
1 parent bd5d189a8f
commit 7590b50801
182 files changed
+9562 -1329

No files matched your search

@@ -183,8 +183,8 @@ const comparisonItemSchema = z.union([
const comparisonCoverageSchema = z.strictObject({
left_graph_status: z.enum(["complete", "partial", "unknown", "unavailable"]),
right_graph_status: z.enum(["complete", "partial", "unknown", "unavailable"]),
left_graph_omitted_count: z.number().int().min(0).nullable(),
right_graph_omitted_count: z.number().int().min(0).nullable(),
left_graph_omitted_count: z.int().min(0).nullable(),
right_graph_omitted_count: z.int().min(0).nullable(),
status: z.enum(["complete-within-inputs", "partial", "truncated"]),
});
@@ -203,21 +203,21 @@ export const applicationVersionComparisonResultSchema = z
root_artifact_sha256: z.string().regex(/^[a-f0-9]{64}$/u),
}),
summary: z.strictObject({
unchanged: z.number().int().min(0),
added: z.number().int().min(0),
removed: z.number().int().min(0),
changed: z.number().int().min(0),
unknown: z.number().int().min(0),
unchanged: z.int().min(0),
added: z.int().min(0),
removed: z.int().min(0),
changed: z.int().min(0),
unknown: z.int().min(0),
}),
matching: z.strictObject({
exact_node_identity: z.number().int().min(0),
exact_content_digest: z.number().int().min(0),
exact_module_source_digest: z.number().int().min(0),
source_map_identity: z.number().int().min(0),
structural_fingerprint: z.number().int().min(0),
semantic_key: z.number().int().min(0),
ambiguous: z.number().int().min(0),
unmatched: z.number().int().min(0),
exact_node_identity: z.int().min(0),
exact_content_digest: z.int().min(0),
exact_module_source_digest: z.int().min(0),
source_map_identity: z.int().min(0),
structural_fingerprint: z.int().min(0),
semantic_key: z.int().min(0),
ambiguous: z.int().min(0),
unmatched: z.int().min(0),
}),
items: z.array(comparisonItemSchema),
graph: javascriptApplicationGraphSchema,