SOURCE INVENTORY, BUILD FEASIBILITY, AND REMAINING SMALL-FILE REVIEW
Scope: unmodified SampleTestIntegrationCode_v35.zip extraction, inspected 2026-10-23.

1. Exact provenance and delta
The new archive is 570,424 bytes and SHA-256
3648a0423e9fc35d8d98058015edd5b3d2423704cfbcb08775a7dd141163470c.
It contains 91 files, totaling 2,719,336 extracted bytes and 60,524 physical lines.
The old Stage_01.zip is 292,376 bytes and SHA-256
31f6aad676e4c2fec08acf25e8441eaa69345334dd6cf15edbe6b178bd551ef2.
It contains 61 files. Every old file is byte-identical in the new archive; all 30
additions are under Module/. No old file changed or disappeared. Both extraction
trees were checked byte-for-byte against their respective ZIP members.
source_inventory.csv gives each of the 91 paths, exact bytes, physical LF lines,
LF count, SHA-256, category, delta and static include reachability.

2. What the inventory proves and what it does not
All 91 files were inventoried. All C/C++ include occurrences were classified after
lexically removing // and /* */ comments; literal #if 0 regions and conditional
contexts are tracked. Includes in Markdown or text are documentation, not active
code. Counts: 645 lexically active directives, 26 conditional directives, 590
commented occurrences, and 40 documentation occurrences. An unknown #if branch
is retained as potentially active, not claimed to be the compiler-selected branch.
This is not compiler preprocessing output. Include guards are conditional too.

The exact relative-path graph reaches 50 files from the main C++ source, or 52
from the likely three translation units (main .cpp, AlgorithmConcreteKernels.cu,
and lynsyn.c). Two internal include directives do not resolve relative to their
own files or source root; their targets exist and are already reachable elsewhere
or via the C translation unit. Because build flags were not supplied, this graph
must not be represented as a proof that every internal dependency resolves.
include_inventory.csv preserves source line, include spelling, comment status,
conditional context, actual local path resolution, same-basename candidates,
and verified optional include-directory candidates.

This subreview performed focused semantic review of ModuleFactory.h, IModule.h,
IScheduler.h, FrameSkippingScheduler.h, LatencyHistogram.hpp,
MemoryOptimizedMetricsBuffer.h, metrics_analyzer.py, AKYHFT~N, the seven Module
text/Markdown documents, Stage_01/README.md, and reset_lynsyn_usb.sh. The larger
controller, pipeline, telemetry, CUDA, and interface files received inventory and
dependency coverage here; their deeper semantic review is handled separately.
Nothing here means all 91 files were compiled, executed, or validated on hardware.

3. Current variants versus dormant files
The main .cpp includes RuntimeControls, ConfigManager, Modules, WorkloadMission,
PilotCollector and PilotCollectorHooks. ConfigManager selects the active
EvolutionarySelector_02.h; that includes GeneticAlgorithm_05.h. The GA includes
AdaptiveWeightManager.h and SurrogateModel.h. Modules.h includes
DataConcrete_new.h, AlgorithmConcrete_new.h, SdlDisplayConcrete_new.h,
SoCConcrete_new.h, LynsynMonitorConcrete_new.h and
SystemMetricsAggregatorConcrete_v3_2.h. These are the archive's integration path.

DataConcrete_new_old.h and DataConcrete_new_USB_CSI_Modular.h are not reached by
this integration path. Neither are SharedQueue_old.h, PipelineFactory.h,
IDisplay_new.h, JetsonThermalManager.h, nor the three helper classes named below.
This is static reference status, not a claim that users cannot build other entry
points externally. See inventory_summary.json for all 29 source/header files
not reached from the expected three translation units under exact local paths.

Module/AKYHFT~N is not an unknown binary: it is a 23,024-byte, 505-line C++ text
file. It exactly equals the first 23,024 bytes (first 505 lines) of
AdaptiveWeightManager.h. The latter's remainder is commented historical code;
comment-stripped nonblank code lines in both equal 292. No supplied active source
includes AKYHFT~N. Treat it as a redundant snapshot, not a separate active manager.

FrameSkippingScheduler.h, LatencyHistogram.hpp, and
MemoryOptimizedMetricsBuffer.h have no active references outside their own files.
Their proposed wiring is in Integration_Guide.md only. That guide additionally
mentions an AdaptivePopulationManager type absent from the source tree; the GA
has comments referring to the concept, not that standalone type definition.

4. Build and reproduction requirements
No CMakeLists.txt, Makefile, build script, compile_commands.json, package manifest,
lockfile, requirements.txt, test target, config.json, or sample input data is
present in the 91-file archive. The README's cmake command is therefore not a
reproducible build procedure for this package. The main file is an executable
entry point (main at line 2010), not a build-system entry point.

