Skip to content

test(parse-meta): assert PARSE_META matches dynamic rebuild from authoringMetaV2#229

Merged
thedavidmeister merged 3 commits into
mainfrom
2026-06-24-issue-17-parse-meta-consistency
Jul 4, 2026
Merged

test(parse-meta): assert PARSE_META matches dynamic rebuild from authoringMetaV2#229
thedavidmeister merged 3 commits into
mainfrom
2026-06-24-issue-17-parse-meta-consistency

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Closes #17

Adds testParseMetaMatchesDynamicBuild to ERC4626Words.parseMeta.t.sol.

The test calls LibERC4626SubParser.authoringMetaV2(), decodes the result to AuthoringMetaV2[], passes it to LibGenParseMeta.buildParseMetaV2 with the committed PARSE_META_BUILD_DEPTH, and asserts the output equals the committed PARSE_META constant.

This ensures that drift between the hand-maintained parse meta binary and the source authoring metadata is caught at test time.

Summary by CodeRabbit

  • Tests
    • Added a new check that verifies the generated parsing metadata matches the statically defined version exactly.
    • Expanded coverage around metadata decoding and rebuild behavior for ERC4626 word parsing.

@thedavidmeister thedavidmeister self-assigned this Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0c5e4af6-871e-4870-aa95-52464e318375

📥 Commits

Reviewing files that changed from the base of the PR and between 7d1eb1c and 99b4092.

📒 Files selected for processing (1)
  • test/src/concrete/ERC4626Words.parseMeta.t.sol

Walkthrough

A new test function was added to a Solidity test file to verify that dynamically rebuilding PARSE_META from authoringMetaV2() produces bytes identical to the statically-defined PARSE_META constant, along with supporting imports.

Changes

PARSE_META drift-guard test

Layer / File(s) Summary
Add drift-guard test and imports
test/src/concrete/ERC4626Words.parseMeta.t.sol
Adds imports for AuthoringMetaV2 and LibGenParseMeta, and introduces testParseMetaMatchesDynamicBuild, which decodes LibERC4626SubParser.authoringMetaV2(), rebuilds parse meta via LibGenParseMeta.buildParseMetaV2, and asserts it equals the committed PARSE_META constant.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-06-24-issue-17-parse-meta-consistency

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thedavidmeister thedavidmeister merged commit 9c8bfa5 into main Jul 4, 2026
4 of 5 checks passed
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.

Two-phase regen (authoring-meta prelude THEN BuildPointers) is order-dependent and only the second phase's drift is git-checked; PARSE_META

1 participant