Repository Analysis

lupinemachines/lupine

LUPINE is a GPU over IP bridge allowing GPUs on remote machines to be attached to CPU-only machines.

3.2 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of lupinemachines/lupine, a C++ project with 2,330 GitHub stars. SynthScan v2.0 examined 68,547 lines of code across 72 source files, recording 144 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 3.2 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).

3.2
Adjusted Score
3.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
2.3K
Stars
C++
Language
68.5K
Lines of Code
72
Files
144
Pattern Hits
2026-07-14
Scan Date
0.24
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 0HIGH 17MEDIUM 1LOW 126

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 144 distinct pattern matches across 7 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.

Cross-Language Confusion17 hits · 85 pts
SeverityFileLineSnippetContext
HIGHcodegen/ops.py37 " ({param_name} != nullptr && rpc_write(conn, {param_name}, sizeof({base_type})) < 0) ||\n".format(CODE
HIGHcodegen/ops.py80 " ({param_name}_null_check && rpc_read(conn, &{param_name}, sizeof({base_type})) < 0) ||\n".format(CODE
HIGHcodegen/ops.py105 " ({param_name}_null_check && rpc_write(conn, &{param_name}, sizeof({base_type})) < 0) ||\n".format(CODE
HIGHcodegen/ops.py121 " ({param_name}_null_check && rpc_read(conn, {param_name}, sizeof({base_type})) < 0) ||\n".format(CODE
HIGHcodegen/ops.py223 " ({size} != 0 && rpc_write(conn, {param_name}, {size}) < 0) ||\n".format(STRING
HIGHcodegen/ops.py457 " ({size} != 0 && rpc_write(conn, {param_name}, {size}) < 0) ||\n".format(STRING
HIGHcodegen/ops.py476 " ({size} != 0 && rpc_read(conn, {param_name}, {size}) < 0) ||\n".format(STRING
HIGHcodegen/ops.py497 anchor array is null, which is a count-only query); the server runs the APICODE
HIGHcodegen/codegen.py792 f.write(" if (return_value == CUDA_SUCCESS && dptr != nullptr) lupine_note_deviceptr_allocation_route(*dptr, CODE
HIGHcodegen/codegen.py794 f.write(" if (return_value == CUDA_SUCCESS && dptr != nullptr) {\n")CODE
HIGHcodegen/codegen.py801 f.write(" if (return_value == CUDA_SUCCESS && dptr != nullptr) lupine_note_deviceptr_allocation_route(*dptr, CODE
HIGHcodegen/codegen.py825 f.write(" if (return_value == CUDA_SUCCESS && hfunc != nullptr) return_value = lupine_record_module_function(CODE
HIGHcodegen/codegen.py827 f.write(" if (return_value == CUDA_SUCCESS && pKernel != nullptr) return_value = lupine_record_library_kernelCODE
HIGHcodegen/codegen.py1341 f.write(" (dptr != nullptr && rpc_read(conn, dptr, sizeof(CUdeviceptr)) < 0) ||\n")CODE
HIGHcodegen/codegen.py1347 f.write(" if (return_value == CUDA_SUCCESS && dptr != nullptr) lupine_note_deviceptr_allocation(*dptrCODE
HIGHcodegen/codegen.py1363 f.write(" (dptr != nullptr && rpc_read(conn, dptr, sizeof(CUdeviceptr)) < 0) ||\n")CODE
HIGHcodegen/codegen.py1369 f.write(" if (return_value == CUDA_SUCCESS && dptr != nullptr) lupine_note_deviceptr_allocation(*dptrCODE
Over-Commented Block58 hits · 56 pts
SeverityFileLineSnippetContext
LOWclient.cpp1#include <algorithm>COMMENT
LOWclient.cpp21#endifCOMMENT
LOWclient.cpp41COMMENT
LOWmemcpy.cpp1#include <algorithm>COMMENT
LOWmanual_server.cpp1#include <algorithm>COMMENT
LOWmanual_server.cpp21#include <unordered_set>COMMENT
LOWmanual_server.cpp41#include "codegen/gen_api.h"COMMENT
LOWmanual_server.cpp181// the device-printf channel and nothing else can contaminate the capture.COMMENT
LOWlupine_platform.h1#ifndef LUPINE_PLATFORM_HCOMMENT
LOWrouting.cpp1#include <algorithm>COMMENT
LOWlupine_log.h1#ifndef LUPINE_LOG_HCOMMENT
LOWh2.cpp1#include "lupine_log.h"COMMENT
LOWnvml_server.cpp1#include "nvml_server.h"COMMENT
LOWh2_test.cpp1#include "lupine_log.h"COMMENT
LOWmemcpy.h1#pragma onceCOMMENT
LOWnvml_client.cpp1#include <arpa/inet.h>COMMENT
LOWnvml_client.cpp541} // namespaceCOMMENT
LOWrpc.h1#ifndef RPC_HCOMMENT
LOWcuda_compat.h1#ifndef LUPINE_CUDA_COMPAT_HCOMMENT
LOWcompress.cpp1// Optional LZ4 compression for large host<->device memory transfer payloads.COMMENT
LOWcompress.cpp21//COMMENT
LOWserver.cpp1#include <condition_variable>COMMENT
LOWcodegen/gen_api.h1// Generated by codegen.py. Do not edit by hand.COMMENT
LOWcodegen/gen_api.h21#define RPC_cuFlushGPUDirectRDMAWrites 434434783COMMENT
LOWcodegen/gen_api.h41#define RPC_cuCtxSetCacheConfig 820065396COMMENT
LOWcodegen/gen_api.h61#define RPC_cuLinkComplete 1460078792COMMENT
LOWcodegen/gen_api.h81#define RPC_cuMemFree_v2 2004586063COMMENT
LOWcodegen/gen_api.h101#define RPC_cuMemcpyDtoA_v2 206508478COMMENT
LOWcodegen/gen_api.h121#define RPC_cuMemsetD32_v2 447800970COMMENT
LOWcodegen/gen_api.h141#define RPC_cuMipmappedArrayCreate 1284494309COMMENT
LOWcodegen/gen_api.h161#define RPC_cuMemPoolDestroy 1759284423COMMENT
LOWcodegen/gen_api.h181#define RPC_cuStreamSynchronize 1581600379COMMENT
LOWcodegen/gen_api.h201#define RPC_cuStreamWaitValue32_v2 1641833423COMMENT
LOWcodegen/gen_api.h221#define RPC_cuLaunch 1255109853COMMENT
LOWcodegen/gen_api.h241#define RPC_cuGraphAddEmptyNode 523519941COMMENT
LOWcodegen/gen_api.h261#define RPC_cuGraphMemFreeNodeGetParams 1901836585COMMENT
LOWcodegen/gen_api.h281#define RPC_cuGraphNodeSetEnabled 401629509COMMENT
LOWcodegen/gen_api.h301#define RPC_cuOccupancyMaxPotentialClusterSize 600198052COMMENT
LOWcodegen/gen_api.h321#define RPC_cuTexRefGetFormat 1609708665COMMENT
LOWcodegen/gen_api.h341#define RPC_cuCtxEnablePeerAccess 1737933368COMMENT
LOWcodegen/gen_api.h361#define RPC_cuGraphRemoveDependencies_v2 1606074400COMMENT
LOWcodegen/gen_api.h381#define RPC_cuTensorMapEncodeIm2col 1203430832COMMENT
LOWcodegen/gen_api.h401#define RPC_nvmlDeviceGetMemoryInfo 1622472062COMMENT
LOWcodegen/gen_api.h421#define RPC_nvmlDeviceGetMaxPcieLinkWidth 1143822398COMMENT
LOWcodegen/gen_api.h441#define RPC_nvmlDeviceGetMemoryInfo_v2 1387993144COMMENT
LOWcodegen/gen_client.cpp1#include <cuda.h>COMMENT
LOWcodegen/annotations.h1#include <cuda.h>COMMENT
LOWcodegen/gen_server.cpp1#include "cuda_compat.h"COMMENT
LOWcodegen/gen_client.h1#ifndef GEN_CLIENT_HCOMMENT
LOWthird_party/lz4/lz4.h81* Enable exporting of functions when building a Windows DLLCOMMENT
LOWthird_party/lz4/lz4.h121# endifCOMMENT
LOWthird_party/lz4/lz4.h781 * Should deprecation warnings be a problem, it is generally possible to disable them,COMMENT
LOWthird_party/lz4/lz4.c121* Compiler OptionsCOMMENT
LOWthird_party/lz4/lz4.c161 */COMMENT
LOWthird_party/lz4/lz4.c221# define ALLOC_AND_ZERO(s) LZ4_calloc(1,s)COMMENT
LOWthird_party/lz4/lz4.c241**************************************/COMMENT
LOWthird_party/lz4/lz4.c261#define ML_MASK ((1U<<ML_BITS)-1)COMMENT
LOWthird_party/lz4/lz4.c341 * environments, the compiler can't assume the implementation of memcpy() isCOMMENT
Hyper-Verbose Identifiers42 hits · 50 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_lupine_adapter.py57def test_connect_sets_env_and_returns_devices(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py66def test_connect_loads_explicit_libcuda(lupine_module, monkeypatch, tmp_path):CODE
LOWpython/tests/test_lupine_adapter.py79def test_connect_accepts_multiple_hosts_in_order(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py86def test_session_devices_use_native_topology_for_multi_gpu_server(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py99def test_connect_uses_sidecar_when_torch_has_no_cuda_backend(lupine_module, monkeypatch):CODE
LOWpython/tests/test_lupine_adapter.py116def test_connect_sidecar_fallback_rejects_multiple_hosts(lupine_module, monkeypatch):CODE
LOWpython/tests/test_lupine_adapter.py125def test_connect_sidecar_fallback_rejects_libcuda(lupine_module, monkeypatch, tmp_path):CODE
LOWpython/tests/test_lupine_adapter.py134def test_connect_requires_cuda_backend_off_macos(lupine_module, monkeypatch):CODE
LOWpython/tests/test_lupine_adapter.py143def test_connect_restores_env_when_cuda_was_not_initialized(lupine_module, monkeypatch):CODE
LOWpython/tests/test_lupine_adapter.py152def test_connect_restores_env_when_cuda_initialized_inside_context(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py161def test_connect_restores_env_after_topology_query(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py170def test_connect_accepts_matching_preconfigured_env(lupine_module, monkeypatch):CODE
LOWpython/tests/test_lupine_adapter.py180def test_connect_rejects_different_preconfigured_env(lupine_module, monkeypatch):CODE
LOWpython/tests/test_lupine_adapter.py189def test_connect_refuses_after_cuda_init(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py198def test_devices_use_native_topology_without_configured_servers(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py209def test_session_no_visible_devices(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py217def test_connect_accepts_empty_hosts(lupine_module):CODE
LOWpython/tests/test_lupine_adapter.py226def test_duplicate_hosts_are_preserved(lupine_module):CODE
LOWpython/tests/tensor_test.py13def test_cpu_tensor_rejects_noncontiguous_input():CODE
LOWpython/tests/tensor_test.py35def test_cpu_tensor_rejects_lazy_views(value, error):CODE
LOWpython/tests/tensor_test.py64def test_cpu_tensor_transport_uses_bounded_binary_chunks():CODE
LOWpython/tests/tensor_test.py98def test_cpu_tensor_binary_round_trip(value):CODE
LOWpython/tests/tensor_test.py113def test_worker_streams_cpu_cuda_transfers_in_chunks():CODE
LOWpython/tests/sidecar_test.py32def test_sidecar_container_runtime_is_macos_only(monkeypatch):CODE
LOWpython/tests/sidecar_test.py39def test_sidecar_container_runtime_requires_cli(monkeypatch):CODE
LOWpython/tests/sidecar_test.py47def test_sidecar_container_runtime_starts_services_and_pulls_missing_image(monkeypatch):CODE
LOWpython/tests/sidecar_test.py71def test_sidecar_container_runtime_pulls_missing_image(monkeypatch):CODE
LOWpython/tests/sidecar_test.py98def test_sidecar_dispatch_mode_forwards_factory_ops(monkeypatch):CODE
LOWpython/tests/sidecar_test.py126def test_sidecar_dispatch_mode_forwards_tensor_ops(monkeypatch):CODE
LOWpython/tests/sidecar_test.py154def test_sidecar_dispatch_mode_keeps_cpu_ops_local(monkeypatch):CODE
LOWpython/tests/sidecar_test.py169def test_sidecar_to_copy_uses_direct_cpu_upload(monkeypatch):CODE
LOWpython/tests/sidecar_test.py192def test_sidecar_to_copy_uses_direct_gpu_download(monkeypatch):CODE
LOWpython/tests/sidecar_test.py221def test_sidecar_copy_uses_direct_cpu_stream(monkeypatch):CODE
LOWpython/tests/sidecar_test.py249def test_sidecar_worker_consumes_tensor_stream_before_operation_error(tmp_path):CODE
LOWpython/lupine/tensor.py147def _validate_cpu_result_tensor(tensor: Any) -> None:CODE
LOWcodegen/ops.py255 def client_post_rpc_read_success(self, f):STRING
LOWcodegen/codegen.py659def client_translated_deviceptr_names(CODE
LOWcodegen/codegen.py715def client_routing_route_expr(metadata: FunctionAnnotationMetadata) -> str:CODE
LOWcodegen/codegen.py913def write_nvml_client_validation(f, operations):CODE
LOWcodegen/codegen.py970def write_nvml_client_wrapper(f, function, operations, metadata):CODE
LOWcodegen/codegen.py1017def write_server_buffer_cleanup(f, owned_buffers, indent):CODE
LOWcodegen/codegen.py1022def write_nvml_server_handler(f, function, operations):CODE
Excessive Try-Catch Wrapping10 hits · 11 pts
SeverityFileLineSnippetContext
LOWpython/lupine/worker.py58 except Exception:CODE
LOWpython/lupine/worker.py133 except Exception:CODE
LOWpython/lupine/worker.py146 except Exception:CODE
LOWpython/lupine/worker.py210 except Exception:CODE
LOWpython/lupine/worker.py226 except Exception as exc:CODE
LOWpython/lupine/sidecar.py268 except Exception as exc:CODE
LOWpython/lupine/tensor.py196 except Exception:CODE
LOWpython/lupine/tensor.py252 except Exception:CODE
MEDIUMcodegen/codegen.py1145 print(f"Error parsing annotation for {function.name}: {e}")CODE
LOWcodegen/codegen.py1144 except Exception as e:CODE
Deep Nesting9 hits · 8 pts
SeverityFileLineSnippetContext
LOWpython/lupine/worker.py190CODE
LOWpython/lupine/sidecar.py239CODE
LOWpython/lupine/tensor.py203CODE
LOWcodegen/ops.py348CODE
LOWcodegen/annotationgen.py6CODE
LOWcodegen/codegen.py262CODE
LOWcodegen/codegen.py745CODE
LOWcodegen/codegen.py913CODE
LOWcodegen/codegen.py1098CODE
Unused Imports5 hits · 5 pts
SeverityFileLineSnippetContext
LOWpython/lupine/sidecar.py1CODE
LOWpython/lupine/__init__.py8CODE
LOWpython/lupine/tensor.py3CODE
LOWcodegen/codegen.py4CODE
LOWcodegen/codegen.py5CODE
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWpython/lupine/__init__.py71def _set_server_env(servers: Sequence[str]) -> None:CODE
LOWpython/lupine/__init__.py225__all__ = [CODE
LOWpython/lupine/tensor.py33def _set_active_session(session: Any) -> None:CODE