Repository Analysis

puma/puma

A Ruby/Rack web server built for parallelism

5.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of puma/puma, a Ruby project with 7,904 GitHub stars. SynthScan v2.0 examined 40,854 lines of code across 245 source files, recording 176 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 5.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).

5.3
Adjusted Score
5.3
Raw Score
100%
Time Factor
2026-07-11
Last Push
7.9K
Stars
Ruby
Language
40.9K
Lines of Code
245
Files
176
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 35LOW 141

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 176 distinct pattern matches across 5 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.

Over-Commented Block110 hits · 82 pts
SeverityFileLineSnippetContext
LOWtest/test_request_invalid_multiple.rb1# frozen_string_literal: trueCOMMENT
LOWtest/test_puma_server.rb1621 endCOMMENT
LOWtest/helpers/test_puma/puma_socket.rb21 # @param timeout [Float, nil] total socket read timeout, defaults to `RESP_READ_TIMEOUT`COMMENT
LOWtest/helpers/test_puma/puma_socket.rb41 # * `port:` - tcp/ssl port (`Integer`, `String`)COMMENT
LOWext/puma_http11/mini_ssl.c1#define RSTRING_NOT_MODIFIED 1COMMENT
LOWdocs/nginx.md41COMMENT
LOWdocs/systemd.md21COMMENT
LOWexamples/plugins/redis_stop_puma.rb1require 'puma/plugin'COMMENT
LOWbenchmarks/local/long_tail_hey.rb1# frozen_string_literal: trueCOMMENT
LOWbenchmarks/local/long_tail_hey.rb21 #COMMENT
LOWbenchmarks/local/long_tail_hey-0-2-4-8.sh1#!/usr/bin/env bashCOMMENT
LOWbenchmarks/local/response_time_wrk.rb1# frozen_string_literal: trueCOMMENT
LOWbenchmarks/local/response_time_wrk.rb21 #COMMENT
LOWbenchmarks/local/bench_base.sh1#!/usr/bin/env bashCOMMENT
LOW.github/workflows/turbo-rails.yml61 DST="if RUBY_PATCHLEVEL == -1\n gem 'rack', git: 'https://github.com/rack/rack', ref: 'main'\nelse\n gem 'raCOMMENT
LOWlib/puma/minissl.rb141 endCOMMENT
LOWlib/puma/const.rb81 # For some HTTP status codes the client only expects headers.COMMENT
LOWlib/puma/cluster_accept_loop_delay.rb1# frozen_string_literal: trueCOMMENT
LOWlib/puma/cluster_accept_loop_delay.rb21 #COMMENT
LOWlib/puma/cluster_accept_loop_delay.rb41 # (processes), they will "race" to accept a request at roughly the same rate. However, if oneCOMMENT
LOWlib/puma/launcher.rb21 # Returns an instance of LauncherCOMMENT
LOWlib/puma/response.rb1# frozen_string_literal: trueCOMMENT
LOWlib/puma/response.rb41 #COMMENT
LOWlib/puma/json_serialization.rb1# frozen_string_literal: trueCOMMENT
LOWlib/puma/client_env.rb121 # avoid allocation in the common case (ie there are no headersCOMMENT
LOWlib/puma/sd_notify.rb1# frozen_string_literal: trueCOMMENT
LOWlib/puma/sd_notify.rb21 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSCOMMENT
LOWlib/puma/sd_notify.rb121 # @param state [String]COMMENT
LOWlib/puma/client.rb21 #———————————————————————— DO NOT USE — this class is for internal use only ———COMMENT
LOWlib/puma/commonlogger.rb1# frozen_string_literal: trueCOMMENT
LOWlib/puma/reactor.rb1# frozen_string_literal: trueCOMMENT
LOWlib/puma/configuration.rb21 # puts options[:foo]COMMENT
LOWlib/puma/configuration.rb101 #COMMENT
LOWlib/puma/dsl.rb1# frozen_string_literal: trueCOMMENT
LOWlib/puma/dsl.rb21 #COMMENT
LOWlib/puma/dsl.rb41 # parameter. This allows storage of data, typically objects that are createdCOMMENT
LOWlib/puma/dsl.rb181 # @exampleCOMMENT
LOWlib/puma/dsl.rb201COMMENT
LOWlib/puma/dsl.rb261 # not overwrite previous bindings.COMMENT
LOWlib/puma/dsl.rb281 # bind 'ssl://127.0.0.1:9292?key=key.key&cert=cert.pem&ca=ca.pem&verify_mode=force_peer'COMMENT
LOWlib/puma/dsl.rb301 # Systemd can present sockets as file descriptors that are already opened.COMMENT
LOWlib/puma/dsl.rb321 endCOMMENT
LOWlib/puma/dsl.rb341 #COMMENT
LOWlib/puma/dsl.rb361 # If a new request is not received within this number of seconds, begin shutting down.COMMENT
LOWlib/puma/dsl.rb381 # fiber_per_requestCOMMENT
LOWlib/puma/dsl.rb401 endCOMMENT
LOWlib/puma/dsl.rb441COMMENT
LOWlib/puma/dsl.rb461 # load Puma itself (i.e. `ruby -Ilib bin/puma`), not the argumentsCOMMENT
LOWlib/puma/dsl.rb481 #COMMENT
LOWlib/puma/dsl.rb501 #COMMENT
LOWlib/puma/dsl.rb521 #COMMENT
LOWlib/puma/dsl.rb541 # The default is +nil+.COMMENT
LOWlib/puma/dsl.rb561 # Redirect +STDOUT+ and +STDERR+ to files specified. The +append+ parameterCOMMENT
LOWlib/puma/dsl.rb581 # endCOMMENT
LOWlib/puma/dsl.rb621 #COMMENT
LOWlib/puma/dsl.rb641COMMENT
LOWlib/puma/dsl.rb661 #COMMENT
LOWlib/puma/dsl.rb681 # cert_pem: File.read(path_to_cert),COMMENT
LOWlib/puma/dsl.rb701 #COMMENT
LOWlib/puma/dsl.rb721 #COMMENT
50 more matches not shown…
Self-Referential Comments20 hits · 60 pts
SeverityFileLineSnippetContext
MEDIUMtest/helper.rb321# This module is modified based on https://github.com/rails/rails/blob/7-1-stable/activesupport/lib/active_support/testiCOMMENT
MEDIUMtest/helpers/test_puma/puma_socket.rb24 # This module is included in CI test files, and provides methods to createCOMMENT
MEDIUMtest/helpers/test_puma/puma_socket_include.rb14 # This module contains the methods included in PumaSSLSocket, PumaTCPSocket,COMMENT
MEDIUMbenchmarks/local/long_tail_hey.rb9 # This file is called from `long_tail_hey.sh`. It requires `hey`.COMMENT
MEDIUMbenchmarks/local/response_time_wrk.rb8 # This file is called from `response_time_wrk.sh`. It requires `wrk`.COMMENT
MEDIUMlib/puma/log_writer.rb33 # Create a LogWriter that prints to +stdout+ and +stderr+.COMMENT
MEDIUMlib/puma/cli.rb24 # Create a new CLI object using +argv+ as the command lineCOMMENT
MEDIUMlib/puma/cluster.rb10 # This class is instantiated by the `Puma::Launcher` and usedCOMMENT
MEDIUMlib/puma/client_env.rb8 # This module is included in `Client`. It contains code to process the `env`COMMENT
MEDIUMlib/puma/single.rb8 # This class is instantiated by the `Puma::Launcher` and usedCOMMENT
MEDIUMlib/puma/reactor.rb24 # Create a new Reactor to monitor IO objects added by #add.COMMENT
MEDIUMlib/puma/dsl.rb323 # Define the TCP port to bind to. Use `bind` for more advanced options.COMMENT
MEDIUMlib/puma/server.rb24 # This class is used by the `Puma::Single` and `Puma::Cluster` classesCOMMENT
MEDIUMlib/puma/server.rb59 # Create a server for the rack app +app+.COMMENT
MEDIUMlib/puma/server.rb294 # This method is called from the Reactor thread when a queued Client receives data,COMMENT
MEDIUMlib/puma/server.rb485 # This method is called from a ThreadPool processor thread.COMMENT
MEDIUMlib/puma/cluster/worker_handle.rb7 # This class represents a worker process from the perspective of the pumaCOMMENT
MEDIUMlib/puma/cluster/worker.rb8 # This class is instantiated by the `Puma::Cluster` and represents a singleCOMMENT
MEDIUMlib/puma/launcher/bundle_pruner.rb6 # This class is used to pickup Gemfile changes duringCOMMENT
MEDIUMlib/rack/handler/puma.rb5 # This module is used as an 'include' file in code at bottom of file. It loadsCOMMENT
Decorative Section Separators14 hits · 41 pts
SeverityFileLineSnippetContext
MEDIUMtest/test_request_invalid_multiple.rb109 # ──────────────────────────────────── below are invalid Host headerCOMMENT
MEDIUMtest/test_request_invalid_multiple.rb119 # ──────────────────────────────────── below are oversize path lengthCOMMENT
MEDIUMtest/test_request_invalid_multiple.rb132 # ──────────────────────────────────── below are invalid Content-LengthCOMMENT
MEDIUMtest/test_request_invalid_multiple.rb145 # ──────────────────────────────────── below have http_content_length_limit setCOMMENT
MEDIUMbenchmarks/local/long_tail_hey.rb124 str << "#{@ka.ljust 28} ──────────────────── Hey Latency ──────────────────── Long Tail\n" \CODE
MEDIUMbenchmarks/local/bench_base.rb413 # Body ────────── req/sec ────────── ─────── req 50% times ───────COMMENT
MEDIUMbenchmarks/local/response_time_wrk.rb109 # ───────────────────────────────────────────────────────────────── 1kBCOMMENT
MEDIUM.github/workflows/release-checks.yml24 # ── Parse the release version from the branch name ──────────────────────COMMENT
MEDIUM.github/workflows/release-checks.yml46 # ── Check 1: VERSION in lib/puma/const.rb matches the branch ────────────COMMENT
MEDIUM.github/workflows/release-checks.yml61 # ── Check 2: CODE_NAME is set and not a placeholder ─────────────────────COMMENT
MEDIUM.github/workflows/release-checks.yml78 # ── Check 3: History.md has an entry for this version ───────────────────COMMENT
MEDIUM.github/workflows/release-checks.yml88 # ── Check 4: History.md entry has a properly-formatted date ─────────────COMMENT
MEDIUM.github/workflows/release-checks.yml99 # ── Check 5: Upgrade guide exists for major releases ────────────────────COMMENT
MEDIUM.github/workflows/release-checks.yml121 # ── Check 6: SECURITY.md is updated for major releases ──────────────────COMMENT
Hyper-Verbose Identifiers31 hits · 31 pts
SeverityFileLineSnippetContext
LOWtest/test_puma_server_ssl.rb323 def assert_ssl_client_error_match(error, subject: nil, context: CTX, &blk)CODE
LOWtest/test_puma_server_ssl.rb545 def assert_ssl_client_error_match(close_error, log_writer: SSLLogWriterHelper.new(STDOUT, STDERR), &blk)CODE
LOWtest/test_worker_gem_independence.rb88 def change_gem_version_during_phased_restart(old_app_dir:,CODE
LOWtest/test_config.rb879 def assert_raise_on_hooks_without_block(hook_name)CODE
LOWtest/test_config.rb886 def assert_warning_for_hooks_defined_in_single_mode(hook_name)CODE
LOWtest/test_pumactl.rb315 def assert_command_cli_output(options, expected_out)CODE
LOWtest/test_pumactl.rb332 def assert_system_exit_with_cli_output(options, expected_out)CODE
LOWtest/helper.rb323 def assert_called_on_instance_of(klass, method_name, message = nil, times: 1, returns: nil)CODE
LOWtest/helper.rb346 def assert_not_called_on_instance_of(klass, method_name, message = nil, &block)CODE
LOWtest/test_json_serialization.rb98 def assert_puma_json_generates_string(expected_output, value_to_serialize, expected_roundtrip: nil)CODE
LOWtest/test_plugin_systemd.rb81 def assert_restarts_with_systemd(signal, workers: 2)CODE
LOWtest/test_puma_server_hijack.rb187 def partial_hijack_closes_body(hdrs, body)CODE
LOWtest/test_puma_server.rb615 def test_timeout_in_data_phase(**options)CODE
LOWtest/test_puma_server.rb1481 def test_open_connection_wait(**options)CODE
LOWtest/test_puma_server.rb1615 def assert_does_not_allow_http_injection(app, opts = {})CODE
LOWtest/test_integration_ssl.rb84 def test_verify_client_cert_roundtrip(tls1_2 = nil)CODE
LOWtest/helpers/integration.rb130 def silent_and_checked_system_command(*args)CODE
LOWtest/helpers/integration.rb221 def restart_server_and_listen(argv, env: {}, log: false)CODE
LOWtest/helpers/integration.rb246 def wait_for_server_to_include(str, timeout: LOG_TIMEOUT, log: false)CODE
LOWtest/helpers/integration.rb486 def restart_does_not_drop_connections(CODE
LOWlib/puma/binder.rb120 def synthesize_binds_from_activated_fs(binds, only_matching)CODE
LOWlib/puma/server_plugin_control.rb28 def update_thread_pool_min_max(min: max_threads, max: min_threads)CODE
LOWlib/puma/dsl.rb319 def bind_to_activated_sockets(bind=true)CODE
LOWlib/puma/dsl.rb1164 def raise_exception_on_sigterm(answer=true)CODE
LOWlib/puma/dsl.rb1182 def extra_runtime_dependencies(answer = [])CODE
LOWlib/puma/dsl.rb1364 def wait_for_less_busy_worker(val=0.005)CODE
LOWlib/puma/dsl.rb1542 def mutate_stdout_and_stderr_to_sync_on_write(enabled=true)CODE
LOWlib/puma/dsl.rb1559 def http_content_length_limit(limit)CODE
LOWlib/puma/dsl.rb1600 def add_pem_values_to_options_store(opts)CODE
LOWlib/puma/runner.rb181 def ensure_output_directory_exists(path, io_name)CODE
LOWlib/puma/server.rb760 def update_thread_pool_min_max(min: @min_threads, max: @max_threads)CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMlib/puma/dsl.rb649 # you can use this method.COMMENT