Repository Analysis

riverqueue/river

Fast and reliable background jobs in Go

2.6 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of riverqueue/river, a Go project with 5,444 GitHub stars. SynthScan v2.0 examined 87,277 lines of code across 381 source files, recording 216 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 2.6 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

2.6
Adjusted Score
2.6
Raw Score
100%
Time Factor
2026-07-13
Last Push
5.4K
Stars
Go
Language
87.3K
Lines of Code
381
Files
216
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 7LOW 209

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 216 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block205 hits · 194 pts
SeverityFileLineSnippetContext
LOWexample_job_args_hooks_test.go121 // JobWithHooksInsertAndWorkBeginHook.InsertBegin ranCOMMENT
LOWerror.go21func JobCancel(err error) error {COMMENT
LOWexample_batch_insert_test.go81 }COMMENT
LOWworker.go21//COMMENT
LOWworker.go41 Middleware(job *rivertype.JobRow) []rivertype.WorkerMiddlewareCOMMENT
LOWworker.go61 // be cancelled for other reasons.COMMENT
LOWworker.go81type WorkerDefaults[T JobArgs] struct{}COMMENT
LOWworker.go101// river.AddWorker(workers, &SortWorker{})COMMENT
LOWworker.go121 panic(err)COMMENT
LOWclient_context.go21// from the context provided to a Worker's Work() method.COMMENT
LOWresumable.go41COMMENT
LOWresumable.go81 }COMMENT
LOWjob_list_params.go141 // This option must be used in conjunction with filtering by only finalizedCOMMENT
LOWjob_list_params.go421type NamedArgs map[string]anyCOMMENT
LOWdelete_many_params.go121 paramsCopy := p.copy()COMMENT
LOWclient.go81 // when creating jobs.COMMENT
LOWclient.go101 //COMMENT
LOWclient.go121COMMENT
LOWclient.go141 ErrorHandler ErrorHandlerCOMMENT
LOWclient.go161 // Defaults to 1 second.COMMENT
LOWclient.go181 // If in doubt, leave this property empty.COMMENT
LOWclient.go201 // return at all). The handler receives minimal information about the stuckCOMMENT
LOWclient.go221 //COMMENT
LOWclient.go241 // work hook runs and the insertion hooks on either side of it are skipped.COMMENT
LOWclient.go261 // If not specified, defaults to 25 (MaxAttemptsDefault).COMMENT
LOWclient.go281 // insertion middlewares on either side of it are skipped.COMMENT
LOWclient.go301 Plugins []rivertype.PluginCOMMENT
LOWclient.go321COMMENT
LOWclient.go341 // disable the timeout.COMMENT
LOWclient.go361 //COMMENT
LOWclient.go381 // by cancelling the context of all running jobs. This applies regardless ofCOMMENT
LOWclient.go401 // Defaults to no timeout (wait indefinitely for jobs to finish).COMMENT
LOWclient.go421 // Defaults to false.COMMENT
LOWclient.go441 // rather than working them, but if it is configured the client can validateCOMMENT
LOWclient.go641 // FetchCooldown is the minimum amount of time to wait between fetches of newCOMMENT
LOWclient.go781//COMMENT
LOWclient.go1061// Start starts the client's job fetching and working loops. Once this is called,COMMENT
LOWclient.go1121 // In case of error, stop any services that might have started. ThisCOMMENT
LOWclient.go1241 // won't complete. We probably need a timeout or way to move on in thoseCOMMENT
LOWclient.go1281// StopAndCancel shuts down the client and cancels all work in progress. It is aCOMMENT
LOWclient.go1321 return c.stoppedCOMMENT
LOWclient.go1341func (c *Client[TTx]) Subscribe(kinds ...EventKind) (<-chan *Event, func()) {COMMENT
LOWclient.go1421//COMMENT
LOWclient.go1461COMMENT
LOWclient.go1481// If the job is currently running, it is not immediately cancelled, but isCOMMENT
LOWclient.go1561COMMENT
LOWclient.go1601 // Output is a new output value for a job.COMMENT
LOWclient.go1861COMMENT
LOWclient.go1901// The provided context is used for the underlying Postgres inserts and can beCOMMENT
LOWclient.go2081 }COMMENT
LOWclient.go2121// mechanism, making the operation quite fast and memory efficient. Each job isCOMMENT
LOWclient.go2401 // Jobs is a slice of job returned as part of the list operation.COMMENT
LOWclient.go2561COMMENT
LOWclient.go2601 // Queues is a slice of queues returned as part of the list operation.COMMENT
LOWclient.go2721 if _, err := c.notifyQueuePauseOrResume(ctx, executorTx, controlActionPause, name, opts); err != nil {COMMENT
LOWclient.go2761 return errCOMMENT
LOWexample_global_hooks_test.go101COMMENT
LOWexample_resumable_cursor_job_test.go101 // Output:COMMENT
LOWresumable_step_tx.go21// out-of-transaction, there's a chance that it doesn't happen in case of panicCOMMENT
LOWjob.go21type JobArgs interface {COMMENT
145 more matches not shown…
Decorative Section Separators4 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMinternal/leadership/doc.go34// ┌─────────────────────────────────────┐COMMENT
MEDIUMinternal/leadership/doc.go38// └──────────────────┬──────────────────┘COMMENT
MEDIUMinternal/leadership/doc.go41// ┌─────────────────────────────────────┐COMMENT
MEDIUMinternal/leadership/doc.go45// └──────────────────┬──────────────────┘COMMENT
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMriverdbtest/riverdbtest_test.go68 // Essentially the same check as above, but just looking that jobs areCOMMENT
MEDIUMriverdriver/river_driver_interface.go449 // encoded into EncodedArgs, but the original is kept here for to leverage itsCOMMENT
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWinternal/dbunique/db_unique_test.go55 Recipient: "user@example.com",CODE
LOWinternal/dbunique/db_unique_test.go63 expectedJSON: `&kind=worker_1&args={"recipient":"user@example.com","subject":"Test Email"}`,CODE
LOWinternal/dbunique/db_unique_test.go77 PhoneNumber: "555-5678",CODE
LOWinternal/dbunique/db_unique_test.go83 expectedJSON: `&kind=worker_2&args={"phone_number":"555-5678"}`,CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMriverlog/example_new_middleware_custom_context_test.go59 // For demonstration purposes we show the use of a built-inCOMMENT