68 Commits
Author SHA1 Message Date
poli0981andClaude Fable 5.2 a6bebc4adf feat(input): the Agent records what a session was played with - the switch, the terms, Privacy Policy 2.22 and Disclaimer 2.18 (D155, D156, D160, D161) (#468)
* feat(input): the arithmetic of controller statistics - classes, batteries, makers, one pad seen twice (D155-D163)

Nothing reads a device yet. Domain.Input says whether an XInput state or a DualSense report is a pad in use and what
its battery is, adds a battery's readings up, counts switches and decides when two entries are one pad;
Application.Input holds one session's slices and turns them into a reading a second; InputSessionBuilder turns a
session's readings into its totals, its controllers as JSON and its timeline. TelemetrySample can carry a reading.

Every byte and reading under test was written by hand: no report from a real controller has passed through this code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session can store what it was played with - schema 0024, the .partial file's chunk 11, both tiers (D160)

Nine columns on sessions (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on games (what a store lists of controller support), ADD COLUMN only. The .partial
file gains chunk 11, so a session recovered after the Agent died keeps its readings. SessionFinalizer.Build stores
them before the tier branch: hooked, unhooked and recovered sessions alike. The input series are sensor_blobs rows
named input.*, which the sensors' read now leaves out and FindInputSensorsAsync returns.

Nothing produces a reading yet. A ledger this build has opened cannot be opened by 0.1.0-beta.49 or earlier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159)

Application.Input.InputReader takes a slice about ten times a second from Infrastructure.Input.Win32InputBackend, on
the thread of InputDeviceHub, which exists only while a session has a view of it. It opens no device, sends nothing
to one and registers for no keyboard or mouse. tools/input-readonly-check.ps1 holds its Windows calls to a list.

With no controller at hand, what the reader does with one connected is not established.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(input): an arm of XInputPad.Battery's switch said what the default says (Qodana, on #464 after it merged)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): no using that makes the file's own qualified names redundant (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): what InspectCode reported in the reader's tests - redundant casts, a hub disposed twice, a suppression not needed

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): the Agent records what a session was played with - the switch, the terms, the legal texts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style(input): import order in the Agent's composition; no redundant qualifier in a test (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 21:53:04 +00:00
poli0981andClaude Fable 5.2 e3dab94834 feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159) (#467)
* feat(input): the arithmetic of controller statistics - classes, batteries, makers, one pad seen twice (D155-D163)

Nothing reads a device yet. Domain.Input says whether an XInput state or a DualSense report is a pad in use and what
its battery is, adds a battery's readings up, counts switches and decides when two entries are one pad;
Application.Input holds one session's slices and turns them into a reading a second; InputSessionBuilder turns a
session's readings into its totals, its controllers as JSON and its timeline. TelemetrySample can carry a reading.

Every byte and reading under test was written by hand: no report from a real controller has passed through this code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session can store what it was played with - schema 0024, the .partial file's chunk 11, both tiers (D160)

Nine columns on sessions (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on games (what a store lists of controller support), ADD COLUMN only. The .partial
file gains chunk 11, so a session recovered after the Agent died keeps its readings. SessionFinalizer.Build stores
them before the tier branch: hooked, unhooked and recovered sessions alike. The input series are sensor_blobs rows
named input.*, which the sensors' read now leaves out and FindInputSensorsAsync returns.

Nothing produces a reading yet. A ledger this build has opened cannot be opened by 0.1.0-beta.49 or earlier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159)

Application.Input.InputReader takes a slice about ten times a second from Infrastructure.Input.Win32InputBackend, on
the thread of InputDeviceHub, which exists only while a session has a view of it. It opens no device, sends nothing
to one and registers for no keyboard or mouse. tools/input-readonly-check.ps1 holds its Windows calls to a list.

With no controller at hand, what the reader does with one connected is not established.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(input): an arm of XInputPad.Battery's switch said what the default says (Qodana, on #464 after it merged)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): no using that makes the file's own qualified names redundant (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): what InspectCode reported in the reader's tests - redundant casts, a hub disposed twice, a suppression not needed

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 16:20:55 +00:00
poli0981andClaude Fable 5.2 33a5da1373 feat(overlay): two more members of NVIDIA's latency report - the driver's active GPU time and its GPU frame time - and every frame-generation multiplier a session saw; four reserved words, layout still 5; a read left by the session before is dropped (D142, D144; in no release yet) (#450)
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 10:16:39 +07:00
poli0981andClaude Fable 5.2 80d1048235 feat(overlay): the driver's latency report, read while a session asks - two read-only getters, once a second, on the presenting thread; the gates that hold it (D132, D136, D138-D141; in no release yet) (#443)
* feat(overlay): the driver's latency report, read while a session asks - two getters of an nvapi64.dll the game loaded, about once a second on the presenting thread, behind a gate of four states; a module beside the executable refused, a fault or a call of 2 ms the last one; the gates that hold it (D132, D136, D138-D141; in no release yet)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(overlay): the latency log line measures its path with a bound (cpp:S5813)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(overlay): the resolve switch names every outcome (Qodana native: clang-diagnostic-switch-enum)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 00:29:23 +07:00
poli0981andClaude Fable 5.2 a4baae26fc feat(overlay): hook slIsFeatureSupported, slIsFeatureLoaded and slSetFeatureLoaded - read only where asked, the adapter never read; slInit not hooked (beta.45 PR-1; D129-D131) (#427)
* feat(overlay): hook slIsFeatureSupported, slIsFeatureLoaded and slSetFeatureLoaded - whether Streamline says a feature is supported and loaded, and the game switching it, read only once the Agent has asked; the adapter a game asks about is never read; slInit is not hooked (beta.45 PR-1; D129-D131)

Three new patch sites on sl.interposer.dll, a row and a family bit each (17-19), installed only in a process that
was asked for Advanced metrics (D111). Bare arguments and results, no vendor struct: the feature's id, the sl::Result
of slIsFeatureSupported (a refusal is the answer), the bool slIsFeatureLoaded wrote when it said OK, the bool the
game passed to slSetFeatureLoaded. sl::AdapterInfo is forwarded and never looked at, and the fields gate refuses the
names of its members in code loaded into a game (D131). Packed into word 1 of the feature's slot (layout 5 as it
was); the switch bits are a session's, the answers the process's.

Also: a stop restores a patch in about 160 ms, and the watchdog's wait for the stop's log lines was two seconds
whatever the number of patches - with fifteen the log lost its last UNHOOK_RESTORED lines. The wait is now a quarter
of a second for every patch the registry can hold.

Measured (the detours' bodies on the headers, the Overlay's flags, 20 M calls x 3): slIsFeatureSupported +1.50/+1.48/
+1.50 ns not asked, +11.97/+11.98/+12.08 asked; slIsFeatureLoaded +1.79/+1.77/+1.89, +12.35/+12.31/+12.33;
slSetFeatureLoaded +1.44/+1.47/+1.80, +11.28/+11.54/+11.45.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(harness): compute two feature-slot indices in size_t in the unit probe (Qodana native, bugprone-implicit-widening-of-multiplication-result)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 22:04:47 +07:00
poli0981andClaude Fable 5.2 91204ed8d3 feat(overlay): hook slGetFeatureVersion and slGetFeatureRequirements - Streamline's answers about a feature, read only where asked; never the lists the answer points to (beta.44 PR-2) (#422)
* feat(overlay): hook slGetFeatureVersion and slGetFeatureRequirements - what Streamline answers when a game asks which version a feature is and what it requires, read after the original call and only once the Agent has asked; never the lists the answer points to (beta.44 PR-2)

Two new patch sites on sl.interposer.dll, a row and a family bit each (15, 16), installed only in a process that
was asked for Advanced metrics (D111) and the first two rows the watchdog patches. The answer is read only when
the original returned eOk and the struct carries its own GUID: two versions; the flags, three counts and four
versions of the requirements - every one a member of struct version 1 at each of sixteen upstream tags (D115).
requiredTags and the Vulkan members are never read; no pointer of the game's is followed. Twelve slots in region 5
(layout 5 as it was), kept across a new request.

Measured (the detours' bodies on the headers, the Overlay's flags, 20 M calls x 3): the version +0.58/+0.61/+0.58 ns
not asked, +14.82/+14.54/+14.47 ns asked; the requirements +0.58/+0.63/+0.61 ns not asked, +20.88/+21.01/+20.96 ns
asked.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(tests): compute the index of a feature slot in size_t - three products of two 32-bit values used as a pointer offset, in the injected test and the harness (Qodana native, bugprone-implicit-widening-of-multiplication-result)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 10:47:32 +00:00
poli0981andClaude Fable 5.2 b2e90324c5 feat(overlay): hook ffxConfigure on the four ffx-api modules - how a game configures FSR frame generation, read only while the Agent asks and patched only once it has; never the swapchain, the callbacks, the HUD-less resource or the frame id (beta.43 PR-3) (#416)
Four inventory rows, family FL_HOOK_FFX_CONFIGURE (bit 14), installed only in a process asked for Advanced metrics at least once and published when every loaded ffx-api module is patched. fl_adv_fields.h reads frameGenerationEnabled, allowAsyncWorkloads, flags, onlyPresentGenerated and generationRect of a frame-generation configuration into region 5's ffxFg group, counted at the first module that saw one; the rectangle is kept in one word so it cannot tear, and one that does not fit is four -1. Every configure type is kept for the log (FFX_CONFIGURE). tools/overlay-fields-check.ps1 gains the parameter g and five list entries.

Measured on the headers with the Overlay's flags: +1.7 ns not asked, +15.2 ns on the counted module, +2.7 ns on the forwarded copy.

The test's 'is this export patched' compares the target's bytes with the file's own.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 06:05:06 +00:00
poli0981andClaude Fable 5.2 b4feea1b0b feat(overlay): hook slSetConstants - what a game tells Streamline about each frame, read only while the Agent asks and patched only once it has; never the matrices or the camera's position and axes (beta.43 PR-2) (#415)
A new inventory row, sl.interposer.dll!slSetConstants, family FL_HOOK_SL_CONSTANTS (bit 13). InstallByFamily returns before resolving the symbol in a process never asked for Advanced metrics (D111), so nothing is patched with the option off. The detour checks the request, MayObserve, the struct's GUID and version and the viewport handle's on every call; fl_adv_fields.h reads jitterOffset, mvecScale, cameraNear, cameraFar, cameraFOV, cameraAspectRatio and the seven Booleans into region 5's sl group, summarised for the first viewport seen. tools/overlay-fields-check.ps1 gains the parameter k and thirteen list entries; the camera's names are still refused everywhere.

Measured on the headers with the Overlay's flags: +0.6 ns not asked, +19.6 ns asked on the summarised viewport, +5.8 ns on another.

ctest fl_adv_fields and fl_guard [advanced]: never asked - the export's first 16 bytes in the target are the file's; asked - the first viewport's numbers and none of the second's; no longer asked - the region unchanged; stopped - the bytes restored.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 04:43:24 +00:00
poli0981andClaude Fable 5.2 4051dba5c7 feat(overlay): the Overlay reads what a hooked game tells its upscaler, only while the Agent asks - DLSSOptions chained into the evaluation, the rest of the FSR upscale descriptor, FSR's own memory; no new patch site; each session's request its own; a gate that refuses a camera's position anywhere in code loaded into a game (Advanced B PR-3, D111/D114/D115/D116) (#397)
fl_adv_fields.h is the one place a vendor struct's extra members are read: sl::DLSSOptions at the struct version
that carries each member, ffxDispatchDescUpscale on the ffx-api route, the upscaler's memory query after the vendor
answered OK. The detours consult one process-local flag the watchdog copies from FlControlBlock.advancedRequested;
with it at 0 nothing more is read and region 5 is never written.

"On" is a request, not a 1: a value no session of the ring used before. The watchdog starts its summaries afresh at
a request it has not seen and names it in every publication (FlAdvancedState.request, the word that was reserved0);
ShmRingReader.AdvancedState returns only a publication that names its own. A second session of a game that kept
running no longer reads the first one's ranges and counts.

tools/overlay-fields-check.ps1 (build.ps1 gate): every member read is on tools/overlay-allowed-fields.txt and every
name there is read; no alias; no listed member read elsewhere in the Overlay or the Vulkan layer; a camera's
position, axes and matrices named nowhere, whatever the list says; sl::Constants and the frame-generation prepare
descriptor never copied or measured.

Measured (the header's functions, the Overlay's flags, 20 M calls x 3): +22.3-23.2 ns per ffx UPSCALE dispatch,
+9.5-11.7 ns per evaluation that chains DLSSOptions, +4.3-6.1 ns per memory query while asked; inside the bench's
noise when not asked.

ctest 33/33 (fl_adv_fields; fl_guard: every byte of region 5 zero until asked on a target that sends everything,
the exact values when asked, untouched after an off, a count that starts again at the next request).

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 18:08:34 +00:00
poli0981andClaude Fable 5.2 3a4765ef55 docs(advanced): train B planned - three releases, the struct-version table from the upstream tags, the Agent's cost measured in a real session and NFR-2 amended to 2.5 % (Advanced B PR-1, D110-D117) (#395)
Train B (what only a hooked game can say) is three releases: beta.40 more fields of calls already hooked and no new
patch site; beta.41 slSetConstants + ffxConfigure; beta.42 slGetFeatureVersion + slGetFeatureRequirements. Inside the
game too, off means nothing more is read. docs/17_HOOK_ENGINE.md gains which struct version carries which field,
compared across sixteen Streamline and ten FidelityFX tags. tools/agent-cost.ps1 measures the shipped Agent in a
session: 1.93 % of one core off, 2.04 % on; the owner amended NFR-2 to 2.5 %. HANDOFF records beta.39's release facts.
ShmDrainIntegrationTests waits Init out and prints the guard's verdict.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 16:58:01 +00:00
poli0981andClaude Fable 5.2 42fb21bb18 feat(telemetry): the NVAPI bridge's ABI 3 - the reads "Advanced metrics" needs, measured on an RTX 5080, mapped to the catalog; and "never a setter" as a build gate (Advanced PR-2, D101/D104/D108) (#388)
FrameLedger.NvapiBridge.dll - loaded by the Agent into its own process,
never into a game - gains five reads. Nothing composes them yet: no Agent
code calls the reader, so no behaviour changes.

- Native (fl_nvapi_bridge.h/.cpp, ABI 3, additive): FlNvReadFacts (the
  card's type, bus, PCI ids, VBIOS, architecture, core counts, base and
  boost clocks, memory sizes, the driver's package, the chipset),
  FlNvReadLive (free video memory with evictions and promotions, the
  frame-buffer / video / bus utilisation, video clock, P-state, board and
  power-supply temperatures, the throttle word, encoder statistics),
  FlNvReadDisplays (HDR formats and luminances, variable refresh,
  adaptive sync per connected display), FlNvSessionDisplay (one display's
  variable-refresh state and one process's colour space) and
  FlNvProfileSettings (every setting of the global profile, or what a
  game's own profile sets). Each struct carries its size and a present
  mask; a clear bit is N/A, never 0. No ABI 2 struct changed size, and
  FL_NV_FIELD_VRAM stays clear, so which layer fills vram_adapter does
  not change.
- No identifier has an entry point (D104): no board serial, unique id,
  EDID, or list of encoding programs. A display is passed on by its place
  in the list, never by NVAPI's handle.
- tools/nvapi-readonly-check.ps1 (D108), wired into build.ps1: every
  NvAPI_* call of the bridge's source is on tools/nvapi-allowed-calls.txt
  and every name there is called - forty-four - and a name that sets,
  saves, restores, registers or controls, or returns an identifier, is red
  even when the list names it. Seventeen self-test cases, both directions;
  the self-test caught two holes in the rule as first written.
- Managed: mirrors of the five structs, INvapiAdvancedBridge (a port of
  its own; a DLL that predates ABI 3 answers Unavailable, never throws),
  NvapiAdvancedReader (the structs become the catalog's facts and
  readings - every nvapi. entry of the Agent's reach and no other, held
  in both directions) and Application.Advanced's value model: a fact is a
  number, the vendor's words, our own tokens the App will translate, or
  rows; one that was not read is absent.
- Measured the day it was written (ctest fl_nvapi_bridge, AVAILABLE
  branch, RTX 5080): all twenty facts answer; eight of ten live groups -
  the card has no board or power-supply temperature sensor; the display
  answers its four groups; the global profile lists 24 settings.
  20_OPEN_QUESTIONS M12 is half answered, with what is still open.
- The vendored nvapi.h misspells NV_ENCODER_STATISTICS_VER; the bridge
  names NV_ENCODER_STATISTICS_VER1.
- Fixed from #387: Qodana's one result, a redundant "!" in
  AdvancedMetricCatalogTests.
- docs: 18_GPU_VENDOR_APIS (ABI 3, the gate), 12_BUILD (gate 14e),
  CLAUDE.md, CHANGELOG.

Hook overhead: not applicable - nothing in code loaded into a game
changes (Overlay, VkLayer, Shm, Injector untouched).

Gate on the dev box: all passed in 301 s (native 32/32).

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 08:30:54 +00:00
poli0981andClaude Opus 5.5 fad7b84075 feat: the accessibility statement - ACCESSIBILITY.md under Help > Accessibility and on the wiki, the Accessibility problem form and its label, the documents corrected (D88) (beta.35 PR-1) (#366)
ACCESSIBILITY.md states WCAG 2.2 AA through WCAG2ICT as a goal and never a claim, what works with the keyboard
alone, a screen reader, a contrast theme or Magnifier, how it is checked (the owner's pass of 2026-11-09 on
beta.34 and alpha.3), the known limits with what to do instead, and how a barrier is reported and handled - by
severity, no promised times. Embedded and shown under Help > Accessibility and after Limitations in the guide's
window; a wiki page of its own.

The Accessibility problem issue form, a user-interface section in the PR template, and the labels accessibility,
safety and priority-high - the last two named by the Safety gap form since 2026-08-02 and never existing.

Documents corrected: charts take focus and ScottPlot's keys (ChartKeyboardTests measures it; 08_UI said
neither); the database-maintenance live region announces nothing; the Narrator gap is the owner's pass now;
20_OPEN_QUESTIONS G's accessibility row closed; NFR-9 widened (D88-D91); LIMITATIONS gains an Accessibility
section and loses its one struck sentence, which a screen reader reads as current.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 03:51:44 +00:00
poli0981andClaude Opus 5.5 6ba6a41cea feat: games from the Xbox app and the Microsoft Store - the GDK library, a package root as an install-root boundary, the xbox platform rule, the game's own art; Privacy 2.13 (D77-D81) (beta.33 PR-1) (#351)
* docs(spike-notes): §25 - the Xbox/GDK titles' layout, read-only, and the launch probe's decision table, written before the run (D77) (beta.33 PR-1)

The owner's 11 GDK packages under C:\XboxGames and D:\xbox, read without launching anything: the .GamingRoot files,
MicrosoftGame.config / appxmanifest.xml, the WindowsApps junction chain, and the executables refusing FILE_READ_DATA
and FILE_EXECUTE to every process outside their package. Then the probe's method and the table that decides what each
outcome changes - committed before the probe runs, as the house rule asks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(spike-notes): §25's run - six GDK titles activated through their packages; the image paths, the chains, the tokens, the mitigations, and what a start by path really does (D77, D80) (beta.33 PR-1)

The image path and the loader's main-module path are both the Content spelling on every process of every chain; no
chain member the guard's rights cannot open; no fuzzy-fragment module; full trust, not an AppContainer, medium
integrity; none of the four mitigations. And CreateProcess by path is not error 5, as assumed: the package's launch
executable is replaced by an unpackaged gamelaunchhelper.exe that activates the package (the game is never the
caller's process nor its descendant), and an Unreal shipping executable runs outside its package. D80 stands on those
two measured grounds; the read-only claim is struck and dated in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: games from the Xbox app and the Microsoft Store - the GDK library, a package root as an install-root boundary for the guard and detection, the xbox platform rule (root_file, rules 2026.11.1), the game's own art; Privacy 2.13 (D77-D81) (beta.33 PR-1)

The import gains a fifth store, `xbox`: each ready drive's .GamingRoot names the games folders, each
<Game>\Content\ holding MicrosoftGame.config beside appxmanifest.xml is a GDK package (read with DTDs prohibited),
and Windows' appmodel calls (PackageFamilyNameFromId, GetPackagesByPackageFamily) say whether it is installed for
this user. The record: the family name as the store id, Content as the install folder (the spelling the game's own
process reports, spike-notes section 25), the AUMID as the launch key; ExecutableLocator picks the process that
draws, never gamelaunchhelper.exe.

Safety: no install-root boundary matched the Xbox layout, so check 4 walked only an Unreal title's
Binaries\WinGDK. A GDK package root is now a boundary for InstallRoot and the native ResolveInstallRoot alike, asked
only where no store boundary matched (it can only widen the walk); GamesInstalled joins the native list; one case
list, tests/fixtures/install-roots/cases.txt, is read by Catch2 and xUnit both.

Detection: an `xbox` platform first in the array (a GDK FINAL FANTASY ships steam_api64.dll), decided by a new
root_file signal from the install root's own listing, so a deep walk that ran short cannot make it Unknown. Art: the
square logo and the splash image the package names, from inside the package root only. games.platform's vocabulary
gains xbox; the importer's fake repository now validates as the real one does. Privacy Policy 2.13 with the wording
approved with the plan; TRADEMARKS, 02_SPEC, 15_ROADMAP, 05/06/08/19/20, README, LIMITATIONS and the guide follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 05:10:52 +00:00
poli0981andClaude Opus 5.5 648e9c28b1 build: the alpha line - RELEASE_LINE stamped into every assembly, release.yml's line-vs-tag rule and Velopack alpha channel, CI on the alpha branch, no wiki for an alpha (D73) (beta.32 PR-1) (#344)
The owner, 2026-10-31: an alpha build where new .NET versions are tried, .NET 11 RC3 / C# 15 first,
with an experimental-build warning (owner decisions D73-D76, asked while planning). This is the
plumbing on main; it changes nothing in a beta.

- RELEASE_LINE (main | alpha), read like VERSION by Directory.Build.props, stamped as the
  FrameLedger.ReleaseLine assembly metadata; any other value is a build error. Shared.BuildLine
  reads it back for composition (BuildLineTests, AssemblyIdentityTests).
- release.yml: the version gate reads RELEASE_LINE - the alpha line takes vX.Y.Z-alpha.N and
  nothing else, no other line may carry an -alpha. tag; an alpha's vpk download and pack take
  --channel alpha (feed releases.alpha.json, asset names from assets.<channel>.json); the main
  line's pack command is unchanged. An alpha's release is titled "(experimental alpha)".
- ci.yml: also on pushes to alpha; no sonarcloud job and no Changelog step for pull requests into
  alpha. wiki.yml: no publish after an -alpha. tag.
- tools/fps-impact-runbook.ps1: the Agent path no longer names a TFM.
- Docs: 12_BUILD §The alpha line, 13_CI_CD §The alpha line (+ ci/release/wiki sections, branch
  policy), 11_UPDATER §Channels corrected in place (the alpha line uses Velopack channels;
  GithubSource reads the newest ten releases, hence one alpha per beta), 20_OPEN_QUESTIONS §G
  "The main line's .NET" with its decision table written first, CLAUDE.md, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:58:38 +00:00
poli0981andClaude Opus 5.5 6b9330cb67 deps: the .NET 10.0.14 servicing packages and the updates beta.30 left - Markdig 1.5.0, CsWin32 0.3.367, Meziantou 3.0.317, coverlet.collector 10.1.0, Catch2 3.16.1 (D72) (beta.31 PR-1) (#342)
The owner, after beta.30: "làm thêm bản beta 31 với các deps còn lại (.net 10.0.14) và 1 số thư viện khác" - inside
Dependabot's seven-day cooldown on purpose (owner decision D72).

- Microsoft.Extensions.Hosting, Microsoft.Data.Sqlite, System.Diagnostics.EventLog 10.0.14 (Microsoft.Data.Sqlite
  10.0.14 still declares SQLitePCLRaw 2.1.13).
- Markdig 1.5.0: license.txt at the packaged commit 9900e46e is byte-identical; the override's header names it.
- CsWin32 0.3.367 and Meziantou.Analyzer 3.0.317: the build is warning-free as it was, nothing to change.
- coverlet.collector 10.1.0: NoSecondMatcherTests leaves out the Coverlet.* types the collector injects into each
  instrumented assembly (a constant reflection cannot read; not ours) - the reason it stayed at 10.0.1 in beta.29.
  Passes with coverage collected as CI collects it.
- Catch2 3.16.1 (native tests): clean under /W4 /WX with the /EHsc fix kept; 32 of 32 suites pass.
- legal/licenses/nuget regenerated; 13_CI_CD §Dependabot, CLAUDE.md, 08_UI.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:56:29 +00:00
poli0981andClaude Opus 5.5 517ef136f8 deps: Velopack and vpk 1.2.161 (D71), Markdig 1.4.2, and the SQLitePCLRaw pin dropped - Microsoft.Data.Sqlite's own 2.1.13 again; what was not taken and why (beta.30 PR-3) (#340)
- Velopack 1.2.0 -> 1.2.161 (Directory.Packages.props) with vpk 1.2.161 (release.yml) - the owner's decision D71, item
  24(d)'s Velopack half; never 1.2.158 (NuGet-deprecated). The five private fields VelopackHooksTests reads are there.
- Markdig 1.4.0 -> 1.4.2 (parser fixes); license.txt at the packaged commit 6a410393 is byte-identical to 1.4.0's, the
  reviewed override's header names the new commit.
- SQLitePCLRaw.bundle_e_sqlite3 3.0.5 transitive pin dropped: its own comment said to drop it once
  Microsoft.Data.Sqlite resolved a patched version (10.0.13 declares 2.1.13), and it had put a package built against
  the 2.x line on SQLitePCLRaw 3.x - a cross-major resolution NuGet does not report. The engine is SQLite 3.53.3
  (3.53.4 under the pin; read from the native libraries), above every floor the ledger needs.
- legal/licenses/nuget regenerated by license-gather (78 packages); THIRD_PARTY_NOTICES names the engine's package.
- Not taken, with reasons (13_CI_CD §Dependabot): the 10.0.14 servicing packages (a day old; the Brotli fix is the
  runtime's), Markdig 1.5.0, CsWin32 0.3.366/0.3.367, coverlet.collector 10.1.0, FluentAssertions 8.
- Docs: CLAUDE.md, 08_UI, 11_UPDATER, 13_CI_CD, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:18:23 +00:00
poli0981andClaude Opus 5.5 985decfdc6 docs: 20_OPEN_QUESTIONS keeps its open entries and spike-notes becomes the index of its sections - the resolved and measured moved verbatim (beta.24 PR-5) (#320)
Owner request 2026-10-19 (decision D66), second half of the split.

- docs/20_OPEN_QUESTIONS.md (4,467 -> 2,008 lines) keeps its rules (the "A ✅
  entry is closed" rule gains a dated amendment naming where), the scope
  decisions, §S24 and every entry §S24 does not mark resolved. The 26 S and 4 H
  entries it marks resolved moved, in order, to docs/open-questions/closed-s.md
  and closed-h.md; a table at the end of each series lists them. S12's heading
  says ✅ but §S24 says 🅓 (deferred): it stays.
- docs/spike-notes.md (2,816 -> 47 lines) is the title, the intro and the index
  of its 24 sections (§Environment, §0-§21, §Exit criteria), each moved to its
  own file under docs/spike-notes/, with the convention for a new measurement.
- tools/docs-split-check.ps1 holds both indexes to their folders (11 self-test
  cases). PR template, fps-impact-runbook's message, CLAUDE.md, docs/README and
  12_BUILD name the parts.

Proof: a script rebuilt both originals byte for byte from the parts against the
base commit (the original supplies the heading order only); docs-split-check,
wiki-check, notice-check and the App's document tests pass.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:47:55 +07:00
poli0981andClaude Opus 5.5 237971ef59 docs: CHANGELOG and HANDOFF split into parts, moved verbatim - each original stays as the index, release-notes reads the version's own file, a gate keeps them in step (beta.24 PR-4) (#319)
Owner request 2026-10-19 (decision D66): the long documents split.

- CHANGELOG.md keeps its header (with a dated note), [Unreleased] and a
  Releases table; each released section moved to docs/changelog/<version>.md
  (23 files) and the ledger kept before the first tag to five parts under
  docs/changelog/ledger-before-0.1.0-beta.1/, cut at ### boundaries. 6,130 ->
  107 lines.
- docs/HANDOFF.md keeps the rule, a "How this file is split" table that
  resolves every cited section (§P2, §P3, §P4, §Traps, §2b, §beta.N, items),
  START HERE, the open owner-only items, a Decisions index (D1-D61) and
  "Keeping this file honest" with the convention for each release. The P0
  queue, P2-P4 and every train beta.3-beta.22 moved to docs/handoff/history/,
  the passed owner-only items (3, 12, 14-19) to docs/handoff/owner-only-passed.md,
  the corrections and traps to docs/handoff/traps.md. 2,844 -> 299 lines.
- tools/release-notes.ps1 reads docs/changelog/<version>.md when it exists,
  CHANGELOG.md otherwise; three new self-test cases.
- tools/docs-split-check.ps1 (new gate, nine self-test cases both ways): no
  released section left in CHANGELOG.md, one own heading and no relative link
  per release file, and both indexes name their files and vice versa.
- 12_BUILD, 13_CI_CD, CLAUDE.md, README, docs/README, wiki/Releasing,
  wiki/Developers and wiki/Developer-glossary name the split.

Proof: a script rebuilt both originals from the parts byte for byte (CHANGELOG
6,130 lines, HANDOFF 2,844); release-notes output for all 23 versions matches
the SHA-256 baseline taken before the split; wiki-check, notice-check and the
App's document tests pass.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:34:22 +07:00
poli0981andClaude Opus 5.5 1d0e8407bd fix(release): the natives carry the clean checkout's build id - read before the date substitution, handed to CMake, read back out of the binaries (beta.18 PR-3) (#288)
The chip from beta.17, open since beta.4 (HANDOFF §0.1.0-beta.4, "Found and NOT fixed"): the owner's Dashboard read
"Overlay build v0.1.0-beta.17-dirty", and beta.16's the same. The release run's own log says why:
"RELEASE_DATE = 2026-10-07 in 3 file(s)" and, 22 s later, "FL_BUILD_ID = v0.1.0-beta.17-dirty". release.yml writes the
release date into the tracked legal/*.md before the gate, and CMake's configure reads `git describe --dirty` after it.
CI's own checkout is clean (main's last run: "FL_BUILD_ID = 15b4c6b0ecc1").

- release.yml: a step before the substitution reads describe from the clean checkout (12 digits, as CMake does),
  refuses one that is already dirty or longer than 31 characters, and exports FL_BUILD_ID. After the publish,
  tools/buildid-check.ps1 reads it back out of the four natives that compile it.
- src/native/FrameLedger.Shm/CMakeLists.txt: the environment's FL_BUILD_ID is taken as given, after a check for the
  characters a C string literal carries without escaping; otherwise describe as before. Its comment said a released
  build was exact - "CI configures and builds once from a clean checkout" - corrected in place.
- tools/buildid-check.ps1 (new): looks for the id as the C string it is compiled as (characters + NUL) in each
  binary's bytes; nothing is loaded - loading the Overlay would run its DllMain. -SelfTest, eight cases, both
  directions, runs in the gate (build.ps1 'buildid-check').

Measured here: ./build.ps1 native with FL_BUILD_ID=b18-envtest.1+x_y printed "FL_BUILD_ID = b18-envtest.1+x_y", and
buildid-check over the four built DLLs: "ok - 4 native binaries carry 'b18-envtest.1+x_y'"; with FL_BUILD_ID='bad "id"'
the configure stopped ("holds a character no build id has"). On this branch's own describe (dirty, "+"), the tool
refused the id itself and found it in all four binaries.

Docs: 12_BUILD (§Release-time token substitution; gate 14c), 13_CI_CD (§release.yml), HANDOFF (§0.1.0-beta.4's bullet
struck, dated), CLAUDE.md (tools), wiki Releasing, CHANGELOG [Unreleased].

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:53:00 +07:00
poli0981andClaude Opus 5.5 2c967b3d63 docs(wiki): the developer half of the wiki, built from the repository and published at each release (beta.17 PR-4, D53) (#284)
* docs(guide): the user guide looks things up too - the screens, every setting, troubleshooting, a glossary (beta.17 PR-3, D54)

The owner (2026-10-07): "a complete wiki, concise and easy, split into End-user and Dev". Decided the same day (D54):
the End-user part IS the user guide, one source - shown in the App under Help > User guide and, from PR-4, on the
wiki. Four pages join it after the FAQ, each written from the code it describes (labels, defaults, ranges and messages
read in SettingsPage.xaml, SettingsRegistry, Strings.resx and the view models):

- guide/07-screens.md - the badge and banners, every menu item, Dashboard, Games, a game's page, the session summary,
  Compare, Logs, the tray icon, keyboard and mouse.
- guide/08-settings.md - every setting the Settings page shows, in its order: what it does, its default, and which
  ones the agent reads.
- guide/09-troubleshooting.md - what you see, what it means, what to do: the agent, a game recorded but not measured
  (each "Why:"), N/A figures, "How it ended", updates, the database, the viewer, reporting a problem.
- guide/10-glossary.md - the words the App shows, A to Z.

guide/README.md lists them in the App's order (EmbeddedDocuments.GuidePages). The first run's "Your library" step named
"File > Import library... on the Games page"; File is the main window's menu and the Games page has no import button -
fixed in en/vi/ja (vi names the menu as shown, "Tep").

Tests (GuideDocumentsTests), each shown to bite on a deliberately broken page:
- EveryLinkToASectionNamesAHeadingOfItsPage - every section link, within a page, to another guide page, Limitations or
  a document, against the anchors the App's renderer gives the target (it replaces the one-anchor check);
- TheContentsListThePagesInTheAppsOrder;
- TheSettingsPageOfTheGuideNamesEverySetting - every Settings_*_Label the Settings page binds, in English;
- TheScreensPageOfTheGuideNamesEveryPageAndMenuItem - every Nav_* and Menu_* of the main window.
MarkdownRendererTests counts the guide's twelve pages.

Docs: CLAUDE.md and 08_UI ("eight short English pages" struck, the tests named; the consent dialog's button is "Keep
hooking off", not "Keep it off"), CHANGELOG [Unreleased].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(wiki): the developer half of the wiki, built from the repository and published at each release (beta.17 PR-4, D53)

The owner (2026-10-07): "a complete wiki, concise and easy, split into End-user and Dev". Decided the same day (D53):
the wiki's source lives in the repository and the Wiki tab is a copy, published when a release is made; the End-user
half is the user guide (PR-3, D54). The Wiki tab existed with one placeholder page.

- wiki/: Home (two doors), _Sidebar, and eleven short developer pages - Developers (where to start, where status lives),
  Architecture (a mermaid diagram, the processes, the two tiers, a frame's way to the screen), Repository map, Build and
  test (the gates in one table), Contributor rules (the nine rules in plain words, what will never be built, every
  pull request), Capture pipeline, Metrics (and the display rules), Data and IPC, App UI development (the WPF UI traps,
  this train's two included), Releasing, Developer glossary. Each links to its full document and states no status.
- tools/wiki-build.ps1: names each page (a guide page after its first heading; guide/README.md is User-guide,
  LIMITATIONS.md Limitations), rewrites links between pages to page names and every other repository link to GitHub at
  -Ref, drops each page's first heading, writes _Footer.md naming the ref. Refuses a link to a missing file, folder or
  section, two sources for one page, a page nothing leads to, a sidebar out of the guide's order, a backticked path in a
  wiki/ page that names nothing, and a version written into a wiki/ page. -SelfTest: nine cases, both directions.
- build.ps1: the wiki-check gate after notice-check (self-test, then -Check).
- .github/workflows/wiki.yml: on workflow_run of Release (success, started by a pushed v* tag - a rehearsal never
  publishes) and by hand (ref, publish). Checks out head_sha, links at the tag, uploads the pages, and publishes with
  gh auth setup-git + a clone of <repo>.wiki.git + push HEAD:master, only when something changed. contents: write, since
  the repository's default token is read-only. Separate from release.yml so a wiki failure is never a red release and
  can be re-run.
- Docs: README (the wiki, both halves), docs/README.md (the wiki; "D1...D46" corrected), CONTRIBUTING (where
  documentation lives), CLAUDE.md (wiki/ and wiki-build), 12_BUILD (gate 13d), 13_CI_CD (wiki.yml, five repo-local
  workflows, the owner's wiki-editing setting), CHANGELOG [Unreleased].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:18:43 +00:00
poli0981andClaude Opus 5.5 d565760830 feat(build): every managed binary names FrameLedger and carries the native copyright line; versioninfo-check reads both kinds (beta.14 PR-6, D50) (#269)
Owner request 2026-10-05 ("Thêm Assembly metadata"); D50: company and product "FrameLedger", the copyright the
native FL_COPYRIGHT word for word.

Measured before the change, from the built binaries: FrameLedger.Agent.exe/.dll read Company and Product
"FrameLedger.Agent" and FileDescription "FrameLedger.Agent" (what Task Manager lists); each library its own assembly
name; every managed LegalCopyright was one space; the apphost's OriginalFilename is its assembly's (FrameLedger.dll).
tools/versioninfo-check.ps1 read the five native binaries and nothing else.

- Directory.Build.props: Company, Product, Authors, Copyright, Description (the native blocks' sentence, the Comments
  field), RepositoryUrl (stamped as AssemblyMetadata by the SDK); the FrameLedgerSourceRef metadata moved here from the
  App csproj, and release.yml passes the same ref to the Agent's publish.
- App: AssemblyTitle "FrameLedger" and a Description. Agent: AssemblyTitle "FrameLedger Agent" and a Description.
- versioninfo-check.ps1: the rules in one function over a block, a managed half (-ManagedDir, -ExpectedProductVersion -
  required, -ManagedOnly), one LegalCopyright across every binary read, the apphost carrying its assembly's block,
  Company as well as Product = FrameLedger, and -SelfTest: ten cases, nine RED, each for the reason it names (four
  mutations of the rules each turn the self-test red). build.ps1 runs the self-test and both halves (the managed half
  alone under -SkipNative); release.yml reads out/app with the tag's version.
- AssemblyIdentityTests (App, Agent): company, product, copyright = FL_COPYRIGHT parsed from CMakeLists.txt,
  description, RepositoryUrl = IssueLink.Repository, and the Win32 block Explorer shows. Red on the source before.

Docs: 12_BUILD (Identity table, the gate, the publish lines), 13_CI_CD, 19_SAFETY, FORKING (what a fork changes),
CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 04:33:07 +07:00
poli0981andClaude Opus 5.5 63808a3821 docs: about a hundred statements the code contradicted, corrected in place with dated notes; a developer index; the Logs page reads the Agent's lines; a Settings switch that did nothing removed (D46, beta.12 PR-6) (#258)
Four audits read docs 01-20, HANDOFF, CLAUDE.md and FORKING against the
code. Every stale statement is struck and followed by a dated correction,
the repository's own convention (D46); history stays as it stood.

The largest classes: a rules feed that does not exist (05, 11, 13, 19, 02
FR-7.3, the rules file's own $comment, the rules workflow's header -
rules reach a user with a release); hooks that were never built (01's
diagram, 17's XeSS row and detour count, 03's fgEvaluations sources); the
in-game watchdog described as reading two numbers and sleeping (17; the
Disclaimer was fixed in PR-5); the unhook path and the vtable-swap advice
(17); L1 never pointed at the game's adapter (18); pre-release steps that
would bump VERSION (13, CHANGELOG header); the Legal Gate's row count (08);
the logging configuration of the two processes (10); a delta package never
published (11, 14); missing 0009/0013 migration entries and a duplicated
0002 paragraph (06); closed items still marked open, and S23-3 marked
deferred while the refusal UI shipped without it (20); the stale START HERE
(HANDOFF); the layout, tools and static-analysis lines (CLAUDE.md); three
names a fork must also change (FORKING). docs/README.md is a new index.

Code found by the same audits:
- LogTail.LevelOf read only the App's "[HH:mm:ss.fff LVL]" prefix, so the
  Logs page's Warning and Error filters showed no Agent line; the Agent
  writes Serilog's default template, a date first. Both are read, with a
  strict timestamp shape; the test that fed App-form lines into the fake
  Agent log now uses the real form.
- Settings' "Record games launched outside FrameLedger" wrote
  capture.background, which no Agent code read, and the App cannot start a
  game, so "off" could only mean recording nothing. The switch and its two
  strings (en/vi/ja) are removed; the key stays reserved, AgentReads false.
- Comments that said what is not so: the sparkline, the flyout,
  VulkanLayerRegistered "false by construction", two self-test counts, the
  sensor blobs' nominal Hz, SessionRowColumns' missing generator.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:29:49 +07:00
poli0981andClaude Opus 5.5 ca2275ce85 feat(app): documents rendered, not raw Markdown - the Legal Gate, Help > Limitations, the update notes and a tabbed About with the program's legal notices; links open this version's documents (owner request 4, D45, beta.12 PR-4) (#256)
- Markdown/MarkdownRenderer: Markdig 1.4.0 (BSD-2-Clause) into a themed WPF FlowDocument - headings with GitHub
  anchors, emphasis, strikethrough, code, quotes, nested and numbered lists, pipe tables, rules, links. HTML is off
  (shown as text), no image is fetched (its description stands in), an unknown node is shown as its source text. The
  GPL is shown as written, monospace.
- Controls/MarkdownView (FlowDocumentScrollViewer: selectable, Ctrl+C, zoom) and Markdown/MarkdownLinks: http, https and
  mailto through IUrlOpener, #section scrolls, a relative path resolves against the document's place in the repository
  and opens in the App when the window holds that page; file:, javascript:, drive and UNC paths are never followed.
- Services/RepositoryLinks: release.yml stamps -p:FrameLedgerSourceRef (the tag; a rehearsal's commit) as assembly
  metadata, so every link into the repository opens this version's documents instead of main's.
- The Legal Gate renders its documents (a link to another document opens it in the gate; View on GitHub goes through
  IUrlOpener); Help > Limitations is Windows/DocumentWindow; Help > About is Windows/AboutWindow - This app (the
  Appropriate Legal Notices: copyright, no warranty, the licence with the NOTICE terms, this version's source),
  Third-party licences (THIRD_PARTY_NOTICES and the package index, the licences folder), Legal documents (EULA, GPL,
  Disclaimer, Privacy, NOTICE, Trademarks). The update notes are rendered.
- Licences: tools/license-gather.ps1 takes a reviewed override for an expression it has no text for (sixteen self-test
  cases); tools/license-overrides/Markdig.txt; legal/licenses/nuget (78 packages); a THIRD_PARTY_NOTICES row, and its
  "About -> Third-party tab" item ticked. The table there had a note line between its rows, which ended it for Markdig;
  the note is below the table now.
- Strings: 22 new keys, 2 removed, en/vi/ja (ja marked review).
- Tests: MarkdownRendererTests (each construct; nothing dropped and no table left as source, for all nine embedded
  documents), MarkdownLinksTests, DocumentWindowsTests, the first-run opener, the legal documents' paths.
- Docs: 08_UI, 11_UPDATER, 16_WPFUI_SYNTAX (FlowDocument), 12_BUILD, 20_OPEN_QUESTIONS, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:22:50 +07:00
poli0981andClaude Opus 5.5 2ce8251d31 feat: the game's own memory, measured from outside the game in every session - a C++ reader of the GPU Process Memory counters and GetProcessMemoryInfo, median and mean, schema 0018 (D43, beta.12 PR-2) (#254)
- FrameLedger.ProcessStats.dll (C++20, loaded by the Agent, never into a game): the game process's dedicated and shared
  GPU memory from the documented `GPU Process Memory` performance counters (no handle to the game, every instance of the
  pid summed) and its private working set / working set / commit from GetProcessMemoryInfo (EX2, falling back to EX)
  through PROCESS_QUERY_LIMITED_INFORMATION only (a sentinel refuses an EX2 answer whose private working set was not
  filled). Not D3DKMTQueryStatistics ("Reserved for system use").
  ctest fl_process_stats (GPU_INSTANCE on a hardware adapter, NO_GPU_INSTANCE on CI) and fl-probe-processstats.
- Measured first, decision table in spike-notes §16 written before the runs: +512.0 MiB for a 512 MiB buffer,
  private working set equal to Windows' own counter, 0.1 ms per read, nothing leaked over 600 reads; dedicated reads a
  constant 4.5 MiB above DXGI's local usage, so it is never compared with a budget.
- NativeProcessStats (third facade), GameMemoryReader: a pinned session reads through its held handle; an unpinned
  Tier-2 hold opens each process of the executable for the read, refuses a reused pid, sums. CaptureSession tells the
  observer which process (ICaptureObserver.Measuring), the recorder forwards it to the poller (ITelemetryPoller.Follow).
- TelemetrySample.Game; five sensor series; schema 0018 (game_vram_dedicated_*, game_ram_private_*, ..., sensor_stats_json);
  SeriesAggregates gains Median and Min; a wide .partial sensors chunk (type 8) with type 4 still read; SessionProgress
  and SessionHeld carry the game's memory live.
- notice-check accepts a contributor's own copyright line in the same form.
- Tests: the two classes that open a LibreHardwareMonitor Computer run one at a time - GenericCpu.Update threw a
  NullReferenceException in the local gate when they ran in parallel (the Agent's own read is already contained).
- Docs corrected in place: 03_METRICS, 18_GPU_VENDOR_APIS, 17_HOOK_ENGINE, 20_OPEN_QUESTIONS (§M7, §H10, new §M11),
  04_CAPTURE, 19_SAFETY, 06_DATA_MODEL, 07_IPC, 02_SPEC, 01_ARCHITECTURE, 12_BUILD, CLAUDE.md; the accuracy block and
  LIMITATIONS.md.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:21:45 +07:00
poli0981andClaude Opus 5.5 ff949afc6f feat(legal): NOTICE with the GPLv3 section 7 additional terms, the licence header in every source file, and the documents for people who build, contribute or redistribute (D45, beta.12 PR-1) (#253)
- NOTICE: copyright, GPL-3.0-only, and three additional terms of the kinds section 7 permits - (b) preserve the
  notices and the attribution in the program's legal notices, (c) mark a modified version as different and do not
  call it "FrameLedger" alone, (e) no trademark rights in the name. Shipped as licenses\NOTICE.txt; release.yml
  refuses a published tree without it.
- Section 7 wants additional terms named in the source files: every first-party .cs .cpp .h .inl .ps1 .xaml file
  (1,053; src/native/third_party excluded) opens with the SPDX line and a pointer to NOTICE. tools/notice-check.ps1
  is the gate (six self-test cases, both directions; -Fix writes a missing header) and tools/resx-gen.ps1 generates
  the string accessors with the header.
- The native VERSIONINFO LegalCopyright said GPL-3.0-or-later; it now names the real licence.
- CONTRIBUTING.md, FORKING.md, CODE_OF_CONDUCT.md (Contributor Covenant 2.1 by reference), legal/TRADEMARKS.md.
- 12_BUILD gate list, CLAUDE.md layout and conventions.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:16:00 +07:00
poli0981andClaude Opus 5.5 7ad1519a4c feat: run the capture agent as administrator - an option off by default, a disclosure, and a UAC prompt at every agent start; games stay standard-user (D34, beta.10) (#244)
* feat: run the capture agent as administrator - an option off by default, a disclosure, and a UAC prompt at every agent start; games stay standard-user (D34, beta.10)

The owner asked for a Settings option, off by default, to let the Agent run with administrator rights. Owner decision D34
(2026-09-27): Windows is asked at EVERY Agent start - by the App, or by the logon task's Agent - with no silent path, and
games started from an elevated Agent must not run elevated.

- Setting capture.run_elevated (registry, Agent-read), read BEFORE the Agent exists by Infrastructure.Startup's
  RunElevatedSetting: one row, PRAGMA query_only, no version gate (the first start after an update meets an older
  schema), anything but "1" is off.
- App: AgentLauncher asks through a UAC prompt owned by the main window (ShellHost.Handle) and starts the Agent with
  --serve --for-user <SID>; declined or failed, it starts the standard user's Agent with --elevation <outcome>; an
  elevated Agent that exits 11 (another account answered) makes it start standard-user Agents until the App restarts.
  With the option off and the App elevated, the Agent gets the desktop shell's token. The connection shows
  AgentConnectionState.Elevating while the prompt waits.
- Agent: --serve takes at most one of --for-user <SID> (refuses to run as another account: exit 11, before anything is
  claimed or written) or --elevation declined|other-account|failed. A plain --serve with the option on and no elevation
  (the logon task's) holds the folder's ElevationMarker, asks Windows once (taskbar prompt), and hands over to the
  elevated Agent once it has claimed the folder - or serves as before and says why. HelloAck.ElevationOutcome carries
  the answer; an elevated Agent logs its enabled privileges.
- Games: ProcessLauncher in an elevated Agent starts the game with the shell's token (UnelevatedProcess: GetShellWindow,
  the token duplicated, CreateProcessWithTokenW, the kill switch's explicit environment) and refuses with error 1400
  rather than start it elevated. LaunchGame is reachable by any process of the user; an elevated launch would be a
  silent elevation.
- Locks: the ledger's migration lock is a SharedMutex with a stated DACL (owner the user; user, Administrators, SYSTEM),
  so an elevated creator no longer locks the unelevated App out; the elevation marker keeps two prompts from racing.
- Privileges: nothing enables one. TokenPrivileges reads them; chokepoint-check forbids AdjustTokenPrivileges,
  RtlAdjustPrivilege, EnterDebugMode and SeDebugPrivilege under src/ (canary checked); PrivilegeFootprintTests asserts on
  the elevated CI runner that the resolver and LibreHardwareMonitor's CPU group enable none.
- Settings: "Run the agent as administrator" with the versioned disclosure (Shared Safety_AdminMode_*, agent-admin-dialog/1;
  ja = the English pending review, vi translated), then a restart over the pipe - never under a running session - and the
  elevation line says why a standard user's Agent is one. Safety_Refused_TargetUnreadable names the mode.
- Updater: the apply also waits for the data folder's instance lock to be let go; an Agent holding it without answering
  is never updated under.
- Tests: setting reader (no ledger, no table, "1"/"0"), marker, account check, SharedMutex SDDL + wait/release,
  environment block, shell-token start (elevated runs only), privilege footprint, CLI surface, Settings toggle
  (declined writes nothing; accepted writes, stops, retries; a running session defers), elevation words, Elevating pill,
  launcher marker, updater held-folder cases.
- Docs: 01_ARCHITECTURE ADR-9, 19_SAFETY elevated targets, 20_OPEN_QUESTIONS G (closed: chosen, not inherited),
  06_DATA_MODEL settings, 02_SPEC FR-10, 12_BUILD flags, 07_IPC (HelloAck, prompts, stated DACLs), 08_UI Settings,
  11_UPDATER, 18_GPU_VENDOR_APIS, 04_CAPTURE launch; CHANGELOG.

No hook-path change: the Overlay is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: the admin mode's two tests as the hosted runner measured them - a variable keeps the process's own name casing, and the runner's token arrives with SeDebugPrivilege on

CI on #244 (run 36332900944) failed two of the new tests, both on facts of the hosted runner rather than of the code:

- The environment block keeps an existing variable's own casing ("Path" there, "PATH" on the dev box) when the caller
  overrides it - Windows compares names without case, so the value replaces it rather than standing beside it. The
  test now finds the one PATH entry case-insensitively and checks its value.
- The runner's token ARRIVES with SeDebugPrivilege enabled (an administrator's service), so "nothing enabled before
  anything ran" was false there. The footprint test now asserts that nothing it runs NEWLY enables a powerful
  privilege, and names what was already on in its message.

The third failure of that run, TargetResolverTests.OneInstanceResolves (TargetNotRunning), is the hosted-runner flake
the test's own comment records from 2026-09-04; this PR does not touch the resolver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 23:49:16 +07:00
poli0981andClaude Opus 5.5 32fdcf82f3 feat(detection): the exact Unreal Engine version from the shipping executable, and the witness it rests on (beta.10) (#241)
The owner asked for the exact Unreal Engine version on a game's page. The rule could not give one: it read only the
executable's ProductVersion string, which most shipping executables leave empty, and its pattern
`\+\+UE(4|5)\+Release-(\d+\.\d+)` had two capture groups of which the evaluator returns the first - so every Unreal
version ever stored was a bare "4" or "5".

Measured first, read-only, on the owner's ten installed Unreal titles: the numeric file version is the engine's in seven,
a studio's own in three; the engine's branch name (UTF-16 `++UE5+Release-5.1`) is in the bytes of five - in .rdata in
four, 290 MB into .code in Black Myth: Wukong's protected executable (whose .rdata is 8 KB).

- Domain: UnrealVersion.Decide weighs the two witnesses (branch + agreeing file version -> M.m.p; branch alone -> M.m;
  a file version that reads as an engine's where nothing says the studio replaced it -> M.m.p; else nothing), and
  EngineVersionSource names the rung. The ten measured titles are its test cases.
- Rules 2026.09.6: the unreal extractor is `unreal_build` (a fourth oneOf branch in the schema, no parameter);
  StaticGameDetector makes the second read for the one engine that matched, never the probe for every game.
- UnrealBuildReader: the version resource, then the branch name in .rdata (or the whole file, bounded at 1 GiB, when
  .rdata is under 1 MiB), 4 MB chunks with overlap so a cut name is never read short, cancellation between chunks.
  Through the shipped reader on the same ten files: every version as measured, 16 ms to 1.1 s each, 7.5 s for Black
  Myth on the owner's USB drive.
- Schema 0015: games.engine_version_source, written only with a version the row took; the old rule's bare "4"/"5"
  removed only where field_provenance says detected.
- rules-validate: a version pattern must compile and capture exactly one group (canary: the old pattern is red).
- App: the game page's Details say which witness an Unreal version rests on, or that none was found.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 22:14:49 +07:00
poli0981andClaude Opus 5.5 efcee1d08d feat: the game page says what the game's files say - x64 or x86, file and store versions, the DLSS/FSR/XeSS files it ships - and a 32-bit game's hooking cannot be turned on (#230)
Owner request 2026-09-25 (beta.8, item 3: game version, DLSS/FSR versions, 32/64-bit).

- Schema 0011: games.exe_machine / exe_file_version / exe_product_version /
  library_versions, written whole by the detection sweep (DetectionWrite). A NULL
  exe_machine is stale once, so every library entry is read under this build.
- PeImports.ReadArchitecture: the COFF machine and, for .NET, the CLR header's flags
  (Domain.Detection.ExecutableArchitecture: x64 | x86 | arm64 | arm | anycpu |
  anycpu32 | other | unknown) - an AnyCPU assembly carries an I386 machine and runs as
  64-bit unless it prefers or requires 32-bit.
- GameFileProbe: the files a capability rule names, with the numeric version of their
  VS_FIXEDFILEINFO (bounded at 48); RuleEvaluator.NamesFile shares the matcher.
- Known not hookable (x86, anycpu32, arm64, arm): SetHookEnabled answers
  Refused ExecutableNotX64 before anything is scanned or stamped; the sweep turns off
  hooking on a row enabled before this build (hook_autodisabled_reason); the page
  disables the switch with the reason and offers no re-enable. A switch that is on can
  still be turned off.
- App: a Details card (runs as, file/product version, store build labelled with its
  store, engine, shipped libraries), the subtitle says "Steam build 20374416", and the
  session summary lists the runtime libraries (runtime_modules, recorded since P2 and
  shown nowhere) against the copy the game ships.
- Rules 2026.09.5: fsr gains ffx_fsr3*.dll, xess gains libxess_dx11.dll (+ fixture).
- Docs: 05_DETECTION (what the files say about themselves), 06_DATA_MODEL (0011),
  07_IPC (ExecutableNotX64), 08_UI (Details, loaded libraries), HANDOFF traps, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:34:41 +00:00
poli0981andClaude Opus 5.5 79f21422a3 feat(guard): check 3 is live in both halves and seeded; any kernel driver in a game's folder is a finding; the pre-scan sees the install root (#228)
beta.8 PR-2, the owner's strictness decisions of 2026-09-25 (HANDOFF D30, D31).

- Check 3's store half: Sources::StoreIdentity reads the store's own metadata from the install root the guard
  derives itself - the Steam library's appmanifest_*.acf whose installdir is the game's folder, or a GOG
  goggame-<id>.info - so no caller hands in evidence (S3) and nothing is read from the game (rule 4). Matrix: listed
  refuses (BlockedStoreId); no store identity is not refused; unreadable store metadata refuses (PreScanFailed).
- rules 2026.09.4 seeds both per-title lists - 30 Steam app ids, 33 executables across nine families (VAC titles,
  Riot, Roblox, Blizzard, Call of Duty, NetEase, ACE, HoYoverse, EA) - and floors them like the families, so data
  can add a title and never remove one. kMaxTitleRules 64 -> 128 (the floor doubles the worst case). rules-validate
  refuses generic executable names, exact rules without .exe, and duplicates, and checks the 2x capacity.
- The kernel-driver rule: a *.sys file in the install tree that no files entry names is AntiCheatFile under
  "Kernel driver in the game folder". Code, not data; a named entry (randgrid.sys) keeps its own family.
- FlStaticPreScan(gameDirectory) -> FlStaticPreScanGame(exePath), and IAntiCheatGuard.PreScanGameDirectoryAsync ->
  PreScanGameAsync(executablePath): SetHookEnabled passed the exe's own folder and the guard scanned exactly that, so
  an Unreal title's root-level EasyAntiCheat folder was never seen by the enable-time scan. The guard now resolves
  the install root itself and runs check 3 there too. The port keeps four methods.

Tests: native fakes gain the store seam; new cases for the store matrix, the driver rule, the root resolution and
check 3 in the advisory scan; the real seam against a Steam library and a GOG folder built in %TEMP%; the floor
reproduction and the minimal-file test cover the title lists.
Docs: 19_SAFETY checks 3 and 4, the VAC row; 20_OPEN_QUESTIONS S14 closed and the S24 count; 05_DETECTION; HANDOFF
D30/D31 and traps; CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 13:59:28 +00:00
poli0981andClaude Fable 5.1 7c67f4610d fix: the guard override is withdrawn; a finding turns the game's hooking off at session start and at the re-scan (#215)
Owner decision 2026-09-22 (D22). The per-game override of 2026-09-21 is removed entirely: the native
acknowledged entries and reason 28, FlGuardIsJudgement, the SetGuardBypass message, the App's card and
dialog, the session mark and export line, the Safety_Bypass_* strings, and schema 0007's five columns
(0008 drops them). CLAUDE.md rule 2 reads "there is no override" again; Disclaimer 2.5, EULA 1.2.

In its place: an anti-cheat named in the game itself (its process, its title lists, its folder) is written
to the row as the pre-scan always wrote it, now also when the guard finds it at a session's start or at
the 30 s re-scan (AntiCheatVerdict.IsFindingAboutTheGame, CaptureSession.TurnHookingOffAsync). A
machine-wide driver or service refuses that session only. CaptureRefused / SafetyUnhook carry
hookingTurnedOff and the notice says so; capture_notes carry hooking-turned-off=.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 11:14:24 +07:00
poli0981andClaude Fable 5.1 234962f0e7 feat(safety): a per-game "bypass the anti-cheat guard" switch, at the user's own risk (owner decision 2026-09-21) (#209)
The owner asked for a mode that skips the guard behind a warning the user MUST accept first, and chose the per-game
form. CLAUDE.md rule 2 said "There is no override switch. Do not add one"; it is amended with this, and the amendment
is the constraint list below. Rule 3 is untouched: the bypass changes WHETHER FrameLedger injects, never HOW.

What it is. A switch on the game's page, off by default, never global: no setting, no CLI switch, no environment
variable, no field in rules/detection-rules.json (the schema still rejects one). It is a recorded human act - its own
disclosure, accepted by a ticked acknowledgement AND the typed phrase BYPASS, stamped by the Agent with the
disclosure's version (schema 0007: games.guard_bypass_at / _disclosure_version) through IGuardBypassStore, a port of its
own. It is keyed on the executable like consent, and ends when hooking is turned off or the executable changes.

What it overrules: the guard's JUDGEMENT (blocklist matches, the suspicious-module rule, scans that could not look,
unusable rules, the PreviouslyBlocked latch). What it never overrules: the kill switch, a game merely added, a missing
consent, a foreign payload, a 32-bit target, a failed injection, and a Vulkan title the guard refuses.

Native. FlGuardedInjectAcknowledged / FlGuardedInjectWhenReadyAcknowledged live in fl_guard.cpp, the one chokepoint
file. They run EVERY check, verify the payload, use the same LoadLibraryW primitive, and answer
AllowedUnderUserBypass (28) with the family and signal of what was found - never kAllow, so Allowed() stays false for
every caller written before it. IsGuardJudgement is the list; FlGuardIsJudgement exports it for the mirror test.

Managed. AntiCheatVerdict.IsAllowedUnderBypass, asked by name in CaptureSession only. HookRequest gains the fifth
input, built in FromConsent from a stored record that names its disclosure, dropped on a fingerprint mismatch.
HookedCaptureGate checks it after the kill switch, enablement and consent. The port's acknowledged methods DEFAULT to
the hard gate. GuardSupervisor still scans and still ticks under a bypass; a judgement is kept, counted and does not
unhook, a fact still does. SetGuardBypass re-checks everything the App checked; SetHookEnabled under a recorded bypass
still writes the finding and stamps consent beside it.

Afterwards. sessions.guard_bypassed / guard_bypass_family / guard_bypass_signal; the sessions list, the summary, the
CSV header and the JSON export say so. A session recovered from a .partial does not carry the mark (recorded limit).

Docs with it: CLAUDE.md rule 2, 19_SAFETY (the spec), 02_SPEC FR-2.7, 06, 07, 08, 14, 20_OPEN_QUESTIONS, SECURITY.md,
and tools/chokepoint-check.ps1's own description. Safety strings in en/vi; ja ships the English until a reviewer signs.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 18:58:29 +07:00
poli0981andClaude Opus 5 f94687f42f test: the harness's overlay logs leave with the test run that wrote them, and a gate keeps it so (#180)
The injection tests inject the shipped Overlay into hook-harness, and the Overlay logs to the real
%LOCALAPPDATA%\FrameLedger\logs by design (SHGetKnownFolderPath, not the environment, per S21). The owner's folder
held 2506 overlay logs on 2026-09-15, 2492 of them hook-harness's from test runs, beside 14 from real titles.

No switch goes into the injected DLL. Each test binary removes, when its run ends, the logs it caused: an
overlay-*.log created after the run started whose first line names a hook-harness image it owns. Natively a Catch2
listener in guard_test.cpp over src/native/tests/overlay_log_sweep.h (the image must be FL_HARNESS_EXE); in managed
code tests/Shared/HarnessOverlayLogSweep.cs, an xUnit assembly fixture that FrameLedger.DrainFixtures.targets compiles
into every test project staging the harness, with PipeEndToEndTests registering its renamed copy's directory. Parallel
assemblies own different copies, so none removes a log another is about to read, and a game's log is never touched.

tools/test-artifacts-check.ps1 (seven self-test cases) is a new gate step: a hook-harness log created during the gate
and still there fails it, which is what makes a missing sweep red. Existing logs are left for the owner.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 20:33:23 +07:00
poli0981andClaude Opus 5 e149bf251d feat(legal): every NuGet package the App and the Agent ship has its licence text, and the gate keeps it true (P4 PR-6) (#176)
tools/license-gather.ps1 reads the two publish roots' restore output and writes one text per shipped
package into legal/licenses/nuget/ (77 packages; the notices table named about fifteen): the package's
own licence file verbatim, a reviewed override for a URL-only package (Mono.Posix.NETStandard,
OpenTK.GLWpfControl), or MIT under the package's own copyright field / a pointer to the shared
Apache-2.0 and MPL-2.0 texts. Distinct third-party notices are written once. An MPL-2.0 package that
applies Exhibit B is red; the MPL text itself, which carries it as a template, is not.

license-check section 3 runs -Check (regenerate, compare both directions); build.ps1 runs the
fourteen-case self-test first, one case under tr-TR in a child process -- the output was
culture-dependent until file names matched CultureInvariant and ordering became ordinal.

The App's publish carries legal/licenses/ as licenses/; release.yml adds the .NET runtime's licence
and notices from the packs the publish used and asserts the licence files in the published tree.
LHM's three transitive MPL-2.0 packages are recorded Exhibit-B clear from an upstream code search.
The directory is nuget/, not packages/, which .gitignore ignores.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 00:48:56 +07:00
poli0981andClaude Opus 5 1776a22907 feat(app): Velopack, the updater with FR-12 as its shape, release.yml, and one VERSION source (P4 PR-5) (#174)
* feat(app): Velopack, the updater with FR-12 as its shape, release.yml, and one VERSION source (P4 PR-5)

The updater of 11_UPDATER behind an IUpdateClient port (VelopackUpdateClient over Velopack 1.2.0's
GitHub source; stable = releases GitHub does not mark pre-release, beta adds them): the startup silent
check 5 s after start for an installed copy with update.auto_check on, Help > Check for updates with
the dialogs and the six error rows, the background download (a checksum failure retried once), and the
apply -- refused while any session runs, Deferred until the last SessionCompleted, then Shutdown to the
Agent, the connection's relaunch held, the pipe watched until it drops, WaitExitThenApplyUpdates, the
host ended. Program.Main runs VelopackApp first; the uninstall hook stops the Agent, unregisters the
layer, removes the logon task and asks about the data folder.

The package id is FrameLedger.App, not FrameLedger: Velopack installs into and deletes
%LOCALAPPDATA%\<packId>, which with the documented id is the data folder holding ledger.db.

VERSION at the root feeds Directory.Build.props and the native CMake project; versioninfo-check
compares every binary against it. release.yml gates the tag against VERSION and CHANGELOG
(tools/release-notes.ps1), substitutes {{RELEASE_DATE}}, runs the identical gate, publishes, asserts
the published tree, packs, checksums and releases.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(app): the private constant's name, Velopack's copyright as its package states it, and the measured pack

- UpdateService: _idleState (IDE1006, the repository's private-field rule; dotnet format caught it).
- legal/licenses/velopack-MIT.txt and THIRD_PARTY_NOTICES: the copyright line is the package's own
  <copyright> field ("Velopack Ltd."), not a name written from memory.
- 12_BUILD / 13_CI_CD / CHANGELOG: vpk pack 1.2.0 run by hand over the published tree -- Setup 104 MB,
  VelopackApp.Run() verified in Program.Main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 23:56:55 +07:00
poli0981andClaude Fable 5.1 e16185f60e feat(app): the first .resx family with its generator and gate, and the App shell -- Generic Host, FluentWindow, the Agent pill over the pipe, theme + language persisted (P3 PR-2) (#155)
resx: src/FrameLedger.App/Strings.resx + .vi + .ja (65 keys; ja machine-drafted,
marked `review`), tools/resx-gen.ps1 writing the committed Strings.Designer.cs (the
SDK-style WPF project runs no ResXFileCodeGenerator), tools/resx-audit.ps1 as
build.ps1 step 15: -SelfTest (11 fixture cases, 9 red) then live. Per family:
identifier keys, non-empty neutral values, EXACT key sets in vi/ja, Safety_* in ja
marked `safety: human review required` with the English verbatim (that is how "shown
as en until signed" is true by construction) or `safety: reviewed by <name>`, and the
accessor current. No family under src/ is red, not green.

App: Generic Host per 16_WPFUI §App bootstrap; FluentWindow with the Agent pill in
the TitleBar, the Menu row (unbuilt items say so in a snackbar), NavigationView with
Settings in the footer, the offline InfoBar + Retry, SnackbarPresenter,
ContentDialogHost. Theme (Light/Dark/System + SystemThemeWatcher) and language
(rebuilds the shell in the new culture) persisted in `settings` under D16's
ui.theme/ui.language through SqliteSettingsStore -- the App opens ledger.db directly
(06_DATA_MODEL §Writer ownership, D15). Services.AgentConnection is 07_IPC §Client
behavior as a state machine over PipeClient: 8 x 250 ms, start
FrameLedger.Agent.exe --serve beside the App when absent, Hello/GetStatus, keepalive,
the event stream, retry every 5 s. Dashboard shows the Agent card with N/A until
answered; Games/Compare/Logs are empty states. Serilog logs/ui-.log per 10_LOGGING.

Three things 16_WPFUI now records: MainWindow is transient with
ShutdownMode=OnExplicitShutdown and the host lifetime ending the process; the run is
one Task from a synchronous OnStartup (async void overrides are VSTHRD100 here); and
ApplicationThemeManager.Apply(..., updateAccent: true) must precede the first
window's XAML or the accent resources are missing at first Measure (measured:
XamlParseException 'SystemAccentColorPrimary').

tests/FrameLedger.App.Tests (16): every key resolves in en/vi/ja and the satellites
really load; the accessor's keys are the resx's; appearance settings round-trip; the
connection against an in-process PipeServer -- Missing with nothing to start,
Connected on Hello, Starting -> Connected through a launcher that brings the server
up, Offline then Connected again when it returns. First window measured at 1.3 s.

Docs corrected in place: 09_I18N (generator, audit as built, the ja Safety_* rule),
12_BUILD line 15, 13_CI_CD, CLAUDE.md (App is the shell; resx-audit exists),
08_UI §Shell built note, 16_WPFUI deviations + gotcha, 10_LOGGING ui log, HANDOFF
§P3 row 2 struck (Shared's family waits for PR-4 on purpose). CHANGELOG.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 12:45:40 +07:00
poli0981andClaude Fable 5.1 d5c801a516 docs: P3 PR-0 -- the P2 sweep; HANDOFF §P3 START HERE with the slice table and D11-D17; roadmap §P3 takes the full 08_UI (#152)
Docs and tools only, no src/. What PR-G's closing sweep left stale, corrected in
place: coverage-gate.ps1's "empty today" prose (armed since PR-A/C), 13_CI_CD's
"nine" Integration cases (20 across six classes) and its claim that the signer
probe lacks `if: always()` (it has carried it since #137, before the failure the
bullet describes -- why the probe was not read is now recorded as unmeasured),
09_I18N's "two members" (three since PR-F), 17_HOOK_ENGINE's cite of a §H9 that
the P0 spike answered and removed, ci.yml's census comment still promising "the
next PR wires the script" after vulkaninfo.exe read absent twice.

HANDOFF: P2's START HERE struck; §P3 is the head, with the slice order (0, 1,
1b, 2, 2b, 3-9), what makes each fail on unmodified main, and decisions D11-D17
(pipe transport + ACL, commands as one more Channel producer, SessionProgress as
a third ICaptureObserver, Safety_* in Shared with a version in HelloAck, the App
opening ledger.db under 06_DATA_MODEL's writer ownership, the settings registry,
FL_MOCK under --data-dir only). D1/D5/D6/D10 labelled where they were cited by
number; D2/D3 recorded as never assigned. 15_ROADMAP §P3 takes the pipe, i18n,
the Legal Gate, Settings, Logs and the tray from §P4 (owner, 2026-09-13). §G's
threading-model row struck with its pointer.

What P2 still owes is unchanged: spike-notes §14's four slots, all empty, all
the owner's.

./build.ps1 check: exit 0, 30/30 native, 671 managed tests green.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 08:39:30 +00:00
poli0981andClaude Opus 5 9b3f5f5fb3 test(agent): kill-and-recover end to end, the FPS-impact runbook, and P2's closing sweep (P2 PR-G) (#151)
PartialRecoveryEndToEndTests is 14_TESTING's long-standing `.partial` line,
built: the shipped FrameLedger.Agent.exe captures hook-harness with the new
`--console ... --partial-flush-seconds <n>`, the test polls until a flush has
actually landed and the session is past the product's 30 s discard threshold,
Process.Kill's the Agent, and `--console recover` turns the valid prefix into
an `interrupted` row whose frame_count IS that prefix, deletes the file, and
finds nothing on a second pass.

Three things the first version got wrong, kept as comments where they bit:
the two Integration classes ran in parallel and started two harnesses of one
image, which TargetResolver correctly refused as ambiguous (they now share an
xUnit collection); PartialSessionFile.Read cannot open a file a live Agent
holds, so the test reads the bytes with FileShare.ReadWrite and calls the same
Parse; and a 2.5 s prefix was DISCARDED by recovery, correctly -- the test
waits the threshold out rather than adding a knob to shrink it.

--partial-flush-seconds is under --console only and pinned by
AgentCommandLineSurfaceTests beside the others: it bounds how often a running
session writes its own crash-recovery file and names nothing about injection.

tools/fps-impact-runbook.ps1 (dev-only, never in build.ps1 check) sequences
14_TESTING item 2's six launches -- consent granted for the ON leg, revoked
for the OFF leg, the same launch path both times so the only difference is
the injection -- reads the Agent's CPU and RSS itself, prompts for the game's
own benchmark average, and prints the spike-notes block. It does not measure
FPS and says so first: FrameLedger's frame times exist only in the hooked leg,
so they cannot be both sides of the comparison. Overlay resident size is left
unmeasured rather than guessed -- reading the target's memory is rule 4.

spike-notes §14 holds three empty slots with the exact commands (the milestone
row against a title's menus, §S1's launcher-fronted election, the FPS table)
and says in its first line that nothing in it has been run. 14_TESTING item 2
now reads "not measured" rather than nothing. HANDOFF's P2 section states what
is left -- two measurements, no code -- and gains a P3 head: the pipe (D10),
and FR-2.1's dialog, which retires ConsentProvenance.AgentConsoleOperator and
must not gain its enum member before the reviewed text exists.

Also carries what merging P2's stack measured about CI itself: THREE failures
in eight gate runs, every one a Category=Integration case, every one green on a
re-run of the identical commit, none caused by the code under review. Two were
guard scans failing -- GuardedInjectAsync(...).IsAllowed false (§S19(b)'s
fragment/signer shape) and ProcessTreeUnavailable, "could not establish the
scan set", which §S19(b) does NOT cover -- and one was ours: CaptureSessionTests
opens a real SQLite ledger, Microsoft.Data.Sqlite pools connections, and the
pooled handle on ledger.db outlived DisposeAsync, so the recursive
Directory.Delete threw IOException and xUnit blamed an unrelated test. That
fixture was the ONLY one in the repository catching just DirectoryNotFoundException
-- every sibling already catches IOException -- and it is the one holding a
database. Fixed here.

13_CI_CD and HANDOFF carry the rest as observations rather than fixes: re-run
first, and if it reproduces read the module list and the scan-set reason rather
than the test. Two traps inside that one, both recorded: ci.yml's signer probe,
the step that would name the refusing module, runs AFTER the gate, so the one
run that needed it printed nothing; and `gh run rerun --failed` rewrites the
original run's conclusion, so the run history shows those three failures as
successes and anyone measuring the flake rate from it measures zero. An earlier
draft of this PR said the refusal fires "one run in the low tens" -- written
after the first failure and wrong by the end of the same evening. Corrected in
place rather than deleted.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 08:53:28 +07:00
poli0981andClaude Fable 5.1 222dd10083 feat(telemetry): the NVAPI bridge -- FrameLedger.NvapiBridge.dll, L3 NvapiTelemetrySource, and the NGX probe in-process (P2 PR-E2) (#149)
A new native target, src/native/FrameLedger.NvapiBridge/, is the C ABI the
managed side reaches NVAPI through: refcounted FlNvInit/FlNvShutdown,
FlNvReadSample into a fixed struct with a present bit per field, FlNvNgxState
for one pid, FlNvDriverVersion, and size / ABI-version / build-id queries so a
drifted mirror is refused (FL_NV_BAD_SIZE) rather than read. It is the only
shipped binary that links nvapi64.lib, read-only by construction, loaded by the
Agent into its own process by absolute path (FrameLedger.NvapiBridge.targets)
and never into a game.

Infrastructure.Telemetry: NativeNvapiBridge (the second P/Invoke facade after
the guard's, same absolute-path rule), NvapiTelemetrySource (L3: a clear bit is
null, never 0; an Init that does not answer 0 disables the layer with zero
faults; two throws disable it for the session; VRAM is not read because the
vendored nvapi.h declares no non-deprecated memory-info call, so L1's PDH
counter keeps it), and NvapiNgxStateProbe, the INgxDriverProbe in-process.
The capture host composes L1 + L2 + L3 under the composite and no longer
spawns fl-probe-nvapi.exe; the probe is no longer staged beside it.

Infrastructure.Native.BesideThisAssembly is the assembly's one DllImport
resolver. The runtime allows one per assembly and the guard's static
constructor already set it, which the first real-hardware run of the mirror
test found (TypeInitializationException: a resolver is already set). The
guard claims its name as required (absent throws); the bridge as optional
(absent is a missing layer that reports itself).

Tests: ctest fl_nvapi_bridge (every export, BRANCH: line required);
NvapiBridgeMirrorTests (both mirrors' sizes against the DLL's answers, fails
rather than skips when the DLL is not staged); NvapiTelemetrySourceTests and
NvapiNgxStateProbeTests over a scripted bridge. versioninfo-check.ps1
requires the new DLL's version block.

Measured on the dev box (RTX 5080, 616.64 r616_41), written into
18_GPU_VENDOR_APIS §L3: core 35 °C, GPU domain 0 %, 2670 / 15001 MHz,
throttle mask 0, PCIe x16; memory-temperature and fan bits clear at an idle
desktop.

Docs: 18_GPU_VENDOR_APIS (§Abstraction, §L3 built note, function table,
measured matrix), 12_BUILD (§Targets, the .targets list), 03_METRICS and
20_OPEN_QUESTIONS §H5 (probe in-process), CLAUDE.md (pinned stack, the two
facades), legal/THIRD_PARTY_NOTICES (NVAPI row), CHANGELOG.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:18:23 +07:00
poli0981andClaude Fable 5.1 c5932cc115 P0 closing sweep — criterion 1 amended, criterion 2 met; §S19(c) and §S23-6 closed by a gate each, §S29(d) on a CI measurement, six deferrals written (#137)
* docs+tools: P0's closing sweep -- criterion 1 amended, criterion 2 met; §S19(c) and §S23-6 closed by a gate each, §S29(d) pre-committed on a CI measurement, six items deferred with rationale

The owner's "theo bảng" (2026-09-06). Criterion 1: the quality preset reads N/A on every
title by measurement (tags carry no size or preset on D3D12, NVIDIA's override fields are
the override's, XeSS is closed by licence) and an honest N/A is the correct value rule 7
asks for; upscaler, render->output, FG factor and RT verified against nine titles' menus.
Criterion 2: §S24 counts zero S-items against it, with S23-2 (a GitHub setting) outside
any PR.

- §S19(c): rules-validate gains canary 3 -- the shipped document mutated to action
  "allow" and to signerField "CN" must be rejected by the schema (proven red by loosening
  the const in a temp copy). The policy is code; the fields exist so the data cannot say
  otherwise.
- §S23-6: legal/ACCURACY.md is the one accuracy block, embedded verbatim in README.md
  and DISCLAIMER.md §4 between markers; tools/accuracy-check.ps1 (build.ps1 gate, four
  self-test cases both directions) fails on drift, missing markers or an empty source.
  The block is rewritten to 2026-09-06 truth (the old §4 still said frame generation and
  ray tracing had no hook).
- §S29(d): ci.yml prints a Vulkan runtime census; rows pre-committed -- present: the
  blast-radius script becomes a CI step; absent: deferred on that measurement.
- Deferred with rationale in the entry and phase in §S24: S6 and S2 part three (P1),
  S23-3 (P3), S4 signing, S20 feed half, S14 store-id half (P4).
- 15_ROADMAP and HANDOFF: P0 closed, P1 starts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs: §S29(d)'s census read off the sweep run -- loader present, vulkaninfo and ICD absent; deferred on that measurement with the reopen condition written

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 09:07:04 +00:00
poli0981andClaude Fable 5.1 ee718c3380 feat(overlay): the FSR 3.0 host route -- ffx_fsr3_x64.dll!ffxFsr3ContextDispatchUpscale as a fifth AMD target, vendored from fsr3-v3.0.4 (not v1.1.4) (#119)
Cyberpunk 2077 at FSR 3 upscales through the FSR 3.0 HOST DLL's named export while its frame
generation goes through the 1.1.x monolith's ffxDispatch, so the leaf-only build printed
`upscaler: N/A` beside `FsrFg` (20_OPEN_QUESTIONS §H11, 2026-09-04).

- One row, the host's UPSCALE, under the same family and publish point as the four ffx-api rows
  (PublishFfxFamilyIfWhole waits for a loaded host as it waits for a loaded leaf), keyed by module
  in the installer's ffx arm with its own trampoline and latch. Rule 4: renderSize of the
  descriptor the title passed and nothing else; offsetof(renderSize) is pinned to the literal 1256
  so a re-vendoring that moved it fails to compile. Identity FSR3 as a fact.
- ffxFsr3DispatchFrameGeneration is deliberately not a row: the monolith generates on the one
  title, the count is Streamline's, and the host's FG export fires per GENERATED batch. The
  reversal condition is pre-committed in §H11.
- The headers are vendored from tag fsr3-v3.0.4, NOT the v1.1.4 three documents named: the shipped
  module exports exactly 3.0.4's twelve ffxFsr3* names, 1.1.4 declares fifteen and appends fields
  after renderSize, and at 3.0.4 ffx_types.h includes <stdint.h> only (no <mutex>; ten files, no
  ffx_message.h). Separate directory (root LICENSE.txt is MIT verbatim, inline grants) with its
  own license-check §2e; every blob sha checked against the upstream tree. The two FidelityFX
  trees both define FfxFrameGenerationConfig, so the 3.0.4 header is included inside a namespace.
- Fixtures: the ffx_fsr3_x64.dll stub (hookinventory-check Pass C's second positive control),
  harness topologies fsr3host / fsr3host+mono, an [ffx] injected case at K = 1 (the row's
  double-count control) and K in {1, 4} beside the monolith, fl_ffx_resolve extended, and a
  consumer case for Cyberpunk's shape.
- Docs corrected in place (18_GPU_VENDOR_APIS, HANDOFF 7c, 20_OPEN_QUESTIONS §H11 with rows
  B1-B4 owed, 03_METRICS, 17_HOOK_ENGINE, spike-notes, 12_BUILD, THIRD_PARTY_NOTICES).

Hook-path overhead: the detour is on a once-per-application-frame call, not on the present path;
its body is the UPSCALE arm of ObserveFfxDispatch verbatim (one null check, two relaxed stores,
one fetch_add). hook-harness --probe-cost on this build: unhooked 300.3 ns / hooked 301.2 ns per
present, delta 0.8 ns (budget 1000 ns).

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-05 03:36:43 +00:00
poli0981andClaude Fable 5.1 59d26fa7f1 feat(overlay): the slSetTagForFrame row — Streamline 2.8's frame-based tags reach the params family, published when whole (#115)
Dying Light: The Beast at DLSS (SL 2.8.0) read Dlss identity on every batch and
UpscalerParams on none across three captures: 2.8 deprecates slSetTag for
slSetTagForFrame and the only params row hooked the deprecated export. A second
row on the same family, picked by symbol through constants the inventory header
binds to its rows; the family is published once every tag export the loaded
interposer has is patched, because publishing on the first row measured 38 of 41
records claiming params on the fixture (the ffx leaves' #110 defect again).

tools/vendor-exports.ps1 unions exports across every copy of a module name and
lists every version seen — the first-copy merge had hidden the 2.8 export behind
2.7.4 — and docs/vendor-exports.json is regenerated.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-04 17:10:02 +00:00
poli0981andClaude Fable 5.1 596e673d5c feat(ffx): AMD identity through the ffx-api leaves — FidelityFX v2.3.0 vendored (MIT by exception), leaf-only hooks, FSR3/FsrFg and the second count (HANDOFF 7c) (#110)
* feat(ffx): vendor the FidelityFX ffx-api headers (v2.3.0, MIT by exception) and give the three AMD leaves their inventory rows

The three AMD modules a title ships export the same five generic names, so the
identity lives in the descriptor the game passes -- which needs the vendor's own
headers to decode, and 20_OPEN_QUESTIONS §H11 forbids decoding it from observation.
This commit vendors five headers from FidelityFX-SDK tag v2.3.0 under upstream's
Kits/FidelityFX layout, with upstream's docs/license.md verbatim: a binary-only default
licence whose MIT exception list names every one of the tree's 845 files, the five
included, and each header carries the grant inline. license-check.ps1 §2d asserts both
per vendored file, and the notices table gains the row with a bidirectional claim.
v2.3.0 rather than the v1.1.4 18_GPU_VENDOR_APIS first named because its own reversal
condition fired: installed titles ship SDK 2.x effect DLLs (Hell Is Us 4.0.x, Expedition
33 / Dying Light The Beast 4.0.2 + 3.1.5) and the sample dispatches PrepareV2, which
v1.1.4 does not declare; every value and layout read is identical in both tags.

Three inventory rows, one compound family, and the rows are the LEAVES:
amd_fidelityfx_dx12.dll (the SDK 1.1.x monolith), amd_fidelityfx_upscaler_dx12.dll and
amd_fidelityfx_framegeneration_dx12.dll. Never the SDK 2.x loader -- it forwards to
the effect DLLs through their own exports (the only route five identical export tables
allow), so hooking both would count every dispatch twice, straight into fg_factor. The
header binds the leaf table and the rows to each other at compile time in both
directions and refuses the loader as a row; SpeaksExpectedAbi gains an AMD arm keyed on
the five exports. No detour yet: a row whose family has no InstallByFamily arm installs
nothing, which is the header's safe direction, so this commit changes no record.

Fixtures: three leaf stubs sharing one body that counts dispatches by descriptor type,
and a FORWARDING loader decoy bound to the two 2.x leaves, so "the leaf count reads 1x
with a loader in the chain" is falsifiable. hook-harness --probe-ffx-resolve (ctest
fl_ffx_resolve) drives the Overlay's resolver against all four and pushes dispatches
through the decoy. hookinventory-check Pass C now reads the built Overlay's EXPORT table
too, with the leaf stub as the parser's positive control: ffx_api.h declares its entry
points __declspec(dllexport) unconditionally, and a definition inside the Overlay would
announce a vendor API it does not implement with every import check green.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* feat(ffx): hook ffxDispatch on the three AMD leaves — identity, render extent, FSR_FG and the application-frame count from the descriptor

The detour behind HANDOFF item 7c. One observer, three trampolines from one template
(MinHook needs a distinct detour address per patched target), installed by the family
arm InstallByFamily gained for kFamilyFfxDispatch. It reads the descriptor the title
passed to the API we hooked and nothing else: the head type first, and the body only
after the type matched a constant from the vendored headers -- UPSCALE yields identity
(FSR3 from the SDK 1.1.x monolith; the new FL_UPSCALER_FSR_UNVERSIONED from the 2.x
upscaler DLL, which hosts FSR 3.1 and FSR 4 behind one type and does not say which --
an enumerator, no layout change), renderSize and one COUNT; PREPARE / PREPARE_V2 yield
frameID, counted on a NEW index only, the way slGetNewFrameToken's index is; and a
FRAMEGENERATION dispatch -- the generated batch, sent back through the export from the
title's own callback -- names FL_FG_FSR_FG on that present. Never context, pNext, a
command list, a resource, or numGeneratedFrames. PREPARE is read through the V2 layout,
which the older, [[deprecated]] struct shares byte for byte through renderSize; the
equality is a static_assert inside the smallest possible pragma.

RecordPresent drains the AMD word and count on every present beside the Streamline
word, and publishes under two one-way latches: Streamline's token count keeps
precedence once a token has ever been issued, so every title validated on §S31 is
byte-identical to before; on the AMD side PREPARE's frameID once a PREPARE has ever
arrived, else the UPSCALE count -- per window rather than per present, because choosing
per present would double-count a frame whose two dispatches straddle a present.

The family is published only when EVERY LEAF THE PROCESS HAS LOADED is patched --
PublishHookFamily's own rule -- and it was measured mattering before it was applied:
with the family published on the first leaf, the injected fixture caught the window
between the upscaler leaf's patch and the frame-generation leaf's, in which UPSCALE
dispatches were counted and the PREPARE and FRAMEGENERATION dispatches on the other
leaf were not (two application frames identified as FSR with no FSR_FG mode, in a
window the test had every right to read as complete).

Fixture: hook-harness --hold-presenting-ffx dispatches the way an FSR title does --
one UPSCALE, the PREPARE issued TWICE with the same frameID, one FRAMEGENERATION at
K > 1, then K presents -- on both vendor shapes (--ffx-topology 2x: the two effect DLLs
behind the forwarding loader decoy; 1x: the monolith with the pre-V2 PREPARE) and with
--ffx-no-prepare for the frame-generation-off shape. guard_test's two [ffx] cases drive
K = 1 and K = 4 on each: |drained - K*sigma| <= K, identity named on sigma records and
never DLSS or NONE, the exact tagged extent with quality and sharpness 0xFF, FSR_FG on
sigma records at K = 4 and on none at K = 1, hooks by equality, and the census naming
the leaves that are in the process and not the ones that are not. A writer that counted
PREPARE calls, or that also hooked the loader, reads 2.0 on the K = 1 control.

Hook-path overhead: the present path gains two exchange operations, two loads and a
branch; the detour is one 8-byte read, a switch and one read-modify-write per dispatch
(a CAS loop on PREPARE). Rule 4 per row: arguments of the API we hooked, nothing written.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* feat(capturehost): print the AMD route — Fsr3 / FSR (3.1 or 4) identity, FsrFg, and the ffx dispatch census as the second count

The reading side of the ffx-api rows. MeasuredFacts maps the new
FL_UPSCALER_FSR_UNVERSIONED to a sentence rather than the enumerator's name, so the
report says "FSR (3.1 or 4 — the SDK 2.x upscaler DLL hosts both, and the dispatch does
not name the version)" and never guesses FSR4; Fsr3 and FsrFg print from the enum as
Dlss and DlssG already do. The upscaler N/A line names both hook routes now that two
exist, and the two lines that credited the application-frame count to
slGetNewFrameToken alone name the ffx-api PREPARE / UPSCALE dispatch beside it.

FfxCensus is the AMD twin of SlCensus, and the second count HANDOFF 7c asks for before
the first is trusted: presents that drained an UPSCALE dispatch (an FSR identity),
presents that drained a FRAMEGENERATION dispatch (FSR_FG), and Σ fgEvaluations over the
same window, printed as presents/frame, frames/upscale-drained and fg-dispatch/frame with
the reading guide on the line -- 1.00 when the PREPARE and UPSCALE counts agree, 2.00
when one of them is doubled by a hook on the loader as well as the leaf or by two
upscale contexts per frame. Derived from the decoded bytes rather than raw fact bits,
because featureFlags has no free bit for a raw AMD fact and adding one is a layout
change; the census says so about itself.

Tests: the Lies of P shape (Fsr3 + FsrFg at ×2) prints the trio and no WARNING even
with amd_fidelityfx_dx12.dll in the census's FG group; frame generation off on the
monolith is `none` by the UPSCALE count; the 2.x leaf prints the versionless sentence;
the census reads 1.00 on an agreeing window and 2.00 on a doubled one, and says so
rather than printing zeros when nothing FSR-shaped arrived.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs(ffx): the AMD route is recorded where each fact lives — inventory, licence, §H11's table, HANDOFF 7c's three corrections

17_HOOK_ENGINE: the banner counts eleven detours, the FidelityFX row is ✅ with the
leaf-only scoping and the rule-4 reading per field, and the FG row's "non-NVIDIA
vendors deferred" clause is struck with the date. 18_GPU_VENDOR_APIS §AMD: tag v2.3.0
taken, why its own v1.1.4 sentence's reversal condition fired, the whole-tree exception
finding (845 of 845), §2d, Pass C already covering the imports (a sentence here said
otherwise) and now reading the export table, and the FSR 3.0 host route's real closure
(ten files, <mutex> through ffx_types.h). 20_OPEN_QUESTIONS §H11: ◐ -- AMD built, Intel
closed by licence, FSR 3.0 deferred -- with the owner's acceptance table pre-committed
(A1-A3, R1-R5) before the run. HANDOFF 7c: struck as landed, with the three corrections
that changed what got built -- scope to the LEAVES and never the loader (the entry said
"the facade"), ffxCreateContext is not a row, and "extend Pass C" was a no-op; 7b gains
the measurement that no statically linked title is installed. 03_METRICS: the AMD
source beside the Streamline one, including the two latches and the second count.
05_DETECTION, 12_BUILD (four stubs, fl_fidelityfx_headers, and the "no AMD SDK"
sentence narrowed to telemetry), README's one-line accuracy of the same, and
spike-notes §9's module topology table with the three owed launches.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(license-check): §2d's path normalisation lost its backslashes on the way in, and the canary is what found it

The scripted edit that wrote §2d swallowed the backslash in three .Replace calls,
leaving `.Replace('/', '')` on the path being checked and `.Replace('', '/')` in the
violation messages. The check still passed on Windows -- GetRelativePath already
returns backslashes, so the first call was a no-op -- and the second only runs when a
violation is being reported, which is exactly when it threw "oldValue cannot be an
empty string" instead of naming the file. Found by planting the canary the PR body
promised: one header dropped from the vendored exception list now reads
"fidelityfx/Kits/FidelityFX/upscalers/include/ffx_upscale.h is NOT on license.md's
MIT exception list", exit 1, and the gate is green again once it is restored.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-04 17:33:44 +07:00
poli0981andClaude Fable 5.1 416b38d14e feat(metrics): Presented FPS, and a runtime census that says what the one number may and may not mean (#102)
* feat(metrics): Presented FPS, and a runtime census that says what the one number may and may not mean

With this writer every title lands on rung 0 of the frame-generation ladder:
no non-Streamline title sets FL_MEASURED_FG and Σ fgEvaluations is 0 on every
Streamline title measured. So a 2D title with no upscaler and Black Myth:
Wukong running DLSS-G through an unhooked path printed the same line, and
08_UI ("FG not detected -> 144 FPS") contradicted 03_METRICS rung 0 (N/A, not
none).

Owner decision 2026-09-03, CLAUDE.md rule 6 amended: when frame generation is
not measured, the one number that stands alone is Presented FPS (presents / D,
numerically Displayed, named so Native and Displayed are only ever printed
together), with a mandatory qualifier chosen by the runtime census.

FlWriterState.runtimeCensus takes reserved[0] (no layout bump: the build-id
handshake refuses an older writer first). The watchdog asks the loader once a
second for each of twenty measured module names in FL_RUNTIME_CENSUS --
GetModuleHandleExW(UNCHANGED_REFCOUNT), OR-only, nothing on the present path,
nothing patched. hookinventory-check gains Pass D: every census name must be
a module vendor-exports.json has seen, because a misspelt name reads as
"not loaded", which reads as the 2D case.

The report prints one of three lines under Presented FPS -- census did not
run; no known FG runtime was loaded so this cannot include in-process
generated frames (static FSR3-FG and AFMF excepted); or WARNING: an FG runtime
was loaded (nvngx_dlssg.dll) and nothing was observed, so it MAY. The upscaler
line stops saying "our coverage is short" and names the three causes it cannot
tell apart.

The census never produces NONE. FSR is routinely linked statically, so a
census-none on an FSR3-FG title would print presents as native with a
confident label -- the exact number rule 6 forbids. guard_test asserts the
present-only writer publishes exactly FL_CENSUS_RAN and the Streamline-stub
writer publishes the interposer bit with every FG bit clear.

Hook-path overhead: none.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(census): the FSR 3.1 facade counts as a frame-generation runtime, and the report prints the census by name

Lies of P ships amd_fidelityfx_dx12.dll ALONE while running AMD frame
generation -- there is no amd_fidelityfx_framegeneration_dx12.dll beside it.
With the facade in the upscaler group the census would have printed "cannot
include in-process generated frames" on exactly the title generating them.
The facade dispatches both upscaling and frame generation (H11), so a module
that MAY generate frames belongs with the ones that do: its presence now
warns rather than reassures.

The real-title report gains a `runtime census:` line with the raw word and
the module names per group, so a run can say which names the loader answered
for rather than only which qualifier was chosen.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs(census): six real titles, both qualifiers seen, and a Chromium title refused as ambiguous

spike-notes §9 records the 2026-09-03 run: DS3 and a Unity VN publish the
clean (a) shape (runtimeCensus == 0x1); Cyberpunk, Lies of P and Hell Is Us
print the WARNING with the loader's own names. The census is a startup
property on UE5 -- the identical word at off / FSR / DLSS + FG x4 -- so it
cannot separate "loaded and off" from "loaded and driven elsewhere", which it
was designed not to try. Hell Is Us with DLSS on drained zero Streamline
batches: three of five titles now, and the report line says so.

Flower in Us (NW.js) refused as TargetAmbiguous: several processes, one
image path. Recorded as a scope row rather than fixed -- the presenting
process is Chromium's GPU process, which owns no window, so no cheap pick is
the right one and --pid stays forbidden.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs(spike): Lies of P labelled — FSR3 frame-generation presents reach the hook

Operator-confirmed: two runs FSR + AMD frame generation (231 / 237 presented,
Steam counting generated frames), one run DLSS with FG off (59.9). The
FidelityFX 3.1 facade's proxy swapchain forwards to the real Present on the
shared dxgi vtable, so the §H5 fear does not occur for AMD either; the
presented figure on those runs is the displayed rate, which is what the
WARNING tells the reader to take it as.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-03 18:54:06 +07:00
poli0981andClaude Opus 5 81011315ab feat(tier2): PresentMon is dropped, and Tier 2 keeps its place while losing its mechanism (#96)
Owner decision 2026-08-27. §S31 retired PresentMon as a measurement ORACLE (row
P2); this removes it as an IMPLEMENTATION. It is not bundled, not fetched, not
used, and tools/frametype-oracle.ps1 -- the parser written for its output -- is
deleted with it, along with its build.ps1 gate.

THE DISTINCTION THIS COMMIT IS BUILT ON: dropping PresentMon is not dropping
Tier 2. The owner's earlier instruction was explicit that a release "will use a
different approach", so Tier 2 keeps its place in the design and loses its named
tool. Nothing here rewrites the tier out of the product; everything here stops
naming an implementation nobody chose.

TWELVE DOCUMENTS NAMED IT AS THE MECHANISM AND EVERY ONE IS CORRECTED:
CLAUDE.md's pinned-stack row; README's capture-tier table AND its safety row;
01_ARCHITECTURE's tier table and ADR-3; 03_METRICS rung 2; 04_CAPTURE's source
table and tier selection; 05_DETECTION's two Tier-2 rows; 07_IPC's
PresentMonMissing error code; 12_BUILD; 14_TESTING's CSV-parser row;
15_ROADMAP's P2 phase and v2 backlog; and legal/THIRD_PARTY_NOTICES.md plus
legal/licenses/README.md. Struck in place rather than deleted wherever the
reasoning is what a later reader needs.

THE NOTICES ROW AND license-check's CLAIM HAD TO GO TOGETHER, AND THAT IS THE
GATE WORKING. tools/license-check.ps1 bound `Intel PresentMon` to
assets/native/PresentMon.exe BIDIRECTIONALLY, so removing the row alone fails
with "no table row mentions Intel PresentMon, so its bundling claim cannot be
checked". Removing a claim is a deliberate act and is recorded as one, in the
notices file itself. legal/licenses/README.md also listed a presentmon-MIT.txt
that never existed -- a row pointing at a file nobody had shipped.

§M1, §M2 AND §M6 CLOSE BY DECISION, NOT BY MEASUREMENT, and each row says which.
They were questions about a tool that no longer has a subject. §M2's answers are
kept in full -- the binary's identity, its refusal to run unelevated, the 24-column
set -- because every one of them cost a measurement, and a closed row that deletes
its evidence is how the next person re-runs it.

§G IS NOT CLOSED. IT GETS BIGGER. "Is the binary committed or fetched?" becomes
"by what mechanism does a shipped build reach Tier 2 at all?", and nothing in
this repository names one. The row now carries its own constraints: README's
capture-tier table and its SAFETY row, legal/DISCLAIMER.md §73 and
legal/EULA.md §33 all describe a no-injection mode as THE DEFAULT for uncertain
cases; ETW needs elevation regardless of tool (§M6); and 15_ROADMAP has no v2
fallback any more either.

WHAT THIS COSTS USERS, PUT WHERE THEY WILL READ IT. README's safety row promised
"always a way out". It now carries, in that row, that the mode is unbuilt and has
no chosen mechanism, and that A REFUSED OR UNHOOKABLE TITLE GETS TIER 3 --
session duration and hardware telemetry. Said in the safety table rather than in
a footnote, because a way out that does not exist is the wrong thing to be
reassured by.

THE TWO LEGAL DOCUMENTS ARE DELIBERATELY NOT TOUCHED. DISCLAIMER §73 and EULA §33
still call the no-injection mode "the default" without the qualification the
README now carries. That is a real gap, §G names both files, and changing a legal
document is not a cleanup -- it is an owner decision with its own review.

AND THE DISCRIMINATOR RUN PRODUCED NOTHING, so it settled nothing. The command I
supplied targeted explorer.exe, which may present nothing PresentMon tracks, so
"no CSV" and "no FrameType column" are indistinguishable -- the §Traps entry
about a canary that dies before reaching the gate, in a command I wrote. A target
known to present would have settled it. Recorded in §S31 and spike-notes §11 so
nobody re-runs it believing it is untried, and moot either way now.

Also corrected while in the file: CLAUDE.md's tools list omitted
hookinventory-check. Same class as §R10 and found by counting the directory
rather than by reading the line.

./build.ps1 check with no switches: PASSED, one skipped gate (resx-audit, which
does not exist). license-check green -- the row/claim pair was removed
consistently, which is the only way that gate can stay green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>


---

docs: two pointers to a script that was never landed, left by closing #94

`spike-notes` §11 and `HANDOFF` item 3 both credited the §S31 run to
`tools/s31-capture.ps1`. That script lived in #94, which was closed unmerged
because it drives PresentMon and PresentMon was dropped the same day. So two
documents on `main` name a file the repository does not contain -- a reader
follows the pointer and finds nothing.

Caught by grepping `main` for the name after the close, not by reading the
diff: the reference was correct when it was written and became wrong when a
DIFFERENT pull request was closed. That is the "a document can go stale by NOT
being touched" entry arriving from the one direction §Traps does not describe --
staleness caused by a decision taken elsewhere.

Both now describe the run without naming an artifact, and `spike-notes` says
explicitly that the script is not in this repository so nobody goes looking.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 09:57:36 +07:00
poli0981andClaude Opus 5 8b99621c20 feat(tools): the PresentMon FrameType oracle, pre-committed — and two obstacles measured before it could run (#88)
* feat(tools): the PresentMon FrameType oracle, pre-committed -- and two obstacles measured before it could run

HANDOFF item 3's producer decision needs one measurement: is a drained Streamline
batch an application frame? Three oracles have already fallen, so the mapping from
measurement to action is committed FIRST, in the file that owns the item -- the
discipline S30 used, including the part where its table turned out to have holes
and was kept unchanged anyway. S31 carries six rows and TWO OF THEM RETIRE
PRESENTMON OUTRIGHT.

tools/frametype-oracle.ps1 produces the input as TWO DIMENSIONLESS RATIOS --
PresentMon's displayed/application against our presents/batch -- because S30's own
correction records that comparing RATES needs a shared span, and the span is where
the previous draft went circular. Each ratio is internal to one instrument.

TWO OBSTACLES, MEASURED BEFORE THE RUN RATHER THAN DURING IT:

1. The console binary will not start a trace session unelevated on this machine.
   Exit 6, "requires either administrative privileges or to be run by a user in the
   Performance Log Users user group" -- and the account is in neither. The running
   PresentMonSharedService does NOT help, because the console starts its own
   session. That answers half of M6 in the direction nobody expected.

2. --track_frame_type is a BETA option whose own help says it "requires application
   and/or driver instrumentation using Intel-PresentMon provider". So FrameType
   reports events a vendor chose to emit rather than classifying any present from
   first principles, and whether NVIDIA's DLSS-G driver instruments Intel's provider
   is unmeasured. 03_METRICS rung 2 presented this as unconditional and now says so;
   it also adds the consequence, that a FrameType column classifying nothing is an
   ABSENCE, so rung 0 makes it N/A rather than rung 4 making it `none`.

THE PARSER HAS NEVER SEEN A REAL PRESENTMON CSV, for obstacle 1, and that is stated
in the script, in spike-notes S11 and in S31 rather than left to be assumed. It
resolves columns by NAME, refuses loudly when FrameType is absent and names the
columns it did find, prints the whole FrameType vocabulary rather than assuming
one, and refuses rather than dividing by zero when nothing is spelled Application.
Its -SelfTest decision table is the only thing standing behind it, so build.ps1
runs it on every check: 12 cases, both directions. Canaried by mis-spelling the
Application value -- 4 of 12 go red, the refusal cases stay green, and the restore
is in a `finally` per the trap about build.ps1's throw killing the rest of a block.

spike-notes S11 is filled: PresentMon 2.5.1, 956,768 bytes, SHA256 9BEC...A191 --
and it carries NO VERSIONINFO at all, so pinning can only mean hash plus filename,
which is worth stating in a repository that requires that metadata of everything it
builds. The 2.x column set stays unmeasured, explicitly.

Also: XeFG and FSR3-FG identity is deferred with a written rationale (H11), which
is what item 3 asked for instead of a guess. The newer
amd_fidelityfx_framegeneration_dx12.dll exports only five generic ffx* names, so
identity lives in a struct field, and hand-declaring a vendor ABI from observation
is the #71 defect class with another vendor's name on it. The licence checklist has
not been run on either SDK either. Cost is coverage, not correctness: such a title
reports FL_FG_UNKNOWN, never NONE.

./build.ps1 check: green, 20/20 native + 274 managed, only the documented
resx-audit skip.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(metrics): I asserted which vendors instrument Intel's provider, and measured none of them

The block added one commit ago says rung 2 is conditional on the vendor emitting
events, and then asserted "Intel's own frame generation instruments it" -- a claim
nothing here measured, written inside the very paragraph whose subject is that
availability was being presented as settled when it was not.

It is Intel's provider and Intel ships XeFG, so the reading is obvious. Obvious is
not measured, and this repository's recurring defect is a verdict decided before the
check looks. Corrected to say which readings are plausible and which are measured:
none of them are.

./build.ps1 check: green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 19:42:25 +07:00
poli0981andClaude Opus 5 76d70f64e7 feat(gates): the import-table check the vendoring README has claimed since 2026-08-09 (#69)
src/native/third_party/streamline/README.md:89 stated that hookinventory-check
asserts the built FrameLedger.Overlay.dll imports nothing matching
^(sl\.|nvngx|libxess|ffx_|amd_fidelityfx). It did not. The script's only mention
of dumpbin was a comment about tools/vendor-exports.ps1, and a repo-wide search
for /dependents, IMAGE_DIRECTORY_ENTRY_IMPORT or any import inspection returned
nothing. Found by going to read the code instead of the sentence.

WHY THIS ONE MATTERS MORE THAN A STALE SENTENCE USUALLY WOULD. Passes A and B
are source checks: they see what the Overlay RESOLVES. Neither can see what it
LINKS. Taking the address of an SL_API declaration in evaluated code -- writing
&slEvaluateFeature instead of resolving it at runtime -- makes sl.interposer.dll
a load-time dependency, and the Overlay then fails to load in every game that
ships no Streamline: in the loader, before DllMain, with no message anywhere and
nothing in the ring to explain it. The vendored headers are types-only for
exactly this reason, and the gate meant to hold that line was the sentence.

Pass C reads the binary's own dependency list with dumpbin /dependents.

IT REFUSES RATHER THAN PASSES WHENEVER IT CANNOT LOOK. A zero-length import list
is a FAILURE, not a clean result -- every way that parse can break produces the
same empty list as a binary with no vendor imports, which is this repository's
recurring defect wearing a new regex. The list must also contain kernel32.dll
before any verdict is formed, the same discrimination rule the oracle probe
above it already follows.

IT RUNS ONLY UNDER -RequireBinaries, and that was a bug first. The first version
read whatever binary was in the build tree, so `check -SkipNative` printed a skip
line AND ran the pass anyway, against an artefact the run did not produce. A gate
reporting on a stale binary is worse than one that says it did not look. Now the
flag means "the native build ran in THIS invocation", exactly as it does for
chokepoint-check's symbol half, and build.ps1 registers the skip when it did not.

PROVEN ON REAL BINARIES, not only fixtures. Out of AlanWake2.exe's 47 imports and
Cyberpunk2077.exe's 36, the predicate names exactly sl.interposer.dll and -- for
Cyberpunk -- libxess.dll, libxess_fg.dll, ffx_fsr3_x64.dll and
ffx_backend_dx12_x64.dll, and nothing else. The real Overlay imports three
modules (ADVAPI32, d3d11, KERNEL32) and passes. Self-test is 17 cases, both
directions, including that the match is ANCHORED so an innocent name merely
containing a vendor prefix passes, and that _nvngx.dll is caught despite the
leading underscore an unanchored pattern would have needed.

Pass B's sweep also gains xefg[A-Z], which xess[A-Z] does not cover:
libxess_fg.dll's 31 measured exports include 28 xefgSwapChain* names and not one
xess* name. Widened before the frame-generation hooks land rather than after,
because the sweep going quiet on a whole vendor family is the silence this gate
exists to break.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 18:06:29 +00:00
poli0981andClaude Opus 5 400659c808 feat(overlay): the upscaler hook resolves one module, and the doc recommended a route its own licence forbids (#64)
Queue item 2's identity half. FrameLedger.Overlay gains module-scoped symbol
resolution -- it had none, GetProcAddress and GetModuleHandle appeared nowhere in
the target -- and one MinHook detour on sl.interposer.dll!slEvaluateFeature,
installed lazily by the existing 1 Hz watchdog so a title that loads Streamline
at device creation is caught without a LoadLibrary hook. Sec S6 stays separable.

FlWriterState::hooksInstalledMask gets its FIRST PRODUCER anywhere in the tree,
including FL_HOOK_PRESENT, which the present hook was always entitled to and
never set. MeasuredFacts.RayTracingOf already said so in its own comment while
reaching N/A on every session because of it.

NEVER FL_UPSCALER_NONE. A Streamline-only writer cannot see FFX, XeSS or
NGX-direct, and NONE is the only one of the three states fl_shm.h allows to be
aggregated as a negative. An unrecognised feature id reports UNKNOWN, a state
this codebase could not previously produce; a ctest drives 0xF00D to prove it.

Ray Reconstruction's OBSERVED bit is gated on having seen an SL evaluation THIS
FRAME rather than on the hook being installed. Found by an adversarial refuter
over the design: the consumer returns Tri.No when OBSERVED is set on every record
and no record carries the fact bit, so the honest-looking choice would publish
"Ray Reconstruction: No" on an NGX-direct DLSS-RR title, which never calls
slEvaluateFeature at all.

FL_MEASURED_UPSCALER_PARAMS is deliberately unset, and the reason is a licence.
17_HOOK_ENGINE recommended hooking NVSDK_NGX_Parameter_SetUI for quality and
render size; that needs NGX declarations, and the NGX/DLSS SDK is the proprietary
NVIDIA RTX SDKs License -- verified upstream, hitting three of
18_GPU_VENDOR_APIS Sec Checklist step 2's four needles. Step 3 forbids vendoring
it AND re-declaring it. The document recommended a path its own rule forbids and
nothing had noticed, because no code had gone near it. Corrected in place; the
in-policy route is Streamline's own MIT surface and it is the next PR.

Streamline MIT headers vendored, one atomic commit with the licence copy, the
notices row and both of license-check's arrays. It buys the vendor's own
PFun_slEvaluateFeature: five parameters, every one integer-class, so nothing
travels in XMM -- the exact residual hazard nobody could rule out while the
signature was a guess, and a guess wrong by one argument corrupts the stack
inside the ORIGINAL function, where FL_HOOK_GUARD's __try cannot reach.
sl_nvperf.h is excluded (the same license.txt carries a second, proprietary
NSight Perf block naming it) and all of external/ is excluded (upstream's
external/ngx-sdk is the RTX licence, so a recursive copy does the forbidden thing
by default). Four canaries proven red. This also answers what spike-notes Sec 5
recorded as open: Sec H5 case 3 was "blocked on a licence decision, not on
hardware", and the decision is taken.

tools/hookinventory-check.ps1 checks every symbol the Overlay resolves by name
against docs/vendor-exports.json, MODULE-SCOPED, in both halves. It is prevention
and it FIXED NOTHING, and its own docstring says so, because a gate whose
write-up implies it caught something cannot be audited later. Five red cases
proven; the load-bearing one is an oracle-discrimination canary that runs before
any verdict, since every failure mode of such a lookup produces the same answer
as "absent". A misspelt symbol is caught earlier still, by a compile-time binding
between the inventory and the stub fixtures -- stronger, and not the script's
credit to take.

The decoy stub is what makes module scoping falsifiable, and it earned its place
immediately: the first version exported nothing, and THREE assertions still
passed, because nullptr differs from a real address.

Fixed: a failed REQUIRE terminated the whole native test binary. Catch2 compiled
itself with CATCH_CONFIG_DISABLE_EXCEPTIONS because the top-level CMakeLists
strips /EHsc and tests/CMakeLists.txt re-added it only to the test binaries,
never to the library that decides the mode. On a box where WARP's D3D12 path is
broken this silently removed the end-to-end injection cases from ctest, including
the honesty assertion Sec S29(a) names as the merge gate's coverage. ctest
reported "1 test failed" where the truth was "and 2 never ran". Recovered 70 test
cases and 1051 assertions.

Fixed: MeasuredFacts.IsHonest compared measuredMask against a hardcoded constant,
correct for a present-only writer and wrong the moment a feature hook landed.
Entitlement is now derived from hooksInstalledMask -- a writer may claim a
measurement only where it installed a hook capable of taking it -- plus the
reverse direction that was missing, a value set while its mask bit is clear.

Fixed: 12_BUILD said the NVAPI SDK "is not vendored yet" and that third_party
held only CMakeLists and vulkan-headers. Both false since #55. That sentence was
itself a correction of the opposite error, so the file has now been wrong in both
directions about one fact: legal/ is gated bidirectionally and caught its own
version, docs/ is not.

Fixed: HANDOFF item 2 named NVSDK_NGX_EvaluateFeature, which no measured module
exports, and said four modules where NVSDK_NGX_D3D12_EvaluateFeature has seven.
The argument survived both errors; the data was wrong in the bullet whose subject
is that a wrong symbol name degrades silently.

NOT VERIFIED AGAINST A REAL TITLE. Everything here is proven against stubs
carrying the measured names. Real-title verification is owner-only.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 17:00:53 +07:00
poli0981 44f3dc1120 feat(capture): the consent gate gets a real source, and guardTicks a driver that is not a test (#60)
docs/HANDOFF.md queue item 1, all six parts. HookedCaptureGate's three inputs
(hook_enabled, hook_consent_at, hook_blocked_reason) come from IGameConsentStore
instead of a `games` table that existed in 06_DATA_MODEL and in no .cs file, and
FlControlBlock.guardTicks is advanced by a NON-TEST binary for the first time --
the sending half of the 30 s re-scan 19_SAFETY calls the most important runtime
behaviour in the capture layer. Both ends of that field existed and were tested
since #46/#50; only the loop was missing, and a missing loop reads as a missing
subsystem.

FrameLedger.CaptureHost is a separate project nothing publishes, and
tools/package-closure-check.ps1 is what keeps that true rather than remembered.
§S27 was closed on the grounds that no shipped binary carries an injecting entry
point; the host IS one, so its absence from the package is the load-bearing
clause. The gate walks the transitive ProjectReference closure of the two publish
roots and names the edge -- proven by planting a reference from the Agent, which
leaves the build green and turns the gate red.

WHAT THE PRE-BUILD PANEL CHANGED, because it changed what got built:

  - `new HookRequest { HookEnabled = true, ConsentedAt = UtcNow }` still compiled
    and reached GuardedInjectAsync -- verbatim the synthesis §S27 named and
    rejected. A store, a record and a provenance flag only add an honest path
    BESIDE the dishonest one. HookRequest is now get-only behind a private
    constructor with one factory, so the expression is a compile error.
  - GameConsentRecord.Stored is internal: Domain is inside both publish closures,
    so a public minting factory would be a blessed SHIPPED API for producing
    consent nobody gave, and the closure gate cannot see it.
  - An acknowledgement takes a DTO carrying neither BlockedReason nor
    PreScanUnverified, so `consent grant` structurally cannot clear a block --
    the "I understand, continue anyway" button rule 2 forbids, arrived at by
    omission.
  - frameIndex is process-global, so an interval rule keyed on "+1" would exclude
    every interval in a multi-swapchain title and report no duration at all.

WHAT THE ADVERSARIAL REVIEW OF THE DIFF CAUGHT, 17 of 23 candidates surviving a
refuter told to default to refuted. The worst was MEASURED, not argued:
Process.GetProcessById holds NO handle and HasExited opens one and closes it
again, so the pid was never pinned -- §S29(e) had been closed on a mechanism that
did not exist, asserted in three source comments, the ledger and the changelog.
HeldProcessHandle now opens SYNCHRONIZE | PROCESS_QUERY_LIMITED_INFORMATION and
keeps it; a pid that cannot be pinned is a refusal. Also: "could not read the
executable" passed the fingerprint check by comparing the record with itself;
Enum.TryParse accepts numeric strings, so "provenance": "1" walked round the
two-member enum; an unreadable consent file silently cleared a persisted block
and dropped every other game's record; a guard exception discarded the whole
session's drained frames; StreamSegmenter cut a spurious 0x0 segment; and three
of the new tests could not fail for the property they named.

CLOSED: §S29(c) by deleting ShouldUnhookAsync (zero production callers, strictly
weaker than ScanOnceAsync, and inverted in polarity), §S29(e) host-side with no
ABI change. §S29(f)'s premise corrected in place -- layout v3 put rtTier and
hooksInstalledMask in FlWriterState, neither has a producer, so RT `Yes` is
unreachable as well as `No`.

Also: ShmRingReader.SetPaused had no test at all and now has both halves;
ShmHandshakeValidator never compared handshake.Pid, so a ring left by a finished
session validated Ok; the drop branch runs against the real Overlay for the first
time, which needed --present-interval-ms on hook-harness (uncapped, the harness
does 171,636 presents in 3 s, so the ring laps in under a second instead of 68).

Docs corrected in the same PR: 04_CAPTURE's "consent lives in SQLite" was the only
line in the tree saying where consent lives; 12_BUILD and 13_CI_CD both said the
struct-mirror gate does not exist while build.ps1 throws on it; 12_BUILD's gate
list omitted four gates and claimed Directory.Build.props sets RuntimeIdentifier;
13_CI_CD documented a release.yml that does not exist; 03_METRICS still listed
dlss_rr, named the retired rtPsoAlive bit, and had no rung 0 on the FG ladder.

./build.ps1 check with no switches: PASSED, 78 s, 1 pre-existing skip.
Native 16/16. Managed 252, up from 160 -- Domain 60, Application 39,
Infrastructure 82, CaptureHost 71. Every new gate proven red-then-green with the
build's exit code read BEFORE the test's.

NOT MEASURED HERE, and stated rather than left to be inferred: the nine
Category=Integration cases do not run on CI (§S19(b)), and package-closure-check
reads ProjectReference only -- it does not follow <Import> or
Directory.Build.props, so a .targets staging a foreign binary is outside what it
sees. Both are written into the script, 12_BUILD and HANDOFF.

Six owner decisions are recorded in §S24. One was taken because it cannot be
retrofitted: a consent record carries a disclosure/wording version from the first
record written.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>


Follow-up in the same branch: 15_ROADMAP's status header is dated forward with what
changed AND with what did not — items 4, 6 and 7 are exactly where they were, because
the writer still measures nothing but output resolution and its own present arguments.
A status line that only ever grows is how that file came to lag its own repository
twice.
2026-08-09 12:57:19 +07:00
poli0981andClaude Opus 5 09e450e15d feat(safety): four gates that could not fail, and the one I wrote could not either (#54)
MERGED OVER A RED SAFETY GATE, WITH THE OWNER'S APPROVAL RECORDED HERE.

`Rules / validate` failed with exactly one error and no others:

  Anti-cheat blocklist entries removed: heuristic/nameFragments/gameguard

That job exists so a blocklist removal is reviewed in public rather than waved
through. It was reviewed and approved by the repository owner on 2026-08-05, on
this evidence:

  - `guard` is a substring of `gameguard` and the match is a case-insensitive
    substring, so `guard` matched everything `gameguard` could, first. Zero
    coverage is lost BY CONSTRUCTION, not by estimate.
  - nProtect GameGuard additionally has its own named module family in the same
    file (GameGuard, npgg, GameMon, exact-prefix), so the fuzzy fragment was
    never its only route.
  - `rules-validate` now refuses any fragment that contains another, so the
    class cannot return and a future removal of `guard` reads as a removal
    instead of something `gameguard` appears to survive.

Recorded in the merge rather than only in a conversation, because the whole
point of the gate is that the reasoning is visible to whoever reads this later.
Note the gate is currently ADVISORY on `main` (§S23-2): it did not block, and
it should have had to.

---

S19(a), S19(d)'s residual, S23-5 and S29(d). Each closed by a MECHANISM rather
than by a correction, because three of the four were already corrections that had
gone stale.

1. `gameguard` COULD NEVER FIRE, and it is now impossible to add another that
   cannot. The heuristic match is a case-insensitive substring and `guard` is a
   substring of `gameguard`, so the shorter token always won first. Removed;
   rules-validate now fails when ANY nameFragment contains another, naming which
   one can never fire.

   DELETING A FRAGMENT IS NORMALLY A DETECTION REMOVAL IN A HARD GATE, and this
   is the one case where it removes nothing. Subsumption means BY CONSTRUCTION
   that every name `gameguard` could match, `guard` matches. Checked separately
   and not previously recorded anywhere: nProtect GameGuard also has its OWN
   NAMED MODULE FAMILY in the same file (GameGuard, npgg, GameMon, exact-prefix),
   so the fragment was redundant twice over. The standing objection -- three
   refuters rejected deleting a fragment -- applies in full to `protect` and not
   to this one, and spike-notes had both findings in one paragraph under a
   conclusion that was true of one of them.

   The hazard was always in the FUTURE, which is why "cosmetic" was the wrong
   word: with both entries present, someone removing `guard` leaves a list that
   still appears to cover nProtect. Now the list is minimal, so a removal reads
   as a removal.

   IT TRIPS rules-publish's REMOVAL CHECK. That is the gate working. It exists to
   make a blocklist removal reviewable, and this is one.

2. THE SCHEMA CANARY PROVED THE SCHEMA WAS NOT INERT, AND NOTHING MORE. It was
   {"schemaVersion":"not-a-number"}, which any schema still pinning schemaVersion
   rejects -- so deleting `minItems` from nameFragments left it passing, Test-Json
   passing, and the schema half of the heuristic floor gone.

   A second canary now carries nameFragments: [] and must be rejected. DERIVED
   FROM THE SHIPPED DOCUMENT -- parse, empty the array, re-serialise -- never
   hand-written: a hand-written canary is a second statement of the schema's shape
   and drifts from it, which is the defect the validator exists to catch. Mutating
   the real document makes the constraint under test the ONLY difference between
   the passing and the failing case.

   S19(d)'s STATED CONSEQUENCE WAS OVERSTATED and is corrected in place rather
   than repeated. "The CI floor silently ceases to exist" is not what would
   happen: gen-ac-floor.ps1 hard-errors on an empty list and runs as a CMake
   custom command, so the native BUILD fails. What was unguarded is the SCHEMA
   half -- a rules file with an empty list reaching a machine, where the
   compiled-in floor is what saves it. Narrower than written, and worth fixing on
   its own terms rather than on an inflated one.

3. THE SHIPPED detection-rules.json CARRIED A FOURTH STATEMENT OF THE GATE'S
   COMPOSITION, omitting the services tier -- the only one ever MEASURED firing on
   real anti-cheat -- in the one copy that reaches users. Closed the way S23-4
   closed the same class: by REMOVING the restatement rather than correcting it,
   with rules-validate failing if any $comment enumerates checks again.

   THAT RULE'S FIRST VERSION COULD NOT FIRE, and that is the finding worth the
   space. I scoped it to `anticheat.$comment`. The text it exists to catch lives
   in the TOP-LEVEL $comment. A check pointed at the wrong object -- this
   project's signature defect, committed inside the fix for it.

   ITS CANARY REPORTED GREEN TWICE BEFORE THE CAUSE WAS FOUND. The first time, a
   backtick inside a double-quoted PowerShell needle silently mangled the search
   string, so .Replace matched nothing, the file was unchanged, and the validator
   correctly passed -- a canary that never applied, reporting exactly what a
   working gate reports. Sixth time on this project that the verification harness
   was the broken thing; sixth time it reported success. The second run printed
   the mutated line before validating, which is what turned "the rule is fine"
   into "the rule is scoped wrong".

   It now walks EVERY $comment in the document AND FAILS IF IT FINDS NONE, because
   a walk that reports clean having looked nowhere is the same defect one layer
   up. Walking everything also means moving the text does not dodge the gate.

   The rewritten rule then went red on MY OWN replacement comment, which quoted
   the sentence it had removed in order to explain the removal. The rule was
   right; the comment was reworded to describe the list rather than reproduce it.

4. vklayer-blastradius.ps1 CASE 3 IS AN ASSERTION INSTEAD OF A PRINTOUT. It tests
   whether the Vulkan loader compares enable_environment's VALUE or merely its
   existence -- the difference between a stray `set FRAMELEDGER_ENABLE_VK_LAYER=0`
   doing nothing and it mapping FrameLedger into every Vulkan process on the
   machine, which 15_ROADMAP calls the highest blast radius in the spike. It
   printed in both branches and never touched $errors.

   BEING AN OBSERVATION WAS CORRECT WHILE THE ANSWER WAS UNKNOWN. The step existed
   to DISCOVER the loader's behaviour, and a discovery step that fails is just a
   step with an opinion. What was wrong is that the discovery was made on
   2026-08-02 against loader 1.4.357, recorded in spike-notes §2 as settled, and
   the step went on printing about it in green either way. When a measurement
   becomes a recorded fact, the step that produced it has to become the thing that
   defends it -- otherwise the fact stops being checked while a script that still
   mentions it reads as coverage.

   STILL OPEN and marked ◐ rather than ✅: the script writes HKCU and is excluded
   from build.ps1 and CI by design, so the assertion only fires when someone runs
   it by hand. Nothing reminds them, and a loader upgrade is exactly when it
   matters.

CANARIES, each proven RED at a named line and each recovered:

  RED  S19(a)   re-add gameguard    -> "'gameguard' can never fire - it contains 'guard'"
  RED  S19(d)   delete minItems     -> "the schema accepted an EMPTY nameFragments"
  RED  S23-5    restore the list    -> "rules.$comment enumerates the gate's composition"

S24 ledger recounted: nine items block exit criterion 2, down from twelve.

build.ps1 check, no switches: PASSED WITH 1 SKIPPED GATE(S) in 82s, 15/15 ctests,
160 managed tests, clang-format 22.1.3. The one skip is resx-audit, which does not
exist and says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 19:43:32 +07:00
poli0981andClaude Opus 5 86453f5fe5 docs(ledger): seven PRs landed with no entry, and the note asking for one had already been tried (#53)
#45 wrote five retrospective CHANGELOG entries for #40-#44 and complained, at
length and in prose, that the ledger had gone stale. Then #46 through #52 landed
with NO changelog entry for any of them -- the struct mirror, the ring reader,
the handshake validator, the closed write-read loop, the occlusion-probe filter,
the watchdog thread and check 3's call site. Seven more, immediately after, in
the same session.

THAT IS THE FINDING. A retrospective note is not a mechanism. The repository
already carried the sentence asking people to remember, and the sentence is what
failed, twice, in one week. So this PR adds a gate and then does the cleanup,
rather than doing the cleanup and asking again.

THE GATE. tools/changelog-check.ps1, called from ci.yml with GitHub's own view of
the pull request's changed files: a diff touching src/ that does not touch
CHANGELOG.md fails.

  - It is a STEP OF `check`, not a job of its own, and that is deliberate.
    main's required contexts are exactly check, analyze (csharp, none) and
    analyze (cpp, manual). A job named `changelog` would go red and the merge
    button would stay green -- which is S23-2, the defect that already makes
    `Rules / validate` advisory. A second instance of it is a notification, not
    a gate.
  - It FAILS CLOSED ON AN EMPTY LIST. A pull request with no files is not a
    thing; an empty list means the query broke. Reporting "no src/ changes,
    therefore fine" would be a verdict decided before the check looked.
  - Its LOGIC runs in build.ps1 on every build via -SelfTest: nine cases, five of
    which must come back RED. The gate itself needs a pull request to exist, so
    what is proven locally is that it discriminates.
  - WHAT IT DOES NOT DO is written into the script: it cannot judge whether an
    entry is any good. A one-word entry satisfies it. Said there rather than left
    to be discovered, because a gate whose write-up claims more than it covers is
    this project's own recurring defect.

THE SELF-TEST CAUGHT A DEFECT IN ITSELF ON ITS FIRST RUN. A whitespace-only path
is truthy in PowerShell, so `Where-Object { $_ }` kept '   ' and the empty-list
refusal was unreachable for that input. Trim before filtering, not after.

CANARY, and every step upstream stayed green, which is what makes it evidence:
disarming the matcher left the managed build succeeding, dotnet format clean,
160 tests passing, coverage/rules/chokepoint/license all OK, and the ONLY failure
was `changelog-check (self-test) failed (exit 1)` at build.ps1:68. Restored with
a stamped mtime; self-test green again.

WHAT THE LEDGER SAID THAT WAS FALSE. Seven new entries plus:

  - CHANGELOG's own current-state bullets: the struct-mirror gate "does not
    exist" (it does, #47), GuardSupervisor "nothing maps the shared memory"
    (ShmRingReader does, #50 -- only the production CALLER is missing, a missing
    loop rather than a missing subsystem), and two Known-issues entries.
  - README had NO accuracy note at all, in the file most users read first, while
    every other user-facing document had one. Three specific claims: the rules
    feed listed as a live network call (FR-7.3 is unmet, no fetch exists), the
    30 s re-scan promised as running, and -- the sharpest -- "blocklist entries
    ship as data and can be updated without a new release", which is a
    RESPONSE-TIME PROMISE attached to a security-priority commitment, in the
    paragraph asking users to report a missed anti-cheat family.
  - legal/DISCLAIMER: FOUR -> SIX. Two additions, both about what the software
    claims to MEASURE: section 1's "what it observes ... upscaling, ray tracing,
    pipeline creation" and section 4's "read from the parameters the game passes
    to those APIs". Only presentation is hooked. The block's own rule -- whoever
    changes what the Overlay does must re-read it -- had already been broken by
    #48, which changed what the Overlay does inside a game.
  - "check 3 is unwired" survived in SIX places after #52 wired its executable
    half, three of them in code: fl_ac_rules.h's header comment, fl_guard.h and
    AntiCheatRefusalReason.cs both reasoning that "the native guard cannot
    produce kBlockedExecutable" (it can now, which makes the separation they
    argue for MORE important), and HookedCaptureGateTests. Plus 19_SAFETY's VAC
    row and its During-a-session note -- where the pointer S23-4 installed to
    stop the restate-in-two-places failure had itself paraphrased the text it
    points at, which is a copy.
  - EVERY COUNT OF THE CHECKS IS WRONG BY ONE. "Four documented checks" omits 2b
    (services) -- the only tier ever MEASURED firing on real anti-cheat.
    EvaluateImpl runs five: 1, 2, 2b, 3 (exe) and 4.
  - 07_IPC and 04_CAPTURE: #50 changed ZERO documentation while making two
    decisions the docs specify the opposite of or omit -- map at offset 0 (a view
    at a non-zero offset returns the 64 KiB boundary BELOW it, so the obvious
    control-block write lands on FlShmHandshake.pid without faulting) and seed
    the read index from the writer (without which the first drain reports 999,992
    drops and 04_CAPTURE turns that into "the Agent stalled for over ~16 s").
    Both existed only as comments in ShmRingReader.cs.
  - CLAUDE.md's pinned stack claimed "NVAPI (MIT, headers vendored)" in the
    present tense; third_party/ holds only vulkan-headers. legal/ had already
    caught the identical claim about ITSELF and gained a bidirectional gate for
    it. Also: Domain has no metric calculators, which coverage-gate prints on
    every run ("metric calculators: none found").
  - 20_OPEN_QUESTIONS S14 and R10 each contradicted THEMSELVES inside one
    section, and S24's summary undercounted: twelve items block exit criterion 2,
    not seven -- the criterion says "resolved OR explicitly deferred with a
    written rationale", so the three sequenced and two partly-closed rows are as
    open as the six undecided ones. One disposition currently wears three
    different glyphs in a table whose only purpose is being auditable by counting
    glyphs.

NEW: S29 records what the audit found that needs code, so the next session finds
it by reading. Four gates -- the items-4/6/7 honesty assertion is not in the merge
gate (CI skips the only class that carries it, so a feature-hook PR can set a
measured bit with no hook behind it and merge green); fl_vtable_indices pins
hook-harness's own duplicated literals rather than the Overlay's indices;
HookedCaptureGate.ShouldUnhookAsync is a second, tickless, non-latching
supervision path on the object a drain loop will already be holding; and
vklayer-blastradius case 3 prints in both branches and never fails, in the
highest-blast-radius gate in the spike. Plus: no session-end signal, and a
NORMATIVE CONTRADICTION -- CLAUDE.md rule 7 and 03_METRICS section RT disagree
about whether inline RayQuery is measurable, and README promises the 03_METRICS
reading to users. As the record stands item 6 can reach Yes or N/A and never No,
because nothing measures device RT tier and every byte is allocated.

NOT IN THIS PR, deliberately: rules/detection-rules.json's $comment, the fourth
statement of the gate's composition and now also wrong about check 3. S23-4
closed that class by REMOVING a restatement rather than correcting one, and doing
the same here belongs with the validator rule that keeps it removed.

build.ps1 check, no switches: PASSED WITH 1 SKIPPED GATE(S) in 120s, 15/15
ctests, 160 managed tests (76 Infrastructure, i.e. the integration class ran),
clang-format 22.1.3. The one skip is resx-audit, which does not exist and says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 19:28:03 +07:00