Required non-vendored dependencies evidenced by live includes:
- spdlog/spdlog.h, spdlog/fmt/ostr.h and fmt/format.h;
- nlohmann/json.hpp;
- CUDA toolkit headers/runtime and a CUDA compiler for AlgorithmConcreteKernels.cu;
- SDL2/SDL.h and SDL2 library;
- libusb.h and libusb library, with an appropriate include directory;
- Linux/POSIX headers and threading support (V4L2, eventfd, mmap, pthread, sched).
The source advertises C++17 and uses both std::filesystem and
std::experimental::filesystem; compiler/version and any filesystem link flags
must be specified in a real build. The unused frame-skip and metrics-buffer
headers use designated initializers, which require C++20 for strict standard
conformance (GCC may accept them as extensions in C++17).
Python analysis imports pandas and numpy but no version pins are supplied.

Concrete active include-path gaps:
- Stage_01/Concretes/LynsynMonitorConcrete_new.h:39 uses
  ../Stage_01/Includes/lynsyn.h, which points to a nonexistent nested Stage_01
  from that file's directory.
- Stage_01/SharedStructures/AlgorithmConfig.h:295 similarly uses
  ../Stage_01/Concretes/CudaUtiles.h from SharedStructures.
Both target files are present. An explicitly configured include search directory
such as source/Module or source/Stage_01 would resolve those spellings, but the
archive has no build recipe establishing that flag.
- ../nlohmann/json.hpp is used from the root .cpp, Module headers and Stage_01
  headers at different depths, and no nlohmann header exists anywhere in the
  archive. Merely placing one copy at a guessed relative location does not prove
  every include will work; normalize the include spelling or configure and verify
  a shared search directory.

Concrete active C++17 namespace conflict (F-INV-09):
main:71, Modules.h:27, ConfigManager.h:45 and LynsynMonitorConfig.h:16 declare
global fs as std::experimental::filesystem, while actively included
LynsynMonitorConcrete_new.h:29 and SystemMetricsAggregatorConcrete_v3_2.h:73
choose std::filesystem for __cplusplus >= 201703L. These distinct namespace
aliases conflict in the same translation unit. A minimal probe containing the
exact two aliases fails with a conflicting declaration error under strict C++17.
Thus adding external packages and include flags alone is insufficient: the
filesystem abstraction must be unified. The probe is isolated and does not claim
a complete main compile was reached through its absent dependency headers.

Concrete unresolved symbol:
LynsynMonitorConcrete_new.h:40 declares extern C lynsyn_reset_device(void), with
calls at 158 and 180. No supplied file defines that symbol; bundled lynsyn.c
contains no implementation. A matching extra implementation or compatible
external library is required before the full link can succeed.

Runtime reproducibility additionally needs the exact effective JSON config,
Jetson device/sysfs layout, camera and display setup, Lynsyn device/permissions,
rail wiring/calibration, and the expected NVIDIA system commands where used.
config.json is the main default at main:2039 but is absent. Some config loaders
have fallback defaults, so this absence is a reproducibility/configuration gap,
not proof that every execution immediately fails. No hardware was invoked.

5. Focused small-file findings
F-INV-01 / ACTIVE BUILD HYGIENE / ModuleFactory.h:31
The factory correctly constrains T to IModule, uses unique_ptr ownership, and
validates before returning. It throws std::runtime_error without including
<stdexcept>. A direct standalone C++17 include fails to compile; the current main
include order masks this via earlier includes. Add direct <stdexcept> and
<utility> includes for the facilities used rather than relying on transitive
includes. This is not claimed as a full-main compile error.

F-INV-02 / ACTIVE INTERFACE / IScheduler.h:16-25 and IModule.h:16-22
Both have virtual destructors. IScheduler exposes reset/apply with shared action,
snapshot and controls; IModule exposes validate/start/stop. IScheduler standalone
C++17 strict syntax check passed. No additional issue was identified in this
narrow interface review. This does not validate Scheduler implementations.

F-INV-03 / DORMANT HELPER / FrameSkippingScheduler.h:30-35,48,57-64,89-91
Zero keyframe_interval is accepted by the constructor and used as a modulo divisor
at line48. For non-keyframes with high latency and severe backlog, the skip branch
at57 wins before the documented quality-reduction branch at62. frames_skipped is
only the counter since the most recent keyframe reset at52, not a lifetime total;
its other name skip_budget_remaining is also misleading because it counts upward.
No production impact is asserted because this class is not integrated.

F-INV-04 / DORMANT HELPER / LatencyHistogram.hpp:34-40,47-59,66-77
Percentile target_count truncates to zero for small samples. An exact unmodified
header probe with one 20ms sample returns P95=0.5ms (reproduced), average=20.5ms.
Use an explicitly defined percentile rank convention with a nonzero rank for
nonempty data. Inputs lack finite/nonnegative/range checks. Overflow values are
all represented by the 50.5ms bucket midpoint, so the reported average/percentiles
cannot measure arbitrary tail latency. Independent atomics do not provide a
consistent snapshot across reset, bins and total_count. No production integration
was found; the compile/probe does not validate concurrent behavior.

