Puffing up reinforcement learning
This report summarizes scanner evidence for PufferAI/PufferLib, a C project with 6,572 GitHub stars. SynthScan examined 199,925 lines of code across 424 source files, recording 376 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 2.2 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 335 finding(s).
Are imports declared and package/API names verified? 15 finding(s).
Are wrappers, guards, and repeated structures necessary? 57 finding(s).
Which changes need focused human review? 376 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 376 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build.sh | 1 | #!/bin/bash | COMMENT |
| LOW | ocean/battle/battle.h | 1 | /* Battle: a sample multiagent env about puffers eating stars. | COMMENT |
| LOW | ocean/battle/battle.h | 21 | COMMENT | |
| LOW | ocean/battle/rlights.h | 101 | //---------------------------------------------------------------------------------- | COMMENT |
| LOW | ocean/slimevolley/slimevolley.h | 1 | #include "raylib.h" | COMMENT |
| LOW | ocean/slimevolley/slimevolley.h | 21 | #define REF_W 48 | COMMENT |
| LOW | ocean/trash_pickup/trash_pickup.h | 1 | #include <stdlib.h> | COMMENT |
| LOW | ocean/asteroids/asteroids_net.h | 1 | // CPU asteroids policy: entity encoder + MinGRU + decoder. | COMMENT |
| LOW | ocean/asteroids/asteroids.h | 1 | #include "raylib.h" | COMMENT |
| LOW | ocean/terraform/terraform.h | 1 | #include <stdlib.h> | COMMENT |
| LOW | ocean/terraform/terraform.h | 41 | #define BUCKET_OFFSET 2.0f | COMMENT |
| LOW | ocean/terraform/terraform.h | 401 | COMMENT | |
| LOW | ocean/terraform/terraform.h | 421 | // available[idx] = available[--num_available]; | COMMENT |
| LOW | ocean/rware/rware.h | 1 | #include <stdlib.h> | COMMENT |
| LOW | ocean/rware/rware.h | 21 | #define SHELF 1 | COMMENT |
| LOW | ocean/pacman/pacman.h | 1 | #include "helpers.h" | COMMENT |
| LOW | ocean/osrs/osrs_collision.h | 1 | #ifndef OSRS_COLLISION_H | COMMENT |
| LOW | ocean/osrs/osrs_collision.h | 21 | COMMENT | |
| LOW | ocean/osrs/osrs_env_profile.h | 1 | #ifndef _POSIX_C_SOURCE | COMMENT |
| LOW | ocean/osrs/osrs_env_profile.h | 101 | for (int t = 0; t < threads; t++) { | COMMENT |
| LOW | ocean/osrs/osrs_ui_interfaces.h | 1 | #ifndef OSRS_UI_INTERFACES_H | COMMENT |
| LOW | ocean/osrs/osrs_pvp_observations.h | 1 | #ifndef OSRS_PVP_OBSERVATIONS_H | COMMENT |
| LOW | ocean/osrs/osrs_policy.h | 1 | #ifndef OSRS_POLICY_H | COMMENT |
| LOW | ocean/osrs/osrs_policy.h | 21 | #define OSRS_SHARED_OBS_EFFECT_START \ | COMMENT |
| LOW | ocean/osrs/osrs_render_motion.h | 1 | #ifndef OSRS_RENDER_MOTION_H | COMMENT |
| LOW | ocean/osrs/osrs_asset_raylib.h | 1 | #ifndef OSRS_ASSET_RAYLIB_H | COMMENT |
| LOW | ocean/osrs/osrs_anim.h | 1 | #ifndef OSRS_ANIM_H | COMMENT |
| LOW | ocean/osrs/osrs_pathfinding.h | 261 | #if defined(__GNUC__) || defined(__clang__) | COMMENT |
| LOW | ocean/osrs/osrs_encounter.h | 1 | #ifndef OSRS_ENCOUNTER_H | COMMENT |
| LOW | ocean/osrs/osrs_encounter.h | 681 | entities[0].attack_target_entity_idx = i; | COMMENT |
| LOW | ocean/osrs/osrs_types.h | 1 | #ifndef OSRS_TYPES_H | COMMENT |
| LOW | ocean/osrs/osrs_types.h | 21 | #define WILD_MAX_Y 3968 | COMMENT |
| LOW | ocean/osrs/osrs_types.h | 41 | #define ICE_BURST_MAX_HIT 22 | COMMENT |
| LOW | ocean/osrs/osrs_gfx_ids.h | 1 | #ifndef OSRS_GFX_IDS_H | COMMENT |
| LOW | ocean/osrs/osrs_lab.h | 1 | #ifndef OSRS_LAB_H | COMMENT |
| LOW | ocean/osrs/osrs_env.h | 1 | #ifndef OSRS_ENV_H | COMMENT |
| LOW | ocean/osrs/osrs_pvp_actions.h | 1 | #ifndef OSRS_PVP_ACTIONS_H | COMMENT |
| LOW | ocean/osrs/osrs_render_click_hull.h | 1 | #ifndef OSRS_RENDER_CLICK_HULL_H | COMMENT |
| LOW | ocean/osrs/osrs_inventory_clicks.h | 41 | OsrsConsumableKind kind | COMMENT |
| LOW | ocean/osrs/osrs_visual_net.h | 1 | #pragma once | COMMENT |
| LOW | ocean/osrs/osrs_visual_net.h | 21 | #define COLO_ENT_NPC_NUM_RECS 24 | COMMENT |
| LOW | ocean/osrs/osrs_models.h | 1 | #ifndef OSRS_MODELS_H | COMMENT |
| LOW | ocean/osrs/osrs_items.h | 141 | #define STAT_NORM_MAGIC_DMG 30.0f | COMMENT |
| LOW | ocean/osrs/osrs_render.h | 1 | #ifndef OSRS_RENDER_H | COMMENT |
| LOW | ocean/osrs/osrs_render.h | 21 | #include "osrs_terrain.h" | COMMENT |
| LOW | ocean/osrs/osrs_render.h | 41 | #define RENDER_SPLATS_PER_PLAYER 4 | COMMENT |
| LOW | ocean/osrs/osrs_render.h | 81 | #define COLOR_P0 CLITERAL(Color){ 80, 140, 255, 255 } | COMMENT |
| LOW | ocean/osrs/osrs_visual.c | 1 | #ifndef _POSIX_C_SOURCE | COMMENT |
| LOW | ocean/osrs/osrs_visual.c | 21 | #pragma GCC diagnostic push | COMMENT |
| LOW | ocean/osrs/osrs_gui.h | 1 | #ifndef OSRS_GUI_H | COMMENT |
| LOW | ocean/osrs/osrs_gui.h | 21 | #include "osrs_types.h" | COMMENT |
| LOW | ocean/osrs/osrs_gui.h | 41 | #define GUI_MINIMAP_X 53 | COMMENT |
| LOW | ocean/osrs/osrs_gui.h | 61 | #define GUI_HP_Y 37 | COMMENT |
| LOW | ocean/osrs/osrs_gui.h | 181 | #define OSRS_ID_COMBAT_4 12695 | COMMENT |
| LOW | ocean/osrs/osrs_gui.h | 2621 | gs, "wornitems", ref->icon_component_name, ref->icon_rect); | COMMENT |
| LOW | ocean/osrs/osrs_objects.h | 1 | #ifndef OSRS_OBJECTS_H | COMMENT |
| LOW | ocean/osrs/tests/test_colosseum_modifiers.c | 41 | } | COMMENT |
| LOW | ocean/osrs/tests/test_encounter_route_topology_setup.c | 1 | #include <stdint.h> | COMMENT |
| LOW | ocean/osrs/tests/test_encounter_route_topology_setup.c | 21 | return (uint32_t)collision_get_flags( | COMMENT |
| LOW | ocean/osrs/tests/test_encounter_route_topology_setup.c | 41 | #include "ocean/osrs/encounters/encounter_zulrah.h" | COMMENT |
| 226 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | resources/trailer/trailer.c | 32 | // ─── Vertex layout (x, y, size_scale, r, g, b, a) ─────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/trailer.c | 38 | // ─── GL draw ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/trailer.c | 71 | // ─── Shared background star field ───────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/trailer.c | 431 | // ─── Text overlay helpers ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/trailer.c | 460 | // ─── Haiku + title overlay (called every frame from anim5 onward) ───────────── | COMMENT |
| MEDIUM | resources/trailer/trailer.c | 586 | // ─── Video recording ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/trailer.c | 628 | // ─── Main ───────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/architecture.c | 92 | // ─── tiny helpers ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/architecture.c | 216 | // ─── packets ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/architecture.c | 495 | // ─── layer drawings ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/architecture.c | 1033 | // ─── chrome ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | resources/trailer/architecture.c | 1166 | // ─── ffmpeg recorder (same pattern as trailer.c) ────────────────────────────── | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 31 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 33 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 64 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 66 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 118 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 120 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 226 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_nmmo3_encoder.py | 228 | # ============================================================================ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …n/laser_puzzle/level_generation/generate_levels_bin.py | 92 | def generate_verified_puzzles(): | CODE |
| LOW | tests/test_pufferl_train.py | 4 | def test_train_worker_args_scale_total_timesteps_per_rank(): | CODE |
| LOW | tests/test_pufferl_train.py | 22 | def test_train_worker_args_leave_single_gpu_budget_unchanged(): | CODE |
| LOW | tests/test_osrs_asset_manifest_preload.py | 23 | def test_selected_groups_emit_ordered_unique_full_vfs_paths() -> None: | CODE |
| LOW | tests/test_osrs_asset_manifest_preload.py | 36 | def test_group_argument_order_does_not_change_manifest_order() -> None: | CODE |
| LOW | tests/test_osrs_asset_manifest_preload.py | 52 | def test_empty_group_selection_emits_every_asset_once() -> None: | CODE |
| LOW | tests/test_osrs_asset_manifest_preload.py | 84 | def test_gui_group_contains_every_exported_gui_sprite() -> None: | CODE |
| LOW | tests/test_osrs_asset_manifest_preload.py | 97 | def test_items_group_contains_every_exported_item_sprite() -> None: | CODE |
| LOW | tests/test_puffernet.py | 67 | def test_puffernet_linear_layer(batch_size=16, input_size=128, hidden_size=128): | CODE |
| LOW | tests/test_puffernet.py | 85 | def test_puffernet_convolution_layer(batch_size=16, in_width=11, in_height=11, | CODE |
| LOW | tests/test_puffernet.py | 205 | def test_puffernet_argmax_multidiscrete(batch_size=16, logit_sizes=[5,7,2]): | CODE |
| LOW | tests/test_sweep.py | 39 | def synthetic_percentile_task(args): | CODE |
| LOW | tests/test_osrs_puffer_render.py | 18 | def test_puf_render_owns_renderer_lifecycle(tmp_path: Path, wrapper: str) -> None: | CODE |
| LOW | tests/microbench.py | 167 | def log_coeffs_and_values_loss(outputs): | CODE |
| LOW | tests/microbench.py | 171 | def test_log_coeffs_and_values(): | CODE |
| LOW | tests/test_osrs_entity_encoders.py | 308 | def test_cuda_forward_and_all_weight_gradients(cuda_library, contract): | CODE |
| LOW | tests/test_osrs_cpu_build.py | 16 | def test_osrs_cpu_build_selects_visual_entrypoint(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_selfplay.py | 6 | def test_resolve_opponent_pool_directory_glob_and_list(tmp_path): | CODE |
| LOW | tests/test_selfplay.py | 19 | def test_external_pool_entries_are_path_only(tmp_path): | CODE |
| LOW | tests/test_selfplay.py | 30 | def test_resolve_opponent_pool_falls_back_to_repo_relative(monkeypatch, tmp_path): | CODE |
| LOW | tests/test_selfplay.py | 44 | def test_external_pool_entries_reject_missing_configured_pool(tmp_path): | CODE |
| LOW | tests/test_selfplay.py | 66 | def test_step_adds_self_checkpoints_to_external_pool(tmp_path): | CODE |
| LOW | tests/test_api.py | 42 | def test_pettingzoo_api_usage(print_errors=False): | CODE |
| LOW | tests/test_league.py | 31 | def test_protein_refreshes_observations_by_run_id(): | CODE |
| LOW | tests/test_league.py | 46 | def test_batch_ratings_anchor_zero_and_symmetric(): | CODE |
| LOW | tests/test_league.py | 65 | def test_league_config_allows_architecture_sweep_keys(): | CODE |
| LOW | tests/test_league.py | 100 | def test_league_trials_use_historical_selfplay_only(): | CODE |
| LOW | tests/test_league.py | 142 | def test_league_match_reward_conditioning_uses_player_hypers(): | CODE |
| LOW | tests/test_league.py | 188 | def test_league_match_policy_arch_uses_player_hypers(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | ocean/craftax/pack_textures.py | 51 | except ImportError: | CODE |
| HIGH | tests/hparam_seed_sensitivity.py | 388 | except ValueError: | CODE |
| HIGH | tests/test_sweep.py | 17 | except: | CODE |
| HIGH | tests/test_custom_gp_numerics.py | 108 | except ImportError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ocean/osrs/scripts/osrs_asset_manifest.py | 4 | CODE | |
| LOW | ocean/drive/dataset.py | 19 | CODE | |
| LOW | tests/hparam_seed_sensitivity.py | 15 | CODE | |
| LOW | tests/hparam_seed_sensitivity.py | 26 | CODE | |
| LOW | tests/hparam_seed_sensitivity.py | 27 | CODE | |
| LOW | tests/async_stability_runs.py | 4 | CODE | |
| LOW | tests/async_stability_runs.py | 8 | CODE | |
| LOW | tests/test_import_performance.py | 5 | CODE | |
| LOW | tests/microbench.py | 7 | CODE | |
| LOW | tests/offpolicy_scaling_study.py | 9 | CODE | |
| LOW | tests/test_api.py | 1 | CODE | |
| LOW | tests/score_noise_study.py | 7 | CODE | |
| LOW | tests/score_noise_study.py | 11 | CODE | |
| LOW | tests/test_muon.py | 6 | CODE | |
| LOW | tests/craftax_parity.py | 19 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ocean/osrs/scripts/osrs_asset_manifest.py | 248 | CODE | |
| LOW | …n/laser_puzzle/level_generation/generate_levels_bin.py | 52 | CODE | |
| LOW | …n/laser_puzzle/level_generation/generate_levels_bin.py | 92 | CODE | |
| LOW | ocean/laser_puzzle/level_generation/optimal_solver.py | 18 | CODE | |
| LOW | ocean/laser_puzzle/level_generation/optimal_solver.py | 20 | CODE | |
| LOW | ocean/drive/dataset.py | 83 | CODE | |
| LOW | tests/hparam_seed_sensitivity.py | 319 | CODE | |
| LOW | tests/test_nethack_encoder.py | 233 | CODE | |
| LOW | tests/test_nethack_encoder.py | 483 | CODE | |
| LOW | tests/test_nethack_encoder.py | 1430 | CODE | |
| LOW | tests/async_stability_runs.py | 112 | CODE | |
| LOW | tests/microbench.py | 99 | CODE | |
| LOW | tests/avg_breakout_seeds.py | 15 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_sweep.py | 126 | # Create a ColumnDataSource that includes the 'order' for each point | COMMENT |
| MEDIUM | tests/test_sweep.py | 139 | # Define a color mapper across the range of point indices | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build.sh | 4 | # Usage: | COMMENT |
| LOW | profile.sh | 4 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ocean/drive/dataset.py | 208 | except Exception as e: | CODE |
| MEDIUM | tests/test_sweep_hyper.py | 167 | print(f"Error: Results file not found at {results_file}") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_puffernet.py | 106 | CODE | |
| LOW | tests/microbench.py | 149 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ocean/scape/scape.h | 166 | * extra memory. This should be freed by puf_close. Don't forget to call | COMMENT |