Repository Analysis

teamcapybara/capybara

Acceptance test framework for web applications

6.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of teamcapybara/capybara, a Ruby project with 10,165 GitHub stars. SynthScan v2.0 examined 38,610 lines of code across 273 source files, recording 229 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 6.7 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).

6.7
Adjusted Score
6.7
Raw Score
100%
Time Factor
2026-07-13
Last Push
10.2K
Stars
Ruby
Language
38.6K
Lines of Code
273
Files
229
Pattern Hits
2026-07-14
Scan Date
0.01
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 3HIGH 0MEDIUM 5LOW 221

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 229 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 Block195 hits · 186 pts
SeverityFileLineSnippetContext
LOWREADME.md781page.find(:field, 'Greeting') == page.find_field('Greeting') # => trueCOMMENT
LOW.github/lock.yml21COMMENT
LOW.github/workflows/build.yml101 # - uses: actions/checkout@v6COMMENT
LOW.github/workflows/build.yml121 # - uses: actions/checkout@v6COMMENT
LOWlib/capybara.rb21 class InfiniteRedirectError < CapybaraError; endCOMMENT
LOWlib/capybara.rb41 # See {Capybara.configure}COMMENT
LOWlib/capybara.rb61 ##COMMENT
LOWlib/capybara.rb81 # - **default_normalize_ws** (Boolean = `false`) - Whether text predicates and matchers use normalize whitespace behCOMMENT
LOWlib/capybara.rb101 # - **server_errors** (Array\<Class> = `[Exception]`) - Error classes that should be raised in the tests if they areCOMMENT
LOWlib/capybara.rb121 #COMMENT
LOWlib/capybara.rb141 # Rack::Handler::WEBrick.run(app, ...)COMMENT
LOWlib/capybara.rb161 # xpath { |num| ".//tbody/tr[#{num}]" }COMMENT
LOWlib/capybara.rb181 #COMMENT
LOWlib/capybara.rb221 # anchor[:href] #=> 'foo'COMMENT
LOWlib/capybara.rb241 Capybara::Node::Simple.new(html)COMMENT
LOWlib/capybara.rb321 #COMMENT
LOWlib/capybara/helpers.rb1# frozen_string_literal: trueCOMMENT
LOWlib/capybara/helpers.rb41 ##COMMENT
LOWlib/capybara/result.rb1# frozen_string_literal: trueCOMMENT
LOWlib/capybara/session.rb1# frozen_string_literal: trueCOMMENT
LOWlib/capybara/session.rb21 # current values of the global options and a configuration block can be passed to the session initializer.COMMENT
LOWlib/capybara/session.rb221 #COMMENT
LOWlib/capybara/session.rb241 # session.visit('http://google.com')COMMENT
LOWlib/capybara/session.rb301 ##COMMENT
LOWlib/capybara/session.rb321 # Not supported by Rack TestCOMMENT
LOWlib/capybara/session.rb341 #COMMENT
LOWlib/capybara/session.rb381 endCOMMENT
LOWlib/capybara/session.rb461 Window.new(self, driver.current_window_handle)COMMENT
LOWlib/capybara/session.rb501 # window = switch_to_window { title == 'Page title' }COMMENT
LOWlib/capybara/session.rb521 _switch_to_window(window, **options, &window_locator)COMMENT
LOWlib/capybara/session.rb561 _switch_to_window(original) unless original == window_or_procCOMMENT
LOWlib/capybara/session.rb601 # @param [String] script A string of JavaScript to executeCOMMENT
LOWlib/capybara/session.rb641 # Execute the block, accepting a alert.COMMENT
LOWlib/capybara/session.rb661 endCOMMENT
LOWlib/capybara/session.rb681 endCOMMENT
LOWlib/capybara/session.rb701 dismiss_modal(:prompt, text, options, &blk)COMMENT
LOWlib/capybara/session.rb721COMMENT
LOWlib/capybara/session.rb741 # and file will be given randomly generated filename. If invoked with a relative pathCOMMENT
LOWlib/capybara/selector.rb1# frozen_string_literal: trueCOMMENT
LOWlib/capybara/selector.rb21# * **:xpath** - Select elements by XPath expressionCOMMENT
LOWlib/capybara/selector.rb41#COMMENT
LOWlib/capybara/selector.rb61# * :valid (Boolean) - Match fields that are valid/invalid according to HTML5 form validationCOMMENT
LOWlib/capybara/selector.rb81# page.html # => '<fieldset disabled>COMMENT
LOWlib/capybara/selector.rb101# page.html # => '<a href="/"><img src="/logo.png" alt="The logo"></a>'COMMENT
LOWlib/capybara/selector.rb121# page.html # => '<button name="article[state]" value="draft">Save as draft</button>'COMMENT
LOWlib/capybara/selector.rb141# * **:fillable_field** - Find text fillable fields ( textarea, input [not of type submit, image, radio, checkbox, hiddeCOMMENT
LOWlib/capybara/selector.rb161# ```COMMENT
LOWlib/capybara/selector.rb181# page.find :radio_button, 'Published', checked: trueCOMMENT
LOWlib/capybara/selector.rb201# page.find :checkbox, 'I agree to terms and conditions', unchecked: trueCOMMENT
LOWlib/capybara/selector.rb221# # <option value="General" checked></option>COMMENT
LOWlib/capybara/selector.rb241# ```rubyCOMMENT
LOWlib/capybara/selector.rb261#COMMENT
LOWlib/capybara/selector.rb281# * Filters:COMMENT
LOWlib/capybara/selector.rb301# * :name (String, Regexp) - Matches the name attributeCOMMENT
LOWlib/capybara/selector.rb321# ```rubyCOMMENT
LOWlib/capybara/selector.rb341# # <caption>A table</caption>COMMENT
LOWlib/capybara/selector.rb361# page.find :table, with_rows: [COMMENT
LOWlib/capybara/selector.rb381# # <tr>COMMENT
LOWlib/capybara/selector.rb401# * Filters:COMMENT
LOWlib/capybara/config.rb41 # By default, Capybara will try to use puma.COMMENT
135 more matches not shown…
Hallucination Indicators3 hits · 30 pts
SeverityFileLineSnippetContext
CRITICALlib/capybara/spec/public/jquery-ui.js6(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,CODE
CRITICALlib/capybara/spec/public/jquery-ui.js8return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.CODE
CRITICALlib/capybara/spec/public/jquery.js4marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"CODE
Self-Referential Comments5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMlib/capybara/selector/definition.rb47 # Define a selector by an xpath expressionCOMMENT
MEDIUMlib/capybara/selector/definition.rb65 # Define a selector by a CSS selectorCOMMENT
MEDIUMlib/capybara/selector/definition.rb133 # Define a node filter for use with this selectorCOMMENT
MEDIUMlib/capybara/selector/definition.rb150 # Define an expression filter for use with this selectorCOMMENT
MEDIUMlib/capybara/node/base.rb44 # This method is Capybara's primary defence against asynchronicityCOMMENT
Hyper-Verbose Identifiers14 hits · 14 pts
SeverityFileLineSnippetContext
LOWspec/regexp_dissassembler_spec.rb244 def verify_alternated_strings(hsh, wrap: false)CODE
LOWlib/capybara/selenium/atoms/src/isDisplayed.js392 function getParentNodeInComposedDom(node) {CODE
LOWlib/capybara/selenium/extensions/scroll.rb32 def scroll_element_to_location(element, location)CODE
LOWlib/capybara/selector/definition.rb180 def describe_expression_filters(&block)CODE
LOWlib/capybara/selector/definition.rb190 def describe_all_expression_filters(**opts)CODE
LOWlib/capybara/selector/builders/xpath_builder.rb62 def regexp_to_xpath_conditions(regexp)CODE
LOWlib/capybara/selector/definition/table.rb92 def row_match_cells_to_headers(row)CODE
LOWlib/capybara/spec/spec_helper.rb131 def be_an_invalid_element_error(session)CODE
LOWlib/capybara/queries/selector_query.rb242 def find_nodes_by_selector_format(node, exact)CODE
LOWlib/capybara/rack_test/browser.rb54 def process_and_follow_redirects(method, path, attributes = {}, env = {})CODE
LOWlib/capybara/node/whitespace_normalizer.rb71 def normalize_visible_spacing(text)CODE
LOWlib/capybara/node/matchers.rb602 def assert_not_matches_selector(*args, &optional_filter_block)CODE
LOWlib/capybara/node/matchers.rb894 def _set_query_session_options(*query_args)CODE
LOWlib/capybara/node/actions.rb310 def find_select_or_datalist_input(from, options)CODE
Fake / Example Data12 hits · 12 pts
SeverityFileLineSnippetContext
LOWREADME.md119 fill_in 'Email', with: 'user@example.com'CODE
LOWREADME.md163 User.create(email: 'user@example.com', password: 'password')CODE
LOWREADME.md169 fill_in 'Email', with: 'user@example.com'CODE
LOWREADME.md194 User.create(email: 'user@example.com', password: 'caplin')CODE
LOWREADME.md200 fill_in 'Email', with: 'user@example.com'CODE
LOWREADME.md999 fill_in 'Email', with: 'user@example.com'CODE
LOWREADME.md1070 session.fill_in 'Email', with: 'user@example.com'CODE
LOWlib/capybara/spec/session/ancestor_spec.rb14 expect(el.ancestor('//p')).to have_text('Lorem ipsum dolor')CODE
LOWlib/capybara/spec/session/ancestor_spec.rb37 expect(el.ancestor(:css, 'p')).to have_text('Lorem ipsum dolor')CODE
LOWlib/capybara/spec/session/ancestor_spec.rb50 expect(el.ancestor(:xpath, '//p')).to have_text('Lorem ipsum dolor')CODE
LOWlib/capybara/spec/session/all_spec.rb65 expect(paras[0]).to have_text('Lorem ipsum dolor')CODE
LOWlib/capybara/node/matchers.rb733 # page.has_text?('lorem ipsum', between: 2..4)COMMENT