docs+test(readme): pin canonical authoringMetaV2 word descriptions into the README - #259
docs+test(readme): pin canonical authoringMetaV2 word descriptions into the README#259thedavidmeister wants to merge 1 commit into
Conversation
…ADME Embeds each word's canonical authoringMetaV2() description verbatim under its README heading and adds a test that decodes the authoring meta and asserts the README contains every description (newline-normalised so markdown hard-wrapping cannot defeat the check). The description strings carry the canonical input ordering and decimals/rounding semantics, so a source-side description change that is not mirrored into the README now fails the suite, and vice versa. Closes #133 Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
🤖 ai:vetter |
|
🤖 ai:vetter |
Summary
authoringMetaV2()description verbatim into the README under its word heading, replacing the hand-written one-line summaries. The description strings are the canonical statement of each word's input ordering ("the vault contract address and the amount of shares/assets as a float") and decimals/rounding semantics, so the README now carries the single-source-of-truth prose instead of a hand-kept paraphrase.ERC4626WordsReadmeDescriptions.t.sol: decodesLibERC4626SubParser.authoringMetaV2()and asserts the README contains every description, after newline normalisation so markdown hard-wrapping of the quoted paragraphs cannot defeat the containment check. The source is the oracle — a description edit inauthoringMetaV2()(input order, decimals, rounding) that is not mirrored into the README fails CI, and vice versa. The test contains no expected description literals.{ access = "read", path = "README.md" }tofoundry.tomlfs_permissions(identical hunk to open PR test(readme): assert README documents both ERC4626 word names #185 so the two merge cleanly).Relationship to #185: the human rework note on #185 split issue #133 into legs — #185 (Refs #133) covers the word-names leg; this PR covers the remaining input-ordering and decimals-semantics legs by pinning the full canonical descriptions.
Docs + test + config only; no
src/change, no bytecode change, no pointer/meta regeneration, no redeploy required.Closes #133
QA
testReadmeContainsEveryAuthoringMetaWordDescription— fails on base (base README lacks the canonical description paragraphs; corrupting one character of a quoted paragraph reproduces the base condition and fails withREADME must contain the canonical description of word 0).testContainsBytesDiscriminates/testNormalizeNewlines— pin the helper edges whose silent failure would make the main check vacuous (verified by mutants below).convertToAssets→convertToAssetz→ killed by main test (only failure, diagnostic word index).LibERC4626SubParser.soldesc[0]: input order swapped to "the amount of shares as a float and the vault contract address" (README untouched) → killed by main test; no other test in the 141-test suite failed, i.e. description drift was previously invisible to the suite.LibERC4626SubParser.soldesc[1]: "respects the asset and share token decimals" → "ignores..." → killed by main test (word 1).normalizeNewlines:0x0A→0x0B(LF normalisation disabled) → killed bytestNormalizeNewlinesAND the main test (proves the README really is hard-wrapped and that the main test fails without normalisation).foundry.toml: READMEfs_permissionsline removed → main test fails loudly withvm.readFile: ... not allowed, never a silent pass.containsBytes: inner mismatch check disabled (vacuous-true) → killed bytestContainsBytesDiscriminates("corrupted needle must not match"); the main test PASSED under this mutant, demonstrating the self-test is necessary.containsBytes: outer loop<=→<(end-of-haystack off-by-one) → killed bytestContainsBytesDiscriminates("match at end of haystack must be found").LibERC4626SubParser.authoringMetaV2()viaabi.decode(..., (AuthoringMetaV2[]))— the same bytes that flow into the on-chain/metaboard meta. The test carries no expected word/description literals.rainexamples remain human paraphrase adjacent to the pinned canonical text — they can still be edited independently, but the enforced canonical prose now sits directly beside them, and every enforcement failure mode probed above fails loud rather than silently green. Baseline 139/139 green before the change; 141/141 green after.🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com