Skip to content

Repository files navigation

MemoryValidator

CI

MemoryValidator provides evidence-driven local memory validation for Windows. It is an Apache-2.0-licensed command-line application built around conservative evidence semantics: missing or failed evidence never silently becomes a passing result.

It reads local hardware and environment evidence, correlates Windows Storage, WHEA, and completed Windows Memory Diagnostic evidence, optionally consumes user-supplied smartctl read-only evidence, imports completed llama-bench JSON, and produces deterministic JSON and Markdown reports. The repository contains the v0.1 authoritative Core contracts, read-only hardware/environment and validation adapters, a bounded workload importer, deterministic diagnostic correlation, and a dependency-light CLI that emits JSON and Markdown reports with evidence-linked conservative recommendations. It does not tune a system, replace independent confirmation, or download/install tools, models, drivers, or diagnostics.

MemoryValidator is not a custom RAM stress engine. It does not install drivers, modify firmware or memory settings, download tools or models automatically, or treat llama-bench as an end-to-end latency measurement.

T001 scope

The Core establishes:

  • strongly typed execution and deterministic configuration identities;
  • an explicit run-state allow-list and generation preconditions;
  • independent execution and diagnostic status contracts;
  • immutable Evidence and Finding contracts;
  • a bounded file authority store and explicit recovery decisions;
  • JSON Schema v0.1 artifacts and fail-closed version checks.

The integration authority is docs/INTEGRATION_CONTRACT.md. Changing it requires a separately authorized bounded contract-change task.

T002 scope

The hardware intake layer reuses Hardware.Info behind a MemoryValidator-owned adapter. It captures only operating environment, basic CPU/system-memory/DIMM/motherboard/BIOS/ GPU/storage identity, normalizes optional values, and emits T001 Evidence and ModuleResult contracts. See docs/HARDWARE_INTAKE.md.

T003 scope

The validation layer provides thin, read-only evidence adapters around mature Windows facilities and an optional, explicitly located smartctl 7.5+ executable. Acquisition, structured parsing, privacy filtering, normalization, and status policy are separate. No upstream, CIM, XML, or process type crosses its public boundary. See docs/VALIDATION_ADAPTERS.md.

T004 scope

The workload layer strictly imports completed llama-bench -o json output supplied with capture-time tool SHA-256 and exit status. It removes local model paths, rejects RPC-backed records and path-bearing descriptive metadata, and records reported/requested model, backend, thread, batch, and context configuration without claiming AUTO/default/sentinel values are runtime-resolved state. It retains benchmark/model-evaluation timings, throughput, samples, timestamps, safe unknown-field names, limitations, and provenance, then emits T001 Evidence and ModuleResult contracts. It does not launch tools, load models, prove local-machine execution or model-content identity, or infer hardware health. See docs/WORKLOAD_INTAKE.md.

T005 scope

The diagnostics layer correlates existing T002-T004 captures using fixed versioned rules. It preserves supporting and conflicting Evidence references, coverage, explicit unknowns, machine-binding and model-content uncertainty, workload comparability, and independent execution/diagnostic status. It does not infer hardware health from acquisition failure, missing events, or benchmark throughput. See docs/T005_PRIOR_ART.md.

T006 scope

The CLI orchestrates the existing adapters and T005 correlation, then renders one typed, privacy-safe report model as deterministic JSON and Markdown. Recommendations are bounded and link back to findings and Evidence. Existing report files are never overwritten. See docs/CLI_REPORTING.md and docs/T006_PRIOR_ART.md.

Supported platform and runtime

The MVP release target is local Windows x64. Live Windows Storage, WHEA, and Windows Memory Diagnostic collection is Windows-only and may require the local account to have permission to read the corresponding APIs or event logs. Unsupported or restricted acquisition is reported as ERROR or TIMEOUT, never as proof of hardware failure.

Source builds require the .NET SDK 10.0.303 selected by global.json. The local release artifact is framework-dependent and requires the .NET 10 x64 runtime. MemoryValidator is not a GUI, daemon, cloud service, remote scanner, tuning utility, boot-time memory tester, or hardware health certification service.

Repository layout

  • src/MemoryValidator.Core/ — dependency-light .NET 10 contract library.
  • src/MemoryValidator.Hardware/ — thin Hardware.Info adapter and normalized snapshots.
  • src/MemoryValidator.Validation/ — bounded read-only validation evidence adapters.
  • src/MemoryValidator.Workloads/ — bounded structured workload evidence importer.
  • src/MemoryValidator.Diagnostics/ — deterministic evidence correlation and findings.
  • src/MemoryValidator.Reporting/ — privacy-safe report model and JSON/Markdown renderers.
  • src/MemoryValidator.Cli/ — local CLI orchestration and safe output handling.
  • tests/MemoryValidator.Core.Tests/ — adversarial contract and persistence tests.
  • tests/MemoryValidator.Hardware.Tests/ — deterministic adapter/normalization tests.
  • tests/MemoryValidator.Validation.Tests/ — fixtures, parser, policy, security, and boundary tests.
  • tests/MemoryValidator.Workloads.Tests/ — workload fixture, parser, privacy, provenance, and boundary tests.
  • tests/MemoryValidator.Diagnostics.Tests/ — correlation, uncertainty, conflict, and comparability tests.
  • tests/MemoryValidator.Cli.Tests/ — CLI, report parity, determinism, privacy, and path tests.
  • schemas/ — public JSON Schema artifacts for persisted contracts.
  • docs/ — architecture, state, recovery, evidence, evolution, and invariant rules.

