Skip to content

Methodology

Investigation Methodology

How Duskbot was compared with OpenMausBot: repository snapshots, byte-level file comparison, fuzzy line matching, the U0–N3 classification and its limits.

At a glance

  • WhoAnalysis by Claude (Anthropic's AI model), published by Sachin Patel.
  • Read-onlyLocal clones and git commands only. Nothing was built, installed, run or modified.
  • Byte-level6,448 of 6,451 imported files have identical git blobs.
  • Line-level428,028 significant production lines, fuzzy-matched against upstream.
  • Seven classesU0–U3 for upstream files, N1–N3 for files at new paths.
  • Limits statedTextual only: no AST matching, no tests run.

01

Repository snapshots

02

Initial import and fork point

  • Duskbot's first commit names the upstream commit it was taken from. That reference was validated, not assumed: the import's file tree was compared with OpenMausBot at that commit.
  • The import contains 6,451 files. The fork point has 6,865, of which 414 were not imported.
  • The 8,209 earlier upstream commits are not in Duskbot's history.

03

Byte-level file comparison

  • Git stores each file's content as a blob identified by its hash. The same path with the same blob hash means byte-identical.
  • By this test, 6,448 of the 6,451 imported files were identical to the fork point.
  • The 3 that were not:
  • LICENSE (replaced by PolyForm Strict in the import itself)
  • third_party/openmausbot/NOTICE (added)
  • third_party/openmausbot/OpenMausBot-Apache-2.0.txt (added)

04

Fuzzy line matching

Exact file hashes miss code that was moved, renamed or edited, so every Duskbot source file was also compared line by line:

  • Each line is normalised: whitespace collapsed and text lowercased.
  • Brand names (OpenMausBot, MausBot, Dusk Bot, Grok Bot and variants) become one placeholder, so a rename alone does not make a line look new.
  • Lines under 12 characters and comment-only lines are dropped: braces and comments say nothing about origin.
  • Every remaining line is looked up in an index of all upstream source lines at any path, so moved and split code still matches.
  • Two baselines: upstream at the fork point, and lines that exist only in upstream HEAD (added after the fork).

61.3%

Inherited

0.3%

Post-fork upstream

38.4%

Unmatched

05

Classifications

Each production source file gets one class from its path and its share of inherited lines. Thresholds were fixed before the results were seen.

ClassRuleFilesLines
U0 Identical to upstreamSame path, byte-identical blob.66933,039
U1 Near-identical or movedAt least 90% of significant lines inherited.987139,239
U2 Modified upstream file60–90% of significant lines inherited.50589,015
U3 Rewritten in placeSame path, less than 60% inherited.13513,779
N1 New file built from upstream codeNew path, 25–60% inherited.22713,277
N2 New file in the coreNew path inside the existing core, less than 25% matching.84374,401
N3 New app or subsystem fileNew path inside a new app (dashboard, cloud, link, mobile, site), less than 25% matching.55165,278

06

Generated files, tests, assets and configuration

  • Generated and vendored (40 files): lockfiles, third_party/, vendor/, minified and built output. Excluded from line counts.
  • Assets and content (2,227 files): images, fonts, media, Markdown and HTML, the website's SEO pages and locale strings. Excluded from line counts.
  • Configuration (341 files): JSON, YAML, plist, Gradle and similar. Excluded from line counts.
  • Tests (3,309 files, 445,531 significant lines, 77% inherited): classified the same way, reported separately.

07

Commit metadata

  • Commit counts, authors and Co-Authored-By trailers were counted with git log.
  • Ranges: ddadba1c9..HEAD in Duskbot, e7317a7..HEAD in OpenMausBot.
  • Script: data/gitstats.py.

08

Limitations

  • No application was executed and no tests were run.
  • No AST or semantic comparison: similarity is textual.
  • Renamed or restructured code can be classified as unmatched, so the unmatched share is an upper bound.
  • Generic code (common imports, boilerplate) can overstate inheritance.
  • Unmatched lines do not establish authorship, and new code does not necessarily mean new functionality.
  • Static analysis does not establish production readiness or runtime behaviour.
  • Upstream services that are not public (its hosted admin backend, its native iOS app) could not be compared.

09

Evidence