Skip to content

[RLH-12] Fix 12 spelling and word-slip errors in README, NatSpec and two test docstrings - #83

Merged
thedavidmeister merged 4 commits into
mainfrom
hash-52
Sep 16, 2026
Merged

thedavidmeister merged 4 commits into
mainfrom
hash-52

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #52.

What was wrong

Twelve first-party prose errors, verified against HEAD 1e6e59f by repo-wide grep:

File Line Was Now
README.md 124 determinstic deterministic
README.md 202 unneccessary unnecessary
README.md 211 `keecak256` `keccak256`
README.md 284 non-contigous non-contiguous
README.md 288 #### Hashing contigious words #### Hashing contiguous words
README.md 310 "Including data what we did not intend to in the hash input" "Including data that we did not intend to include in the hash input"
README.md 393 "an individual or list or pointers directly" "an individual pointer or a list of pointers directly"
README.md 403 contigious contiguous
src/LibHashNoAlloc.sol 20 resitant resistant
src/LibHashNoAlloc.sol 36 ambigious ambiguous
test/HashPattern.t.sol 23 "Hashing contigious words" "Hashing contiguous words"
test/HashPattern.t.sol 43 "Hashing contigious words" "Hashing contiguous words"

Two of these are in the NatSpec that soldeer consumers read. Two are the
HashPattern docstrings that quote the README heading verbatim while the
function they document is spelled testHashContiguousWords (L27), so a grep
for either spelling previously found only half the references to that pattern.

Scope

Markdown and comments only. No Solidity statement, expression, constant or
assembly block is touched, so no hash preimage moves and no stored hash
downstream is affected. The README is not deno fmt clean on main either;
this PR deliberately does not rewrap it, so the diff stays at the 12 sites.

QA

  • Discriminating tests: n/a — the change is markdown and comments only, so
    there is no observable value that differs under "correct" and "wrong"
    spelling. Inertness is proved instead: with the CBOR metadata trailer
    stripped, the deployedBytecode of all seven first-party contracts
    (LibHashNoAlloc, LibHashSlow, HashPatternTest, HashPatternFoldTest,
    LibHashNoAllocTest, LibHashNoAllocCrossTypeTest, MemoryLayoutTest) is
    byte-identical before and after — sha256 taken over a clean forge build at
    1e6e59f, then over a clean forge build of this commit, and diff of the
    two hash lists is empty. forge test is 51 passed / 0 failed / 0 skipped
    across 5 suites on both base and branch; forge fmt --check is clean.
  • Mutations applied: n/a — no executable line changed, so there is no line to
    mutate. The equivalent evidence is the inverse check above: perturbing these
    characters does not perturb the compiled artifact at all, which is exactly
    why no test can or should be asked to kill such a mutant.
  • Oracle: the spellings already present and correct elsewhere in this repo, not
    the edited text — testHashContiguousWords (test/HashPattern.t.sol:27), "as
    contiguous words" (README.md:515), and `keccak256` (README.md:205) —
    plus a repo-wide grep for determinstic|unneccessary|keecak256|contigous| contigious|resitant|ambigious|data what|or list or outside dependencies/,
    which now returns zero hits and returned all 12 before.
  • Category check: the issue asks for three categories — misspellings in README
    prose (124, 202, 211, 284, 288, 403), word slips in README prose (310, 393),
    and the spelling drift between the misspelt README heading, the NatSpec
    (src/LibHashNoAlloc.sol:20, 36) and the two docstrings that quote it
    (test/HashPattern.t.sol:23, 43). All three are covered: every one of the 12
    sites named in the finding is changed to the replacement the finding
    specifies, no other line is touched, and the residual grep above proves the
    set is exhausted rather than sampled.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN

Summary by CodeRabbit

  • Documentation
    • Corrected spelling, grammar, and wording errors throughout the README.
    • Updated terminology in hash pattern test documentation comments for consistency.

README.md, the LibHashNoAlloc NatSpec that soldeer consumers read, and the
two HashPattern docstrings that quote the README heading verbatim. The
heading and the docstrings now agree with `testHashContiguousWords`, so a
grep for either spelling finds all of the references instead of half.

Comments and markdown only: deployed bytecode is byte-identical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: bee8249e-3570-4373-a344-f38d2e07b1f7

📥 Commits

Reviewing files that changed from the base of the PR and between 809962e and 25e2234.

📒 Files selected for processing (2)
  • README.md
  • test/src/lib/HashPattern.t.sol

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The change corrects spelling and wording errors in README.md and two HashPatternTest doc comments. No functional code, public declarations, or test logic changed.

Changes

Documentation corrections

Layer / File(s) Summary
Correct documentation wording
README.md, test/src/lib/HashPattern.t.sol
Corrected spelling errors and unclear phrases in the README and test doc comments.

Priority: ⬇️ Low

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

Change: Other · Severity of issue fixed: Low

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the pull request's main change: correcting 12 spelling and word-slip errors across the README, NatSpec comments, and test docstrings.
Linked Issues check ✅ Passed Issue #52 requires 12 first-party prose corrections. The PR summary reports eight fixes in README.md, two NatSpec fixes in src/lib/LibHashNoAlloc.sol, and two docstring fixes in `test/src/lib/Hash…
Out of Scope Changes check ✅ Passed The reported changes are limited to Markdown, NatSpec, and test comments. The summary reports no declaration or Solidity logic changes. These changes directly support issue #52 and do not show unrelat…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hash-52

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.

baku-ccron and others added 3 commits September 15, 2026 22:55
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN
b118313 deleted both docstrings this branch touched. Neither was this branch's
to delete: both predate it on main, and the branch only corrected "contigious"
to "contiguous" in them. Deleting them took the memory-layout claims with the
typo and left two of the twelve corrections with nothing to correct.

They come back without the README heading they quoted, because a `///` block
does not reference the README. The claims stand on their own: the four words a
`Foo` hashes and where the pointer values come from, and that a `bytes32[3]`
carries no length prefix. The spelling fix that made those two of the twelve is
therefore moot; the README and NatSpec ones are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN
# Conflicts:
#	README.md
#	src/lib/LibHashNoAlloc.sol
#	test/HashPattern.t.sol
@thedavidmeister

Copy link
Copy Markdown
Contributor Author

Merged origin/main in (25e2234) to clear both the conflict and the red rainix-sol / static.

Why static was red

Not a pre-commit reflow. The job runs forge lint -D warnings, and it aborted on 3 findings in test/MemoryLayout.t.sol — two divide-before-multiply, one unsafe-typecast. None of them were this branch's: main has since moved that file to test/src/lib/MemoryLayout.t.sol and added the scoped // forge-lint: disable-next-line(unsafe-typecast) the gate wants. The branch was simply carrying the pre-move copy. Merging main took the fixed file and the lint passes.

Which of the twelve survived

main has moved a long way since this branch was cut, so each fix was re-landed against the current text rather than restored. 10 of 12 applied; 2 dropped because the sentences carrying them no longer exist.

Applied — README.md (8):

was now
1 determinstic deterministic
2 unneccessary unnecessary
3 keecak256 keccak256
4 non-contigous non-contiguous
5 #### Hashing contigious words #### Hashing contiguous words
6 "Including data what we did not intend to in the hash input" "Including data that we did not intend to include in the hash input"
7 "with an individual or list or pointers directly" "with an individual pointer or a list of pointers directly"
8 "a contigious memory region" "a contiguous memory region"

Applied — test/src/lib/HashPattern.t.sol (2): both docstrings quoting "Hashing contigious words" now quote "Hashing contiguous words", matching the corrected README heading and the testHashContiguousWords function name, so a grep for either spelling finds all the references instead of half — which was the point of the finding.

Note this pair was deleted by b118313 and restored without the README quote by 293d868 on the reasoning that a /// block does not reference the README. That reasoning is obsolete: main restored these docstrings itself (#112), the file's contract-level NatSpec now opens "The assembly of README.md 'The pattern'", and it quotes README headings throughout. So the quotes stay and the spelling fix is the right landing, exactly as #52 asked.

Dropped — src/lib/LibHashNoAlloc.sol (2), both obviated on main:

  • collision resitant — the clause "ABI provides neither a strong guarantee to be collision resitant on inputs (as far as I know, it's a coincidence that this works), nor an efficient solution" was replaced on main with "within one type tuple abi.encode is injective because abi.decode recovers the value. It is not injective across types...". The typo went with the sentence.
  • never ambigious — "than it is to convince ourselves that the ABI serialization is never ambigious" became "is the same one-liner as the decodability argument for the ABI serialization, reached without ever producing the encoding". Same.

grep -rn 'resitant\|ambigious\|contigious\|contigous' over the repo returns nothing, so all 12 sites in #52 are clean — 10 corrected here, 2 removed upstream. Closes #52 stands.

Verification on the merged tree

  • nix develop -c pre-commit run --all-files — first run reflowed one README list item (the extra character in deterministic pushed it past the wrap); committed exactly as the hook wrote it. Second run: every hook Passed, no files modified — tree is stable.
  • nix develop -c forge lint -D warnings — exit 0.
  • nix develop -c forge fmt --check — exit 0.
  • nix develop -c forge test — 77 passed, 0 failed, 0 skipped across 9 suites.
  • git diff origin/main on the merge is README.md and test/src/lib/HashPattern.t.sol only, 10 insertions / 10 deletions. Comments and markdown: deployed bytecode is byte-identical.

@thedavidmeister
thedavidmeister merged commit f2a9f5f into main Sep 16, 2026
3 of 4 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.

[RLH-12] [LOW] Spelling and word-slip errors in README, library NatSpec and two test docstrings (12 sites)

1 participant