F-INV-05 / DORMANT HELPER / MemoryOptimizedMetricsBuffer.h:47-50,57-65,71-79,110-119
The average sums only valid frames but divides by all recent frames. The oldest
index (head+1)%CAPACITY is incorrect: before capacity fills the oldest remains
index0, and when full it is head. push and monitoring readers access ordinary
non-atomic storage and counters with no synchronization, despite the header's
lock-free-read claim; concurrent use would cause data races. getRecent allocates
std::vector, so the file-level no-dynamic-allocation claim does not cover reads.
The header also omits direct <vector>/<cstdint> includes. These are static review
findings on a currently unreferenced helper, not observed production failures.

F-INV-06 / ANALYSIS BLOCKER / metrics_analyzer.py:94 and :138
The parser requires time_s, while current LynsynMonitorConcrete_new.h:121 exports
device_time_s and system_time_us. Current writer data therefore fails the required
column check without adaptation. Independently, calculate_power_stats calls
PowerRail("RAIL_0"), but Enum values are tuples; correct access by name would be
PowerRail["RAIL_0"]. The supplied implementation raises ValueError on every normal
call. This exception was reproduced with a synthetic seven-rail dataframe.

F-INV-07 / ANALYSIS MEASUREMENT ERROR / metrics_analyzer.py:177-195,201-210,224
Thermal statistics label CPU utilization as Celsius. With a synthetic utilization
series [40,80], mean_c is60 (reproduced). The current aggregator's CSV emits
SoC_CPU1_Util ... CPU4_Util instead of SoC_CPU_Util, so real current output produces
silent zero temperatures in this function. Energy integrates all seven rail powers
using mean sample interval times every sample, without rail-selection semantics,
clock alignment, or irregular-interval trapezoidal integration. For N constant
samples at regular spacing, multiplying all N samples by dt also assigns N
intervals to a span with N-1 intervals. Frames are row counts filtered FrameID>0,
not unique-frame or aligned-interval counts. AlgoDroppedFrames is summed without
establishing whether its source is per-row or cumulative. None of these outputs
should be used as thesis evidence until reconciled with actual writer schemas.

F-INV-08 / UNUSED SHELL UTILITY / Stage_01/Config/reset_lynsyn_usb.sh:3-6
The shell syntax passes bash -n. It extracts VID and PID as separate loop values
and invokes the same script via a hardcoded /home/ansorosa/... path, without a
USB-reset operation. If installed at that original path while the device remains
present, it recursively re-enters itself. If not installed there, the path fails.
It was not executed. Active C++ recovery calls the missing reset function above;
no active source reference to this shell utility was found.

6. Documentation classification
- Stage_01/README.md is historical prose with a C++17 badge and unsupported
  'Production Ready'/zero-copy/performance claims, placeholder clone URL, cmake
  commands without a CMakeLists, .hpp names where supplied files are .h, and a v19
  entry-point name while the archive has v35. These are not measured evidence.
- Module/README_ERL_EVIDENCE.md documents intended CSV outputs and a missing
  plot_pareto_evidence.py. Selected==1 and rank==0 establishes selection from an
  exported front only; it alone cannot establish causal improvement, trained RL,
  valid measurements, or counterfactual execution. Reconcile with runtime writer.
- Module/Integration_Guide.md is a block-commented proposed integration example,
  including TODO queue-depth tracking and the absent standalone population type.
- Module/AdaptiveWeights_README.md is mostly a copied ConfigManager implementation
  plus historical comments, not an authoritative independent build target.
- Module/ERL_Modularity.md is historical architecture commentary; it ends by
  proposing a SchedulerModule implementation already present in the code.
- Module/RLAction_Heuristics.md explicitly describes a heuristic proxy, but has
  unsupported 'real measured behavior' examples and thesis-readiness language.
- Module/workloads for your Evolutionary Reinforcement Learning (ERL) framework.MD
  describes missing/ghost algorithms and suggested additions; it is narrative,
  not a tested current workload conformance matrix.
- Module/GEneticAlgorith.txt is a short design rationale, not executable code or
  empirical validation.

7. Checks actually run
PASS: all archive member hashes equal corresponding extracted-file hashes.
PASS: old/new comparison; 61 identical, 30 added, 0 changed/removed.
BLOCKED: g++ -std=c++17 -fsyntax-only SampleTestIntegrationCode_v35.cpp fails first
at main:46, missing spdlog/spdlog.h. No subsequent full-build claims are made.
REPRODUCED: exact conflicting experimental/filesystem vs filesystem aliases fail
under C++17 in filesystem_alias_probe.cpp.
NOT AVAILABLE: nvcc (not found on PATH in this environment).
FAIL: standalone strict C++17 ModuleFactory.h due missing std::runtime_error.
PASS: standalone strict C++17 IScheduler.h and LatencyHistogram.hpp syntax.
REPRODUCED: histogram one20ms-sample P95=0.5ms.
PASS: Python syntax compile; no source __pycache__ created.
REPRODUCED: analyzer Enum ValueError and utilization-as-temperature calculation.
PASS: bash -n reset_lynsyn_usb.sh; no execution, sudo, USB, sysfs or device access.
NOT RUN: complete CPU/CUDA build/link, hardware execution, thread sanitizer,
platform timing/thermal/power validation, or supplied experimental-run replay.
