A composable build system for OCaml.
This report presents the forensic synthetic code analysis of ocaml/dune, a OCaml project with 1,907 GitHub stars. SynthScan v2.0 examined 24,861 lines of code across 326 source files, recording 66 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 3.7 places this repository in the Likely human-written 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 66 distinct pattern matches across 6 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 | …test-cases/include-subdirs/test3.t/include/dune_test.h | 1 | #include <caml/mlvalues.h> | COMMENT |
| LOW | …ts/test-cases/foreign-stubs/cpp-std-ocaml5.t/cpp11.cpp | 1 | #include <iostream> | COMMENT |
| LOW | otherlibs/stdune/src/wait4_stubs.c | 21 | #include <caml/unixsupport.h> | COMMENT |
| LOW | otherlibs/stdune/src/spawn_stubs.c | 1 | #define _GNU_SOURCE | COMMENT |
| LOW | otherlibs/stdune/src/spawn_stubs.c | 21 | #include <caml/unixsupport.h> | COMMENT |
| LOW | otherlibs/stdune/src/spawn_stubs.c | 41 | #include <sys/socket.h> | COMMENT |
| LOW | otherlibs/stdune/src/spawn_stubs.c | 81 | COMMENT | |
| LOW | otherlibs/stdune/src/dune_clock.h | 1 | // Cross-platform realtime clock with legacy fallbacks | COMMENT |
| LOW | otherlibs/stdune/src/time_stubs.c | 1 | #if defined(__APPLE__) | COMMENT |
| LOW | otherlibs/stdune/src/signal_stubs.c | 1 | #include <caml/mlvalues.h> | COMMENT |
| LOW | otherlibs/stdune/src/copyfile_stubs.c | 1 | #include <caml/fail.h> | COMMENT |
| LOW | .github/workflows/workflow.yml | 141 | COMMENT | |
| LOW | doc/conf.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | doc/conf.py | 161 | COMMENT | |
| LOW | doc/changes/scripts/build_changelog.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | doc/dev/releases/backport.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | doc/dev/releases/backport.sh | 21 | # | COMMENT |
| LOW | doc/dev/releases/release-init.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | doc/dev/releases/release-cut.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | doc/dev/releases/release-cut.sh | 21 | # - NB. To stage a release against forks, dune-release reads the following from | COMMENT |
| LOW | doc/howto/use-multiple-build-contexts.md | 101 | #7 caml_startup runtime/startup_nat.c:144 (tsan_check.exe+0xdc29b) | COMMENT |
| LOW | doc/howto/use-multiple-build-contexts.md | 121 | #8 caml_main runtime/startup_nat.c:151 (tsan_check.exe+0xdc29b) | COMMENT |
| LOW | src/dune_trace/dune_trace_stubs.c | 1 | #include <caml/alloc.h> | COMMENT |
| LOW | src/lev/src/config.h | 1 | // TODO port support | COMMENT |
| LOW | src/lev/src/config.h | 21 | #define HAVE_SELECT 1 | COMMENT |
| LOW | src/lev/src/config.h | 41 | #define HAVE_SIGNALFD_H 1 | COMMENT |
| LOW | src/lev/src/config.h | 61 | #if __has_include(<sys/event.h>) | COMMENT |
| LOW | src/lev/src/lev_stubs.c | 1 | #include "ev.h" | COMMENT |
| LOW | src/lev/src/lev_stubs.c | 21 | #include <caml/callback.h> | COMMENT |
| LOW | src/dune_scheduler/fsevents_stubs.c | 1 | #include <caml/alloc.h> | COMMENT |
| LOW | src/dune_scheduler/fswatch_win_stubs.c | 21 | object which causes the [wait] function to return. | COMMENT |
| LOW | src/dune_scheduler/fswatch_win_stubs.c | 41 | #define caml_uerror uerror | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3_stubs.c | 1 | #include <errno.h> | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.h | 1 | #ifndef BLAKE3_H | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.h | 21 | # define BLAKE3_API __attribute__((visibility("default"))) | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3_dispatch.c | 1 | #include <stdbool.h> | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3_dispatch.c | 21 | #if !defined(BLAKE3_ATOMICS) | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.c | 261 | // wouldn't be able to implement extendable output.) Note that this function is | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.c | 281 | // With more than simd_degree chunks, we need to recurse. Start by dividing | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.c | 361 | // The following loop never executes when MAX_SIMD_DEGREE_OR_2 is 2, because | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.c | 441 | // If the user gives us 64 KiB, we want to parallelize over all 64 KiB at once | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.c | 501 | uint8_t chunk_cv[32]; | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3.c | 521 | // Because we might need to break up the input to form powers of 2, or to | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3_impl.h | 1 | #ifndef BLAKE3_IMPL_H | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3_impl.h | 21 | ROOT = 1 << 3, | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3_impl.h | 41 | #if (defined(__x86_64__) || defined(_M_X64)) && !defined(_M_ARM64EC) | COMMENT |
| LOW | src/ocaml-blake3-mini/blake3_impl.h | 61 | #if !defined(BLAKE3_USE_NEON) | COMMENT |
| LOW | src/dune_pkg/md5_stubs.c | 1 | #define CAML_INTERNALS // needed to access md5.h functions | COMMENT |
| LOW | src/rpc/csexp_rpc_stubs.c | 1 | #include <caml/alloc.h> | COMMENT |
| LOW | src/rpc/csexp_rpc_stubs.c | 21 | } | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/blackbox-tests/test-cases/pkg/ocamllsp/helpers.sh | 3 | # Create a dune-workspace file with mock repos set up for the main | COMMENT |
| MEDIUM | test/blackbox-tests/test-cases/pkg/ocamllsp/helpers.sh | 9 | # Create a fake ocaml-lsp-server package containing an executable that | COMMENT |
| MEDIUM | test/blackbox-tests/test-cases/pkg/merlin/helpers.sh | 3 | # Create a dune-workspace file with mock repos configured for the main | COMMENT |
| MEDIUM | test/blackbox-tests/test-cases/pkg/merlin/helpers.sh | 9 | # Create a fake merlin package containing an executable that | COMMENT |
| MEDIUM | test/blackbox-tests/test-cases/pkg/odoc/helpers.sh | 3 | # Create a dune-workspace file with mock repos set up for the main | COMMENT |
| MEDIUM | test/blackbox-tests/test-cases/pkg/odoc/helpers.sh | 9 | # Create a fake odoc package containing an executable that | COMMENT |
| MEDIUM | .github/workflows/workflow.yml | 1 | # This file is auto-generated. Edit workflow.yml.in instead | COMMENT |
| MEDIUM | .github/workflows/bench.yml | 1 | # This file is auto-generated. Edit bench.yml.in instead | COMMENT |
| MEDIUM | doc/conf.py | 7 | # This file is execfile()d with the current directory set to its | COMMENT |
| MEDIUM | doc/changes/scripts/build_changelog.sh | 95 | # Create the output file | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/dev/releases/backport.sh | 8 | # Usage: | COMMENT |
| LOW | doc/dev/releases/release-init.sh | 8 | # Usage: | COMMENT |
| LOW | doc/dev/releases/release-cut.sh | 8 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/revdeps-release-coverage.yml | 36 | # robust tests we want to run | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | doc/changes/scripts/build_changelog.sh | 33 | # ------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/dev/releases/release-cut.sh | 30 | # Set DUNE_REMOTE to the matching dune fork remote so the release branch and | COMMENT |