The polyglot queue: Fast and reliable background jobs in Go, Ruby, Rust, and JS/TS on Postgres or SQLite.
This report summarizes scanner evidence for riverqueue/river, a Go project with 5,844 GitHub stars. SynthScan examined 326,908 lines of code across 1191 source files, recording 521 pattern matches distributed across 7 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.
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.
Can maintainers explain intent, assumptions, and trade-offs? 502 finding(s).
Are imports declared and package/API names verified? 15 finding(s).
Are wrappers, guards, and repeated structures necessary? 67 finding(s).
Which changes need focused human review? 521 finding(s).
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.
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.
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.
The scanner identified 521 distinct pattern matches across 7 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | example_job_args_hooks_test.go | 121 | // JobWithHooksInsertAndWorkBeginHook.InsertBegin ran | COMMENT |
| LOW | error.go | 21 | func JobCancel(err error) error { | COMMENT |
| LOW | example_batch_insert_test.go | 81 | } | COMMENT |
| LOW | worker.go | 21 | // | COMMENT |
| LOW | worker.go | 41 | Middleware(job *rivertype.JobRow) []rivertype.WorkerMiddleware | COMMENT |
| LOW | worker.go | 61 | // be cancelled for other reasons. | COMMENT |
| LOW | worker.go | 81 | type WorkerDefaults[T JobArgs] struct{} | COMMENT |
| LOW | worker.go | 101 | // river.AddWorker(workers, &SortWorker{}) | COMMENT |
| LOW | worker.go | 121 | panic(err) | COMMENT |
| LOW | client_context.go | 21 | // from the context provided to a Worker's Work() method. | COMMENT |
| LOW | producer.go | 81 | COMMENT | |
| LOW | resumable.go | 41 | state.CursorsDirty = true | COMMENT |
| LOW | resumable.go | 101 | // cursor value from an earlier failed attempt, if one was recorded with | COMMENT |
| LOW | job_list_params.go | 141 | // time field based on listed state. The best fit is determined by looking | COMMENT |
| LOW | job_list_params.go | 541 | // NamedArgs are named arguments for use with JobListParams.Where. Keys should | COMMENT |
| LOW | job_list_params.go | 561 | // | COMMENT |
| LOW | delete_many_params.go | 121 | paramsCopy := p.copy() | COMMENT |
| LOW | client.go | 81 | // The [rivertest.Worker] type automatically disables uniqueness enforcement | COMMENT |
| LOW | client.go | 101 | // with one of its own by cordoning each type to its own prefix. | COMMENT |
| LOW | client.go | 121 | CancelledJobRetentionPeriod time.Duration | COMMENT |
| LOW | client.go | 141 | // tracking, but can also be used to customize retry behavior. | COMMENT |
| LOW | client.go | 161 | // jobs across all queues and discards those whose kinds it doesn't know. | COMMENT |
| LOW | client.go | 181 | // This is used to identify the client in job attempts and for leader election. | COMMENT |
| LOW | client.go | 201 | // Defaults to 30 seconds, which should be more than enough time for most | COMMENT |
| LOW | client.go | 221 | // also be used (for example) to stop and exit the program if too many jobs | COMMENT |
| LOW | client.go | 241 | // | COMMENT |
| LOW | client.go | 261 | // rivertype.Middleware. Use Plugins for an extension that should act as | COMMENT |
| LOW | client.go | 281 | // Logger is the structured logger to use for logging purposes. If none is | COMMENT |
| LOW | client.go | 301 | // cause it to be invoked when a job is worked. Middleware structs may | COMMENT |
| LOW | client.go | 321 | // A type qualifies as a plugin by implementing [rivertype.Plugin]. Most | COMMENT |
| LOW | client.go | 341 | // `LISTEN` statements to wait for events like a leadership resignation or | COMMENT |
| LOW | client.go | 361 | Queues map[string]QueueConfig | COMMENT |
| LOW | client.go | 381 | // will be scheduled for a retry, while one which has exhausted its attempts | COMMENT |
| LOW | client.go | 401 | // Defaults to DefaultRetryPolicy. | COMMENT |
| LOW | client.go | 421 | // ctx, stop := signal.NotifyContext(ctx, syscall.SIGINT, syscall.SIGTERM) | COMMENT |
| LOW | client.go | 441 | // | COMMENT |
| LOW | client.go | 461 | // in production, but which may be harmful to tests, in ways like having the | COMMENT |
| LOW | client.go | 481 | // | COMMENT |
| LOW | client.go | 681 | // are coming in via LISTEN/NOTIFY then fetches may be delayed as long as | COMMENT |
| LOW | client.go | 741 | // because an operation may have made partial changes. If the application needs | COMMENT |
| LOW | client.go | 821 | // rows. For example, attempting to cancel a job that doesn't exist will | COMMENT |
| LOW | client.go | 841 | // import "github.com/riverqueue/river/riverdriver/riverpgxv5" | COMMENT |
| LOW | client.go | 1201 | stopServicesOnError := func() { | COMMENT |
| LOW | client.go | 1361 | // more aggressive stop than Stop because the contexts for any in-progress jobs | COMMENT |
| LOW | client.go | 1401 | } | COMMENT |
| LOW | client.go | 1421 | return c.SubscribeConfig(&SubscribeConfig{Kinds: kinds}) | COMMENT |
| LOW | client.go | 1481 | }() | COMMENT |
| LOW | client.go | 1501 | // If the job is already finalized (cancelled, completed, or discarded), no | COMMENT |
| LOW | client.go | 1521 | // signal is received but _after_ this update was made, the behavior depends on | COMMENT |
| LOW | client.go | 1541 | Queue: job.Queue, | COMMENT |
| LOW | client.go | 1561 | // changes are made. | COMMENT |
| LOW | client.go | 1661 | // current time only if it's not already in the past. | COMMENT |
| LOW | client.go | 1701 | } | COMMENT |
| LOW | client.go | 1921 | return nil, err | COMMENT |
| LOW | client.go | 1961 | InsertOpts *InsertOpts | COMMENT |
| LOW | client.go | 2001 | // | COMMENT |
| LOW | client.go | 2201 | producer.TriggerJobFetch() | COMMENT |
| LOW | client.go | 2241 | COMMENT | |
| LOW | client.go | 2261 | // {Args: BatchInsertArgs{}, InsertOpts: &river.InsertOpts{Priority: 3}}, | COMMENT |
| LOW | client.go | 2481 | // | COMMENT |
| 372 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | java/README.md | 730 | org.junit.jupiter.api.Assertions.assertEquals(inserted.job().id(), event.job().id()); | CODE |
| CRITICAL⚡ | java/README.md | 731 | org.junit.jupiter.api.Assertions.assertEquals(Job.State.COMPLETED, event.job().state()); | CODE |
| CRITICAL⚡ | java/README.md | 732 | org.junit.jupiter.api.Assertions.assertEquals("hello", event.job().metadata().path("output").asString()); | CODE |
| CRITICAL | java/river/src/main/java/com/riverqueue/Database.java | 83 | long deadline = System.nanoTime() + java.util.concurrent.TimeUnit.SECONDS.toNanos(5); | CODE |
| CRITICAL | java/bin/github-release.py | 418 | 'public class Smoke { public static void main(String[] args) { if (!com.riverqueue.Client.class.getName().eq | CODE |
| CRITICAL | …/src/main/java/com/riverqueue/conformance/Adapter.java | 244 | times.add(java.time.format.DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(next)); | CODE |
| CRITICAL | ruby/spec/row_decoding_shared_examples.rb | 43 | expect(client.job_list.jobs.first.errors.map(&:to_h)).to eq(read.errors.map(&:to_h)) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | js/worker-threads/src/thread.ts | 198 | function typeScriptSourceSpecifier( | CODE |
| LOW | js/driver/prisma/src/transaction.ts | 106 | function validatePrismaTransaction( | CODE |
| LOW | js/driver/pg/src/sql/jobs.ts | 988 | function validateCompletionCommands( | CODE |
| LOW | js/driver/pg/src/sql/maintenance.ts | 662 | async function maintenanceLeaderIsCurrent( | CODE |
| LOW | js/etc/riverqueue.unstable-driver.api.md | 76 | export declare function createJobArgsTransformPlugin( | CODE |
| LOW | js/etc/riverqueue.unstable-driver.api.md | 88 | export declare function createJobInsertMetadataTransformPlugin( | CODE |
| LOW | js/etc/riverqueue.unstable-driver.api.md | 1935 | export declare function postgresCapabilitiesFromRow(row: { | CODE |
| LOW | js/migrate/src/migrator.integration.test.ts | 365 | async function waitForAdvisoryLockWaiter(pool: pg.Pool): Promise<void> { | CODE |
| LOW | js/src/json.ts | 279 | export function stringifySelectedUniqueJson( | CODE |
| LOW⚡ | js/src/job-insert-metadata-transform.ts | 71 | export function createJobInsertMetadataTransformPlugin( | CODE |
| LOW⚡ | js/src/job-insert-metadata-transform.ts | 81 | export function cloneJobInsertMetadataTransformPlugin( | CODE |
| LOW⚡ | js/src/job-insert-metadata-transform.ts | 89 | export function getJobInsertMetadataTransformers( | CODE |
| LOW⚡ | js/src/job-insert-metadata-transform.ts | 96 | export function isJobInsertMetadataTransformPlugin(plugin: object): boolean { | CODE |
| LOW⚡ | js/src/job-insert-metadata-transform.ts | 101 | export function transformJobInsertMetadata( | CODE |
| LOW | js/src/periodic.ts | 357 | export function setPeriodicJobsChangeHandler( | CODE |
| LOW | js/src/periodic.ts | 411 | export function hasUninitializedPeriodicJobs(registry: PeriodicJobs): boolean { | CODE |
| LOW | js/src/query.ts | 89 | export function normalizeJobDeleteManyOptions( | CODE |
| LOW | js/src/query.ts | 210 | export function normalizeJobUpdateOptions( | CODE |
| LOW | js/src/query.ts | 225 | export function normalizeQueueListOptions( | CODE |
| LOW | js/src/job-args-transform.ts | 95 | export function createJobArgsTransformPlugin( | CODE |
| LOW | js/src/job-args-transform.ts | 107 | export function cloneJobArgsTransformPlugin( | CODE |
| LOW | js/src/job-args-transform.ts | 127 | export function transformJobArgsForInsert( | CODE |
| LOW | js/src/services.ts | 1296 | function requireMaintenanceCapabilities(driver: RuntimeDriver): void { | CODE |
| LOW | js/src/runtime/validation.ts | 6 | export function requireNonNegativeInteger(name: string, value: number): number { | CODE |
| LOW | js/src/runtime/settings.ts | 730 | function resolveMaintenanceSettings( | CODE |
| LOW | js/src/runtime/notification-payloads.ts | 34 | export function notificationLeaderResigned(payload: string): string | null { | CODE |
| LOW | js/src/runtime/notification-payloads.ts | 54 | export function notificationRequestsLeadershipResignation( | CODE |
| LOW | js/src/runtime/attempt-result.ts | 76 | export function normalizeWorkAttemptResult( | CODE |
| LOW | js/src/internal/postgres-capabilities.ts | 81 | export function postgresCapabilitiesFromRow(row: { | CODE |
| LOW | js/src/internal/event-loop-delay-monitor.ts | 107 | function nanosecondsToMilliseconds(value: number): number { | CODE |
| LOW | java/bin/github_release_test.py | 60 | def test_artifacts_include_parent_without_fat_jar_or_conformance(self): | CODE |
| LOW | java/bin/github_release_test.py | 68 | def test_manifest_rejects_missing_extra_changed_and_symlinked_files(self): | CODE |
| LOW | java/bin/github_release_test.py | 87 | def test_pom_coordinates_parent_inheritance_and_packaging(self): | CODE |
| LOW | java/bin/github_release_test.py | 109 | def test_repository_tracking_accepts_old_and_url_qualified_ids(self): | CODE |
| LOW | java/bin/github_release_test.py | 128 | def test_upload_creates_drafts_without_replacing_latest(self): | CODE |
| LOW | java/bin/github_release_test.py | 166 | def test_upload_resumes_matching_draft_and_never_clobbers(self): | CODE |
| LOW | java/bin/github_release_test.py | 183 | def test_upload_refuses_dirty_build_wrong_tag_and_published_release(self): | CODE |
| LOW⚡ | java/bin/github_release_test.py | 206 | def test_verify_assets_refuses_mismatches_before_uploading_anything(self): | CODE |
| LOW⚡ | java/bin/github_release_test.py | 213 | def test_verify_refuses_credentials_and_non_https_urls(self): | CODE |
| LOW⚡ | java/bin/github_release_test.py | 222 | def test_versions_reject_snapshots_aliases_and_paths(self): | CODE |
| LOW | ruby/driver/riverqueue-activerecord/lib/driver.rb | 181 | private def postgres_insert_params_to_hash(insert_params, nonce) | CODE |
| LOW⚡ | ruby/driver/riverqueue-activerecord/lib/driver.rb | 220 | private def postgres_to_insert_results(res, nonce) | CODE |
| LOW⚡ | ruby/driver/riverqueue-activerecord/lib/driver.rb | 227 | private def postgres_to_job_row_from_model(river_job) | CODE |
| LOW⚡ | ruby/driver/riverqueue-activerecord/lib/driver.rb | 233 | private def postgres_to_job_row_from_raw(row, columns, column_types) | CODE |
| LOW | ruby/driver/riverqueue-activerecord/lib/driver.rb | 292 | private def sqlite_insert_params_to_hash(insert_params, nonce) | CODE |
| LOW | ruby/driver/riverqueue-activerecord/lib/driver.rb | 393 | private def sqlite_to_job_row_from_model(river_job) | CODE |
| LOW | ruby/driver/riverqueue-activerecord/lib/driver.rb | 398 | private def sqlite_to_job_row_from_raw(row) | CODE |
| LOW | ruby/driver/riverqueue-sequel/spec/spec_helper.rb | 53 | def available_test_transaction(&) | CODE |
| LOW | ruby/driver/riverqueue-sequel/lib/driver.rb | 163 | private def postgres_insert_params_to_hash(insert_params, nonce) | CODE |
| LOW | ruby/driver/riverqueue-sequel/lib/driver.rb | 249 | private def sqlite_insert_params_to_hash(insert_params, nonce) | CODE |
| LOW | ruby/driver/riverqueue-sequel/lib/driver.rb | 341 | private def sqlite_to_job_row_from_raw(row) | CODE |
| LOW | ruby/spec/support/transaction_helpers.rb | 70 | def exec_rollback_to_savepoint(name = current_savepoint_name) | CODE |
| LOW | ruby/lib/client_runtime.rb | 289 | private def check_remote_cancellations(queue) | CODE |
| LOW | ruby/lib/client_runtime.rb | 443 | private def finish_transactional_completion(job, timing) | CODE |
| LOW | ruby/lib/client.rb | 54 | def __insert_with_default_scheduled_at(args, insert_opts, default_scheduled_at) | CODE |
| LOW | ruby/lib/client.rb | 429 | private def insert_and_check_unique_job(insert_params) | CODE |
| LOW | ruby/lib/client.rb | 485 | private def make_unique_key_and_bitmask(insert_params, unique_opts) | CODE |
| LOW | ruby/lib/config.rb | 35 | def resolved_fetch_poll_interval(config) | CODE |
| LOW | ruby/lib/driver/runtime.rb | 364 | def notification_delete_before(horizon:, max: 10_000) | CODE |
| LOW | ruby/lib/driver/runtime.rb | 539 | private def runtime_decode_postgres_job(row) | CODE |
| 3 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | internal/leadership/doc.go | 34 | // ┌─────────────────────────────────────┐ | COMMENT |
| MEDIUM⚡ | internal/leadership/doc.go | 38 | // └──────────────────┬──────────────────┘ | COMMENT |
| MEDIUM⚡ | internal/leadership/doc.go | 41 | // ┌─────────────────────────────────────┐ | COMMENT |
| MEDIUM⚡ | internal/leadership/doc.go | 45 | // └──────────────────┬──────────────────┘ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | riverdbtest/riverdbtest_test.go | 67 | // Essentially the same check as above, but just looking that jobs are | COMMENT |
| MEDIUM | riverdriver/river_driver_interface.go | 519 | // encoded into EncodedArgs, but the original is kept here for to leverage its | COMMENT |
| MEDIUM | ruby/driver/riverqueue-activerecord/lib/driver.rb | 9 | # Used in conjunction with a River client like: | COMMENT |
| MEDIUM | ruby/driver/riverqueue-sequel/lib/driver.rb | 8 | # Used in conjunction with a River client like: | COMMENT |
| MEDIUM | ruby/lib/client.rb | 21 | # Used in conjunction with a River driver like: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | js/examples/prisma/src/index.ts | 52 | to: "user@example.com", | CODE |
| LOW | js/examples/node-postgres/src/index.ts | 44 | to: "user@example.com", | CODE |
| LOW | rust/riverqueue/src/client/insert.rs | 340 | /// .insert(SendEmail { address: "user@example.com".to_owned() }) | COMMENT |
| LOW | rust/riverqueue/src/client/insert.rs | 346 | /// .insert(SendEmail { address: "admin@example.com".to_owned() }) | COMMENT |
| LOW | internal/dbunique/db_unique_test.go | 108 | Recipient: "user@example.com", | CODE |
| LOW | internal/dbunique/db_unique_test.go | 116 | expectedJSON: `&kind=worker_1&args={"recipient":"user@example.com","subject":"Test Email"}`, | CODE |
| LOW | internal/dbunique/db_unique_test.go | 130 | PhoneNumber: "555-5678", | CODE |
| LOW | internal/dbunique/db_unique_test.go | 136 | expectedJSON: `&kind=worker_2&args={"phone_number":"555-5678"}`, | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | riverlog/example_new_middleware_custom_context_test.go | 59 | // For demonstration purposes we show the use of a built-in | COMMENT |
| LOW | ruby/spec/client_spec.rb | 298 | # individual drivers has their own unique insert tests that make sure to do | COMMENT |