AI Slop Code Risk Monitor

dgraph-io/badger

SlopCodeMonitor badge for dgraph-io/badger Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Fast key-value DB in Go.

1.9 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for dgraph-io/badger, a Go project with 15,796 GitHub stars. SynthScan examined 43,662 lines of code across 148 source files, recording 67 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 1.9 (Low 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.

1.9
Adjusted Signal
1.9
Raw Pattern Score
100%
Time Factor
2026-10-20
Last Push
15.8K
Stars
Go
Language
43.7K
Lines of Code
148
Files
67
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 9.2/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.0/100 · LOW

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

Agent Over-Engineering Ratio 0.0/100 · LOW

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

PR Review Velocity Impact 8.7/100 · LOW

Which changes need focused human review? 67 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 0MEDIUM 6LOW 61

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 67 distinct pattern matches across 6 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.

Over-Commented Block55 hits · 55 pts
SeverityFileLineSnippetContext
LOWl0_blockwrites_regression_test.go21// TestDropPrepareDrainDoesNotDropWrites is a regression guard for Badger #2308.COMMENT
LOWl0_blockwrites_regression_test.go41// This test reconstructs that exact condition deterministically: flush goroutineCOMMENT
LOWstream_writer.go21COMMENT
LOWbackup.go21)COMMENT
LOWdb.go1061 db.mt, err = db.newMemTable()COMMENT
LOWdb.go1261// RunValueLogGC triggers a value log garbage collection.COMMENT
LOWdb.go1281// called.COMMENT
LOWdb.go1781}COMMENT
LOWdb.go1841 db.lc.nextFileID.Store(1)COMMENT
LOWdb2_test.go641 require.NoError(t, db2.Close())COMMENT
LOWoptions.go201 maxValueThreshold = (1 << 20) // 1 MBCOMMENT
LOWoptions.go281 return superflagCOMMENT
LOWoptions.go361//COMMENT
LOWoptions.go401COMMENT
LOWoptions.go461// WithLevelSizeMultiplier returns a new Options value with LevelSizeMultiplier set to the givenCOMMENT
LOWoptions.go481 return optCOMMENT
LOWoptions.go501// VLogPercentile with value 0.99 means 99 percentile of value will be put in LSM treeCOMMENT
LOWoptions.go521}COMMENT
LOWoptions.go661// WithChecksumVerificationMode returns a new Options value with ChecksumVerificationMode set toCOMMENT
LOWoptions.go701// have better performance and higher levels have better compression ratios.COMMENT
LOWoptions.go721// set to the given value.COMMENT
LOWoptions.go741// Zero value for IndexCacheSize means all the indices will be kept inCOMMENT
LOWvalue_test.go1361}COMMENT
LOWstream.go41 // Number of goroutines to use for iterating over key ranges. Defaults to 8.COMMENT
LOWstream.go61 MaxSize uint64COMMENT
LOWiterator_test.go301 require.NoError(t, db.View(func(txn *Txn) error {COMMENT
LOWiterator_test.go321//COMMENT
LOWutil.go61// // debugPrintMore shows key ranges of each level.COMMENT
LOWtxn.go401// The current transaction keeps a reference to the key and val byte sliceCOMMENT
LOWtxn.go621 // In that case, commitTs should not be never be zero. This might happen ifCOMMENT
LOWtxn.go641// 5. If callback is provided, Badger will return immediately after checkingCOMMENT
LOWtxn.go741//COMMENT
LOWiterator.go61// KeyCopy returns a copy of the key of the item, writing it to dst slice.COMMENT
LOWiterator.go441 // ThreadId is an optional value that can be set to identify which goroutine createdCOMMENT
LOWlevel_handler.go21 // For level >= 1, tables are sorted by key ranges, which do not overlap.COMMENT
LOWl0_backpressure_test.go241// broadcast on close. Many concurrent writers hammer the DB so the write pathCOMMENT
LOWl0_backpressure_test.go261// -count iterations. Run with -race and a high -count. NOTE: this is probabilisticCOMMENT
LOWlevels.go261}COMMENT
LOWlevels.go381// 1. The desired base level is the deepest level whose target size is still withinCOMMENT
LOWlevels.go681 return falseCOMMENT
LOWlevels.go821 if version <= discardTs && vs.Meta&bitMergeEntry == 0 {COMMENT
LOWlevels.go1181// L0 in parallel would require partitioning L0->Lbase by key range (e.g. reusingCOMMENT
LOWlevels.go1681 for l0.numTablesLocked() >= s.kv.opt.NumLevelZeroTablesStall {COMMENT
LOWvalue.go261 }COMMENT
LOWvalue.go281 // - moveKey2 (points to vlog file 14) andCOMMENT
LOWvalue.go301 // L2 => ....COMMENT
LOWskl/skl.go41type node struct {COMMENT
LOWintegration/lsmbench/main.go1/*COMMENT
LOWintegration/lsmbench/main_test.go21// go test -v -tags=integration -timeout 60m ./integration/lsmbench/COMMENT
LOWtable/table.go181 freeMe bool // used to determine if the blocked should be reused.COMMENT
LOW.github/workflows/ci-badger-lsm-bench.yml1name: ci-badger-lsm-benchCOMMENT
LOWy/watermark.go41// WaterMark is used to keep track of the minimum un-finished index. Typically, an index k becomesCOMMENT
LOWy/error.go1/*COMMENT
LOWy/bloom.go141}COMMENT
LOWy/bloom.go161COMMENT
AI Slop Vocabulary5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMvalue_test.go1514 // and learn which key it holds by iterating it (robust to fid ordering).COMMENT
MEDIUMtable/table_test.go219 // ti.Seek brings us to the first key >= "". Essentially a SeekToFirst.COMMENT
MEDIUM.github/workflows/ci-badger-lsm-bench.yml5# Builds the same harness (integration/lsmbench) against the PR's base and theCOMMENT
MEDIUM.github/workflows/ci-badger-lsm-bench.yml72 # Head: harness compiled against this checkout.COMMENT
MEDIUM.github/workflows/ci-badger-lsm-bench.yml74 # Baseline: same harness source compiled against the base checkout,COMMENT
Structural Annotation Overuse3 hits · 7 pts
SeverityFileLineSnippetContext
LOW⚡db2_test.go647// Step 1 - Create badger data. It is necessary that the value size isCOMMENT
LOW⚡db2_test.go652// Step 2 - Re-open the same badger and simulate a crash. The value log fileCOMMENT
LOW⚡db2_test.go656// Step 3 - Re-open the same badger. We should be able to read all the dataCOMMENT
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWmanifest_test.go115 // TODO: Add test for file garbage collection here. No files should be left after the tests here.COMMENT
LOWtable/table_test.go61 // TODO: Add test for file garbage collection here. No files should be left after the tests here.COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMoptions.go122// Feel free to modify these to suit your needs with the WithX methods.COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtest.sh7# Check if Github Actions is runningCOMMENT