refactor(domain): one owner each for non-empty text schemas and UTF-8 head excerpts (#10569)

Fifteen domain schema files each declared z.string().min(1), eight of them
as boundedTextSchema although it bounds nothing. They now share
nonEmptyTextSchema from src/domain/textSchemas.ts; the one trimming copy in
reconstructionCoverage.ts is renamed trimmedTextSchema.

Three private UTF-8 prefix truncators (gdb recent MI records, rizin
diagnostics, environment replay) and src/process/boundedUtf8Text.ts are
replaced by utf8HeadExcerpt in src/domain/utf8HeadExcerpt.ts, which encodes
only the retained prefix and returns a slice of the source text.
This commit is contained in:
morluto
2026-11-14 13:28:28 -05:00
committed by GitHub
parent 1ba93b4602
commit eead7a5815
29 changed files with 236 additions and 173 deletions
@@ -8,8 +8,7 @@ import {
} from "./javascriptApplicationEvidenceSchemas.js";
import { jsonValueSchema } from "../jsonValue.js";
import { prefixedDigestSchema } from "../digests.js";
const boundedTextSchema = z.string().min(1);
import { nonEmptyTextSchema } from "../textSchemas.js";
/** An observed IPC channel match whose uniqueness is not established. */
export const IPC_COVERAGE_LIMITED_PAIRING_BASIS =
@@ -148,7 +147,7 @@ export const javascriptApplicationGraphInputSchema = z.strictObject({
nodes: z.array(applicationNodeSchema).min(1),
edges: z.array(applicationEdgeSchema),
coverage: applicationCoverageSchema,
limitations: z.array(boundedTextSchema),
limitations: z.array(nonEmptyTextSchema),
});
/** Strict stored shape for a JavaScript Application Graph. */