PostgreSQL in-database durable execution
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .devcontainer/onCreateCommand.sh | 62 | # ── Build pg_durable ──────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | examples/azure-http-domains/scripts/common.sh | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/azure-http-domains/scripts/common.sh | 20 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/azure-http-domains/scripts/common.sh | 27 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/azure-http-domains/scripts/common.sh | 29 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/azure-http-domains/scripts/common.sh | 56 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/azure-http-domains/scripts/common.sh | 58 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/azure-http-domains/scripts/common.sh | 78 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/azure-http-domains/scripts/common.sh | 80 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/azure-http-domains/scripts/common.sh | 98 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/azure-http-domains/scripts/common.sh | 100 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/run-pgspot.sh | 58 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test-all-local.sh | 74 | # ── 1. Unit Tests ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/test-all-local.sh | 90 | # ── 2. E2E Tests ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/test-all-local.sh | 106 | # ── 3. pg_regress Tests ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/test-all-local.sh | 134 | # ── Summary ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/test-coverage.sh | 133 | # ── Step 1: Clean previous coverage data ────────────────────────────── | COMMENT |
| MEDIUM | scripts/test-coverage.sh | 139 | # ── Step 2: Build extension with coverage instrumentation ───────────── | COMMENT |
| MEDIUM | scripts/test-coverage.sh | 173 | # ── Step 2b (optional): Run pgrx unit tests ────────────────────────── | COMMENT |
| MEDIUM | scripts/test-coverage.sh | 201 | # ── Step N: Run E2E tests ───────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/test-coverage.sh | 239 | # ── Final step: Merge and report ────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 232 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 234 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 337 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 339 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 485 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 487 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 666 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 668 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 739 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 741 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 912 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 914 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 1020 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/test-upgrade.sh | 1022 | # ============================================================================ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | USER_GUIDE.md | 2211 | #### Step 1: Check Status | COMMENT |
| LOW⚡ | USER_GUIDE.md | 2220 | #### Step 2: Check the Overall Result | COMMENT |
| LOW⚡ | USER_GUIDE.md | 2228 | #### Step 3: Visualize the Execution Tree | COMMENT |
| LOW | USER_GUIDE.md | 2245 | #### Step 4: Inspect Individual Nodes | COMMENT |
| LOW | USER_GUIDE.md | 2265 | #### Step 5: Trace Variable Flow | COMMENT |
| LOW | docs/spec-pg-regress.md | 327 | ### Step 1: Add df.await_instance() | COMMENT |
| LOW | docs/spec-pg-regress.md | 343 | ### Step 2: Create pg_regress Directory Structure | COMMENT |
| LOW | docs/spec-pg-regress.md | 350 | ### Step 3: PGXS Configuration in Root Makefile | COMMENT |
| LOW⚡ | docs/spec-pg-regress.md | 368 | ### Step 4: Convert Phase 1 Tests | COMMENT |
| LOW⚡ | docs/spec-pg-regress.md | 375 | ### Step 5: Update Documentation | COMMENT |
| LOW⚡ | docs/spec-pg-regress.md | 381 | ### Step 6: Add CI Integration | COMMENT |
| LOW | docs/bgw-applies-migrations.md | 81 | #### Step 5: readiness record via `duroxide._worker_ready` | COMMENT |
| LOW | docs/proposal-management-api.md | 362 | // Step 1: Validate preconditions | COMMENT |
| LOW | docs/proposal-management-api.md | 396 | // Step 2: Delete from df.* tables FIRST (source of truth) | COMMENT |
| LOW | docs/proposal-management-api.md | 406 | // Step 3: Delete from duroxide (if this fails, background sync will clean up) | COMMENT |
| LOW | docs/proposal-management-api.md | 488 | // Step 1: Check if running | COMMENT |
| LOW | docs/proposal-management-api.md | 495 | // Step 2: Try graceful cancel | COMMENT |
| LOW | docs/proposal-management-api.md | 515 | // Step 3: Check if still running, force delete if needed | COMMENT |
| LOW | docs/proposal-management-api.md | 530 | // Step 4: Restart the orchestration | COMMENT |
| LOW | scripts/test-upgrade.sh | 683 | # Step 1: Upgrade path — create at previous version, upgrade to current | COMMENT |
| LOW | scripts/test-upgrade.sh | 695 | # Step 2: Fresh install at current version | COMMENT |
| LOW | scripts/test-upgrade.sh | 930 | # Step 1: Install previous version and create test data | COMMENT |
| LOW | scripts/test-upgrade.sh | 943 | # Step 2: Upgrade | COMMENT |
| LOW | scripts/test-upgrade.sh | 954 | # Step 3: Verify pre-upgrade data is still accessible under the new schema | COMMENT |
| LOW | prompts/pg_durable-release.md | 52 | ## Step 0: Open the tracking issue and decide the cut line | COMMENT |
| LOW | prompts/pg_durable-release.md | 88 | ## Step 1: Is the CHANGELOG up to date? (do this first) | COMMENT |
| LOW | prompts/pg_durable-release.md | 120 | ## Step 2: Version & upgrade-script sanity | COMMENT |
| LOW | prompts/pg_durable-release.md | 132 | ## Step 3: Confirm CI is green on the release commit | COMMENT |
| LOW | prompts/pg_durable-release.md | 159 | ## Step 4: Tag the release (builds the draft Release) | COMMENT |
| LOW | prompts/pg_durable-release.md | 196 | ## Step 5: Fill release notes and publish | COMMENT |
| LOW | prompts/pg_durable-release.md | 281 | ## Step 6: Confirm GHCR images | COMMENT |
| LOW | prompts/pg_durable-release.md | 300 | ## Step 7: Open the next development cycle | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 9 | ### Step 1: Review Active Blockers | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 13 | ### Step 2: Check Issue Status | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 24 | ### Step 3: Check if Fix is in a Release | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 38 | ### Step 4: Review Release Notes | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 47 | ### Step 5: Update Dependency | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 71 | ### Step 6: Remove Workarounds | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 84 | ### Step 7: Update Tracking Documents | COMMENT |
| LOW | prompts/pg_durable-check-upstream-fixes.md | 95 | ### Step 8: Commit Changes | COMMENT |
| LOW | prompts/pg_durable-update-docs-tests.md | 6 | ## Step 1: Scan Changes and Propose Tests | COMMENT |
| LOW | prompts/pg_durable-update-docs-tests.md | 24 | ## Step 2: Documentation Hierarchy | COMMENT |
| LOW | prompts/pg_durable-update-docs-tests.md | 57 | ## Step 3: E2E Test Updates | COMMENT |
| LOW | prompts/pg_durable-update-docs-tests.md | 126 | ## Step 4: Ensure USER_GUIDE Examples Have E2E Coverage | COMMENT |
| LOW | prompts/pg_durable-update-docs-tests.md | 211 | ## Step 5: Validation Checklist | COMMENT |
| LOW | prompts/pg_durable-update-docs-tests.md | 280 | ## Step 6: Final Validation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/run-pgspot.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/run-pgspot.sh | 21 | COMMENT | |
| LOW | scripts/run-pgspot.sh | 41 | # pg_durable's DSL intentionally exposes unqualified custom operators (for | COMMENT |
| LOW | scripts/test-all-local.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/deploy-acr.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/test-e2e-docker.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/test-coverage.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/test-coverage.sh | 21 | # Examples: | COMMENT |
| LOW | scripts/test-unit.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/pg-stop.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/test-e2e-local.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/test-e2e-local.sh | 21 | # ./scripts/test-e2e-local.sh | COMMENT |
| LOW | scripts/test-e2e-local.sh | 421 | COMMENT | |
| LOW | scripts/measure-memory.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/pgspot-gate.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/test-upgrade.sh | 1 | #!/bin/bash | COMMENT |
| LOW | .github/dependabot.yml | 1 | # Dependabot configuration for weekly dependency updates. | COMMENT |
| LOW | .github/workflows/docker.yml | 1 | name: Docker CI | COMMENT |
| LOW | src/types.rs | 101 | .map_err(|e| format!("superuser check failed for role '{}': {}", role_name, e)) | COMMENT |
| LOW | src/types.rs | 261 | .execute(&mut conn) | COMMENT |
| LOW | src/monitoring.rs | 21 | /// or filter-binding change) without silently mis-decoding an already-issued | COMMENT |
| LOW | src/monitoring.rs | 121 | } | COMMENT |
| LOW | src/monitoring.rs | 301 | /// List durable function instances, newest-first, with optional status/label | COMMENT |
| LOW | src/monitoring.rs | 381 | // from df.instances directly — no duroxide round-trip, and RLS-safe. | COMMENT |
| LOW | src/monitoring.rs | 501 | // them from duroxide over a worker-credentialed connection (see | COMMENT |
| LOW | src/client.rs | 21 | /// Cached tokio runtime for client operations. | COMMENT |
| LOW | src/lib.rs | 21 | GucSetting::<Option<CString>>::new(Some(c"postgres")); | COMMENT |
| LOW | src/lib.rs | 2141 | "Empty JSON should not be Durofut" | COMMENT |
| LOW | src/worker.rs | 921 | failed_ids | COMMENT |
| LOW | src/dsl.rs | 41 | env!("CARGO_PKG_VERSION"), | COMMENT |
| LOW | src/dsl.rs | 301 | query: Some(config.to_string()), | COMMENT |
| LOW | src/dsl.rs | 341 | ..Default::default() | COMMENT |
| LOW | src/dsl.rs | 481 | /// * `url` - The URL to request | COMMENT |
| LOW | src/dsl.rs | 541 | query: Some(config.to_string()), | COMMENT |
| LOW | src/dsl.rs | 641 | /// rather than an unverified ID. | COMMENT |
| LOW | src/dsl.rs | 821 | COMMENT | |
| LOW | src/dsl.rs | 941 | let legacy_login_role = legacy_login_role_schema(); | COMMENT |
| LOW | src/dsl.rs | 1061 | let input_json = serde_json::to_string(&input).unwrap_or(instance_id.clone()); | COMMENT |
| LOW | src/dsl.rs | 1161 | /// terminal state, returning its final status as plain text | COMMENT |
| LOW | src/dsl.rs | 1181 | /// | COMMENT |
| LOW | src/explain.rs | 41 | fn status_details(&self) -> Option<&str> { | COMMENT |
| LOW | src/ssrf.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/ssrf.rs | 21 | // --------------------------------------------------------------------------- | COMMENT |
| LOW | src/ssrf.rs | 161 | /// | COMMENT |
| LOW | src/orchestrations/mod.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/orchestrations/execute_function_graph.rs | 41 | /// | COMMENT |
| LOW | src/orchestrations/execute_function_graph.rs | 81 | /// `None` only — keeping a user payload from impersonating control flow on a fresh envelope. | COMMENT |
| LOW | src/orchestrations/execute_function_graph.rs | 101 | } | COMMENT |
| LOW | src/orchestrations/execute_function_graph.rs | 841 | .await?; | COMMENT |
| LOW | src/orchestrations/execute_function_graph.rs | 881 | parent_results: &mut HashMap<String, String>, | COMMENT |
| LOW | src/activities/update_node_status.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/activities/update_node_status.rs | 61 | // replay, so adding fields changes the recorded input shape. Instances in | COMMENT |
| LOW | src/activities/execute_sql.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/activities/execute_sql.rs | 21 | //! | COMMENT |
| LOW | src/activities/execute_http.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | USER_GUIDE.md | 1960 | # Duroxide provider pool: orchestration state + LISTEN/NOTIFY | COMMENT |
| MEDIUM | docs/ARCHITECTURE.md | 17 | 4. [Phase 2: Orchestration Execution](#phase-2-orchestration-execution) | CODE |
| MEDIUM | docs/design-azure-functions.md | 18 | - [Agentic Workflows](#6-agentic-workflows) | CODE |
| MEDIUM | docs/design-azure-functions.md | 285 | ### 1. RAG Pipeline | COMMENT |
| MEDIUM | docs/pg_durable_spec.md | 317 | #### RAG Query Pipeline | COMMENT |
| MEDIUM | docs/pg_durable_spec.md | 665 | ### 1. RAG Pipeline: Chunking and Embedding | COMMENT |
| MEDIUM | docs/upgrade-testing.md | 236 | - **In-flight orchestration compatibility (#129 — breaking for in-flight work):** Adding `instance_id` to the `update-no | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/e2e/run.sh | 52 | # Check if PostgreSQL is accepting connections | COMMENT |
| LOW⚡ | tests/e2e/run.sh | 54 | # Check if durable extension is available | COMMENT |
| LOW⚡ | tests/e2e/run.sh | 56 | # Check if background worker has fully started (after init restart) | COMMENT |
| LOW | scripts/deploy-acr.sh | 83 | # Check if local image exists | COMMENT |
| LOW | scripts/measure-memory.sh | 52 | # Check if PostgreSQL is running | COMMENT |
| LOW | scripts/measure-memory.sh | 196 | # Check if worker still exists | COMMENT |
| LOW | .github/workflows/prebuild.yml | 33 | # Check if required files exist | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker-entrypoint-initdb.d/01-init-pg-durable.sh | 7 | # Create the extension in the default database | COMMENT |
| MEDIUM | scripts/pg-common.sh | 151 | # Create the target database if it doesn't exist (e.g. contrib_regression for pg_regress) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/test-upgrade.sh | 683 | # Step 1: Upgrade path — create at previous version, upgrade to current | COMMENT |
| LOW | scripts/test-upgrade.sh | 695 | # Step 2: Fresh install at current version | COMMENT |
| LOW | scripts/test-upgrade.sh | 930 | # Step 1: Install previous version and create test data | COMMENT |
| LOW | scripts/test-upgrade.sh | 943 | # Step 2: Upgrade | COMMENT |
| LOW | scripts/test-upgrade.sh | 954 | # Step 3: Verify pre-upgrade data is still accessible under the new schema | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/azure-http-domains/scripts/provision.sh | 7 | # Usage: | COMMENT |
| LOW | examples/azure-http-domains/scripts/run-test.sh | 7 | # Usage: | COMMENT |
| LOW | examples/azure-http-domains/scripts/cleanup.sh | 7 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/test-upgrade.sh | 122 | # that is <= the target version. This lets the harness install a version | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/pg_durable_spec.md | 131 | durable.func('send_email', '{"to": "user@example.com"}') | CODE |
| LOW | docs/pg_durable_spec.md | 133 | ~> durable.func('send_reminder', '{"to": "user@example.com"}') | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …es/azure-functions/function-app/chunk_text/__init__.py | 54 | except Exception: | CODE |
| LOW | …es/azure-functions/function-app/chunk_text/__init__.py | 127 | except Exception as exc: | CODE |