Repository Analysis

microsoft/pg_durable

PostgreSQL in-database durable execution

4.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of microsoft/pg_durable, a Rust project with 2,575 GitHub stars. SynthScan v2.0 examined 67,720 lines of code across 228 source files, recording 165 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 4.3 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).

4.3
Adjusted Score
4.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
2.6K
Stars
Rust
Language
67.7K
Lines of Code
228
Files
165
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 45LOW 120

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 165 distinct pattern matches across 11 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 Separators35 hits · 111 pts
SeverityFileLineSnippetContext
MEDIUM.devcontainer/onCreateCommand.sh62# ── Build pg_durable ────────────────────────────────────────────────COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh18# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh20# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh27# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh29# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh56# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh58# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh78# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh80# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh98# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/azure-http-domains/scripts/common.sh100# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/run-pgspot.sh58# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/test-all-local.sh74# ── 1. Unit Tests ────────────────────────────────────────────────────────────COMMENT
MEDIUMscripts/test-all-local.sh90# ── 2. E2E Tests ─────────────────────────────────────────────────────────────COMMENT
MEDIUMscripts/test-all-local.sh106# ── 3. pg_regress Tests ──────────────────────────────────────────────────────COMMENT
MEDIUMscripts/test-all-local.sh134# ── Summary ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMscripts/test-coverage.sh133# ── Step 1: Clean previous coverage data ──────────────────────────────COMMENT
MEDIUMscripts/test-coverage.sh139# ── Step 2: Build extension with coverage instrumentation ─────────────COMMENT
MEDIUMscripts/test-coverage.sh173# ── Step 2b (optional): Run pgrx unit tests ──────────────────────────COMMENT
MEDIUMscripts/test-coverage.sh201# ── Step N: Run E2E tests ─────────────────────────────────────────────COMMENT
MEDIUMscripts/test-coverage.sh239# ── Final step: Merge and report ──────────────────────────────────────COMMENT
MEDIUMscripts/test-upgrade.sh232# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh234# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh337# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh339# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh485# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh487# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh666# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh668# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh739# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh741# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh912# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh914# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh1020# ============================================================================COMMENT
MEDIUMscripts/test-upgrade.sh1022# ============================================================================COMMENT
Structural Annotation Overuse46 hits · 71 pts
SeverityFileLineSnippetContext
LOWUSER_GUIDE.md2211#### Step 1: Check StatusCOMMENT
LOWUSER_GUIDE.md2220#### Step 2: Check the Overall ResultCOMMENT
LOWUSER_GUIDE.md2228#### Step 3: Visualize the Execution TreeCOMMENT
LOWUSER_GUIDE.md2245#### Step 4: Inspect Individual NodesCOMMENT
LOWUSER_GUIDE.md2265#### Step 5: Trace Variable FlowCOMMENT
LOWdocs/spec-pg-regress.md327### Step 1: Add df.await_instance()COMMENT
LOWdocs/spec-pg-regress.md343### Step 2: Create pg_regress Directory StructureCOMMENT
LOWdocs/spec-pg-regress.md350### Step 3: PGXS Configuration in Root MakefileCOMMENT
LOWdocs/spec-pg-regress.md368### Step 4: Convert Phase 1 TestsCOMMENT
LOWdocs/spec-pg-regress.md375### Step 5: Update DocumentationCOMMENT
LOWdocs/spec-pg-regress.md381### Step 6: Add CI IntegrationCOMMENT
LOWdocs/bgw-applies-migrations.md81#### Step 5: readiness record via `duroxide._worker_ready`COMMENT
LOWdocs/proposal-management-api.md362 // Step 1: Validate preconditionsCOMMENT
LOWdocs/proposal-management-api.md396 // Step 2: Delete from df.* tables FIRST (source of truth)COMMENT
LOWdocs/proposal-management-api.md406 // Step 3: Delete from duroxide (if this fails, background sync will clean up)COMMENT
LOWdocs/proposal-management-api.md488 // Step 1: Check if runningCOMMENT
LOWdocs/proposal-management-api.md495 // Step 2: Try graceful cancelCOMMENT
LOWdocs/proposal-management-api.md515 // Step 3: Check if still running, force delete if neededCOMMENT
LOWdocs/proposal-management-api.md530 // Step 4: Restart the orchestrationCOMMENT
LOWscripts/test-upgrade.sh683 # Step 1: Upgrade path — create at previous version, upgrade to currentCOMMENT
LOWscripts/test-upgrade.sh695 # Step 2: Fresh install at current versionCOMMENT
LOWscripts/test-upgrade.sh930 # Step 1: Install previous version and create test dataCOMMENT
LOWscripts/test-upgrade.sh943 # Step 2: UpgradeCOMMENT
LOWscripts/test-upgrade.sh954 # Step 3: Verify pre-upgrade data is still accessible under the new schemaCOMMENT
LOWprompts/pg_durable-release.md52## Step 0: Open the tracking issue and decide the cut lineCOMMENT
LOWprompts/pg_durable-release.md88## Step 1: Is the CHANGELOG up to date? (do this first)COMMENT
LOWprompts/pg_durable-release.md120## Step 2: Version & upgrade-script sanityCOMMENT
LOWprompts/pg_durable-release.md132## Step 3: Confirm CI is green on the release commitCOMMENT
LOWprompts/pg_durable-release.md159## Step 4: Tag the release (builds the draft Release)COMMENT
LOWprompts/pg_durable-release.md196## Step 5: Fill release notes and publishCOMMENT
LOWprompts/pg_durable-release.md281## Step 6: Confirm GHCR imagesCOMMENT
LOWprompts/pg_durable-release.md300## Step 7: Open the next development cycleCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md9### Step 1: Review Active BlockersCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md13### Step 2: Check Issue StatusCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md24### Step 3: Check if Fix is in a ReleaseCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md38### Step 4: Review Release NotesCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md47### Step 5: Update DependencyCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md71### Step 6: Remove WorkaroundsCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md84### Step 7: Update Tracking DocumentsCOMMENT
LOWprompts/pg_durable-check-upstream-fixes.md95### Step 8: Commit ChangesCOMMENT
LOWprompts/pg_durable-update-docs-tests.md6## Step 1: Scan Changes and Propose TestsCOMMENT
LOWprompts/pg_durable-update-docs-tests.md24## Step 2: Documentation HierarchyCOMMENT
LOWprompts/pg_durable-update-docs-tests.md57## Step 3: E2E Test UpdatesCOMMENT
LOWprompts/pg_durable-update-docs-tests.md126## Step 4: Ensure USER_GUIDE Examples Have E2E CoverageCOMMENT
LOWprompts/pg_durable-update-docs-tests.md211## Step 5: Validation ChecklistCOMMENT
LOWprompts/pg_durable-update-docs-tests.md280## Step 6: Final ValidationCOMMENT
Over-Commented Block55 hits · 54 pts
SeverityFileLineSnippetContext
LOWscripts/run-pgspot.sh1#!/bin/bashCOMMENT
LOWscripts/run-pgspot.sh21COMMENT
LOWscripts/run-pgspot.sh41 # pg_durable's DSL intentionally exposes unqualified custom operators (forCOMMENT
LOWscripts/test-all-local.sh1#!/bin/bashCOMMENT
LOWscripts/deploy-acr.sh1#!/bin/bashCOMMENT
LOWscripts/test-e2e-docker.sh1#!/bin/bashCOMMENT
LOWscripts/test-coverage.sh1#!/bin/bashCOMMENT
LOWscripts/test-coverage.sh21# Examples:COMMENT
LOWscripts/test-unit.sh1#!/bin/bashCOMMENT
LOWscripts/pg-stop.sh1#!/bin/bashCOMMENT
LOWscripts/test-e2e-local.sh1#!/bin/bashCOMMENT
LOWscripts/test-e2e-local.sh21# ./scripts/test-e2e-local.shCOMMENT
LOWscripts/test-e2e-local.sh421COMMENT
LOWscripts/measure-memory.sh1#!/bin/bashCOMMENT
LOWscripts/pgspot-gate.sh1#!/bin/bashCOMMENT
LOWscripts/test-upgrade.sh1#!/bin/bashCOMMENT
LOW.github/dependabot.yml1# Dependabot configuration for weekly dependency updates.COMMENT
LOW.github/workflows/docker.yml1name: Docker CICOMMENT
LOWsrc/types.rs101 .map_err(|e| format!("superuser check failed for role '{}': {}", role_name, e))COMMENT
LOWsrc/types.rs261 .execute(&mut conn)COMMENT
LOWsrc/monitoring.rs21/// or filter-binding change) without silently mis-decoding an already-issuedCOMMENT
LOWsrc/monitoring.rs121}COMMENT
LOWsrc/monitoring.rs301/// List durable function instances, newest-first, with optional status/labelCOMMENT
LOWsrc/monitoring.rs381 // from df.instances directly — no duroxide round-trip, and RLS-safe.COMMENT
LOWsrc/monitoring.rs501 // them from duroxide over a worker-credentialed connection (seeCOMMENT
LOWsrc/client.rs21/// Cached tokio runtime for client operations.COMMENT
LOWsrc/lib.rs21 GucSetting::<Option<CString>>::new(Some(c"postgres"));COMMENT
LOWsrc/lib.rs2141 "Empty JSON should not be Durofut"COMMENT
LOWsrc/worker.rs921 failed_idsCOMMENT
LOWsrc/dsl.rs41 env!("CARGO_PKG_VERSION"),COMMENT
LOWsrc/dsl.rs301 query: Some(config.to_string()),COMMENT
LOWsrc/dsl.rs341 ..Default::default()COMMENT
LOWsrc/dsl.rs481/// * `url` - The URL to requestCOMMENT
LOWsrc/dsl.rs541 query: Some(config.to_string()),COMMENT
LOWsrc/dsl.rs641/// rather than an unverified ID.COMMENT
LOWsrc/dsl.rs821COMMENT
LOWsrc/dsl.rs941 let legacy_login_role = legacy_login_role_schema();COMMENT
LOWsrc/dsl.rs1061 let input_json = serde_json::to_string(&input).unwrap_or(instance_id.clone());COMMENT
LOWsrc/dsl.rs1161/// terminal state, returning its final status as plain textCOMMENT
LOWsrc/dsl.rs1181///COMMENT
LOWsrc/explain.rs41 fn status_details(&self) -> Option<&str> {COMMENT
LOWsrc/ssrf.rs1// Copyright (c) Microsoft Corporation.COMMENT
LOWsrc/ssrf.rs21// ---------------------------------------------------------------------------COMMENT
LOWsrc/ssrf.rs161///COMMENT
LOWsrc/orchestrations/mod.rs1// Copyright (c) Microsoft Corporation.COMMENT
LOWsrc/orchestrations/execute_function_graph.rs41///COMMENT
LOWsrc/orchestrations/execute_function_graph.rs81/// `None` only — keeping a user payload from impersonating control flow on a fresh envelope.COMMENT
LOWsrc/orchestrations/execute_function_graph.rs101}COMMENT
LOWsrc/orchestrations/execute_function_graph.rs841 .await?;COMMENT
LOWsrc/orchestrations/execute_function_graph.rs881 parent_results: &mut HashMap<String, String>,COMMENT
LOWsrc/activities/update_node_status.rs1// Copyright (c) Microsoft Corporation.COMMENT
LOWsrc/activities/update_node_status.rs61 // replay, so adding fields changes the recorded input shape. Instances inCOMMENT
LOWsrc/activities/execute_sql.rs1// Copyright (c) Microsoft Corporation.COMMENT
LOWsrc/activities/execute_sql.rs21//!COMMENT
LOWsrc/activities/execute_http.rs1// Copyright (c) Microsoft Corporation.COMMENT
Modern AI Meta-Vocabulary7 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMUSER_GUIDE.md1960# Duroxide provider pool: orchestration state + LISTEN/NOTIFYCOMMENT
MEDIUMdocs/ARCHITECTURE.md174. [Phase 2: Orchestration Execution](#phase-2-orchestration-execution)CODE
MEDIUMdocs/design-azure-functions.md18 - [Agentic Workflows](#6-agentic-workflows)CODE
MEDIUMdocs/design-azure-functions.md285### 1. RAG PipelineCOMMENT
MEDIUMdocs/pg_durable_spec.md317#### RAG Query PipelineCOMMENT
MEDIUMdocs/pg_durable_spec.md665### 1. RAG Pipeline: Chunking and EmbeddingCOMMENT
MEDIUMdocs/upgrade-testing.md236- **In-flight orchestration compatibility (#129 — breaking for in-flight work):** Adding `instance_id` to the `update-noCODE
Redundant / Tautological Comments7 hits · 13 pts
SeverityFileLineSnippetContext
LOWtests/e2e/run.sh52 # Check if PostgreSQL is accepting connectionsCOMMENT
LOWtests/e2e/run.sh54 # Check if durable extension is availableCOMMENT
LOWtests/e2e/run.sh56 # Check if background worker has fully started (after init restart)COMMENT
LOWscripts/deploy-acr.sh83# Check if local image existsCOMMENT
LOWscripts/measure-memory.sh52# Check if PostgreSQL is runningCOMMENT
LOWscripts/measure-memory.sh196 # Check if worker still existsCOMMENT
LOW.github/workflows/prebuild.yml33 # Check if required files existCOMMENT
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMdocker-entrypoint-initdb.d/01-init-pg-durable.sh7# Create the extension in the default databaseCOMMENT
MEDIUMscripts/pg-common.sh151 # Create the target database if it doesn't exist (e.g. contrib_regression for pg_regress)COMMENT
Verbosity Indicators5 hits · 6 pts
SeverityFileLineSnippetContext
LOWscripts/test-upgrade.sh683 # Step 1: Upgrade path — create at previous version, upgrade to currentCOMMENT
LOWscripts/test-upgrade.sh695 # Step 2: Fresh install at current versionCOMMENT
LOWscripts/test-upgrade.sh930 # Step 1: Install previous version and create test dataCOMMENT
LOWscripts/test-upgrade.sh943 # Step 2: UpgradeCOMMENT
LOWscripts/test-upgrade.sh954 # Step 3: Verify pre-upgrade data is still accessible under the new schemaCOMMENT
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippetContext
LOWexamples/azure-http-domains/scripts/provision.sh7# Usage:COMMENT
LOWexamples/azure-http-domains/scripts/run-test.sh7# Usage:COMMENT
LOWexamples/azure-http-domains/scripts/cleanup.sh7# Usage:COMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMscripts/test-upgrade.sh122# that is <= the target version. This lets the harness install a versionCOMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWdocs/pg_durable_spec.md131durable.func('send_email', '{"to": "user@example.com"}')CODE
LOWdocs/pg_durable_spec.md133~> durable.func('send_reminder', '{"to": "user@example.com"}')CODE
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOW…es/azure-functions/function-app/chunk_text/__init__.py54 except Exception:CODE
LOW…es/azure-functions/function-app/chunk_text/__init__.py127 except Exception as exc:CODE