Public report of huggingface/tokenizers, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 16:03 UTC · Survey ID cd_ce4771ba84e34a70bf73778f8a06d314
huggingface/tokenizers
Measured 14 November 2026, 16:03 UTC, at code version 39e2818
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 38,791 lines of product code in 11 projects, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Security and Compliance, 63
Findings by how serious they are
9 critical184 serious31 minor
11 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 16:03 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
44of 44 dimensions measured by tools.
205of 224 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
44dimensions across 6 lenses, read from 38,791 lines of product code in 11 projects.
huggingface/tokenizers falls short of our standard for production because it has pipeline steps that install packages without pinning their versions. It scores 69 out of 100 and is rated Adequate, and all nine of its critical findings are security problems.
Security and Compliance, at 63, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 3 points. Pinning the build's installs would lift Security and Compliance itself, worth about 2 points. Raising Security and Compliance to 70 would lift the score to about 71.
Seven pipeline steps install packages that can change without warning. One automatic update takes new releases before a bad one can be spotted, and one weakness in the code could be used by an attacker. Pinning what the pipeline installs, setting a waiting period for automatic updates and fixing the weaknesses the scanner points to would close these risks.
The product code is 38,791 lines, about €54,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 76 findings
These 76 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one.
€18,000 to €90,000, for 300 to 950 hours of work, about 0.4 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×1.0 at a score of 69. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 38,791 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs.
Raises the score by about 3 points · Low effort · ADR Quality
2
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €54,000 to build again, about 0.4 person-years of work. Its weakest lens is Security and Compliance, at 63 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
162 modules, with 217 dependencies between them. 3 loops run through 13 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 122 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
tk_encode.decoders.wordpiece uses tk_encode.decoders, so a change to tk_encode.decoders can break tk_encode.decoders.wordpiece, while a change to tk_encode.decoders.wordpiece can't break tk_encode.decoders.
Position
Below the diagonal: tk_encode.decoders.wordpiece uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline.pre_tokenizer uses tk_encode.tokenizer, so a change to tk_encode.tokenizer can break tk_encode.tokenizer.pipeline.pre_tokenizer, while a change to tk_encode.tokenizer.pipeline.pre_tokenizer can't break tk_encode.tokenizer.
Position
Below the diagonal: tk_encode.tokenizer.pipeline.pre_tokenizer uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline.pre_tokenizer uses tk_encode.vocab.bucket_vocab_store, so a change to tk_encode.vocab.bucket_vocab_store can break tk_encode.tokenizer.pipeline.pre_tokenizer, while a change to tk_encode.tokenizer.pipeline.pre_tokenizer can't break tk_encode.vocab.bucket_vocab_store.
Position
Below the diagonal: tk_encode.tokenizer.pipeline.pre_tokenizer uses a module listed above it, which is the healthy direction.
12→25 tk_encode.utils.truncation uses tk_encode.tokenizer.pipelinepart of a loop✕
Connections
1 pair of types, where a type in tk_encode.utils.truncation uses a type in tk_encode.tokenizer.pipeline.
tk_encode.utils.truncation uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.utils.truncation, while a change to tk_encode.utils.truncation can't break tk_encode.tokenizer.pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
tokenizers_python.components.component_sequence uses tokenizers_python.components.component_spec, so a change to tokenizers_python.components.component_spec can break tokenizers_python.components.component_sequence, while a change to tokenizers_python.components.component_sequence can't break tokenizers_python.components.component_spec.
Position
Below the diagonal: tokenizers_python.components.component_sequence uses a module listed above it, which is the healthy direction.
tokenizers_python.tokenizer uses tokenizers_python.components.component_spec, so a change to tokenizers_python.components.component_spec can break tokenizers_python.tokenizer, while a change to tokenizers_python.tokenizer can't break tokenizers_python.components.component_spec.
Position
Below the diagonal: tokenizers_python.tokenizer uses a module listed above it, which is the healthy direction.
tk_encode.pre_tokenizers.split uses tk_encode.tokenizer, so a change to tk_encode.tokenizer can break tk_encode.pre_tokenizers.split, while a change to tk_encode.pre_tokenizers.split can't break tk_encode.tokenizer.
Position
Below the diagonal: tk_encode.pre_tokenizers.split uses a module listed above it, which is the healthy direction.
tk_encode.pre_tokenizers.split uses tk_encode.vocab.bucket_vocab_store, so a change to tk_encode.vocab.bucket_vocab_store can break tk_encode.pre_tokenizers.split, while a change to tk_encode.pre_tokenizers.split can't break tk_encode.vocab.bucket_vocab_store.
Position
Below the diagonal: tk_encode.pre_tokenizers.split uses a module listed above it, which is the healthy direction.
tk_encode.pre_tokenizers.split uses tk_encode.tokenizer.pipeline.pre_tokenizer, so a change to tk_encode.tokenizer.pipeline.pre_tokenizer can break tk_encode.pre_tokenizers.split, while a change to tk_encode.pre_tokenizers.split can't break tk_encode.tokenizer.pipeline.pre_tokenizer.
Position
Below the diagonal: tk_encode.pre_tokenizers.split uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.encoding uses tk_encode.tokenizer, so a change to tk_encode.tokenizer can break tk_encode.tokenizer.encoding, while a change to tk_encode.tokenizer.encoding can't break tk_encode.tokenizer.
Position
Below the diagonal: tk_encode.tokenizer.encoding uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.encoding uses tk_encode.utils.truncation, so a change to tk_encode.utils.truncation can break tk_encode.tokenizer.encoding, while a change to tk_encode.tokenizer.encoding can't break tk_encode.utils.truncation.
Position
Below the diagonal: tk_encode.tokenizer.encoding uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline.scratch_pool uses tk_encode.vocab.bucket_vocab_store, so a change to tk_encode.vocab.bucket_vocab_store can break tk_encode.tokenizer.pipeline.scratch_pool, while a change to tk_encode.tokenizer.pipeline.scratch_pool can't break tk_encode.vocab.bucket_vocab_store.
Position
Below the diagonal: tk_encode.tokenizer.pipeline.scratch_pool uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline.scratch_pool uses tk_encode.tokenizer.pipeline.pre_tokenizer, so a change to tk_encode.tokenizer.pipeline.pre_tokenizer can break tk_encode.tokenizer.pipeline.scratch_pool, while a change to tk_encode.tokenizer.pipeline.scratch_pool can't break tk_encode.tokenizer.pipeline.pre_tokenizer.
Position
Below the diagonal: tk_encode.tokenizer.pipeline.scratch_pool uses a module listed above it, which is the healthy direction.
17→25 tk_encode.tokenizer.pipeline.scratch_pool uses tk_encode.tokenizer.pipelinepart of a loop✕
Connections
2 pairs of types, where a type in tk_encode.tokenizer.pipeline.scratch_pool uses a type in tk_encode.tokenizer.pipeline.
tk_encode.tokenizer.pipeline.scratch_pool uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.tokenizer.pipeline.scratch_pool, while a change to tk_encode.tokenizer.pipeline.scratch_pool can't break tk_encode.tokenizer.pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
tokenizers_python.compiled uses tokenizers_python.tokenizer, so a change to tokenizers_python.tokenizer can break tokenizers_python.compiled, while a change to tokenizers_python.compiled can't break tokenizers_python.tokenizer.
Position
Below the diagonal: tokenizers_python.compiled uses a module listed above it, which is the healthy direction.
tokenizers_python.components uses tokenizers_python.components.component_spec, so a change to tokenizers_python.components.component_spec can break tokenizers_python.components, while a change to tokenizers_python.components can't break tokenizers_python.components.component_spec.
Position
Below the diagonal: tokenizers_python.components uses a module listed above it, which is the healthy direction.
tokenizers_python.components uses tokenizers_python.tokenizer, so a change to tokenizers_python.tokenizer can break tokenizers_python.components, while a change to tokenizers_python.components can't break tokenizers_python.tokenizer.
Position
Below the diagonal: tokenizers_python.components uses a module listed above it, which is the healthy direction.
tk_encode.decoders.replace uses tk_encode.decoders, so a change to tk_encode.decoders can break tk_encode.decoders.replace, while a change to tk_encode.decoders.replace can't break tk_encode.decoders.
Position
Below the diagonal: tk_encode.decoders.replace uses a module listed above it, which is the healthy direction.
tk_encode.decoders.replace uses tk_encode.pre_tokenizers.split, so a change to tk_encode.pre_tokenizers.split can break tk_encode.decoders.replace, while a change to tk_encode.decoders.replace can't break tk_encode.pre_tokenizers.split.
Position
Below the diagonal: tk_encode.decoders.replace uses a module listed above it, which is the healthy direction.
tk_encode.normalizers.replace uses tk_encode.tokenizer.pipeline.normalizer, so a change to tk_encode.tokenizer.pipeline.normalizer can break tk_encode.normalizers.replace, while a change to tk_encode.normalizers.replace can't break tk_encode.tokenizer.pipeline.normalizer.
Position
Below the diagonal: tk_encode.normalizers.replace uses a module listed above it, which is the healthy direction.
tk_encode.normalizers.replace uses tk_encode.pre_tokenizers.split, so a change to tk_encode.pre_tokenizers.split can break tk_encode.normalizers.replace, while a change to tk_encode.normalizers.replace can't break tk_encode.pre_tokenizers.split.
Position
Below the diagonal: tk_encode.normalizers.replace uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline.parallel uses tk_encode.tokenizer.pipeline.scratch_pool, so a change to tk_encode.tokenizer.pipeline.scratch_pool can break tk_encode.tokenizer.pipeline.parallel, while a change to tk_encode.tokenizer.pipeline.parallel can't break tk_encode.tokenizer.pipeline.scratch_pool.
Position
Below the diagonal: tk_encode.tokenizer.pipeline.parallel uses a module listed above it, which is the healthy direction.
22→25 tk_encode.tokenizer.pipeline.parallel uses tk_encode.tokenizer.pipelinepart of a loop✕
Connections
5 pairs of types, where a type in tk_encode.tokenizer.pipeline.parallel uses a type in tk_encode.tokenizer.pipeline.
tk_encode.tokenizer.pipeline.parallel uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.tokenizer.pipeline.parallel, while a change to tk_encode.tokenizer.pipeline.parallel can't break tk_encode.tokenizer.pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
tk_encode.tokenizer.pipeline.post_processor uses tk_encode.tokenizer.encoding, so a change to tk_encode.tokenizer.encoding can break tk_encode.tokenizer.pipeline.post_processor, while a change to tk_encode.tokenizer.pipeline.post_processor can't break tk_encode.tokenizer.encoding.
Position
Below the diagonal: tk_encode.tokenizer.pipeline.post_processor uses a module listed above it, which is the healthy direction.
23→25 tk_encode.tokenizer.pipeline.post_processor uses tk_encode.tokenizer.pipelinepart of a loop✕
Connections
2 pairs of types, where a type in tk_encode.tokenizer.pipeline.post_processor uses a type in tk_encode.tokenizer.pipeline.
tk_encode.tokenizer.pipeline.post_processor uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.tokenizer.pipeline.post_processor, while a change to tk_encode.tokenizer.pipeline.post_processor can't break tk_encode.tokenizer.pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
tk_encode.utils.padding uses tk_encode.tokenizer.encoding, so a change to tk_encode.tokenizer.encoding can break tk_encode.utils.padding, while a change to tk_encode.utils.padding can't break tk_encode.tokenizer.encoding.
Position
Below the diagonal: tk_encode.utils.padding uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline uses tk_encode.tokenizer.pipeline.normalizer, so a change to tk_encode.tokenizer.pipeline.normalizer can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.tokenizer.pipeline.normalizer.
Position
Below the diagonal: tk_encode.tokenizer.pipeline uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline uses tk_encode.tokenizer.pipeline.pre_tokenizer, so a change to tk_encode.tokenizer.pipeline.pre_tokenizer can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.tokenizer.pipeline.pre_tokenizer.
Position
Below the diagonal: tk_encode.tokenizer.pipeline uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline uses tk_encode.utils.truncation, so a change to tk_encode.utils.truncation can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.utils.truncation.
Position
Below the diagonal: tk_encode.tokenizer.pipeline uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline uses tk_encode.tokenizer.pipeline.scratch_pool, so a change to tk_encode.tokenizer.pipeline.scratch_pool can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.tokenizer.pipeline.scratch_pool.
Position
Below the diagonal: tk_encode.tokenizer.pipeline uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline uses tk_encode.tokenizer.pipeline.parallel, so a change to tk_encode.tokenizer.pipeline.parallel can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.tokenizer.pipeline.parallel.
Position
Below the diagonal: tk_encode.tokenizer.pipeline uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline uses tk_encode.tokenizer.pipeline.post_processor, so a change to tk_encode.tokenizer.pipeline.post_processor can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.tokenizer.pipeline.post_processor.
Position
Below the diagonal: tk_encode.tokenizer.pipeline uses a module listed above it, which is the healthy direction.
tk_encode.tokenizer.pipeline uses tk_encode.utils.padding, so a change to tk_encode.utils.padding can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.utils.padding.
Position
Below the diagonal: tk_encode.tokenizer.pipeline uses a module listed above it, which is the healthy direction.
25→27 tk_encode.tokenizer.pipeline uses tk_encode.models.bpe.modelpart of a loop✕
Connections
1 pair of types, where a type in tk_encode.tokenizer.pipeline uses a type in tk_encode.models.bpe.model.
tk_encode.tokenizer.pipeline uses tk_encode.models.bpe.model, so a change to tk_encode.models.bpe.model can break tk_encode.tokenizer.pipeline, while a change to tk_encode.tokenizer.pipeline can't break tk_encode.models.bpe.model.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
tk_serialize.to_json.normalizers uses tk_encode.tokenizer.pipeline.normalizer, so a change to tk_encode.tokenizer.pipeline.normalizer can break tk_serialize.to_json.normalizers, while a change to tk_serialize.to_json.normalizers can't break tk_encode.tokenizer.pipeline.normalizer.
Position
Below the diagonal: tk_serialize.to_json.normalizers uses a module listed above it, which is the healthy direction.
tk_serialize.to_json.normalizers uses tk_serialize.to_json.writer, so a change to tk_serialize.to_json.writer can break tk_serialize.to_json.normalizers, while a change to tk_serialize.to_json.normalizers can't break tk_serialize.to_json.writer.
Position
Below the diagonal: tk_serialize.to_json.normalizers uses a module listed above it, which is the healthy direction.
tk_serialize.to_json.normalizers uses tk_encode.normalizers.replace, so a change to tk_encode.normalizers.replace can break tk_serialize.to_json.normalizers, while a change to tk_serialize.to_json.normalizers can't break tk_encode.normalizers.replace.
Position
Below the diagonal: tk_serialize.to_json.normalizers uses a module listed above it, which is the healthy direction.
tk_encode.models.bpe.model uses tk_encode.models.bpe.tables, so a change to tk_encode.models.bpe.tables can break tk_encode.models.bpe.model, while a change to tk_encode.models.bpe.model can't break tk_encode.models.bpe.tables.
Position
Below the diagonal: tk_encode.models.bpe.model uses a module listed above it, which is the healthy direction.
tk_encode.models.bpe.model uses tk_encode.vocab.bucket_vocab_store, so a change to tk_encode.vocab.bucket_vocab_store can break tk_encode.models.bpe.model, while a change to tk_encode.models.bpe.model can't break tk_encode.vocab.bucket_vocab_store.
Position
Below the diagonal: tk_encode.models.bpe.model uses a module listed above it, which is the healthy direction.
tk_encode.models.bpe.model uses tk_encode.tokenizer.pipeline.scratch_pool, so a change to tk_encode.tokenizer.pipeline.scratch_pool can break tk_encode.models.bpe.model, while a change to tk_encode.models.bpe.model can't break tk_encode.tokenizer.pipeline.scratch_pool.
Position
Below the diagonal: tk_encode.models.bpe.model uses a module listed above it, which is the healthy direction.
tk_encode.models.bpe.model uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.models.bpe.model, while a change to tk_encode.models.bpe.model can't break tk_encode.tokenizer.pipeline.
Position
Below the diagonal: tk_encode.models.bpe.model uses a module listed above it, which is the healthy direction.
27→33 tk_encode.models.bpe.model uses tk_encode.models.bpe.convertpart of a loop✕
Connections
2 pairs of types, where a type in tk_encode.models.bpe.model uses a type in tk_encode.models.bpe.convert.
tk_encode.models.bpe.model uses tk_encode.models.bpe.convert, so a change to tk_encode.models.bpe.convert can break tk_encode.models.bpe.model, while a change to tk_encode.models.bpe.model can't break tk_encode.models.bpe.convert.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
tk_encode.models.unigram.model uses tk_encode.vocab.bucket_vocab_store, so a change to tk_encode.vocab.bucket_vocab_store can break tk_encode.models.unigram.model, while a change to tk_encode.models.unigram.model can't break tk_encode.vocab.bucket_vocab_store.
Position
Below the diagonal: tk_encode.models.unigram.model uses a module listed above it, which is the healthy direction.
tk_encode.models.unigram.model uses tk_encode.tokenizer.pipeline.scratch_pool, so a change to tk_encode.tokenizer.pipeline.scratch_pool can break tk_encode.models.unigram.model, while a change to tk_encode.models.unigram.model can't break tk_encode.tokenizer.pipeline.scratch_pool.
Position
Below the diagonal: tk_encode.models.unigram.model uses a module listed above it, which is the healthy direction.
tk_encode.models.unigram.model uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.models.unigram.model, while a change to tk_encode.models.unigram.model can't break tk_encode.tokenizer.pipeline.
Position
Below the diagonal: tk_encode.models.unigram.model uses a module listed above it, which is the healthy direction.
tk_encode.models.wordlevel uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.models.wordlevel, while a change to tk_encode.models.wordlevel can't break tk_encode.tokenizer.pipeline.
Position
Below the diagonal: tk_encode.models.wordlevel uses a module listed above it, which is the healthy direction.
tk_encode.vocab.bucket_added_vocabulary uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.vocab.bucket_added_vocabulary, while a change to tk_encode.vocab.bucket_added_vocabulary can't break tk_encode.tokenizer.pipeline.
Position
Below the diagonal: tk_encode.vocab.bucket_added_vocabulary uses a module listed above it, which is the healthy direction.
tk_serialize.to_json uses tk_encode.utils.truncation, so a change to tk_encode.utils.truncation can break tk_serialize.to_json, while a change to tk_serialize.to_json can't break tk_encode.utils.truncation.
Position
Below the diagonal: tk_serialize.to_json uses a module listed above it, which is the healthy direction.
tk_serialize.to_json uses tk_encode.tokenizer.pipeline.post_processor, so a change to tk_encode.tokenizer.pipeline.post_processor can break tk_serialize.to_json, while a change to tk_serialize.to_json can't break tk_encode.tokenizer.pipeline.post_processor.
Position
Below the diagonal: tk_serialize.to_json uses a module listed above it, which is the healthy direction.
tk_serialize.to_json uses tk_encode.utils.padding, so a change to tk_encode.utils.padding can break tk_serialize.to_json, while a change to tk_serialize.to_json can't break tk_encode.utils.padding.
Position
Below the diagonal: tk_serialize.to_json uses a module listed above it, which is the healthy direction.
tk_serialize.to_json uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_serialize.to_json, while a change to tk_serialize.to_json can't break tk_encode.tokenizer.pipeline.
Position
Below the diagonal: tk_serialize.to_json uses a module listed above it, which is the healthy direction.
tk_train.trainer uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_train.trainer, while a change to tk_train.trainer can't break tk_encode.tokenizer.pipeline.
Position
Below the diagonal: tk_train.trainer uses a module listed above it, which is the healthy direction.
tk_encode.models.bpe.convert uses tk_encode.models.bpe.tables, so a change to tk_encode.models.bpe.tables can break tk_encode.models.bpe.convert, while a change to tk_encode.models.bpe.convert can't break tk_encode.models.bpe.tables.
Position
Below the diagonal: tk_encode.models.bpe.convert uses a module listed above it, which is the healthy direction.
tk_encode.models.bpe.convert uses tk_encode.vocab.bucket_vocab_store, so a change to tk_encode.vocab.bucket_vocab_store can break tk_encode.models.bpe.convert, while a change to tk_encode.models.bpe.convert can't break tk_encode.vocab.bucket_vocab_store.
Position
Below the diagonal: tk_encode.models.bpe.convert uses a module listed above it, which is the healthy direction.
tk_encode.models.bpe.convert uses tk_encode.models.bpe.model, so a change to tk_encode.models.bpe.model can break tk_encode.models.bpe.convert, while a change to tk_encode.models.bpe.convert can't break tk_encode.models.bpe.model.
Position
Below the diagonal: tk_encode.models.bpe.convert uses a module listed above it, which is the healthy direction.
tk_encode.models.wordpiece uses tk_encode.decoders.wordpiece, so a change to tk_encode.decoders.wordpiece can break tk_encode.models.wordpiece, while a change to tk_encode.models.wordpiece can't break tk_encode.decoders.wordpiece.
Position
Below the diagonal: tk_encode.models.wordpiece uses a module listed above it, which is the healthy direction.
tk_encode.models.wordpiece uses tk_encode.tokenizer.pipeline.scratch_pool, so a change to tk_encode.tokenizer.pipeline.scratch_pool can break tk_encode.models.wordpiece, while a change to tk_encode.models.wordpiece can't break tk_encode.tokenizer.pipeline.scratch_pool.
Position
Below the diagonal: tk_encode.models.wordpiece uses a module listed above it, which is the healthy direction.
tk_encode.models.wordpiece uses tk_encode.tokenizer.pipeline, so a change to tk_encode.tokenizer.pipeline can break tk_encode.models.wordpiece, while a change to tk_encode.models.wordpiece can't break tk_encode.tokenizer.pipeline.
Position
Below the diagonal: tk_encode.models.wordpiece uses a module listed above it, which is the healthy direction.
tk_encode.models.wordpiece uses tk_encode.models.wordlevel, so a change to tk_encode.models.wordlevel can break tk_encode.models.wordpiece, while a change to tk_encode.models.wordpiece can't break tk_encode.models.wordlevel.
Position
Below the diagonal: tk_encode.models.wordpiece uses a module listed above it, which is the healthy direction.
tk_train.trainers.bpe uses tk_encode.models.bpe.model, so a change to tk_encode.models.bpe.model can break tk_train.trainers.bpe, while a change to tk_train.trainers.bpe can't break tk_encode.models.bpe.model.
Position
Below the diagonal: tk_train.trainers.bpe uses a module listed above it, which is the healthy direction.
tk_train.trainers.bpe uses tk_encode.vocab.bucket_added_vocabulary, so a change to tk_encode.vocab.bucket_added_vocabulary can break tk_train.trainers.bpe, while a change to tk_train.trainers.bpe can't break tk_encode.vocab.bucket_added_vocabulary.
Position
Below the diagonal: tk_train.trainers.bpe uses a module listed above it, which is the healthy direction.
tk_train.trainers.bpe uses tk_train.trainer, so a change to tk_train.trainer can break tk_train.trainers.bpe, while a change to tk_train.trainers.bpe can't break tk_train.trainer.
Position
Below the diagonal: tk_train.trainers.bpe uses a module listed above it, which is the healthy direction.
tk_train.trainers.unigram uses tk_encode.models.unigram.model, so a change to tk_encode.models.unigram.model can break tk_train.trainers.unigram, while a change to tk_train.trainers.unigram can't break tk_encode.models.unigram.model.
Position
Below the diagonal: tk_train.trainers.unigram uses a module listed above it, which is the healthy direction.
tk_train.trainers.unigram uses tk_encode.vocab.bucket_added_vocabulary, so a change to tk_encode.vocab.bucket_added_vocabulary can break tk_train.trainers.unigram, while a change to tk_train.trainers.unigram can't break tk_encode.vocab.bucket_added_vocabulary.
Position
Below the diagonal: tk_train.trainers.unigram uses a module listed above it, which is the healthy direction.
tk_train.trainers.unigram uses tk_train.trainer, so a change to tk_train.trainer can break tk_train.trainers.unigram, while a change to tk_train.trainers.unigram can't break tk_train.trainer.
Position
Below the diagonal: tk_train.trainers.unigram uses a module listed above it, which is the healthy direction.
tk_train.trainers.wordlevel uses tk_encode.models.wordlevel, so a change to tk_encode.models.wordlevel can break tk_train.trainers.wordlevel, while a change to tk_train.trainers.wordlevel can't break tk_encode.models.wordlevel.
Position
Below the diagonal: tk_train.trainers.wordlevel uses a module listed above it, which is the healthy direction.
tk_train.trainers.wordlevel uses tk_encode.vocab.bucket_added_vocabulary, so a change to tk_encode.vocab.bucket_added_vocabulary can break tk_train.trainers.wordlevel, while a change to tk_train.trainers.wordlevel can't break tk_encode.vocab.bucket_added_vocabulary.
Position
Below the diagonal: tk_train.trainers.wordlevel uses a module listed above it, which is the healthy direction.
tk_train.trainers.wordlevel uses tk_train.trainer, so a change to tk_train.trainer can break tk_train.trainers.wordlevel, while a change to tk_train.trainers.wordlevel can't break tk_train.trainer.
Position
Below the diagonal: tk_train.trainers.wordlevel uses a module listed above it, which is the healthy direction.
tk_train.trainers.wordpiece uses tk_encode.decoders.wordpiece, so a change to tk_encode.decoders.wordpiece can break tk_train.trainers.wordpiece, while a change to tk_train.trainers.wordpiece can't break tk_encode.decoders.wordpiece.
Position
Below the diagonal: tk_train.trainers.wordpiece uses a module listed above it, which is the healthy direction.
tk_train.trainers.wordpiece uses tk_encode.vocab.bucket_added_vocabulary, so a change to tk_encode.vocab.bucket_added_vocabulary can break tk_train.trainers.wordpiece, while a change to tk_train.trainers.wordpiece can't break tk_encode.vocab.bucket_added_vocabulary.
Position
Below the diagonal: tk_train.trainers.wordpiece uses a module listed above it, which is the healthy direction.
tk_train.trainers.wordpiece uses tk_train.trainer, so a change to tk_train.trainer can break tk_train.trainers.wordpiece, while a change to tk_train.trainers.wordpiece can't break tk_train.trainer.
Position
Below the diagonal: tk_train.trainers.wordpiece uses a module listed above it, which is the healthy direction.
tk_train.trainers.wordpiece uses tk_train.trainers.bpe, so a change to tk_train.trainers.bpe can break tk_train.trainers.wordpiece, while a change to tk_train.trainers.wordpiece can't break tk_train.trainers.bpe.
Position
Below the diagonal: tk_train.trainers.wordpiece uses a module listed above it, which is the healthy direction.
tk_train.trainers uses tk_train.trainer, so a change to tk_train.trainer can break tk_train.trainers, while a change to tk_train.trainers can't break tk_train.trainer.
Position
Below the diagonal: tk_train.trainers uses a module listed above it, which is the healthy direction.
tk_train.trainers uses tk_train.trainers.bpe, so a change to tk_train.trainers.bpe can break tk_train.trainers, while a change to tk_train.trainers can't break tk_train.trainers.bpe.
Position
Below the diagonal: tk_train.trainers uses a module listed above it, which is the healthy direction.
tk_train.trainers uses tk_train.trainers.unigram, so a change to tk_train.trainers.unigram can break tk_train.trainers, while a change to tk_train.trainers can't break tk_train.trainers.unigram.
Position
Below the diagonal: tk_train.trainers uses a module listed above it, which is the healthy direction.
tk_train.trainers uses tk_train.trainers.wordlevel, so a change to tk_train.trainers.wordlevel can break tk_train.trainers, while a change to tk_train.trainers can't break tk_train.trainers.wordlevel.
Position
Below the diagonal: tk_train.trainers uses a module listed above it, which is the healthy direction.
tk_train.trainers uses tk_train.trainers.wordpiece, so a change to tk_train.trainers.wordpiece can break tk_train.trainers, while a change to tk_train.trainers can't break tk_train.trainers.wordpiece.
Position
Below the diagonal: tk_train.trainers uses a module listed above it, which is the healthy direction.
39→40 tk_train.trainers uses tk_train.trainablepart of a loop✕
Connections
1 pair of types, where a type in tk_train.trainers uses a type in tk_train.trainable.
tk_train.trainers uses tk_train.trainable, so a change to tk_train.trainable can break tk_train.trainers, while a change to tk_train.trainers can't break tk_train.trainable.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
tk_train.trainable uses tk_encode.decoders.wordpiece, so a change to tk_encode.decoders.wordpiece can break tk_train.trainable, while a change to tk_train.trainable can't break tk_encode.decoders.wordpiece.
Position
Below the diagonal: tk_train.trainable uses a module listed above it, which is the healthy direction.
tk_train.trainable uses tk_encode.models.bpe.model, so a change to tk_encode.models.bpe.model can break tk_train.trainable, while a change to tk_train.trainable can't break tk_encode.models.bpe.model.
Position
Below the diagonal: tk_train.trainable uses a module listed above it, which is the healthy direction.
tk_train.trainable uses tk_encode.models.unigram.model, so a change to tk_encode.models.unigram.model can break tk_train.trainable, while a change to tk_train.trainable can't break tk_encode.models.unigram.model.
Position
Below the diagonal: tk_train.trainable uses a module listed above it, which is the healthy direction.
tk_train.trainable uses tk_encode.models.wordlevel, so a change to tk_encode.models.wordlevel can break tk_train.trainable, while a change to tk_train.trainable can't break tk_encode.models.wordlevel.
Position
Below the diagonal: tk_train.trainable uses a module listed above it, which is the healthy direction.
tk_train.trainable uses tk_train.trainer, so a change to tk_train.trainer can break tk_train.trainable, while a change to tk_train.trainable can't break tk_train.trainer.
Position
Below the diagonal: tk_train.trainable uses a module listed above it, which is the healthy direction.
tk_train.trainable uses tk_train.trainers, so a change to tk_train.trainers can break tk_train.trainable, while a change to tk_train.trainable can't break tk_train.trainers.
Position
Below the diagonal: tk_train.trainable uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
14
High / Critical
A03:2025 — Software Supply Chain Failures
12
Medium
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 9
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 184
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 31
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 11
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 44 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 44 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 205 of 224 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for bindings/node/ could not reach the package registry on this run (➤ YN0001: │ RequestError: tunneling socket could not be established, statusCode=403), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 22 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 36 test source file(s) (.rs, .py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for bindings/node/ could not reach the package registry on this run (➤ YN0001: │ RequestError: tunneling socket could not be established, statusCode=403), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in bindings/node/ was NOT MEASURED: the dependency install for bindings/node/ could not reach the package registry on this run (➤ YN0001: │ RequestError: tunneling socket could not be established, statusCode=403), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 27 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
12 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was bitmap_gen::generate_tables at 41. A further 3 function(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being tk_serialize::from_json::normalizers::push_normalizer at 18 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: tokenizers/tk-serialize/src/from_json/normalizers.rs (tk_serialize::from_json::normalizers::push_normalizer at 18), bindings/python/src/components/normalizers.rs (Normalizer::from_spec at 17), tokenizers/tk-serialize/src/to_json/normalizers.rs (tk_serialize::to_json::normalizers::write_one at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with bitmap_gen::generate_tables (cyclomatic 41), ParityBpeTrainer::do_train (cyclomatic 32), bitmap_gen::atom (cyclomatic 27). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cyclomatic Complexity from 8.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 14 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 60 down to 60 or less in Cognitive Complexity — start with bitmap_gen::generate_tables (cognitive 79), ParityBpeTrainer::do_train (cognitive 63). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 5.7 to about 6.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 6 FunctionTooLong finding(s) in God Classes — start with neon.rs (2), family_o200k.rs, lib.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 3 MethodTooLong finding(s) in God Classes — start with parity_trainer.rs, tables.rs, serialization.rs. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 3 FileTooLong finding(s) in God Classes — start with parity_trainer.rs, mod.rs, convert.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
30 duplicated block group(s) detected. 3.4 % of the production lines (1,319 of 38,791) are in a reported copy. A further 29 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (19 corresponding lines) · ×2tokenizers/bitcannon/src/classify/wasm.rs:69
+ 39 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), cl100k.rs, split.rs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with pipeline.rs (2), bucket_vocab_store.rs, padding.rs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with avx.rs, unicode.rs, mod.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.3 / 10Stronggated by 1 serious finding✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
11 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 7 of the 11 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: bitcannon
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 22 tests. Measured on the JavaScript/TypeScript suite only — at least 36 test source file(s) (.rs, .py) went unread, so its test quality is unmeasured and is not in these counts.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
8 outdated, 0 yanked direct Cargo dependencies. 29 of 44 direct crates were graded against crates.io (0 not published there, 15 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: js-sys · ×8
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 428 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 4 Hotspot finding(s) in Churn × Complexity Hotspots — start with convert.rs, lib.rs, serialization.rs. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.1 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
12 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs. Counted over 130 of the 184 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
37 deducted task-comment markers across 38791 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 27 TodoComment finding(s) in Explicit Debt — start with bucket_added_vocabulary.rs (4), mod.rs (3), parallelism.rs (3). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 6 XxxComment finding(s) in Explicit Debt — start with truncation.rs (2), unigram.rs, mod.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with mod.rs, parity_trainer.rs, bucket_added_vocabulary.rs. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 27 document(s) read across 3 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
1 of 11 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
14 finding(s): 0 critical, 9 high, 5 medium, 0 low. semgrep hit a parse error in 2 file(s) — `.github/conda/meta.yaml`, `tokenizers/bitcannon/src/lib.rs` (line 280, lines 310–311) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 5 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 recommendation-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
3 of 130 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is tokenizers/tk-encode/src/utils/cache.rs. Counted over 130 of the 184 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 3 Change coupling finding(s) in Change Coupling — start with model.rs (2), unigram.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 14 platform declaration(s) and 2 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with package.json. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `tokenizers/bitmap_gen`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `npm`, `cargo`, `pip`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — .github/dependabot.yml:2
What to do
Dependabot is configured but does not watch `npm`, `cargo`, `pip` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 70 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — D21 withholds its sibling role token rows: 1 candidate(s) found and not reported.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py, .rs source were not judged.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (29 value object(s))
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — No web surface: 177 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X12 Unreachable branch — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
TodoComment tokenizers/tk-train/src/trainers/unigram.rs:464— // TODO: Temporary hack to avoid Nans. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-train/src/trainers/unigram.rs:612— // TODO Should be able to upgrade to u64 when needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-serialize/src/to_json/normalizers.rs:104— // TODO: this will be fixed for v1! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-serialize/src/to_json/tests.rs:110— // TODO(pr3): every fixture in `data/` is a 1.0 file, so this has no input until tk-convert can — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-serialize/src/from_json/mod.rs:6— //! ## TODO(pr3): port to tk-convert — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-serialize/src/from_json/mod.rs:213— // TODO: this has nothing to do here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/vocab/bucket_added_vocabulary.rs:130— // TODO: remove this once we have the final saving format — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/vocab/bucket_added_vocabulary.rs:233— // TODO: make it clean. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/vocab/bucket_added_vocabulary.rs:294— /// TODO: this will be slow because we rebuild the added tokens — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/vocab/bucket_added_vocabulary.rs:308— // TODO: implem from / to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/vocab/buckets.rs:207— // >8 high nibbles -> fallback to the general implementation TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/utils/parallelism.rs:20— /// TODO: deprecate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/utils/parallelism.rs:23— /// TODO: deprecate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/utils/parallelism.rs:26— /// TODO: deprecate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/tokenizer/encoding.rs:168— // TODO: the mutable `words` / `offsets` accessors and `get_sequence_ranges` were dropped — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/tokenizer/encoding.rs:396— // TODO this is suboptimal as we're doing this iteratively instead of preallocating — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:53— /// TODO: For RC0 this is abolutely fine. For v1, we need an enum, Token or Encoding, which can — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/tokenizer/pipeline/parallel.rs:50— /// TODO: benchmark with and without to validate usefulness — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/tokenizer/pipeline/parallel.rs:67— // TODO: safety doc — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/pre_tokenizers/whitespace.rs:212— // TODO: add xnli test: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/models/unigram/lattice.rs:39— // TODO Maybe use Ordered Floats (https://docs.rs/ordered-float/1.0.2/ordered_float/)
TodoComment tokenizers/tk-encode/src/models/unigram/lattice.rs:203— // TODO can we remove this clone ? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/models/bpe/pair_map.rs:48— // TODO: check for collisions. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-encode/src/models/bpe/serialization.rs:71— // TODO: For now we keep serializing the old "printable" chars, but this costs nothing to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tokenizers/tk-convert/src/convert.rs:764— // TODO: depending on how we implement the byte level post processor we might have to re implement that — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tokenizers/tk-train/src/trainers/unigram.rs:291— // XXX — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tokenizers/tk-encode/src/utils/truncation.rs:83— // XXX: maybe we should error out when instantiating the PipelineTokenizer to avoid this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tokenizers/tk-encode/src/utils/truncation.rs:95— // XXX: this algorithm is ported from the legacy truncation code, verbatim — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:475— // XXX: `Vec::new` does not allocate anything when capacity == 0, so creating empty — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tokenizers/tk-encode/src/models/unigram/lattice.rs:608— // XXX: In sentence piece this is not tested, still incomplete ? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tokenizers/bitcannon/src/classify/neon.rs:128— // | xxx | U+ range | scripts | — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
bitcannon::models::family_o200k::run (cognitive 51) tokenizers/bitcannon/src/models/family_o200k.rs:189— bitcannon::models::family_o200k::run has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (42 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bitcannon::classify::neon::classify_neon (cognitive 43) tokenizers/bitcannon/src/classify/neon.rs:159— bitcannon::classify::neon::classify_neon has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 6 (13 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bitcannon::classify::wasm::classify_wasm (cognitive 43) tokenizers/bitcannon/src/classify/wasm.rs:149— bitcannon::classify::wasm::classify_wasm has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 6 (12 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bitcannon::digit_groups (cognitive 20) tokenizers/bitcannon/src/lib.rs:646— bitcannon::digit_groups has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
bitcannon::models::family_gpt::contractions (cognitive 17) tokenizers/bitcannon/src/models/family_gpt.rs:75— bitcannon::models::family_gpt::contractions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bitcannon::blocks (cognitive 16) tokenizers/bitcannon/src/lib.rs:131— bitcannon::blocks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: bitcannon::models::family_o200k::run tokenizers/bitcannon/src/models/family_o200k.rs:189— FunctionTooLong — bitcannon::models::family_o200k::run runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: bitmap_gen::generate_tables tokenizers/bitmap_gen/src/lib.rs:134— FunctionTooLong — bitmap_gen::generate_tables runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: bitcannon::simd::x86::build64 tokenizers/bitcannon/src/simd/x86.rs:87— FunctionTooLong — bitcannon::simd::x86::build64 runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: bitcannon::classify::wasm::classify_wasm tokenizers/bitcannon/src/classify/wasm.rs:149— FunctionTooLong — bitcannon::classify::wasm::classify_wasm runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: bitcannon::classify::neon::classify_neon tokenizers/bitcannon/src/classify/neon.rs:159— FunctionTooLong — bitcannon::classify::neon::classify_neon runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: bitcannon::simd::neon::build64 tokenizers/bitcannon/src/simd/neon.rs:78— FunctionTooLong — bitcannon::simd::neon::build64 runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
ParityBpeTrainer::do_train (cognitive 63) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:1173— ParityBpeTrainer::do_train has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (40 pts), loops 10 (19 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParityBpeTrainer::init_lengths (cognitive 53) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:903— ParityBpeTrainer::init_lengths has cognitive complexity 53 (threshold 15). Drivers by points: if/else 10 (32 pts), loops 7 (18 pts), boolean chains 3 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParityBpeTrainer::select_next_language (cognitive 35) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:1042— ParityBpeTrainer::select_next_language has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (12 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParityBpeTrainer::tokenize_words (cognitive 20) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:586— ParityBpeTrainer::tokenize_words has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParityBpeTrainer::validate_train_config (cognitive 17) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:797— ParityBpeTrainer::validate_train_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (6 lines × 2) tokenizers/bitcannon/src/models/cl100k.rs:47— tokenizers/bitcannon/src/models/cl100k.rs:47-52 | tokenizers/bitcannon/src/models/gpt2.rs:23-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) tokenizers/tk-encode/src/pre_tokenizers/split.rs:83— tokenizers/tk-encode/src/pre_tokenizers/split.rs:83-88 | tokenizers/tk-encode/src/pre_tokenizers/split.rs:120-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-encode/src/pre_tokenizers/split.rs:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tokenizers/tk-encode/src/pre_tokenizers/split.rs:82` calls `into` and `tokenizers/tk-encode/src/pre_tokenizers/split.rs:119` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:378— tokenizers/tk-train/src/trainers/bpe/mod.rs:378-383 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:577-582 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:378` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:324— tokenizers/tk-train/src/trainers/bpe/mod.rs:324-329 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:534-539 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:324` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:148— tokenizers/tk-train/src/trainers/bpe/mod.rs:148-153 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:167-172 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Hotspot: tokenizers/tk-convert/src/convert.rs tokenizers/tk-convert/src/convert.rs:740— tokenizers/tk-convert/src/convert.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in tk_convert::convert::lower_template_node at line 740. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 16:57:08 +01:00' --until='2026-11-12 16:57:08 +01:00' --full-history --no-merges -- tokenizers/tk-convert/src/convert.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tokenizers/bitmap_gen/src/lib.rs tokenizers/bitmap_gen/src/lib.rs:41— tokenizers/bitmap_gen/src/lib.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in bitmap_gen::atom at line 41. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 16:57:08 +01:00' --until='2026-11-12 16:57:08 +01:00' --full-history --no-merges -- tokenizers/bitmap_gen/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tokenizers/tk-encode/src/models/bpe/serialization.rs tokenizers/tk-encode/src/models/bpe/serialization.rs:193— tokenizers/tk-encode/src/models/bpe/serialization.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in PipelineBPE::from_merge_map at line 193. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 16:57:08 +01:00' --until='2026-11-12 16:57:08 +01:00' --full-history --no-merges -- tokenizers/tk-encode/src/models/bpe/serialization.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tokenizers/tk-encode/src/models/bpe/tables.rs tokenizers/tk-encode/src/models/bpe/tables.rs:79— tokenizers/tk-encode/src/models/bpe/tables.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in BpeTables::build at line 79. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 16:57:08 +01:00' --until='2026-11-12 16:57:08 +01:00' --full-history --no-merges -- tokenizers/tk-encode/src/models/bpe/tables.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FixmeComment tokenizers/tk-train/src/trainers/bpe/mod.rs:603— // FIXME: doesn't look great — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:1493— // FIXME: doesn't look great — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tokenizers/tk-encode/src/vocab/bucket_added_vocabulary.rs:42— // FIXME: we use chr conversion for now, this can be inproved by using bitmap. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tokenizers/tk-encode/src/pre_tokenizers/sequence.rs:117— // FIXME: do we want to add an `offset` param to `pre_tokenize` so we don't have to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×4
Edited copy of a member (9 corresponding lines) bindings/node/src/pipeline.rs:189— bindings/node/src/pipeline.rs:189-200 | bindings/wasm/src/lib.rs:74-82 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) bindings/node/src/pipeline.rs:161— bindings/node/src/pipeline.rs:161-169 | bindings/wasm/src/options.rs:107-118 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) tokenizers/tk-encode/src/vocab/bucket_vocab_store.rs:318— tokenizers/tk-encode/src/vocab/bucket_vocab_store.rs:318-326 | tokenizers/tk-encode/src/vocab/bucket_vocab_store.rs:354-362 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) bindings/python/src/options/padding.rs:66— bindings/python/src/options/padding.rs:66-74 | bindings/python/src/options/truncation.rs:99-107 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
bitcannon::models::family_o200k::run (cyclomatic 24) tokenizers/bitcannon/src/models/family_o200k.rs:189— bitcannon::models::family_o200k::run has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bitcannon::classify::wasm::classify_wasm (cyclomatic 19) tokenizers/bitcannon/src/classify/wasm.rs:149— bitcannon::classify::wasm::classify_wasm has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bitcannon::classify::neon::classify_neon (cyclomatic 17) tokenizers/bitcannon/src/classify/neon.rs:159— bitcannon::classify::neon::classify_neon has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tk_encode::utils::truncation::truncate_pair (cognitive 51) tokenizers/tk-encode/src/utils/truncation.rs:69— tk_encode::utils::truncation::truncate_pair has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (48 pts), match/switch 1 (3 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
tk_encode::tokenizer::pipeline::pre_tokenizer::split_matches (cognitive 28) tokenizers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs:342— tk_encode::tokenizer::pipeline::pre_tokenizer::split_matches has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tk_encode::tokenizer::pipeline::pre_tokenizer::split_delimiter (cognitive 21) tokenizers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs:278— tk_encode::tokenizer::pipeline::pre_tokenizer::split_delimiter has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tk_serialize::vendored::f64_from_parts (cognitive 30) tokenizers/tk-serialize/src/vendored.rs:62— tk_serialize::vendored::f64_from_parts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tk_serialize::vendored::number (cognitive 24) tokenizers/tk-serialize/src/vendored.rs:100— tk_serialize::vendored::number has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (6 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tk_serialize::from_json::post_processors::read_template (cognitive 17) tokenizers/tk-serialize/src/from_json/post_processors.rs:21— tk_serialize::from_json::post_processors::read_template has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MethodTooLong: ParityBpeTrainer.do_train tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:1173— MethodTooLong — do_train runs 185 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BpeTables.build tokenizers/tk-encode/src/models/bpe/tables.rs:79— MethodTooLong — build runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PipelineBPE.from_merge_map tokenizers/tk-encode/src/models/bpe/serialization.rs:193— MethodTooLong — from_merge_map runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: bpe/parity_trainer.rs tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs— FileTooLong — 898 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: ParityBpeTrainer (3 blocks, 321-1533). The bar is 500 significant lines; this is 398 over it, 1.80× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: pipeline/mod.rs tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs— FileTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 224 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/convert.rs tokenizers/tk-convert/src/convert.rs— FileTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 6 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
TooManyMethods: Tokenizer bindings/python/src/tokenizer.rs:107— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. This type is on a published API surface — a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual — so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
TooManyMethods: Encoding tokenizers/tk-encode/src/tokenizer/encoding.rs:12— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. This type is on a published API surface — a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual — so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
TooManyMethods: PipelineTokenizer tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:248— TooManyMethods — 31 methods, declared across 2 files: pipeline/mod.rs (28), pipeline/parallel.rs (3). The bar is 30 methods; this is 1 over it, 1.03× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. This type is on a published API surface — a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual — so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
Change coupling: model.rs ↔ cache.rs tokenizers/tk-encode/src/models/bpe/model.rs:1— `tokenizers/tk-encode/src/models/bpe/model.rs` and `tokenizers/tk-encode/src/utils/cache.rs` change together 76% of the time (13 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `af5a3e3a` perf(bpe): WordCache (#2262); `5aa9f6cf` Disable caching for long strings. (#1676) (at that commit the files were still `tokenizers/src/models/bpe/model.rs` and `tokenizers/src/utils/cache.rs`); `c6b5c3ea` More cache options. (#1675) (at that commit the files were still `tokenizers/src/models/bpe/model.rs` and `tokenizers/src/utils/cache.rs`) — run `git show` on any of them.
Change coupling: unigram.rs ↔ wordlevel.rs tokenizers/tk-train/src/trainers/unigram.rs:1— `tokenizers/tk-train/src/trainers/unigram.rs` and `tokenizers/tk-train/src/trainers/wordlevel.rs` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `15c2e22b` tk-train: fmt, dead code, stale docs, drop unused tk-convert dep (#2473); `abbd2d32` ci: update CI after encode/train split (#2125); `76abe0f7` Bpe clones (#1707) (at that commit the files were still `tokenizers/src/models/unigram/trainer.rs` and `tokenizers/src/models/wordlevel/trainer.rs`) — run `git show` on any of them.
Change coupling: model.rs ↔ word.rs tokenizers/tk-encode/src/models/bpe/model.rs:1— `tokenizers/tk-encode/src/models/bpe/model.rs` and `tokenizers/tk-train/src/trainers/bpe/word.rs` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `af5a3e3a` perf(bpe): WordCache (#2262) (at that commit the file was still `tokenizers/tk-encode/src/models/bpe/word.rs`); `077130b7` perf(scratch): reuse Scratch buffers across encode() calls (#2261) (at that commit the file was still `tokenizers/tk-encode/src/models/bpe/word.rs`); `2c4f6100` no alloc model, follow-ups (#2175) (at that commit the file was still `tokenizers/tk-encode/src/models/bpe/word.rs`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) tokenizers/bitcannon/src/classify/avx.rs:100— tokenizers/bitcannon/src/classify/avx.rs:100-116 | tokenizers/bitcannon/src/classify/avx.rs:120-131 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) tokenizers/tk-encode/src/utils/unicode.rs:22— tokenizers/tk-encode/src/utils/unicode.rs:22-33 | tokenizers/tk-encode/src/vocab/bucket_added_vocabulary.rs:192-212 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) tokenizers/tk-train/src/trainers/mod.rs:45— tokenizers/tk-train/src/trainers/mod.rs:45-56 | tokenizers/tk-train/src/trainers/mod.rs:90-101 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2) tokenizers/tk-encode/src/models/unigram/lattice.rs:349— tokenizers/tk-encode/src/models/unigram/lattice.rs:349-355 | tokenizers/tk-encode/src/models/unigram/lattice.rs:399-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-encode/src/models/unigram/lattice.rs:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:509— tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:509-515 | tokenizers/tk-train/src/trainers/unigram.rs:518-524 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:518— tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:518-524 | tokenizers/tk-train/src/trainers/unigram.rs:510-516 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
bitmap_gen::generate_tables (cyclomatic 41) tokenizers/bitmap_gen/src/lib.rs:134— bitmap_gen::generate_tables has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bitmap_gen::atom (cyclomatic 27) tokenizers/bitmap_gen/src/lib.rs:41— bitmap_gen::atom has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ParityBpeTrainer::do_train (cyclomatic 32) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:1173— ParityBpeTrainer::do_train has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParityBpeTrainer::init_lengths (cyclomatic 18) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:903— ParityBpeTrainer::init_lengths has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bitmap_gen::generate_tables (cognitive 79) tokenizers/bitmap_gen/src/lib.rs:134— bitmap_gen::generate_tables has cognitive complexity 79 (threshold 15). Drivers by points: if/else 23 (47 pts), loops 20 (32 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bitmap_gen::atom (cognitive 31) tokenizers/bitmap_gen/src/lib.rs:41— bitmap_gen::atom has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PipelineBPE::from_merge_map (cognitive 49) tokenizers/tk-encode/src/models/bpe/serialization.rs:193— PipelineBPE::from_merge_map has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 3 (8 pts), match/switch 1 (5 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineBPE::tokenize_spans (cognitive 19) tokenizers/tk-encode/src/models/bpe/model.rs:276— PipelineBPE::tokenize_spans has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnigramTrainer::prune_sentence_pieces (cognitive 37) tokenizers/tk-train/src/trainers/unigram.rs:352— UnigramTrainer::prune_sentence_pieces has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 8 (15 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnigramTrainer::finalize (cognitive 22) tokenizers/tk-train/src/trainers/unigram.rs:190— UnigramTrainer::finalize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tk_convert::convert::lower_template_node (cognitive 30) tokenizers/tk-convert/src/convert.rs:740— tk_convert::convert::lower_template_node has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tk_convert::convert::lower_byte_level_pre_tokenizer (cognitive 19) tokenizers/tk-convert/src/convert.rs:511— tk_convert::convert::lower_byte_level_pre_tokenizer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lattice::nbest (cognitive 28) tokenizers/tk-encode/src/models/unigram/lattice.rs:250— Lattice::nbest has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (15 pts), if/else 4 (12 pts), match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Lattice::viterbi (cognitive 21) tokenizers/tk-encode/src/models/unigram/lattice.rs:189— Lattice::viterbi has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (7 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Unigram::encode_optimized (cognitive 26) tokenizers/tk-encode/src/models/unigram/model.rs:269— Unigram::encode_optimized has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Unigram::tokenize_pipeline (cognitive 17) tokenizers/tk-encode/src/models/unigram/model.rs:528— Unigram::tokenize_pipeline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BpeTrainer::do_train (cognitive 25) tokenizers/tk-train/src/trainers/bpe/mod.rs:503— BpeTrainer::do_train has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BpeTrainer::tokenize_words (cognitive 22) tokenizers/tk-train/src/trainers/bpe/mod.rs:386— BpeTrainer::tokenize_words has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Buckets::from_tokens (cognitive 18) tokenizers/tk-encode/src/vocab/buckets.rs:117— Buckets::from_tokens has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Buckets::build_nibble_table (cognitive 16) tokenizers/tk-encode/src/vocab/buckets.rs:195— Buckets::build_nibble_table has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) tokenizers/bitcannon/src/classify/wasm.rs:69— tokenizers/bitcannon/src/classify/wasm.rs:69-87 | tokenizers/bitcannon/src/classify/wasm.rs:90-108 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) tokenizers/bitcannon/src/literal.rs:94— tokenizers/bitcannon/src/literal.rs:94-112 | tokenizers/bitcannon/src/literal.rs:117-140 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) tokenizers/bitcannon/src/classify/avx.rs:79— tokenizers/bitcannon/src/classify/avx.rs:79-85 | tokenizers/bitcannon/src/classify/avx.rs:88-94 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) bindings/python/src/compiled.rs:358— bindings/python/src/compiled.rs:358-364 | bindings/python/src/tokenizer.rs:454-460 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) tokenizers/bitmap_gen/src/lib.rs:332— tokenizers/bitmap_gen/src/lib.rs:332-340 | tokenizers/bitmap_gen/src/lib.rs:346-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/bitmap_gen/src/lib.rs:332` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) tokenizers/tk-encode/src/decoders/replace.rs:16— tokenizers/tk-encode/src/decoders/replace.rs:16-24 | tokenizers/tk-encode/src/normalizers/replace.rs:37-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) tokenizers/tk-encode/src/decoders/byte_fallback.rs:30— tokenizers/tk-encode/src/decoders/byte_fallback.rs:30-37 | tokenizers/tk-encode/src/decoders/byte_fallback.rs:43-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-encode/src/decoders/byte_fallback.rs:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) tokenizers/tk-encode/src/models/bpe/model.rs:253— tokenizers/tk-encode/src/models/bpe/model.rs:253-260 | tokenizers/tk-encode/src/models/bpe/model.rs:384-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
UnigramTrainer::prune_sentence_pieces (cyclomatic 21) tokenizers/tk-train/src/trainers/unigram.rs:352— UnigramTrainer::prune_sentence_pieces has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PipelineBPE::from_merge_map (cyclomatic 20) tokenizers/tk-encode/src/models/bpe/serialization.rs:193— PipelineBPE::from_merge_map has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tk_convert::convert::lower_template_node (cyclomatic 19) tokenizers/tk-convert/src/convert.rs:740— tk_convert::convert::lower_template_node has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BpeTables::build (cyclomatic 16) tokenizers/tk-encode/src/models/bpe/tables.rs:79— BpeTables::build has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tk_encode::tokenizer::pipeline::pre_tokenizer::split_matches (cyclomatic 16) tokenizers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs:342— tk_encode::tokenizer::pipeline::pre_tokenizer::split_matches has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ByteFallback::decode_chain (cognitive 28) tokenizers/tk-encode/src/decoders/byte_fallback.rs:17— ByteFallback::decode_chain has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BpeTables::build (cognitive 23) tokenizers/tk-encode/src/models/bpe/tables.rs:79— BpeTables::build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 6, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineTokenizer::encode_sequence_into (cognitive 20) tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:763— PipelineTokenizer::encode_sequence_into has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 2 (6 pts), if/else 1 (5 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Word::merge (cognitive 20) tokenizers/tk-train/src/trainers/bpe/word.rs:99— Word::merge has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetaspaceNormalizer::normalize (cognitive 19) tokenizers/tk-encode/src/normalizers/metaspace.rs:70— MetaspaceNormalizer::normalize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ByteLevelFold::fold (cognitive 16) tokenizers/tk-encode/src/models/bpe/fold/byte_level.rs:98— ByteLevelFold::fold has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AddedVocabulary::add_tokens (cognitive 16) tokenizers/tk-encode/src/vocab/bucket_added_vocabulary.rs:347— AddedVocabulary::add_tokens has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassTooLong: ParityBpeTrainer tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:321— ClassTooLong — 736 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 3 blocks, lines 321-1533. The bar is 400 significant lines; this is 336 over it, 1.84× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
D4 · Code Duplication· Near-duplicate member family (3 members, 9 shared lines) · ×1
Near-duplicate member family (3 members, 9 shared lines) tokenizers/bitcannon/src/classify/avx.rs:41— tokenizers/bitcannon/src/classify/avx.rs:41-54 | tokenizers/bitcannon/src/classify/neon.rs:100-113 | tokenizers/bitcannon/src/classify/wasm.rs:30-43 — These 3 members are variants of one another: a block of 9 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) tokenizers/tk-train/src/trainers/bpe/mod.rs:337— tokenizers/tk-train/src/trainers/bpe/mod.rs:337-383 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:548-582 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) tokenizers/tk-train/src/trainers/bpe/mod.rs:706— tokenizers/tk-train/src/trainers/bpe/mod.rs:706-730 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:418-445 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:459-487 | tokenizers/tk-train/src/trainers/unigram.rs:708-732 | tokenizers/tk-train/src/trainers/wordlevel.rs:143-167 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) tokenizers/tk-train/src/trainers/bpe/mod.rs:392— tokenizers/tk-train/src/trainers/bpe/mod.rs:392-430 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:591-620 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) bindings/python/src/components/decoders.rs:6— bindings/python/src/components/decoders.rs:6-6 | bindings/python/src/components/pre_tokenizers.rs:6-6 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) tokenizers/tk-train/src/trainers/bpe/mod.rs:437— tokenizers/tk-train/src/trainers/bpe/mod.rs:437-472 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:627-655 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1151— tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1151-1170 | tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1178-1197 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:663— tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:663-690 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:698-724 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) tokenizers/tk-encode/src/tokenizer/pattern.rs:54— tokenizers/tk-encode/src/tokenizer/pattern.rs:54-73 | tokenizers/tk-encode/src/tokenizer/pattern.rs:96-114 | tokenizers/tk-encode/src/utils/fancy.rs:41-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) bindings/node/src/pipeline.rs:87— bindings/node/src/pipeline.rs:87-101 | bindings/wasm/src/options.rs:129-143 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) tokenizers/bitcannon/src/simd/rvv.rs:9— tokenizers/bitcannon/src/simd/rvv.rs:9-31 | tokenizers/bitcannon/src/simd/rvv.rs:38-58 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1090— tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1090-1100 | tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1102-1112 | tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1114-1124 | tokenizers/tk-encode/src/tokenizer/pipeline/mod.rs:1126-1136 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) tokenizers/tk-encode/src/vocab/bucket_vocab_store.rs:428— tokenizers/tk-encode/src/vocab/bucket_vocab_store.rs:428-437 | tokenizers/tk-encode/src/vocab/bucket_vocab_store.rs:445-454 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) tokenizers/tk-train/src/trainers/bpe/mod.rs:321— tokenizers/tk-train/src/trainers/bpe/mod.rs:321-329 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:532-539 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) tokenizers/bitcannon/src/simd/x86.rs:51— tokenizers/bitcannon/src/simd/x86.rs:51-61 | tokenizers/bitcannon/src/simd/x86.rs:70-80 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) tokenizers/tk-encode/src/models/wordlevel/mod.rs:61— tokenizers/tk-encode/src/models/wordlevel/mod.rs:61-74 | tokenizers/tk-encode/src/models/wordpiece/mod.rs:86-101 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) tokenizers/tk-encode/src/pre_tokenizers/bert.rs:19— tokenizers/tk-encode/src/pre_tokenizers/bert.rs:19-31 | tokenizers/tk-encode/src/pre_tokenizers/whitespace.rs:26-37 | tokenizers/tk-encode/src/pre_tokenizers/whitespace.rs:63-76 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) tokenizers/tk-train/src/trainers/bpe/mod.rs:271— tokenizers/tk-train/src/trainers/bpe/mod.rs:271-283 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:494-506 | tokenizers/tk-train/src/trainers/unigram.rs:163-175 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (25–30 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:393— tokenizers/tk-train/src/trainers/bpe/mod.rs:393-422 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:592-616 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:393` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tokenizers/tk-train/src/trainers/bpe/mod.rs:424` calls `Some`, `inc` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:617` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19–24 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:347— tokenizers/tk-train/src/trainers/bpe/mod.rs:347-370 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:558-576 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–21 lines × 2) tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:670— tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:670-690 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:705-724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:670` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–20 lines × 2) tokenizers/bitcannon/src/classify/neon.rs:200— tokenizers/bitcannon/src/classify/neon.rs:200-219 | tokenizers/bitcannon/src/classify/neon.rs:280-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/bitcannon/src/classify/neon.rs:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–20 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:660— tokenizers/tk-train/src/trainers/bpe/mod.rs:660-679 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:1453-1468 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:660` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) tokenizers/bitcannon/src/classify/mod.rs:171— tokenizers/bitcannon/src/classify/mod.rs:171-187 | tokenizers/bitcannon/src/classify/wasm.rs:291-306 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14–16 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:579— tokenizers/tk-train/src/trainers/bpe/mod.rs:579-594 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:1337-1350 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 3) tokenizers/tk-train/src/trainers/bpe/mod.rs:707— tokenizers/tk-train/src/trainers/bpe/mod.rs:707-721 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:419-433 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:460-474 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:707` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) tokenizers/tk-train/src/trainers/bpe/mod.rs:458— tokenizers/tk-train/src/trainers/bpe/mod.rs:458-472 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:641-655 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:458` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) tokenizers/tk-train/src/trainers/unigram.rs:710— tokenizers/tk-train/src/trainers/unigram.rs:710-723 | tokenizers/tk-train/src/trainers/wordlevel.rs:145-158 — before extracting anything, compare `tokenizers/tk-train/src/trainers/unigram.rs` and `tokenizers/tk-train/src/trainers/wordlevel.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/unigram.rs:710` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) tokenizers/tk-train/src/trainers/bpe/mod.rs:718— tokenizers/tk-train/src/trainers/bpe/mod.rs:718-730 | tokenizers/tk-train/src/trainers/unigram.rs:720-732 | tokenizers/tk-train/src/trainers/wordlevel.rs:155-167 — before extracting anything, compare `tokenizers/tk-train/src/trainers/unigram.rs` and `tokenizers/tk-train/src/trainers/wordlevel.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:718` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) tokenizers/bitcannon/src/classify/neon.rs:337— tokenizers/bitcannon/src/classify/neon.rs:337-349 | tokenizers/bitcannon/src/classify/wasm.rs:287-299 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/bitcannon/src/classify/neon.rs:337` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 5) tokenizers/tk-train/src/trainers/bpe/mod.rs:715— tokenizers/tk-train/src/trainers/bpe/mod.rs:715-726 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:427-438 | tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs:468-479 | tokenizers/tk-train/src/trainers/unigram.rs:717-728 | tokenizers/tk-train/src/trainers/wordlevel.rs:152-163 — before extracting anything, compare `tokenizers/tk-train/src/trainers/bpe/mod.rs` and `tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-train/src/trainers/bpe/mod.rs:715` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) tokenizers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs:359— tokenizers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs:359-370 | tokenizers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs:377-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs:359` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) tokenizers/tk-encode/src/tokenizer/pattern.rs:63— tokenizers/tk-encode/src/tokenizer/pattern.rs:63-73 | tokenizers/tk-encode/src/tokenizer/pattern.rs:104-114 | tokenizers/tk-encode/src/utils/fancy.rs:52-62 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-encode/src/tokenizer/pattern.rs:63` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) tokenizers/tk-encode/src/vocab/buckets.rs:397— tokenizers/tk-encode/src/vocab/buckets.rs:397-407 | tokenizers/tk-encode/src/vocab/buckets.rs:415-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/tk-encode/src/vocab/buckets.rs:397` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) tokenizers/bitcannon/src/classify/avx.rs:46— tokenizers/bitcannon/src/classify/avx.rs:46-54 | tokenizers/bitcannon/src/classify/neon.rs:105-113 | tokenizers/bitcannon/src/classify/wasm.rs:35-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/bitcannon/src/classify/avx.rs:46` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) tokenizers/bitmap_gen/src/lib.rs:299— tokenizers/bitmap_gen/src/lib.rs:299-310 | tokenizers/bitmap_gen/src/lib.rs:327-338 | tokenizers/bitmap_gen/src/lib.rs:341-352 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tokenizers/bitmap_gen/src/lib.rs:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
End-of-life runtime: Node.js 10 bindings/node/package.json:39— bindings/node/package.json declares Node.js 10 as this project's engines.node, and Node.js 10, support ended 2021-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2021-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
Off the main sequence: bitcannon — bitcannon: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Minor — 23 finding(s)
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×5
Orphaned file tokenizers/tk-encode/src/utils/cache.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tokenizers/tk-encode/src/decoders/byte_fallback.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tokenizers/tk-encode/src/utils/iter.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate tokenizers/tk-train/src/trainers/bpe/mod.rs:36— `self.count == other.count && self.pair == other.pair` appears character-identically in 2 files — tokenizers/tk-train/src/trainers/bpe/mod.rs, tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tokenizers/tk-encode/src/decoders/replace.rs:45— `self.pattern == other.pattern && self.content == other.content` appears character-identically in 2 files — tokenizers/tk-encode/src/decoders/replace.rs, tokenizers/tk-encode/src/normalizers/replace.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tokenizers/bitcannon/src/models/cl100k.rs:52— `tags.len() >= ntext && starts.len() >= nblk && out.len() >= ntext` appears character-identically in 2 files — tokenizers/bitcannon/src/models/cl100k.rs, tokenizers/bitcannon/src/models/gpt2.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: tokenizers/tk-train/src/trainers/bpe/parity_trainer.rs, tokenizers/tk-train/src/trainers/bpe/mod.rs, bindings/wasm/src/options.rs, tokenizers/tk-encode/src/models/wordlevel/mod.rs, bindings/python/src/options/padding.rs, bindings/python/src/repr.rs, bindings/python/src/options/truncation.rs, bindings/python/src/type_hints.rs (+1 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (12 single-owned of 130 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 130 of the 184 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: tokenizers/tk-serialize/src/from_json/post_processors.rs, tokenizers/tk-serialize/src/to_json/post_processors.rs, tokenizers/tk-encode/src/utils/parallelism.rs.
No ADRs found tokenizers/bitmap_gen/src/main.rs:1— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `tokenizers/bitmap_gen/src/main.rs` makes this repository a deployable product (line 1).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 11 project(s) overshoot their size bounds, lowering Project Cohesion to 8.2/10. The most over is `tokenizers/tk-encode` (20573 LoC, 168 module-visible types across 13 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 3 of 130 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 130 of the 184 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: tokenizers/tk-encode/src/utils/cache.rs, tokenizers/tk-encode/src/decoders/byte_fallback.rs, tokenizers/tk-encode/src/utils/iter.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `tokenizers/bitmap_gen`.
P3 · Security & performance tooling· Dependabot does not watch npm/cargo/pip · ×1
Dependabot does not watch npm/cargo/pip .github/dependabot.yml:2— `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `npm`, `cargo`, `pip`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Silent fallback default on Err tokenizers/bitcannon/src/classes.rs:113— `pre_tokenize` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Outdated: js-sys — `js-sys` is locked at 0.3.104 but 0.3.107 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in bindings/wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p js-sys` and commit the updated REDACTED.
Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in tokenizers/tk-encode/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
Outdated: log — `log` is locked at 0.4.33 but 0.4.35 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in tokenizers/tk-encode/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p log` and commit the updated REDACTED.
Outdated: rand — `rand` is locked at 0.10.2 but 0.10.3 is the current stable release on crates.io, and it already satisfies the `"0.10"` requirement declared in tokenizers/tk-encode/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rand` and commit the updated REDACTED.
Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in bindings/python/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
Outdated: thiserror — `thiserror` is locked at 2.0.20 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in tokenizers/tk-convert/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
Outdated: unicode-properties — `unicode-properties` is locked at 0.1.4 but 0.1.5 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in tokenizers/bitmap_gen/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-properties` and commit the updated REDACTED.
Outdated: wide — `wide` is locked at 1.6.1 but 1.7.1 is the current stable release on crates.io, and it already satisfies the `"1.6.1"` requirement declared in tokenizers/tk-encode/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wide` and commit the updated REDACTED.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1dacc-e700-7428-a767-8a5fbe2881a3 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 9 · Warnings: 184 · Recommendations: 23 · Info: 8 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 16:03 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.