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
| Snapshot | Commit |
|---|---|
| Duskbot audited HEAD | f7041fff286bbfa0d8cf38e2e96910a414d6d634 |
| Duskbot initial import | ddadba1c930d787f7e6accdf9c904abd4dfa6e70 |
| OpenMausBot fork point | e7317a7fd23495ce6cb159279aa0ef9b8f086b06 |
| OpenMausBot HEAD | 1b10f047b179eeb0e1c59e1dfe17ae0e110bec68 |
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
- Scope: 3,917 production source files, 428,028 significant lines.
- Script: data/analyze.py. Per-file output: data/files.json.
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.
| Class | Rule | Files | Lines |
|---|---|---|---|
U0 Identical to upstream | Same path, byte-identical blob. | 669 | 33,039 |
U1 Near-identical or moved | At least 90% of significant lines inherited. | 987 | 139,239 |
U2 Modified upstream file | 60–90% of significant lines inherited. | 505 | 89,015 |
U3 Rewritten in place | Same path, less than 60% inherited. | 135 | 13,779 |
N1 New file built from upstream code | New path, 25–60% inherited. | 227 | 13,277 |
N2 New file in the core | New path inside the existing core, less than 25% matching. | 843 | 74,401 |
N3 New app or subsystem file | New path inside a new app (dashboard, cloud, link, mobile, site), less than 25% matching. | 551 | 65,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-Bytrailers were counted withgit log. - Ranges:
ddadba1c9..HEADin Duskbot,e7317a7..HEADin 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
- All metrics: METRICS.json.
- File paths, line references and commits: EVIDENCE_INDEX.json.
- Written analysis: CODE_ORIGINALITY.md.
- The results are presented in the main report.