Skip to content

docs(TODO): SI-vs-binary byte-unit consistency - #270

Merged
helly25 merged 1 commit into
mainfrom
docs/todo-byte-units
Jul 5, 2026
Merged

docs(TODO): SI-vs-binary byte-unit consistency#270
helly25 merged 1 commit into
mainfrom
docs/todo-byte-units

Conversation

@helly25

@helly25 helly25 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Records a backlog item: byte units must clearly separate decimal SI (KB/MB/GB/TB/PB/EB = 1000^N) from binary IEC (KiB/MiB/GiB/TiB/PiB/EiB = 1024^N), spell each correctly (the i marks binary), and never mix the two at any one site (never print MB for a 1024^2 value).

Audit + reconcile every place bytes are parsed or formatted so one convention is used correctly throughout: -size/-blocks suffixes (find-native k/M/G are binary today), --block-size, --summary/-ls human sizes (format::SizeUnits iec/si), --buffer byte budgets (B/MB/MiB), and {size}/-printf %s. Decide the canonical spelling rule and document it in --help=size.

Doc-only (TODO.md).

Byte units must distinguish decimal SI (KB/MB/... = 1000^N) from binary IEC (KiB/MiB/... = 1024^N),
spell each correctly, and never mix the two at one site. Audit every byte parse/format site
(-size/-blocks, --block-size, --summary/-ls human sizes, --buffer, {size}/%s) and make one
convention uniform + documented in --help=size.
@helly25
helly25 enabled auto-merge (squash) July 5, 2026 22:31
@helly25
helly25 merged commit 817087d into main Jul 5, 2026
8 checks passed
@helly25
helly25 deleted the docs/todo-byte-units branch July 5, 2026 22:42
helly25 added a commit that referenced this pull request Aug 8, 2026
…2 unblock (#403)

* docs(TODO): add fuzzy finding + w-shingling near-duplicate detection idea

Records two distinct 'approximate match' capabilities under deferred ideas:
(1) fzf/fd-style fuzzy name/path matching as its own -fuzzy primary (subsequence
vs bounded edit distance; ties into --sort=score/--top); (2) content
near-duplicate/similarity via w-shingling (Jaccard over shingle sets, MinHash
to scale) as a per-entry matcher against a reference file plus an optional
cross-tree clustering reduction. Notes the design-open points (shingle width,
threshold, v1 scope, likely a build extra). TaskList #168.

* docs(TODO): add MemorySanitizer (MSan) feasibility check

Records the question of enabling MSan (uninitialized-read detection) as a
fourth sanitizer: macOS is out (Clang/Linux-only), the blocker is needing an
MSan-instrumented libc++ (everything else builds from source and gets the
flag for free), so the task is to check whether the hermetic LLVM toolchain
can supply one and, if so, add a --config=msan + Linux CI cell - else record
why not so it isn't re-litigated. TaskList #169.

* docs(TODO): record clang-tidy-22 unblock (mbo #270 compile-DB fix)

Corrects the clang-tidy follow-up: the parse abort was the compile DB
recording Apple clang (not the <version>-shadowing theory), fixed by mbo
#270. Records the port checklist (extractor pin bump, hermetic --bcce-compiler
+ prefer-target-config + Darwin isysroot, the CharTypedefsToIgnore fix, a
report-only CI job) and defers the finding sweep + gating.
helly25 added a commit that referenced this pull request Aug 8, 2026
 + xff fix) (#405)

clang-tidy-22 aborted on every TU. Two causes, both fixed:

1) compile_commands-update.sh ran `refresh_all --config=clang`, but that flag
   only configures the extractor tool's own build, never the internal aquery,
   so every recorded command named the autodetected Apple clang, not the
   hermetic toolchain (-> 'concepts'/'time.h' not found). Port mbo #270: bump
   the extractor pin to 6eb3ff1 (adds --bcce-prefer-target-config, dropping 227
   duplicate exec-config entries), resolve the hermetic clang++ and pass
   --bcce-compiler + --bcce-prefer-target-config after --, plus Darwin-only
   --bcce-copt=-isysroot. Add //tools:show_compiler as the probe target that
   materializes the toolchain on a fresh checkout.

2) xff-specific: mbo is on the -isystem search path and ships a plain-text file
   named `version` at its root, which shadows libc++'s <version> (an explicit
   -isystem beats the compiler's builtin libc++). clang_tidy.sh now prepends the
   hermetic libc++ dir via --extra-arg-before=-isystem so the real <version>
   wins (hermetic libc++, matching the DB's clang, not the SDK's).

Also fix the dead .clang-tidy option (CharTypdefsToIgnore -> CharTypedefsToIgnore).

clang-tidy-22 now parses clean (real findings only, no abort). The hook stays
stages:[manual]; the report-only CI job + the residual-finding sweep are the
follow-ons (#166).
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.

1 participant