AI Slop Code RIsk Monitor

openai/tiktoken

tiktoken is a fast BPE tokeniser for use with OpenAI's models.

27.0 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for openai/tiktoken, a Python project with 19,435 GitHub stars. SynthScan examined 3,272 lines of code across 25 source files, recording 52 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 27.0 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

27.0
Adjusted Signal
27.0
Raw Pattern Score
100%
Time Factor
2026-08-17
Last Push
19.4K
Stars
Python
Language
3.3K
Lines of Code
25
Files
52
Pattern Hits
2026-10-12
Scan Date
0.04
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 25.8/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 18 finding(s).

Hallucinated Dependency & Supply Chain Risk 22.9/100 · LOW

Are imports declared and package/API names verified? 17 finding(s).

Agent Over-Engineering Ratio 61.5/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 27 finding(s).

PR Review Velocity Impact 72.7/100 · HIGH

Which changes need focused human review? 52 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 1MEDIUM 14LOW 37

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 52 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Decorative Section Separators14 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_encoding.py127# ====================COMMENT
MEDIUMtests/test_encoding.py129# ====================COMMENT
MEDIUMtests/test_encoding.py170# ====================COMMENT
MEDIUMtests/test_encoding.py172# ====================COMMENT
MEDIUM⚡tests/test_encoding.py234# ====================COMMENT
MEDIUM⚡tests/test_encoding.py236# ====================COMMENT
MEDIUMtiktoken/core.py62 # ====================COMMENT
MEDIUMtiktoken/core.py64 # ====================COMMENT
MEDIUMtiktoken/core.py261 # ====================COMMENT
MEDIUMtiktoken/core.py263 # ====================COMMENT
MEDIUMtiktoken/core.py352 # ====================COMMENT
MEDIUMtiktoken/core.py354 # ====================COMMENT
MEDIUMtiktoken/core.py377 # ====================COMMENT
MEDIUMtiktoken/core.py379 # ====================COMMENT
Unused Imports17 hits · 17 pts
SeverityFileLineSnippetContext
LOWtests/test_helpers.py1CODE
LOWtiktoken/registry.py1CODE
LOWtiktoken/__init__.py2CODE
LOWtiktoken/__init__.py3CODE
LOWtiktoken/__init__.py4CODE
LOWtiktoken/__init__.py5CODE
LOWtiktoken/__init__.py6CODE
LOWtiktoken/core.py1CODE
LOWtiktoken/model.py1CODE
LOWtiktoken/load.py1CODE
LOWtiktoken/_educational.py3CODE
LOWscripts/benchmark.py1CODE
LOWscripts/benchmark.py2CODE
LOWscripts/benchmark.py3CODE
LOWscripts/benchmark.py4CODE
LOWscripts/benchmark.py6CODE
LOWscripts/benchmark.py10CODE
Hyper-Verbose Identifiers10 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/test_misc.py24def test_optional_blobfile_dependency():CODE
LOWtests/test_encoding.py102def test_encode_surrogate_pairs():CODE
LOWtests/test_encoding.py114def test_catastrophically_repetitive(make_enc: Callable[[], tiktoken.Encoding]):CODE
LOWtests/test_encoding.py159def test_single_token_roundtrip(make_enc: Callable[[], tiktoken.Encoding]):CODE
LOW⚡tests/test_encoding.py229def test_hyp_special_ordinary(make_enc, text: str):CODE
LOWtests/test_simple_public.py36def test_optional_blobfile_dependency():CODE
LOWtiktoken/registry.py20def _available_plugin_modules() -> Sequence[str]:CODE
LOWtiktoken/core.py289 def decode_single_token_bytes(self, token: int) -> bytes:CODE
LOWtiktoken/core.py441def raise_disallowed_special_token(token: str) -> NoReturn:CODE
LOWtiktoken/load.py89def data_gym_to_mergeable_bpe_ranks(CODE
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtiktoken/load.py63except OSError:CODE
Deep Nesting3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtiktoken/registry.py33CODE
LOWtiktoken/_educational.py83CODE
LOWtiktoken/_educational.py119CODE
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/lib.rs221// Various performance notes:COMMENT
LOWsrc/lib.rs241// =========COMMENT
LOWsrc/lib.rs541 // Morally, this is byte_pair_encode(&possibility, &self.encoder)COMMENT
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtiktoken/registry.py55 except Exception:CODE
LOWtiktoken/load.py169 except Exception as e:CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtiktoken/model.py96 # Check if the model matches a known prefixCOMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtiktoken/_educational.py191 # visualise the token. Here, we'll just use the unicode replacement character to represent someCOMMENT