mirror of
https://github.com/morluto/rea
synced 2026-10-27 14:42:18 -04:00
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:
@@ -32,7 +32,7 @@ export const observeJavaScriptRuntimeInputSchema = z.strictObject({
|
||||
...runtimeEndpoint,
|
||||
target_id: z.string().trim().min(1),
|
||||
runtime_kind: javascriptRuntimeKindSchema.optional(),
|
||||
observation_ms: z.number().int().min(0).default(100),
|
||||
observation_ms: z.int().min(0).default(100),
|
||||
});
|
||||
export type ObserveJavaScriptRuntimeInput = z.infer<
|
||||
typeof observeJavaScriptRuntimeInputSchema
|
||||
@@ -103,8 +103,8 @@ export const javascriptRuntimeTargetListSchema = z.strictObject({
|
||||
runtime: javascriptRuntimeVersionSchema,
|
||||
targets: z.array(javascriptRuntimeTargetSchema),
|
||||
excluded: z.strictObject({
|
||||
unsupported_location: z.number().int().min(0),
|
||||
unconnectable: z.number().int().min(0),
|
||||
unsupported_location: z.int().min(0),
|
||||
unconnectable: z.int().min(0),
|
||||
}),
|
||||
limitations: z.array(observationTextSchema),
|
||||
});
|
||||
@@ -118,7 +118,6 @@ const javascriptRuntimeScriptSchema = z.strictObject({
|
||||
execution_context_key: z.string().nullable(),
|
||||
cdp_hash: z.string().nullable(),
|
||||
length: z
|
||||
.number()
|
||||
.int()
|
||||
.min(0)
|
||||
.nullable()
|
||||
@@ -150,20 +149,20 @@ export const javascriptRuntimeObservationSchema = z.strictObject({
|
||||
]),
|
||||
}),
|
||||
capture: z.strictObject({
|
||||
observation_ms: z.number().int().min(0),
|
||||
events_observed: z.number().int().min(0),
|
||||
events_retained: z.number().int().min(0),
|
||||
events_dropped: z.number().int().min(0),
|
||||
metadata_bytes_retained: z.number().int().min(0),
|
||||
observation_ms: z.int().min(0),
|
||||
events_observed: z.int().min(0),
|
||||
events_retained: z.int().min(0),
|
||||
events_dropped: z.int().min(0),
|
||||
metadata_bytes_retained: z.int().min(0),
|
||||
truncated: z.boolean(),
|
||||
truncation_reasons: z.array(observationTextSchema),
|
||||
}),
|
||||
scripts: z.strictObject({
|
||||
items: z.array(javascriptRuntimeScriptSchema),
|
||||
observed_total: z.number().int().min(0),
|
||||
observed_total: z.int().min(0),
|
||||
excluded: z.strictObject({
|
||||
unsupported_location: z.number().int().min(0),
|
||||
invalid_protocol_value: z.number().int().min(0),
|
||||
unsupported_location: z.int().min(0),
|
||||
invalid_protocol_value: z.int().min(0),
|
||||
}),
|
||||
}),
|
||||
execution_contexts: z.array(javascriptRuntimeContextSchema),
|
||||
|
||||
Reference in New Issue
Block a user