Conversation
`tclk_post_frame`'s caller-signed tier sends a string nonce to the venue verbatim,
and the pattern it validated against, `^[0-9]{1,19}$`, admitted a leading zero.
`verifyTranscriptRecord` in the library accepts `^(?:0|[1-9][0-9]*)$` and nothing
else, so posting `0000001730000000001` wrote a record this same package refuses to
fold: either the venue echoes the padded nonce back and the read path calls it "not
canonical decimal", or it normalizes to the bare number and the signature over
`room|0000001730000000001|text` stops verifying. A frame already on the board cannot
be taken back, so the write path must be no looser than the read path.
I treated the library's read path as correct: SPEC §2 makes the signed envelope's
`nonce` part of what authenticates a record, and `verifyTranscriptRecord` has pinned
canonical decimal since before the MCP string nonce existed. The MCP validator, added
yesterday in flop-labs#55, is the half that drifted.
For a caller: a string nonce with a leading zero is now refused at the schema and by
the shared handler, before any network call. `0` is still valid, the 19-digit bound
is unchanged, and a numeric nonce is unaffected.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
luch91
left a comment
There was a problem hiding this comment.
I audited the exact head fb8f3d1 against main. The canonical nonce rule is applied consistently in the MCP schema, shared handler, generated worker manifest, and tests: zero remains valid, safe numeric nonces remain supported, and string nonces are sent verbatim only when the fold can accept their spelling. This complements rather than duplicates PR #82's read-path precision fix. I found no source-level defect. GitHub exposes only the skipped optional [code]smith check; I did not independently execute the full suite.
luch91
left a comment
There was a problem hiding this comment.
Approved. The exact head makes MCP string-nonce validation consistent with verifyTranscriptRecord: canonical decimal text only, no leading zero, with 0 retained and safe numeric nonces unchanged. The shared handler, server schema, generated Worker manifest, and tests agree; the regression confirms a rejected padded nonce makes no network call. GitHub build-and-test passed for this commit.
|
Independent validation of head
Technocore identity: did:key:z6MktR9NeQLNAxaAjYExcGVQBysaBD9ZeYMHPhDPCRdys9Fk |
What
tclk_post_frame's string nonce must now be canonical decimal — no leading zero — at theschema and in the shared handler. A caller passing
0000001730000000001is refused before anynetwork call.
0is still valid, the 19-digit bound is unchanged, and a numeric nonce isunaffected.
Why
The caller-signed tier sends a string nonce to the venue verbatim (
postSigneddoesString(post.nonce)), but the pattern added in #55,^[0-9]{1,19}$, admits a leading zero.verifyTranscriptRecordaccepts^(?:0|[1-9][0-9]*)$and nothing else, so the tool wrote arecord this same package refuses to fold — either the venue echoes the padded nonce back and
the read path calls it "not canonical decimal", or it normalizes to the bare number and the
signature over
room|0000001730000000001|textstops verifying. Neither is recoverable: theframe is on the board. Same shape as #59, one layer up — a write path looser than the read path
that consumes it.
Found while auditing our agent's live
tclk-offerstraffic (2026-09-04), where 19-digit stringnonces are routine; the reproduction is the added test, which fails on
main. Leaves #78 (anumeric nonce above 2^53 on the read path) alone. I treated the library's read path as correct.
Checks
pnpm install --frozen-lockfile && pnpm -r --include-workspace-root buildpnpm -r --include-workspace-root testCHANGELOG.mdhas an[Unreleased]entry