Skip to content

Format Recognition (#2590): census fixture tooling and the recognizer spine, stacked on the v40 fix - #2636

Draft
zancas wants to merge 2 commits into
devfrom
wallet_grammar_2590
Draft

Format Recognition (#2590): census fixture tooling and the recognizer spine, stacked on the v40 fix#2636
zancas wants to merge 2 commits into
devfrom
wallet_grammar_2590

Conversation

@zancas

@zancas zancas commented Aug 6, 2026

Copy link
Copy Markdown
Member

What this PR carries

This PR is the second of two carved from draft #2633, stacked on #2635 (the immediate version-40 fix). It carries the Format Recognition arc beyond the fix, in two commits.

  1. The workbench fixture pipeline. One writer replica exists per census row, organized into era modules. The wallet-grammar-fixtures binary renders the synthetic corpus. The corpus directory lands with its README only.
  2. The recognizer spine, unhooked. recognition.rs holds the WalletFormat manifest (one arm per census row, keyed by Defining Commit), the bounded Cursor, and the verdict enum. The file is not yet declared in disk.rs, so zingolib builds green.

Draft status and remaining work

This PR is a draft because the recognizer spine is incomplete. The four era discriminator modules it declares (era_inception, era_keys, era_capability, era_modern) are not yet written. The remaining work, in order:

  1. Write the four era discriminator modules.
  2. Declare mod recognition; in disk.rs in the same change.
  3. Generate the fixture corpus and turn on the corpus completeness test.
  4. Dispatch LightWallet::read on the Recognition Verdict, restoring the two misparse windows that remain after fix: read both version-40 wallet grammars and bound wallet-file string lengths #2635 (cc78c2358-era and v34 price files).

References

Issue #2590 (the Format Census). #2635 (the base of this stack; merge it first). Draft #2633 (superseded by this pair; closed).

🤖 Generated with Claude Code

zancas and others added 2 commits August 6, 2026 09:52
One writer replica per Format Census row (issue #2590), organized into
era modules under wallet_grammars, with a wallet-grammar-fixtures
binary that renders the synthetic corpus zingolib's recognition tests
consume. Each fixture is named NN_<defining-commit>.dat: the row number
is presentation order, and the Defining Commit hash is the stable key,
per the census's central finding that the version word does not
identify a format.

The corpus directory lands with its README; the generator renders the
fixture files themselves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The recognizer's spine: one WalletFormat arm per census row, each
carrying its Defining Commit and its discriminator, plus the bounded
Cursor whose length validation retires the read_string allocation
class that aborts today's reader on a dev-v40 file. The corpus test
and the dev-v40 refusal test ride along.

The four era discriminator modules the spine declares (era_inception,
era_keys, era_capability, era_modern) are not yet written. The module
is therefore not yet declared in disk.rs and does not compile into
zingolib; the hookup lands together with the discriminators.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Base automatically changed from fix_v40_misparse to dev August 11, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant