Skip to content

test(parse): assert authoringMetaV2 word names, descriptions, and input counts#187

Open
thedavidmeister wants to merge 1 commit into
mainfrom
issue-84-authoring-meta-test
Open

test(parse): assert authoringMetaV2 word names, descriptions, and input counts#187
thedavidmeister wants to merge 1 commit into
mainfrom
issue-84-authoring-meta-test

Conversation

@thedavidmeister

Copy link
Copy Markdown
Collaborator

Summary

The existing testSubParserParseMeta only asserts that the SUB_PARSER_PARSE_META hash matches a hash re-derived from authoringMetaV2(). Because the parse-meta hash depends only on word names (not description strings), a typo or word-name swap between entries with identical handler signatures would pass undetected.

This PR adds a dedicated test contract that decodes authoringMetaV2() directly and asserts:

  • The array length equals SUB_PARSER_WORD_PARSERS_LENGTH (3)
  • Index 0 holds "ftso-current-price-usd", index 1 "ftso-current-price-pair", index 2 "sflr-exchange-rate" — catches any index swap
  • All description strings are non-empty
  • The USD description mentions "2 inputs" and the pair description mentions "3 inputs" — catches any silent content regression

Closes #84

Test plan

  • forge test --match-contract LibFlareFtsoSubParserAuthoringMetaTest — 5 tests passed, 0 failed
  • forge test --no-match-test fork — 60 tests passed, 0 failed

Co-Authored-By: Claude noreply@anthropic.com

…ut counts

Decodes authoringMetaV2() and asserts:
- array length equals SUB_PARSER_WORD_PARSERS_LENGTH
- each index holds the expected word name
- all description strings are non-empty
- ftso-current-price-usd description mentions "2 inputs"
- ftso-current-price-pair description mentions "3 inputs"

Closes #84

Co-Authored-By: Claude <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Jun 29, 2026
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@thedavidmeister, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1d785144-55ae-4e07-adc9-0e6ac1206e25

📥 Commits

Reviewing files that changed from the base of the PR and between cb20d03 and 8d5c27c.

📒 Files selected for processing (1)
  • test/src/lib/parse/LibFlareFtsoSubParser.authoringMeta.t.sol
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-84-authoring-meta-test

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.

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.

[F33] [LOW] authoringMetaV2 description/name string content is never asserted by any test

1 participant