feat(hash): generate the SMHasher3 Results table (+ compact column, parser fix) - #255
Merged
Conversation
Collapse the verbose 'PASS - 188 / 188' cell to a single 'SMHasher3 result' column: 'PASS' when every test passes, otherwise the failing 'passed/total' count (e.g. 7/188). Add a one-line legend under the table.
- Add a `quality` command to hash_benchmark_report.py that renders the SMHasher3 Results table into mbo/hash/README.md between markers, from a curated source of truth (role/failures) merged with measured verdict/score (--smhasher <bundle>); --check verifies the table without writing. - Fix _smhasher_one: an invalid hash name or crash now reads as ERROR, not a false PASS (FNV-1a was invoked under an unregistered name); capture the score from the '( p / n passed)' Summary line and the failing families from its 'Failures:' block.
Normalize short/legacy names (FNV-1a -> FNV-1a-64, MurmurHash3 -> MurmurHash3-128) in _load_smhasher, without clobbering a real canonical entry, so an older bundle still joins onto the Results rows instead of falling back to the curated fixture.
Fab-Cat
approved these changes
Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the SMHasher3 "Results" table generated instead of hand-maintained, and fixes the result parsing that had let a mis-named battery slip through.
What
PASSwhen every test passes, else the failingpassed/total(e.g.7/186).hash_benchmark_report.py quality): renders the table intombo/hash/README.mdbetween<!-- BEGIN/END SMHasher3 results -->markers from a single curated source (_SMH_RESULTS_ROWS), so human prose around it is untouched.--checkverifies the table matches (CI-friendly, no data needed).--smhasher <bundle|json>sources the measured verdict/score from a fresh run, merged onto the curated role/Failures columns; a partial run (e.g. only the mbo hashes) still renders a complete table._smhasher_one): an unknown hash name (Invalid hash '…' specified) or a crash now reads as ERROR, never a false PASS — FNV-1a was being invoked under an unregistered name (FNV-1a; the registered name isFNV-1a-64). The pass/fail score now parses from the( p / n passed)Summary line, and failing families from the Summary'sFailures:block.The first "Algorithm overview" table stays hand-maintained.
Verification
quality --checkis green).