Quick start

Download MemoryValidator-OSS-MVP-win-x64.zip and its .sha256 sidecar from the v0.6.0 release, verify the archive as described below, and extract it to a local folder. The release is a framework-dependent Windows x64 build and requires the .NET 10 x64 runtime.

memoryvalidator.exe --help
memoryvalidator.exe --version

Generate both report formats with illustrative, non-machine-specific values:

New-Item -ItemType Directory -Force C:\MemoryValidator-Reports | Out-Null
memoryvalidator.exe report `
  --json-output C:\MemoryValidator-Reports\report.json `
  --markdown-output C:\MemoryValidator-Reports\report.md `
  --memory-capacity-bytes 34359738368 `
  --module-count 2 `
  --channel-count 2 `
  --memory-technology DDR5 `
  --data-rate-mtps 6000

Optional smartctl use requires a user-supplied absolute local smartctl.exe path and a bounded device identifier. Optional llama-bench use imports completed JSON plus its captured exit code and executable SHA-256. Neither tool is downloaded or launched by MemoryValidator.

Build and test from source

.NET SDK 10.0.303 is selected by global.json.

dotnet restore --configfile NuGet.Config
dotnet build --configuration Release --no-restore
dotnet test --configuration Release --no-build --no-restore

Show CLI usage and version after the Release build:

dotnet run --project src/MemoryValidator.Cli --configuration Release --no-build -- --help
dotnet run --project src/MemoryValidator.Cli --configuration Release --no-build -- --version

Generate both reports after creating a local output directory and supplying the public-safe material memory configuration:

New-Item -ItemType Directory -Force C:\MemoryValidator-Reports | Out-Null
dotnet run --project src/MemoryValidator.Cli --configuration Release --no-build -- report `
  --json-output C:\MemoryValidator-Reports\report.json `
  --markdown-output C:\MemoryValidator-Reports\report.md `
  --memory-capacity-bytes 34359738368 `
  --module-count 2 `
  --channel-count 2 `
  --memory-technology DDR5 `
  --data-rate-mtps 6000

Optional smartctl use requires both a user-supplied absolute local smartctl.exe path and a bounded device identifier. Optional llama-bench use imports completed JSON plus its captured exit code and executable SHA-256; MemoryValidator never downloads or launches llama.cpp or a model. See docs/CLI_REPORTING.md for all options.

Report semantics

JSON and Markdown are deterministic views of the same privacy-safe report model. They retain the same diagnostic finding IDs, workload identity and comparability meaning, Evidence links, status dimensions, and evidence-linked recommendations.

  • UNKNOWN means the available evidence cannot establish the requested conclusion.
  • NOT_TESTED means no trusted capture was supplied for that evidence source.
  • ERROR and TIMEOUT describe acquisition or import execution, not hardware health.
  • REVIEW and FAIL appear only when authoritative diagnostic evidence supports them.

llama-bench values are benchmark/model-evaluation throughput, not automatically TTFT, end-to-end application latency, user-response latency, or network latency. Machine binding, model-content identity, and resolved AUTO/default/sentinel configuration remain explicit unknowns unless separately evidenced.

Privacy and known limitations

Persistent reports omit disk/DIMM/motherboard/BIOS/processor serials, Windows product or machine IDs, personal paths, remote/RPC endpoints, raw tool stderr, exception details, tokens, credentials, and environment secrets. Safe provenance retains Evidence IDs, source type, observation SHA-256, and bounded tool identity. Output and imported-file paths must be local drive-letter paths; UNC, network-drive, device-namespace, URI, and reparse-point paths fail closed. Existing output files are not overwritten.

Event absence is not proof of health, the CLI does not run a boot-time memory test, and no physical second-machine smoke is claimed unless it is actually performed. Dependency and release audit evidence is recorded in docs/RELEASE_AUDIT.md.

Core, validation, and workload have no third-party runtime dependency. Hardware has a direct Hardware.Info dependency; diagnostics, reporting, and CLI inherit that pinned MIT-licensed runtime chain transitively. Runtime and test dependencies are documented in THIRD_PARTY_NOTICES.md and generated package lock files.

Safety boundary

The hardware and validation adapters have no network, updater, telemetry, raw SPD, hardware-write, firmware-write, reboot, BCD, self-test scheduling, or tuning path. Execution failure alone is never diagnostic proof of hardware failure. See SECURITY.md before extending an adapter boundary.

Verify release integrity

From the folder containing the ZIP and sidecar, compare the published value with a fresh local calculation:

Get-Content .\MemoryValidator-OSS-MVP-win-x64.zip.sha256
(Get-FileHash .\MemoryValidator-OSS-MVP-win-x64.zip -Algorithm SHA256).Hash.ToLowerInvariant()

The two SHA-256 values must match before extraction. release-manifest.json records the same package digest and the exact public source commit used for the release.

License and support

MemoryValidator is licensed under the Apache License 2.0. Dependency attribution and redistribution texts are listed in THIRD_PARTY_NOTICES.md. See CONTRIBUTING.md for changes and SECURITY.md for security reports.

About

Evidence-driven local memory validation for Windows with deterministic JSON/Markdown reporting.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages