Packet — R93 B4 Consensus Schema Regex Messages
Round: R93 debug-sweep · XS scope
Audit/Contract: as named
β task: 3cfa2d18-6820-4cd7-be77-7e85c1143279
§1. Edits
One file: src/domains/consensus/tools.ts. Add a descriptive second-arg message to every .regex() call site.
| Schema field | Regex | New message |
|---|---|---|
ConsensusProposeInputSchema.event.merkle_root_hex |
HEX_64_RE |
"merkle_root_hex must be 64 lowercase hex chars (32 bytes)" |
ConsensusProposeInputSchema.event.rule_version_hash_hex |
HEX_64_RE |
"rule_version_hash_hex must be 64 lowercase hex chars (32 bytes)" |
ConsensusVoteInputSchema.round_id |
DECIMAL_POSITIVE_RE |
"round_id must be a positive decimal integer (allocated by consensus_propose)" |
ConsensusVoteInputSchema.vote.merkle_root_hex |
HEX_64_RE |
"merkle_root_hex must be 64 lowercase hex chars (32 bytes)" |
ConsensusVoteInputSchema.vote.rule_version_hash_hex |
HEX_64_RE |
"rule_version_hash_hex must be 64 lowercase hex chars (32 bytes)" |
ConsensusVoteInputSchema.privKey |
HEX_EVEN_NONEMPTY_RE |
"privKey must be non-empty lowercase hex (even number of chars)" |
ConsensusFinalityInputSchema.round_id |
DECIMAL_POSITIVE_RE |
"round_id must be a positive decimal integer (allocated by consensus_propose)" |
VrfEvalInputSchema.seed_hex |
HEX_EVEN_NONEMPTY_RE |
"seed_hex must be non-empty lowercase hex (even number of chars)" |
VrfEvalInputSchema.input_hex |
HEX_EVEN_NONEMPTY_RE |
"input_hex must be non-empty lowercase hex (even number of chars)" |
VrfEvalInputSchema.priv_key_hex |
HEX_EVEN_NONEMPTY_RE |
"priv_key_hex must be non-empty lowercase hex (even number of chars)" |
ConsensusProposeOutputSchema.round_id |
DECIMAL_POSITIVE_RE |
"round_id must be a positive decimal integer (allocated by consensus_propose)" |
ConsensusFinalityOutputSchema.round_id |
DECIMAL_POSITIVE_RE |
"round_id must be a positive decimal integer (allocated by consensus_propose)" |
ConsensusFinalityOutputSchema.evidence |
HEX_EVEN_OR_EMPTY_RE |
"evidence must be possibly-empty lowercase hex (even number of chars)" |
VrfEvalOutputSchema.output_hex |
HEX_64_RE |
"output_hex must be 64 lowercase hex chars (32 bytes)" |
VrfEvalOutputSchema.proof_hex |
HEX_64_RE |
"proof_hex must be 64 lowercase hex chars (32 bytes)" |
15 edit sites in one file. Output-schema messages are surfaced internally (post-B1 the SDK no longer validates outputSchema at the wire layer, but the Zod schemas continue to serve as TypeScript type sources — the messages document intent).
§2. Gates
npm run build && npm run lint && npm test — all three green.
Proceeding to implement.