Repository Analysis

pgmq/pgmq

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

7.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pgmq/pgmq, a PLpgSQL project with 5,025 GitHub stars. SynthScan v2.0 examined 27,085 lines of code across 163 source files, recording 150 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 7.5 places this repository in the Low AI signal 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).

7.5
Adjusted Score
7.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.0K
Stars
PLpgSQL
Language
27.1K
Lines of Code
163
Files
150
Pattern Hits
2026-07-14
Scan Date
0.02
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 3MEDIUM 21LOW 126

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 150 distinct pattern matches across 9 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.

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
MEDIUMpgmq-extension/client-tests/topics_test.py157# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py159# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py273# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py275# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py439# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py441# =============================================================================COMMENT
MEDIUMpgmq-extension/client-tests/topics_test.py830# =============================================================================COMMENT
MEDIUMpgmq-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
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
LOWpgmq-extension/client-tests/topics_test.py165 def test_valid_simple_routing_key(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py173 def test_valid_routing_key_with_hyphens(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py181 def test_valid_routing_key_with_underscores(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py191 def test_valid_single_segment_routing_key(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py199 def test_invalid_empty_routing_key(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py207 def test_invalid_null_routing_key(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py215 def test_invalid_routing_key_starts_with_dot(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py223 def test_invalid_routing_key_ends_with_dot(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py231 def test_invalid_routing_key_consecutive_dots(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py239 def test_invalid_routing_key_with_wildcards(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py247 def test_invalid_routing_key_with_special_chars(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py255 def test_invalid_routing_key_with_space(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py263 def test_invalid_routing_key_too_long(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py281 def test_valid_pattern_with_star(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py289 def test_valid_pattern_with_hash(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py297 def test_valid_pattern_star_at_start(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py305 def test_valid_pattern_hash_at_start(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py313 def test_valid_pattern_mixed_wildcards(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py321 def test_valid_pattern_exact_match(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py329 def test_valid_pattern_only_hash(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py337 def test_valid_pattern_only_star(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py345 def test_invalid_empty_pattern(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py353 def test_invalid_null_pattern(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py361 def test_invalid_pattern_starts_with_dot(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py369 def test_invalid_pattern_ends_with_dot(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py377 def test_invalid_pattern_consecutive_dots(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py385 def test_invalid_pattern_consecutive_stars(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py393 def test_invalid_pattern_consecutive_hashes(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py401 def test_invalid_pattern_adjacent_wildcards_star_hash(CODE
LOWpgmq-extension/client-tests/topics_test.py411 def test_invalid_pattern_adjacent_wildcards_hash_star(CODE
LOWpgmq-extension/client-tests/topics_test.py421 def test_invalid_pattern_special_chars(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py429 def test_invalid_pattern_too_long(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py447 def test_bind_topic_creates_binding(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py838 def test_send_topic_single_queue(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py974 def test_send_topic_invalid_routing_key(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py982 def test_send_topic_null_message(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py991 def test_send_topic_negative_delay(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py1095 def test_pattern_rejects_parentheses(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py1102 def test_pattern_rejects_square_brackets(self, db_connection: psycopg.Connection):CODE
LOWpgmq-extension/client-tests/topics_test.py1109 def test_pattern_rejects_dollar(self, db_connection: psycopg.Connection):CODE
LOWpgmq-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…
Over-Commented Block27 hits · 27 pts
SeverityFileLineSnippetContext
LOWpgmq-rs/pgmq_test_macro/src/lib.rs1//! Private macro(s) used by the `pgmq` crate in tests.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/mod.rs21#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]COMMENT
LOWpgmq-rs/src/types/mod.rs41 /// The number of times the message has been read. Increments on read.COMMENT
LOWpgmq-rs/src/types/queue_name.rs141 #[case("-")]COMMENT
LOWpgmq-rs/src/types/visibility_timeout_offset.rs1use std::ops::Deref;COMMENT
LOWpgmq-rs/src/types/visibility_timeout_offset.rs21/// assert_eq!(10i32, *VisibilityTimeoutOffset::from(10i32));COMMENT
LOWpgmq-rs/src/types/visibility_timeout_offset.rs41///COMMENT
LOWpgmq-rs/src/types/visibility_timeout_offset.rs61/// ```COMMENT
LOWpgmq-rs/src/bin/pgmq-cli.rs21#[derive(Debug, Parser)]COMMENT
LOWpgmq-rs/src/pg_ext/mod.rs1401 /// Provide a non-zero throttle interval to specify how often a notification can be sent.COMMENT
LOWpgmq-rs/src/pg_ext/mod.rs1581 .await?;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/diesel/mod.rs1#[cfg(feature = "diesel-async")]COMMENT
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
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