Repository Analysis

pgsty/pigsty

Enterprise-Grade OSS PostgreSQL Distribution with HA, PITR, IaC, Monitor, 12 kernel forks and 500+ PG extensions. Best-of-breed products integrated as a platform. Self-host Postgres like a Pro!

13.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pgsty/pigsty, a Shell project with 5,221 GitHub stars. SynthScan v2.0 examined 165,128 lines of code across 511 source files, recording 877 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 13.3 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).

13.3
Adjusted Score
13.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
5.2K
Stars
Shell
Language
165.1K
Lines of Code
511
Files
877
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 1MEDIUM 508LOW 368

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 877 distinct pattern matches across 13 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 Separators476 hits · 1722 pts
SeverityFileLineSnippetContext
MEDIUMslim.yml26#---------------------------------------------------------------COMMENT
MEDIUMslim.yml28#---------------------------------------------------------------COMMENT
MEDIUMslim.yml37#---------------------------------------------------------------COMMENT
MEDIUMslim.yml39#---------------------------------------------------------------COMMENT
MEDIUMslim.yml47#---------------------------------------------------------------COMMENT
MEDIUMslim.yml49#---------------------------------------------------------------COMMENT
MEDIUMslim.yml59#---------------------------------------------------------------COMMENT
MEDIUMslim.yml61#---------------------------------------------------------------COMMENT
MEDIUMslim.yml69#---------------------------------------------------------------COMMENT
MEDIUMslim.yml71#---------------------------------------------------------------COMMENT
MEDIUMminio.yml22#---------------------------------------------------------------COMMENT
MEDIUMminio.yml24#---------------------------------------------------------------COMMENT
MEDIUMminio.yml31#---------------------------------------------------------------COMMENT
MEDIUMminio.yml33#---------------------------------------------------------------COMMENT
MEDIUMminio.yml49#---------------------------------------------------------------COMMENT
MEDIUMvibe.yml40#---------------------------------------------------------------COMMENT
MEDIUMvibe.yml42#---------------------------------------------------------------COMMENT
MEDIUMvibe.yml61#---------------------------------------------------------------COMMENT
MEDIUMvibe.yml63#---------------------------------------------------------------COMMENT
MEDIUMvibe.yml85#---------------------------------------------------------------COMMENT
MEDIUMnode.yml24#---------------------------------------------------------------COMMENT
MEDIUMnode.yml26#---------------------------------------------------------------COMMENT
MEDIUMnode.yml49#---------------------------------------------------------------COMMENT
MEDIUMnode.yml51#---------------------------------------------------------------COMMENT
MEDIUMnode.yml64#---------------------------------------------------------------COMMENT
MEDIUMnode.yml66#---------------------------------------------------------------COMMENT
MEDIUMnode.yml114#---------------------------------------------------------------COMMENT
MEDIUMredis.yml15#---------------------------------------------------------------COMMENT
MEDIUMredis.yml17#---------------------------------------------------------------COMMENT
MEDIUMinfra-rm.yml15#---------------------------------------------------------------COMMENT
MEDIUMinfra-rm.yml17#---------------------------------------------------------------COMMENT
MEDIUMinfra-rm.yml25#---------------------------------------------------------------COMMENT
MEDIUMinfra-rm.yml49 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml51 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml99 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml101 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml117 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml119 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml150 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml152 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml165 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml167 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml177 #---------------------------------------------COMMENT
MEDIUMinfra-rm.yml179 #---------------------------------------------COMMENT
MEDIUMdeploy.yml38#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml40#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml50#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml52#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml61#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml63#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml72#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml74#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml85#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml87#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml96#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml98#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml107#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml109#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml118#---------------------------------------------------------------COMMENT
MEDIUMdeploy.yml120#---------------------------------------------------------------COMMENT
416 more matches not shown…
Over-Commented Block328 hits · 318 pts
SeverityFileLineSnippetContext
LOWpgsql-pitr.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWpgsql-pitr.yml21COMMENT
LOWpgsql-pitr.yml41# link_map: {} # Tablespace link mappingsCOMMENT
LOWpgsql-pitr.yml61# ./pgsql-pitr.yml -l pg-test -e '{"pg_pitr": {"cluster": "pg-meta", "name": "some_restore_point"}}'COMMENT
LOWpgsql-pitr.yml81# - start : # start patroni and postgres serviceCOMMENT
LOWpigsty.yml1---COMMENT
LOWpigsty.yml81 etcd:COMMENT
LOWpigsty.yml161 #----------------------------------------------#COMMENT
LOWpigsty.yml181 # storage_port: 9000 # minio port, 9000 by defaultCOMMENT
LOWredis-rm.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWredis-rm.yml21 vars:COMMENT
LOWredis-rm.yml41#COMMENT
LOWredis-rm.yml61# redis : stop and disable redis cluster/node/instanceCOMMENT
LOWslim.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWpgsql.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWpgsql.yml21 - { role: pg_monitor ,tags: monitor } # init postgres monitoringCOMMENT
LOWpgsql.yml41#COMMENT
LOWpgsql.yml61# - pg_pre : pre-install taskCOMMENT
LOWpgsql.yml81# - pg_primary : launch patroni/postgres primaryCOMMENT
LOWpgsql.yml101# - pgbackrest_init : init pgbackrest repoCOMMENT
LOWpgsql.yml121# - pg_service_config : generate local haproxy config for pg servicesCOMMENT
LOWminio.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWminio.yml21COMMENT
LOWminio.yml41# - minio_cert : minio ssl certCOMMENT
LOWjuice.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWjuice.yml21#--------------------------------------------------------------#COMMENT
LOWjuice.yml41#--------------------------------------------------------------#COMMENT
LOWjuice.yml61# juice_dir : create mountpointCOMMENT
LOWpgsql-user.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWpgsql-user.yml21# `all.children.<pg_cluster>.vars.pg_users[i]`COMMENT
LOWpgsql-user.yml41#--------------------------------------------------------------#COMMENT
LOWpgsql-user.yml61# parameters: {} # optional, role level parameters with `ALTER ROLE SET`COMMENT
LOWvibe.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWvibe.yml21 #code_data: /data/code # code-server user data directoryCOMMENT
LOWvibe.yml41# UsageCOMMENT
LOWvibe.yml61#---------------------------------------------------------------COMMENT
LOWvibe.yml81# - claude_install : install claude-code packageCOMMENT
LOWpgsql-db.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWpgsql-db.yml21#COMMENT
LOWpgsql-db.yml41# vars:COMMENT
LOWpgsql-db.yml61# icu_rules: '' # optional, icu rules for icu locale provider (PG16+)COMMENT
LOWnode.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWnode.yml21 - { role: node_monitor , tags: monitor } # init node monitorCOMMENT
LOWnode.yml41#--------------------------------------------------------------#COMMENT
LOWnode.yml61# 1. node identity can be specified by nodename or node_cluster explicitly (override all)COMMENT
LOWnode.yml81# node_alias : write /etc/profile.d/node.alias.shCOMMENT
LOWnode.yml101# - node_exporterCOMMENT
LOWpgsql-rm.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWpgsql-rm.yml21 #pg_rm_backup: true # remove pgbackrest backup during primary remove? true by defaultCOMMENT
LOWpgsql-rm.yml41#--------------------------------------------------------------#COMMENT
LOWpgsql-rm.yml61# - dns : remove pg dns recordsCOMMENT
LOWredis.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWredis.yml21# ./redis.yml -l <cluster> # create redis clusterCOMMENT
LOWredis.yml41# TasksCOMMENT
LOWetcd-rm.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWetcd-rm.yml21 #etcd_rm_pkg: false # uninstall etcd packages during remove? false by defaultCOMMENT
LOWetcd-rm.yml41# UtilsCOMMENT
LOWinfra-rm.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWdeploy.yml1#!/usr/bin/env ansible-playbookCOMMENT
LOWdeploy.yml21# - node-init : init node, haproxy & dockerCOMMENT
268 more matches not shown…
Modern AI Meta-Vocabulary19 hits · 55 pts
SeverityFileLineSnippetContext
MEDIUMroles/pg_remove/README.md43 ├── main.yml # Entry point: orchestrates removalCODE
MEDIUMroles/node_id/vars/el8.x86_64.yml368 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/d13.aarch64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/el8.aarch64.yml367 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/u24.aarch64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/u26.x86_64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/el7.x86_64.yml253 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/d12.x86_64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/u22.aarch64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/u24.x86_64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/el9.aarch64.yml367 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/d12.aarch64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/el9.x86_64.yml368 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/u22.x86_64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/el10.x86_64.yml368 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/d13.x86_64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/u26.aarch64.yml366 # RAG: extensionCOMMENT
MEDIUMroles/node_id/vars/el10.aarch64.yml367 # RAG: extensionCOMMENT
MEDIUMroles/pgsql/README.md44│ ├── main.yml # Entry point: orchestrates all subtasksCODE
Slop Phrases18 hits · 48 pts
SeverityFileLineSnippetContext
MEDIUMpigsty.yml165 # you can also use external object storage as backup repoCOMMENT
LOWnode.yml27# 1. make sure you have nopass ssh & sudo access to target nodeCOMMENT
LOWnode.yml28# 2. make sure you have defined these nodes in your inventoryCOMMENT
MEDIUMpgsql-monitor.yml55# pg_exporter_config: pg_exporter.yml # pg_exporter configuration file name, you can use other filename under filCOMMENT
MEDIUMdocker.yml40# you can add registry mirror to `docker_registry_mirrors` to accelerateCOMMENT
MEDIUMconf/slim.yml37 #10.10.10.11: { pg_seq: 2, pg_role: replica } # you can add more!COMMENT
MEDIUMconf/fat.yml252 # you can also use external object storage as backup repoCOMMENT
MEDIUMconf/fat.yml278 s3: # you can use cloud object storage as backup repoCODE
MEDIUMconf/rich.yml302 # you can also use external object storage as backup repoCOMMENT
MEDIUMconf/rich.yml328 s3: # you can use cloud object storage as backup repoCODE
MEDIUMconf/supabase.yml302 s3: # you can use cloud object storage as backup repoCODE
MEDIUMconf/meta.yml165 # you can also use external object storage as backup repoCOMMENT
MEDIUMconf/infra.yml25 #10.10.10.11: { infra_seq: 2 } # you can add more nodes if you wantCOMMENT
LOWconf/infra.yml26 #10.10.10.12: { infra_seq: 3 } # don't forget to assign unique infra_seq for each nodeCOMMENT
LOWconf/infra.yml26 #10.10.10.12: { infra_seq: 3 } # don't forget to assign unique infra_seq for each nodeCOMMENT
LOWconf/infra.yml45 # DON't FORGET TO CHANGE DEFAULT PASSWORDS!COMMENT
MEDIUMconf/app/supa.yml302 s3: # you can use cloud object storage as backup repoCODE
MEDIUMconf/ha/safe.yml104 cipher_pass: 'pgBR.${pg_cluster}' # <-------- CHANGE THIS, you can use cluster name as part of passwordCODE
Example Usage Blocks25 hits · 38 pts
SeverityFileLineSnippetContext
LOWpigsty.yml17# Usage:COMMENT
LOWcert.yml16# Usage:COMMENT
LOWterraform/spec/qcloud.tf18# Usage:COMMENT
LOWbin/psql.py18# Usage:COMMENT
LOWconf/mssql.yml16# Usage:COMMENT
LOWconf/oriole.yml16# Usage:COMMENT
LOWconf/polar.yml16# Usage:COMMENT
LOWconf/slim.yml15# Usage:COMMENT
LOWconf/pgsql.yml16# Usage:COMMENT
LOWconf/vibe.yml16# Usage:COMMENT
LOWconf/fat.yml14# Usage:COMMENT
LOWconf/mysql.yml16# Usage:COMMENT
LOWconf/pgtde.yml16# Usage:COMMENT
LOWconf/rich.yml20# Usage:COMMENT
LOWconf/supabase.yml14# Usage:COMMENT
LOWconf/ivory.yml17# Usage:COMMENT
LOWconf/mongo.yml17# Usage:COMMENT
LOWconf/meta.yml17# Usage:COMMENT
LOWconf/pgedge.yml16# Usage:COMMENT
LOWconf/agens.yml16# Usage:COMMENT
LOWconf/pg19.yml15# Usage:COMMENT
LOWconf/infra.yml15# Usage:COMMENT
LOWconf/docker.yml15# Usage:COMMENT
LOWconf/app/supa.yml14# Usage:COMMENT
LOWconf/ha/citus.yml25# Usage:COMMENT
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHterraform/README.md235export VULTR_API_KEY="<your_api_key>"CODE
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippetContext
LOWbin/parse_nginx.py18CODE
LOWbin/parse_nginx.py62CODE
LOWbin/psql.py53CODE
LOWbin/psql.py75CODE
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWterraform/spec/qcloud.tf178# WARNING: This security group allows all inbound/outbound traffic.COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWapp/dify/nginx/docker-entrypoint.sh6 # Check if the certificate and key files for the specified domain existCOMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWroles/pg_pitr/tasks/stop.yml20 # if postmaster.pid file not exists, just returnCOMMENT
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbin/psql.py39 except Exception:CODE
Unused Imports1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbin/psql.py12CODE
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippetContext
LOWfiles/grafana/grafana.py147def get_datasource_id_by_name(name):CODE