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

+2 -3
View File
@@ -16,7 +16,7 @@ export const DEFAULT_SQLITE_WORKER_TIMEOUT_MS = 30_000;
export const MAX_SQLITE_WORKER_TIMEOUT_MS = 2_147_483_647;
const workerTimeout = z.number().int().min(1).max(MAX_SQLITE_WORKER_TIMEOUT_MS);
const nonnegative = z.number().int().nonnegative();
const nonnegative = z.int().nonnegative();
const hex = z.string().regex(/^(?:[0-9a-f]{2})*$/);
const encoding = z.enum(["UTF-8", "UTF-16le", "UTF-16be"]);
const artifactSchema = z.strictObject({
@@ -56,7 +56,6 @@ export const inspectSqliteDatabaseInputSchema = z
"Default: compact inventory without a table, or detailed selected-table schema with a table. selected_table requires table. Database explicitly expands all stored declarations and supported columns.",
),
row_limit: z
.number()
.int()
.min(1)
.optional()
@@ -199,7 +198,7 @@ export const sqliteDatabaseSchema = z
table: z.string(),
columns: z.array(z.string()),
values: z.array(z.array(sqliteValueSchema)),
row_limit: z.number().int().min(1),
row_limit: z.int().min(1),
returned_rows: nonnegative,
truncated: z.boolean(),
order: z.literal("unspecified"),