AI Slop Code RIsk Monitor

pgmq/pgmq

A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.

7.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for pgmq/pgmq, a Rust project with 5,326 GitHub stars. SynthScan examined 34,699 lines of code across 168 source files, recording 205 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 7.2 (Moderate 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.

7.2
Adjusted Signal
7.2
Raw Pattern Score
100%
Time Factor
2026-09-28
Last Push
5.3K
Stars
Rust
Language
34.7K
Lines of Code
168
Files
205
Pattern Hits
2026-10-12
Scan Date
0.02
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 19.6/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.7/100 · LOW

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

Agent Over-Engineering Ratio 20.4/100 · LOW

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

PR Review Velocity Impact 31.9/100 · MEDIUM

Which changes need focused human review? 205 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 4MEDIUM 21LOW 180

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 205 distinct pattern matches across 10 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 Separators20 hits · 72 pts
SeverityFileLineSnippetContext
MEDIUMpgmq-extension/client-tests/upgrade_test.py49# ---------------------------------------------------------------------------COMMENT
MEDIUMpgmq-extension/client-tests/upgrade_test.py51# ---------------------------------------------------------------------------COMMENT
MEDIUMpgmq-extension/client-tests/upgrade_test.py64# ---------------------------------------------------------------------------COMMENT
MEDIUMpgmq-extension/client-tests/upgrade_test.py66# ---------------------------------------------------------------------------COMMENT
MEDIUMpgmq-extension/client-tests/upgrade_test.py206# ---------------------------------------------------------------------------COMMENT
MEDIUMpgmq-extension/client-tests/upgrade_test.py208# ---------------------------------------------------------------------------COMMENT
MEDIUMpgmq-extension/client-tests/upgrade_test.py332# ---------------------------------------------------------------------------COMMENT
MEDIUMpgmq-extension/client-tests/upgrade_test.py334# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py157# =============================================================================COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py159# =============================================================================COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py273# =============================================================================COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py275# =============================================================================COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py439# =============================================================================COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py441# =============================================================================COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py830# =============================================================================COMMENT
MEDIUM⚡pgmq-extension/client-tests/topics_test.py832# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py620# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py622# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py1079# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py1081# =============================================================================COMMENT
Over-Commented Block81 hits · 68 pts
SeverityFileLineSnippetContext
LOWpgmq-rs/pgmq_test_macro/src/lib.rs1//! Private macro(s) used by the `pgmq` crate in tests.COMMENT
LOWpgmq-rs/pgmq_test_macro/src/lib.rs41 test_functions.collect::<proc_macro2::TokenStream>().into()COMMENT
LOWpgmq-rs/src/util.rs101/// be triggered when using the `pgmq.enable_notify_insert` functionality.COMMENT
LOWpgmq-rs/src/lib.rs1//! # Postgres Message Queue (PGMQ)COMMENT
LOWpgmq-rs/src/lib.rs21//!COMMENT
LOWpgmq-rs/src/lib.rs41//!COMMENT
LOWpgmq-rs/src/lib.rs61//! requests to GitHub, but allows installing (or upgrading to) any version available in the repo.COMMENT
LOWpgmq-rs/src/lib.rs81//! ```shellCOMMENT
LOWpgmq-rs/src/lib.rs101//! // Replace the versionCOMMENT
LOWpgmq-rs/src/lib.rs121//!COMMENT
LOWpgmq-rs/src/lib.rs141//!COMMENT
LOWpgmq-rs/src/lib.rs161//! #[cfg(feature = "install-sql-github")]COMMENT
LOWpgmq-rs/src/lib.rs181//!COMMENT
LOWpgmq-rs/src/lib.rs201//!COMMENT
LOWpgmq-rs/src/lib.rs221//! async fn main() -> Result<(), PgmqError> {COMMENT
LOWpgmq-rs/src/lib.rs241//! };COMMENT
LOWpgmq-rs/src/errors.rs21COMMENT
LOWpgmq-rs/src/types/duration.rs1use crate::private::Sealed;COMMENT
LOWpgmq-rs/src/types/duration.rs21/// PGMQ use case.COMMENT
LOWpgmq-rs/src/types/duration.rs41/// ```COMMENT
LOWpgmq-rs/src/types/duration.rs61/// assert_eq!(10i32, *Duration::<Milliseconds>::from(10i64));COMMENT
LOWpgmq-rs/src/types/duration.rs81/// assert_eq!(10i32, *Duration::<Seconds>::from(chrono::Duration::seconds(10)));COMMENT
LOWpgmq-rs/src/types/duration.rs101/// # use pgmq::types::duration::{Duration, Milliseconds, Seconds};COMMENT
LOWpgmq-rs/src/types/mod.rs21COMMENT
LOWpgmq-rs/src/types/mod.rs41/// ```COMMENT
LOWpgmq-rs/src/types/mod.rs61pub const PGMQ_SCHEMA: &str = "pgmq";COMMENT
LOWpgmq-rs/src/types/mod.rs81#[cfg_attr(feature = "diesel", derive(diesel::FromSqlRow))]COMMENT
LOWpgmq-rs/src/types/mod.rs121 pub compiled_regex: String,COMMENT
LOWpgmq-rs/src/types/queue_name.rs141 use std::assert_matches;COMMENT
LOWpgmq-rs/src/types/queue_name.rs161 let name = name.to_string();COMMENT
LOWpgmq-rs/src/bin/pgmq-cli.rs21#[derive(Debug, Parser)]COMMENT
LOWpgmq-rs/src/private/mod.rs1/// Private marker trait that can be used to mark another trait as "sealed", which prevents externalCOMMENT
LOWpgmq-rs/src/queue/transaction.rs1use crate::types::QueueName;COMMENT
LOWpgmq-rs/src/queue/mod.rs21 InsertNotificationThrottleInterval, ListNotifyInsertThrottlesRow, PGMQueueMeta, PollInterval,COMMENT
LOWpgmq-rs/src/queue/mod.rs41 ///COMMENT
LOWpgmq-rs/src/queue/mod.rs61 /// - <https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-UNLOGGED>COMMENT
LOWpgmq-rs/src/queue/mod.rs81 /// [`pg_partman`](https://github.com/pgpartman/pg_partman/) and therefore requires theCOMMENT
LOWpgmq-rs/src/queue/mod.rs141 ///COMMENT
LOWpgmq-rs/src/queue/mod.rs181 /// # ExamplesCOMMENT
LOWpgmq-rs/src/queue/mod.rs221 /// Read at most `quantity` messages from the queue with the provided `queue_name`. If noCOMMENT
LOWpgmq-rs/src/queue/mod.rs241 /// # async fn example(queue: impl pgmq::queue::Queue) -> Result<(), pgmq::PgmqError> {COMMENT
LOWpgmq-rs/src/queue/mod.rs261 whereCOMMENT
LOWpgmq-rs/src/queue/mod.rs281 /// ```rust,no_runCOMMENT
LOWpgmq-rs/src/queue/mod.rs321 ///COMMENT
LOWpgmq-rs/src/queue/mod.rs341 Q: Send + TryInto<QueueName<'q>, Error = QE>,COMMENT
LOWpgmq-rs/src/queue/mod.rs361 async fn delete<'q, Q, QE>(self, queue_name: Q, msg_ids: &[i64]) -> Result<Vec<i64>, PgmqError>COMMENT
LOWpgmq-rs/src/queue/mod.rs381 /// # use pgmq::{Message, PgmqError};COMMENT
LOWpgmq-rs/src/queue/mod.rs421 /// ```rust,no_runCOMMENT
LOWpgmq-rs/src/queue/mod.rs441 /// # async fn example(queue: impl pgmq::queue::Queue) -> Result<(), pgmq::PgmqError> {COMMENT
LOWpgmq-rs/src/queue/mod.rs461 /// // the visibility timeout (`vt`)COMMENT
LOWpgmq-rs/src/queue/mod.rs501 /// Invokes the `pgmq.read_grouped_head` SQL function.COMMENT
LOWpgmq-rs/src/queue/mod.rs521 /// # use pgmq::{Message, PgmqError};COMMENT
LOWpgmq-rs/src/queue/mod.rs541 Q: Send + TryInto<QueueName<'q>, Error = QE>,COMMENT
LOWpgmq-rs/src/queue/mod.rs561 /// # }COMMENT
LOWpgmq-rs/src/queue/mod.rs601 /// # #[cfg(feature = "queue-experimental")]COMMENT
LOWpgmq-rs/src/queue/mod.rs621 /// queue.unbind_topic("topic.*", "my_queue").await?;COMMENT
LOWpgmq-rs/src/queue/mod.rs641 /// # Ok(())COMMENT
LOWpgmq-rs/src/queue/mod.rs661 /// let topic_bindings = queue.list_topic_bindings_all().await?;COMMENT
LOWpgmq-rs/src/queue/mod.rs681 /// # async fn example(queue: impl pgmq::queue::Queue) -> Result<(), pgmq::PgmqError> {COMMENT
LOWpgmq-rs/src/queue/mod.rs701 message: T,COMMENT
21 more matches not shown…
Hyper-Verbose Identifiers83 hits · 66 pts
SeverityFileLineSnippetContext
LOWpgmq-extension/client-tests/extended_notify_test.py203def test_enable_disable_notifications(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/extended_notify_test.py243def test_enable_notify_variations(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/extended_notify_test.py283def test_throttling_mechanism(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/extended_notify_test.py329def test_no_throttling_when_zero(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/extended_notify_test.py359def test_throttling_with_different_intervals(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/extended_notify_test.py400def test_idempotent_enable_disable(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/extended_notify_test.py434def test_negative_throttle_validation(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/extended_notify_test.py454def test_drop_queue_cleans_throttle_table(db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py367 def test_message_content_intact(self, db_connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py397 def test_unlogged_queue_survives(self, db_connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py511 def test_create_new_queue_post_upgrade(self, db_connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py537 def test_drop_pre_upgrade_queue(self, db_connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py559 def test_partitioned_queue_exists(self, db_connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py565 def test_partitioned_messages_survive(self, db_connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py576 def test_partitioned_send_and_read(self, db_connection):CODE
LOWpgmq-extension/client-tests/upgrade_test.py614 def test_drop_partitioned_queue(self, db_connection):CODE
LOWpgmq-extension/client-tests/basic_notify_test.py39def test_pgmq_basic_notification(db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py165 def test_valid_simple_routing_key(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py173 def test_valid_routing_key_with_hyphens(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py181 def test_valid_routing_key_with_underscores(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py191 def test_valid_single_segment_routing_key(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py199 def test_invalid_empty_routing_key(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py207 def test_invalid_null_routing_key(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py215 def test_invalid_routing_key_starts_with_dot(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py223 def test_invalid_routing_key_ends_with_dot(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py231 def test_invalid_routing_key_consecutive_dots(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py239 def test_invalid_routing_key_with_wildcards(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py247 def test_invalid_routing_key_with_special_chars(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py255 def test_invalid_routing_key_with_space(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py263 def test_invalid_routing_key_too_long(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py281 def test_valid_pattern_with_star(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py289 def test_valid_pattern_with_hash(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py297 def test_valid_pattern_star_at_start(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py305 def test_valid_pattern_hash_at_start(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py313 def test_valid_pattern_mixed_wildcards(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py321 def test_valid_pattern_exact_match(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py329 def test_valid_pattern_only_hash(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py337 def test_valid_pattern_only_star(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py345 def test_invalid_empty_pattern(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py353 def test_invalid_null_pattern(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py361 def test_invalid_pattern_starts_with_dot(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py369 def test_invalid_pattern_ends_with_dot(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py377 def test_invalid_pattern_consecutive_dots(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py385 def test_invalid_pattern_consecutive_stars(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py393 def test_invalid_pattern_consecutive_hashes(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py401 def test_invalid_pattern_adjacent_wildcards_star_hash(CODE
LOW⚡pgmq-extension/client-tests/topics_test.py411 def test_invalid_pattern_adjacent_wildcards_hash_star(CODE
LOW⚡pgmq-extension/client-tests/topics_test.py421 def test_invalid_pattern_special_chars(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py429 def test_invalid_pattern_too_long(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py447 def test_bind_topic_creates_binding(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py838 def test_send_topic_single_queue(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py974 def test_send_topic_invalid_routing_key(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py982 def test_send_topic_null_message(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py991 def test_send_topic_negative_delay(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py1095 def test_pattern_rejects_parentheses(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py1102 def test_pattern_rejects_square_brackets(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py1109 def test_pattern_rejects_dollar(self, db_connection: psycopg.Connection):CODE
LOW⚡pgmq-extension/client-tests/topics_test.py1118 def test_routing_key_rejects_regex_metacharacters(CODE
LOWpgmq-extension/client-tests/topics_test.py464 def test_bind_topic_idempotent(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py484 def test_bind_topic_multiple_patterns(self, db_connection: psycopg.Connection):CODE
23 more matches not shown…
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHpgmq-extension/client-tests/extended_notify_test.py0create database connection using database_url environment variable.STRING
HIGHpgmq-extension/client-tests/basic_notify_test.py0create database connection using database_url environment variable.STRING
HIGHpgmq-extension/client-tests/topics_test.py0create database connection using database_url environment variable.STRING
Structural Annotation Overuse8 hits · 12 pts
SeverityFileLineSnippetContext
LOW.claude/commands/pgmq/update-docs.md18## Step 1: Analyze the Source CodeCOMMENT
LOW.claude/commands/pgmq/update-docs.md34## Step 2: Read All Documentation FilesCOMMENT
LOW.claude/commands/pgmq/update-docs.md46## Step 3: Deep Analysis and ComparisonCOMMENT
LOW.claude/commands/pgmq/update-docs.md64## Step 4: Create Comprehensive Issue ListCOMMENT
LOW.claude/commands/pgmq/update-docs.md99## Step 5: Organize Work into PhasesCOMMENT
LOW.claude/commands/pgmq/update-docs.md111## Step 6: Execute Fixes MethodicallyCOMMENT
LOW.claude/commands/pgmq/update-docs.md152## Step 7: Verify Each Edit Ultra-CarefullyCOMMENT
LOW.claude/commands/pgmq/update-docs.md173## Step 8: Create Detailed CommitsCOMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHpgmq-extension/client-tests/extended_notify_test.py85except TimeoutError:CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMpgmq-rs/src/lib.rs63//! #### Create the DBCOMMENT
Unused Imports3 hits · 3 pts
SeverityFileLineSnippetContext
LOWpgmq-extension/client-tests/test.py17CODE
LOWpgmq-extension/client-tests/test.py19CODE
LOWpgmq-extension/client-tests/test.py21CODE
Verbosity Indicators3 hits · 3 pts
SeverityFileLineSnippetContext
LOWpgmq-extension/sql/pgmq--0.11.1--0.11.2.sql1-- pgmq_meta wasn't necessarily existent in this version, so we need to check ifCODE
LOWpgmq-extension/sql/pgmq--0.14.3--0.15.0.sql1-- pgmq_meta wasn't necessarily existent in this version, so we need to check ifCODE
LOWpgmq-extension/sql/pgmq--0.13.0--0.13.1.sql1-- pgmq_meta wasn't necessarily existent in this version, so we need to check ifCODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWdocs/topics.md492 '{"to": "user@example.com", "subject": "Reminder"}',CODE
LOWdocs/topics.md493 '{"to": "admin@example.com", "subject": "Daily report"}'CODE