Cap'n Proto serialization/RPC system - core tools and C++ library
This report presents the forensic synthetic code analysis of capnproto/capnproto, a C++ project with 13,120 GitHub stars. SynthScan v2.0 examined 86,782 lines of code across 210 source files, recording 604 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 6.8 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).
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.
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 604 distinct pattern matches across 9 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 |
|---|---|---|---|---|
| LOW | mega-test.py | 1 | #! /usr/bin/env python | COMMENT |
| LOW | super-test.sh | 381 | fi | COMMENT |
| LOW | c++/CMakeLists.txt | 141 | COMMENT | |
| LOW | c++/ekam-build.sh | 61 | # errors in the benchmarks directory. Note that it's tricky to link against an installed copy | COMMENT |
| LOW | c++/samples/CMakeLists.txt | 1 | # A Cap'n Proto sample project. | COMMENT |
| LOW | c++/src/benchmark/capnproto-common.h | 1 | // Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors | COMMENT |
| LOW | c++/src/benchmark/capnproto-common.h | 21 | COMMENT | |
| LOW | c++/src/benchmark/null-common.h | 1 | // Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors | COMMENT |
| LOW | c++/src/benchmark/protobuf-common.h | 1 | // Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors | COMMENT |
| LOW | c++/src/benchmark/common.h | 1 | // Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors | COMMENT |
| LOW | c++/src/benchmark/common.h | 21 | COMMENT | |
| LOW | c++/src/kj/time.h | 1 | // Copyright (c) 2014 Google Inc. (contributed by Remy Blank <rblank@google.com>) | COMMENT |
| LOW | c++/src/kj/time.h | 81 | // cannot be used to determine the current calendar date. | COMMENT |
| LOW | c++/src/kj/time.h | 101 | // a reasonable operating system the difference is usually negligible. | COMMENT |
| LOW | c++/src/kj/main.h | 1 | // Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors | COMMENT |
| LOW | c++/src/kj/main.h | 41 | KJ_NORETURN(virtual void exit()) = 0; | COMMENT |
| LOW | c++/src/kj/main.h | 61 | // easy for commands to explicitly ensure all output is flushed before exiting, and it is | COMMENT |
| LOW | c++/src/kj/main.h | 81 | // it could crash, the OS could decide to kill it off, or the machine it is running on could | COMMENT |
| LOW | c++/src/kj/main.h | 101 | // has no state anyway. | COMMENT |
| LOW | c++/src/kj/main.h | 161 | mutable std::atomic_bool hadErrors = false; | COMMENT |
| LOW | c++/src/kj/main.h | 181 | MainClass mainObject(context); \ | COMMENT |
| LOW | c++/src/kj/main.h | 201 | // information you provide to the builder as you define each flag. | COMMENT |
| LOW | c++/src/kj/main.h | 221 | // return "Output file must have extension .foo."; | COMMENT |
| LOW | c++/src/kj/main.h | 301 | // builder.addOption({'a', "all"}, KJ_BIND_METHOD(*this, showAll), "Show all files."); | COMMENT |
| LOW | c++/src/kj/main.h | 321 | // Like `addOption()`, but adds an option which accepts an argument. `argumentTitle` is used in | COMMENT |
| LOW | c++/src/kj/main.h | 341 | // | COMMENT |
| LOW | c++/src/kj/main.h | 361 | MainBuilder& expectZeroOrMoreArgs(StringPtr title, Function<Validity(StringPtr)> callback); | COMMENT |
| LOW | c++/src/kj/main.h | 381 | // builder.expectArg("<baz>", ...); | COMMENT |
| LOW | c++/src/kj/async-coroutine-alloc.h | 1 | // Copyright (c) 2026 Cloudflare, Inc. and contributors | COMMENT |
| LOW | c++/src/kj/filesystem.h | 1 | // Copyright (c) 2015 Sandstorm Development Group, Inc. and contributors | COMMENT |
| LOW | c++/src/kj/filesystem.h | 41 | // A Path identifies a file in a directory tree. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 61 | // better result. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 121 | Path eval(StringPtr pathText) &&; | COMMENT |
| LOW | c++/src/kj/filesystem.h | 181 | // the colon, will become the first component of the path, e.g. "c:\foo" becomes {"c:", "foo"}. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 201 | // names like "con". | COMMENT |
| LOW | c++/src/kj/filesystem.h | 301 | // filesystem access in practice. The filesystem drivers on Linux are written to assume they can | COMMENT |
| LOW | c++/src/kj/filesystem.h | 361 | // If they report the same hashCode, then they may or may not be the same object. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 421 | // Depending on the capabilities of the OS and filesystem, the mapping may or may not reflect | COMMENT |
| LOW | c++/src/kj/filesystem.h | 461 | // back at all. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 501 | // visible in other mappings of the file on the same system and will eventually be written back | COMMENT |
| LOW | c++/src/kj/filesystem.h | 561 | virtual Maybe<Own<const ReadableDirectory>> tryOpenSubdir(PathPtr path) const = 0; | COMMENT |
| LOW | c++/src/kj/filesystem.h | 581 | // Mode for opening a file (or directory) for write. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 601 | COMMENT | |
| LOW | c++/src/kj/filesystem.h | 621 | COMMENT | |
| LOW | c++/src/kj/filesystem.h | 681 | // holes in the target file where holes exist in the source file. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 701 | // handle-relative paths, KJ may stop locking directories in this way, so do not rely on this | COMMENT |
| LOW | c++/src/kj/filesystem.h | 721 | // | COMMENT |
| LOW | c++/src/kj/filesystem.h | 741 | // `tryCommit()` may return false based on the CREATE/MODIFY bits passed as the WriteMode when | COMMENT |
| LOW | c++/src/kj/filesystem.h | 761 | // filesystem. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 821 | // Construct a directory which, when ready, will be atomically moved to `path`, replacing | COMMENT |
| LOW | c++/src/kj/filesystem.h | 861 | // implementations of tryTransfer() in cases where the target directory would otherwise fail or | COMMENT |
| LOW | c++/src/kj/filesystem.h | 881 | // APIs. If you're interested, see the TODO(security) in filesystem-disk-win32.c++. | COMMENT |
| LOW | c++/src/kj/filesystem.h | 901 | class Filesystem { | COMMENT |
| LOW | c++/src/kj/filesystem.h | 941 | Own<File> newMemfdFile(uint flags = 0); | COMMENT |
| LOW | c++/src/kj/filesystem.h | 961 | // which would expand it will throw. | COMMENT |
| LOW | c++/src/kj/async-unix.h | 1 | // Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors | COMMENT |
| LOW | c++/src/kj/async-unix.h | 21 | COMMENT | |
| LOW | c++/src/kj/async-unix.h | 41 | // (Note that OpenBSD's kqueue(2) doesn't support user event filters yet) | COMMENT |
| LOW | c++/src/kj/async-unix.h | 61 | struct kevent; | COMMENT |
| LOW | c++/src/kj/async-unix.h | 81 | // particular, note that after a fork(), a UnixEventPort created in the parent process will | COMMENT |
| 517 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | release.sh | 166 | # ====================================================================================== | COMMENT |
| MEDIUM | release.sh | 202 | # ====================================================================================== | COMMENT |
| MEDIUM | release.sh | 244 | # ====================================================================================== | COMMENT |
| MEDIUM | release.sh | 280 | # ====================================================================================== | COMMENT |
| MEDIUM | release.sh | 313 | # ====================================================================================== | COMMENT |
| MEDIUM | release.sh | 341 | # ====================================================================================== | COMMENT |
| MEDIUM | release.sh | 347 | # ====================================================================================== | COMMENT |
| MEDIUM | c++/src/capnp/compiler/capnp-test.sh | 52 | # ======================================================================================== | COMMENT |
| MEDIUM | c++/src/capnp/compiler/capnp-test.sh | 87 | # ======================================================================================== | COMMENT |
| MEDIUM | c++/src/capnp/compiler/capnp-test.sh | 105 | # ======================================================================================== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | c++/src/kj/common.h | 808 | // that type. This is useful to use as e.g. a parameter to a function because it will be robust | COMMENT |
| MEDIUM | c++/src/kj/common.h | 813 | // of that type. This is useful to use as e.g. a parameter to a function because it will be robust | COMMENT |
| MEDIUM | c++/src/kj/async-inl.h | 157 | // potentially other objects that commonly live on the end of a promise chain can also leverage | COMMENT |
| MEDIUM | c++/src/kj/async-inl.h | 1644 | // to a dangling pointer. Essentially, WeakFulfiller is reference counted, although the | COMMENT |
| MEDIUM | c++/src/capnp/serialize-text.h | 38 | // This format is useful for debugging or human input, but it is not a robust alternative | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | doc/cxx.md | 69 | alicePhones[0].setNumber("555-1212"); | CODE |
| LOW⚡ | doc/cxx.md | 78 | bobPhones[0].setNumber("555-4567"); | CODE |
| LOW⚡ | doc/cxx.md | 80 | bobPhones[1].setNumber("555-7654"); | CODE |
| LOW | doc/cxx.md | 523 | phone0.set("number", "555-1212"); | CODE |
| LOW | doc/cxx.md | 537 | bobPhones[0].setNumber("555-4567"); | CODE |
| LOW | doc/cxx.md | 539 | bobPhones[1].setNumber("555-7654"); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | c++/src/kj/main.h | 205 | // Example usage: | COMMENT |
| LOW | c++/src/kj/async.h | 431 | // Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | doc/cxxrpc.md | 27 | Cap'n Proto's RPC is based on the [KJ library](cxx.html#kj-library)'s event-driven concurrency | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | c++/src/kj/array.h | 352 | // TODO: implement for complex T types without creating `size` instances first. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | release.sh | 113 | echo "Don't forget to push changes:" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/_plugins/capnp_lexer.py | 4 | CODE |