Files
frameledger/tests/FrameLedger.Application.Tests/Capture/RuntimeModuleSourcesTests.cs
T
poli0981andClaude Opus 5.5 c9b0aab862 feat: DLSS 5 is named where the game ran its neural rendering (schema 0022, rules 2026.11.2, Privacy 2.14); Streamline headers re-vendored at v2.14.16 (D84) (beta.34 PR-3) (#358)
The owner, 2026-11-06: Hogwarts Legacy with Neural Rendering on loaded DLSS 5's runtime
(nvngx_dlssnr.dll 310.9.16.0, from the game's folder) and the session could say only "DLSS 5
runtime loaded". Then: check what changed in recent Streamline versions, fix it if needed.

- Streamline: the vendored closure was v2.12.0 byte for byte; v2.14.16 changes three of its
  eleven files (kFeatureDLSS_NR = 1004, the uplift buffer types 70-72, kStructVersion7, the
  version). Re-vendored byte for byte; README provenance, THIRD_PARTY_NOTICES row.
- Overlay (hook path): the slEvaluateFeature detour decodes kFeatureDLSS_NR into its own bit;
  RecordPresent sets FL_FEAT_SL_NEURAL_RENDERING (feature byte bit 7, an enumerator - no layout
  change) under the condition every Streamline fact shares; the evaluate row's family also claims
  FL_HOOK_SL_NEURAL_RENDERING (bit 12), published with the detour. Overhead: decode unchanged
  within noise (4.7 ns a call), +0.14..0.19 ns a present.
- Agent: Domain.Metrics.NeuralRendering.SharePct; sessions.dlss_nr_pct (schema 0022) only from a
  writer that published the family - an older Overlay's silence is never a measured 0 %.
  CensusNames records sl.dlss_nr.dll.
- Rules 2026.11.2: capability dlss_nr -> "Supports DLSS 5 Neural Rendering".
- App (D84): DLSS 5 heads the DLSS line where it ran ("DLSS 5 (neural rendering on 97.3% of
  rendered frames)"); its library listed with version and source; measured 0 -> "runtime loaded,
  not seen running"; nothing to tell -> "runtime loaded" as before. CSV basis/pct.
- CaptureHost dev census: a kFeatureDLSS_NR bucket.
- Privacy Policy 2.14 (neural-rendering libraries); the accuracy block's DLSS 5 sentence.
- Tests: native guard_test (the new harness mode through an injected Overlay; 0xF00D lights no NR
  fact; the token case's exact mask gains the family), NeuralRenderingTests, SessionAggregatorTests,
  DlssGenerationTests, DlssTextTests (a row shaped from session 132), LedgerDatabaseTests (0022),
  the repository round trip, the rules fixture, RuntimeModuleSourcesTests, SlCensusTests.
- Docs: 05_DETECTION, 06_DATA_MODEL, 17_HOOK_ENGINE, LIMITATIONS, guide/03, guide/10, the accuracy
  block, spike-notes 26 (+ owner-only item 30(a)'s decision table), HANDOFF (D84), CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 08:39:42 +00:00

47 lines
3.0 KiB
C#

// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FluentAssertions;
using FrameLedger.Application.Capture;
namespace FrameLedger.Application.Tests.Capture;
/// <summary>D64 (beta.24): a loaded module's folder class — the class is stored, the path never is.</summary>
public sealed class RuntimeModuleSourcesTests
{
private const string _windows = @"C:\Windows";
private const string _programData = @"C:\ProgramData";
[Theory]
[InlineData(@"C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1\nvngx_dlssg.dll", RuntimeModuleSource.GraphicsDriver)]
[InlineData(@"C:\ProgramData\NVIDIA\NGX\models\dlss\versions\20316673\files\160_e658700.bin", RuntimeModuleSource.GraphicsDriver)]
[InlineData(@"c:/programdata/nvidia/ngx/models/x.dll", RuntimeModuleSource.GraphicsDriver)]
[InlineData(@"C:\Windows\System32\_nvngx.dll", RuntimeModuleSource.Windows)]
[InlineData(@"D:\SteamLibrary\steamapps\common\Game\Engine\Plugins\nvngx_dlss.dll", RuntimeModuleSource.Game)]
[InlineData(@"C:\WindowsApps\Game\nvngx_dlss.dll", RuntimeModuleSource.Game)]
[InlineData(@"C:\ProgramData\NVIDIAx\nvngx_dlss.dll", RuntimeModuleSource.Game)]
public void AModulesFolderIsItsClass(string path, RuntimeModuleSource source) =>
RuntimeModuleSources.Classify(path, _windows, _programData).Should().Be(source);
[Fact]
public void ThePathlessAndTheTokensAreHandled()
{
RuntimeModuleSources.Classify(null, _windows, _programData).Should().Be(RuntimeModuleSource.Unknown);
RuntimeModuleSources.Classify(_windows, _windows, _programData).Should().Be(RuntimeModuleSource.Game, "the folder itself is not under itself");
FluentActions.Invoking(static () => RuntimeModuleSources.Classify("x", " ", _programData)).Should().Throw<ArgumentException>();
FluentActions.Invoking(static () => RuntimeModuleSources.IsNgxOverrideFolder("x", "")).Should().Throw<ArgumentException>();
RuntimeModuleSources.IsNgxOverrideFolder(@"C:\ProgramData\NVIDIA\NGX\models\x.bin", _programData).Should().BeTrue();
RuntimeModuleSources.IsNgxOverrideFolder(@"C:\ProgramData\NVIDIA\Other\x.dll", _programData).Should().BeFalse();
RuntimeModuleSources.IsNgxOverrideFolder(null, _programData).Should().BeFalse();
foreach (RuntimeModuleSource source in new[] { RuntimeModuleSource.Game, RuntimeModuleSource.GraphicsDriver, RuntimeModuleSource.Windows })
{
RuntimeModuleSources.FromToken(RuntimeModuleSources.Token(source)).Should().Be(source);
}
RuntimeModuleSources.Token(RuntimeModuleSource.Unknown).Should().BeNull();
RuntimeModuleSources.FromToken("cloud").Should().Be(RuntimeModuleSource.Unknown);
CensusNames.ModuleFileNames.Should().Contain(["nvngx_dlssnr.dll", "sl.dlss_nr.dll", "sl.dlss_d.dll", "sl.common.dll", "sl.reflex.dll", "amd_fidelityfx_loader_dx12.dll"],
"the snapshot records them though the census has no bit");
}
}