Memory shorthands in base2 get recursively corrected to long names in base10

Open Beginner friendly
#5,103 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@hieuvu0611 is already working on this.

Since Dec 2, 2026.

  • #5134 by @hieuvu0611 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
tooling

Research direction

The issue describes a recursive correction from tebibytes to terabytes in Harper. Start by locating the ExpandMemoryShorthands and SpellCheck rules and the tests covering their suggestions. Add or update a regression case so expanding TiB does not lead to terabytes; run the relevant tests and confirm the incorrect second suggestion is gone.

Written by the indexing model from the issue text.

Description

bug dictionary false-positive harper-core linting

What got flagged?

By using a bunch of tiny drives I can extend it to 2.5 TiB while also making sure that the entire cluster doesn't go KAPUT if up to two of them have a bad day.

Gets the warning: Did you mean tebibytes? [ExpandMemoryShorthands]
which is a fair critique.

But then the corrected sentence: By using a bunch of tiny drives I can extend it to 2.5 tebibytes while also making sure that the entire cluster doesn't go KAPUT if up to two of them have a bad day.

Gets a SpellCheck error that says Did you mean terabytes? [SpellCheck]

Why is this incorrect?

Tebibytes should never be corrected to Terabytes as they're completely different units of measurement.

Example of correct usage

Wikipedia : While the difference between the decimal and binary interpretations is relatively small for the kilobyte (about 2% smaller than the kibibyte), the systems deviate increasingly as units grow larger (the relative deviation grows by 2.4% for each three orders of magnitude). For example, a power-of-10-based terabyte is about 9% smaller than power-of-2-based tebibyte.

Dominant language
Rust
Stars
18.1k
Forks
870
Avg merge
2d 7h
Merged PRs (30d)
148

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/harper

All issues in Automattic/harper

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.