Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 9406908c7f 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)
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:02:29 +07:00
poli0981andClaude Opus 5.5 f1e518f962 feat: a user guide in the app, the GPL shown for information rather than accepted, EULA 1.5 / Disclaimer 2.10 / Privacy 2.6, and a README for players and for developers (D44, D45, beta.12 PR-5) (#257)
- guide/: eight short English pages for players (install and first start, record a game, read your results, anti-cheat
  and safety, your data, questions and answers, the terms in plain words), embedded in the App and shown under
  Help > User guide - the first Help item - with Limitations last; links between pages open in the window.
  Help > Documentation becomes Online documentation: the README at this build's source.
- The Legal Gate: LegalDocument.RequiresAcceptance; the GPL is listed as "your licence", with a line saying GPLv3
  section 9 needs no acceptance, and Accept writes three rows (an old gpl row stays, unread). The summary names the
  user-mode exception (it said there was no way to override the refusal) and the one network request (it said nothing
  is sent anywhere).
- EULA 1.5: an unmeasured session also records the game's memory use; the GPL needs no acceptance; where the
  third-party notices are in an installed copy; consumer rights no agreement can limit, and severability.
  Disclaimer 2.10: what it reads about a game from outside it; the maintainers' preface moves to
  docs/legal-drift-history.md. Privacy 2.6: the game's memory use (replacing a video-memory figure never read), a new
  section 3A on what an export or a bug report carries about you; the history notes move to the same file.
- README: a pointer to the guide up front, the safety table's D38 rule and the feature list's memory line corrected,
  Tier 2 names the game's memory, NOTICE beside the licence, and a section for developers and forks.
- Strings: 3 new keys, 6 changed, en/vi/ja (ja marked review).
- Tests: GuideDocumentsTests (every page listed and titled, every link leads somewhere, the section anchor exists), the
  guide in the renderer's nothing-dropped test (17 documents), the guide window, three acceptance rows and the old gpl
  row left alone, the documentation link.
- Docs: 02_SPEC FR-11, 06_DATA_MODEL, 08_UI, 09_I18N, CLAUDE.md layout, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:51:27 +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 cc847c588e feat(app): the game's own memory wherever a session is shown - two summary cards, a stored statistics table, Sessions columns, Trend and Compare metrics, two memory charts, the live card, the CSV line (D43, beta.12 PR-3) (#255)
- Formats.Memory: Task Manager's units (MB below 1 GB, GB to two decimals, 1 GB = 1024 MB, null is N/A, never 0).
- Services.GameMemoryText: the summary's VRAM (this game) and RAM (this game) cards - the median with the peak and the
  shared / commit peak beneath - the Sessions grid's median · peak cells and tooltips, the live line, the CSV
  `# game_memory:` header line; all from the stored columns and sensor_stats_json. Where Windows reported no private
  working set the working set is shown and says so; an unpinned hold that summed several processes says how many.
- Services.SensorStatsTable + the summary's "Statistics per series": every stored series' mean / median / minimum /
  peak / readings in its own unit; a session recorded before beta.12 gets one sentence instead.
- SensorsChart: two memory plots in GB - Video memory (this game's dedicated and shared, the whole graphics card's)
  and Memory (this game's private working set or labelled working set, the whole PC's). The line that read the
  never-produced per-present vram_proc blob is gone.
- Trend: MaxVramProcess (vram_proc_max_mb, never written, so never a point) becomes Median / Peak VRAM (game) and
  Median / Peak RAM (game) in GB, machine metrics over both tiers; Avg RAM in use is labelled as the whole PC's, in GB.
  Compare gains the four rows, ranking nothing.
- Live card: MemoryText from SessionProgress / SessionHeld (the old VramText read a field nothing produced).
- Strings: 41 new keys, 4 relabelled, 5 dead ones removed, en/vi/ja (ja marked review); 09_I18N glossary rows.
- Tests: GameMemoryTextTests (new), summary, trend, compare, chart, live card, dashboard, export; GamesViewModelTests
  joins the culture collection (it compared resource text across a parallel culture flip and failed once).
- Docs: 08_UI (corrected in place, new beta.12 paragraph), 03_METRICS export schema, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:53:21 +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 3fb27c8df4 test: the recorder's session harness no longer depends on how many drains a loaded runner fits into 150 ms (beta.12 PR-0) (#252)
main went red at a1b06d2 on SessionRecorderTests.ASessionThatRecordedNothingEndsTheExceptionOnlyDuringItsTrial(1,true):
expected Saved, got Discarded. The loop is bounded by MaxDuration on the wall clock, the session's length comes from the
SteppingClock (+5 s per drain), and a busy hosted runner fitted fewer than six drains into 150 ms - under the 30 s
minimum. The harness's minimum is now one clock step: SuperviseAsync drains at least twice (once in the loop, once
after it), so every hooked session is over it on any machine, and a held session whose clock never moves stays under
it, which is what ARefusedSessionIsATierTwoRow... asserts.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:01:48 +07:00
poli0981andClaude Opus 5.5 a1b06d28be release: 0.1.0-beta.11 - the CHANGELOG section, the accuracy block's release line, README's release lines, LIMITATIONS' version, HANDOFF's train section (#251)
* release: 0.1.0-beta.11 - the CHANGELOG section, the accuracy block's release line, README's release lines, LIMITATIONS' version, HANDOFF's train section

The eleventh pre-release (owner, 2026-10-03: "bump beta11"). The [Unreleased] entries of
#247-#250 move under ## [0.1.0-beta.11] - 2026-10-03 as written, after a summary for a user
and "Updating from 0.1.0-beta.10" (quit the App and the Agent first; schema 0017 adds one
column and an older version cannot open the database again; every game is re-checked once
under rules 2026.10.1; an exception made under beta.9 or beta.10 stays in force and finishes
its trial). The sub-sections' bullets are separated as beta.10's are.

The accuracy block's date and release line (legal/ACCURACY.md and its two verbatim copies,
README.md and legal/DISCLAIMER.md; accuracy-check), README's release list and count
("Eleven tagged pre-releases"), LIMITATIONS.md's version line, and HANDOFF's section for the
train: decisions D38-D42 and the CrackProof choice, the traps met on the way, and owner-only
item 8 (what only real hardware can check in beta.11). VERSION stays 0.1.0; the tag carries
the pre-release suffix.

release-notes.ps1 -Version 0.1.0-beta.11 extracts the section (7,728 characters).

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

* docs(safety): the trial paragraph says what a short or unhooked session is not judged by - its frames and its exit - and that a crash while hooked or a finding still ends the exception for good

19_SAFETY's D38 paragraph said a session too short to be stored, or never hooked, "proves nothing
either way and is not judged". UserModeExceptionLapsePolicy judges it by the D33 ends all the same:
a crash while hooked, however short, or a finding about the game at the start, ends the exception
for good during the trial; what such a session is not judged by is its frames and its exit (it
neither counts toward the two nor fails the trial that way). Found in a last read before the tag.

UserModeExceptionLapsePolicyTests pins the short crash: EndOf answers SessionCrashed for a hooked
session that crashed and was not stored, in the trial. ./build.ps1 check: ALL GATES PASSED.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 12:07:15 +07:00
poli0981andClaude Opus 5.5 c4e47868dd feat: delete all sessions of a game or of every game, charts across a game's sessions, and no Settings row without a control (D39, D40, beta.11) (#250)
* feat: delete all sessions of a game or of every game, charts across a game's sessions, and no Settings row without a control (D39, D40, beta.11)

Owner requests 2026-10-03; when asked, the owner chose both charts (an overview on the Sessions
tab and several metrics on the Trend) and both places for Delete all sessions (the game's page
and Settings > Data).

Delete all sessions (D40, FR-1.7):
- A pipe request, DeleteSessions { gameId? } -> DeleteSessionsAck { gameId?, games, sessions }.
  The rows are the Agent's (06_DATA_MODEL Writer ownership), so the Agent deletes them through
  ISessionRepository.DeleteSessionsAsync in one transaction - segments, frame and sensor series and
  annotations cascade - and answers Error SessionRunning while a session of that game (of any
  game, for all; CaptureOrchestrator.IsRecording / IsRecordingAny) is being recorded.
- App: SessionDeletion asks; the game page's Sessions tab and Settings > Data (a new section, one
  row) ask first through IConfirmations.DeleteSessionsAsync with the count; the strip says what
  was deleted or why nothing was (a recording, no agent, an older agent). The game page reloads
  and clears File > Export's selection when it pointed at a deleted session (ids are reused).

Charts across sessions (D39, FR-6.6):
- The Sessions tab opens with "Sessions at a glance": every hooked session's Presented FPS, or
  Native and Displayed where frame generation was measured (rule 6), and the 1% / 0.1% lows,
  oldest first, partial sessions hollow (TrendSeriesBuilder.Overview); a click near a session's
  points selects it in the grid (TrendChart.SessionClicked).
- The Trend keeps its selector and adds "Also draw": ticked metrics are drawn on the same chart,
  their unit (TrendSeriesBuilder.UnitOf: FPS, degC, %, W, MB, x) on the left when it is the
  selected metric's and on the right when it is a second one; a third unit cannot be ticked.
  TrendChart.Show takes TrendLines; one line keeps its name on the axis as before.

Settings, no row without a control (owner request): the hooked-games card shows only while a game
has hooking on; the Elevation row became the admin mode row's status line; the language note is
gone; the retention message names Settings > Recording.

Strings en/vi/ja (ja marked review); docs 02_SPEC (FR-1.7, FR-6.6, FR-10), 06_DATA_MODEL, 07_IPC,
08_UI; CHANGELOG. Tests: repository delete + cascade; the handler's delete and its malformed
payload; IsRecordingAny; SessionDeletion's outcomes; the game page asks, deletes through the
Agent and reloads; Settings asks with the total; the overview and the two-unit Trend; units.

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

* fix(app): the overview draws Native and Displayed only for sessions that generated frames - on the others Native is the Presented rate, and a second line on the same points read as a second measurement

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

* fix(app): after Delete all sessions, a summary window open on a deleted session closes and File > Export lets go of it - from Settings too

The plan for D40 said the summary windows of deleted sessions close; they did not. A summary is
a window of its own, so after a delete it stayed open on a session that is gone, and a note
written from it would have gone to whichever session takes the id next (the table has no
AUTOINCREMENT). And File > Export's selection was let go of only by the game page: a delete from
Settings > Data left it naming a deleted session.

Both now happen in SessionDeletion, the App's one path to DeleteSessions, after the Agent
answers Deleted: the selection is cleared when its session is no longer in the ledger
(ISessionRepository.FindByIdAsync - a session of another game stays selected), and the summary
windows close the ones whose session is gone (ISessionWindows, which SessionSummaryOpener now
implements over the windows it opened; DI registers the one opener under both interfaces). A
failure there is logged and not the delete's. The game page's own clearing moved there.

Tests: AfterADeleteWhatNamedADeletedSessionLetsGoOfIt (the selection cleared, a kept session
still selected, the windows asked after each delete and not after a refused one); the game page
test builds its SessionDeletion with the selection. 08_UI and the CHANGELOG entry say it.
./build.ps1 check: ALL GATES PASSED (App 399).

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

* fix(app): Delete all sessions closes only the summary windows still open after the ledger read - one the user closed meanwhile is not closed twice

SessionSummaryOpener.CloseDeletedAsync awaits a read per window; a window the user closed during it
has left the list (its Closed handler removes it), and WPF's Window.Close on a closed window can
throw. Each window is closed only while it is still in the list. ./build.ps1 check: ALL GATES PASSED.

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

* fix(app): the Trend unticks a metric left in a third unit when the selected metric changes - every ticked box has its line

With two units ticked beside the selected metric (degC and a frame rate, say), changing the selected
metric to a third unit (watts) left three units ticked; TrendChart draws two, so one box stayed ticked
naming a line that was not there. BuildTrendLines now keeps the selected metric's unit and the first
ticked unit in the list and unticks the rest, before it sets which options can be ticked.

Test: TheOverviewAndTheTrendDrawSeveralMetricsTwoUnitsAtMost goes on to tick degC and the 1% low,
select watts, and finds two units drawn and one line per ticked box. 08_UI says it.
./build.ps1 check: ALL GATES PASSED.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 11:44:00 +07:00
poli0981andClaude Opus 5.5 c48b1348a7 feat(app): the Games library fills the window, switches to a list, counts and refreshes its games; import hides what is already in it (beta.11) (#249)
* feat(app): the Games library fills the window, switches to a list, counts and refreshes its games; import hides what is already in it (beta.11)

Owner requests 2026-10-03 (screenshots): the empty band right of the library; a manual refresh
for when games are installed or uninstalled; import's games already in the library, dimmed or
hidden. The owner chose, when asked: the refresh does all three (reload, new games from the
stores, mark uninstalled games), and the view switches between a filling grid and a list.

Library (Games page):
- Controls.UniformWrapPanel: as many columns as fit at 300 px or wider, every card an equal share
  of the width, each row as tall as its tallest card - the cards were 300 px in a WrapPanel, so a
  card's width went unused at the right. The pill row wraps instead of cutting its last pill.
- A list view (name, store, engine, status, sessions, played, last played; double-click or Enter
  opens a game); the button beside the sort shows the other view; ui.library_view remembers it.
- The title counts the games ("Games - 42").
- Refresh reads the library again, then ImportLibraryFlow.RunAsync(onlyNew: true) asks the stores
  for games installed since ("No new games" and no checklist when there are none), and every
  entry whose executable is not on disk carries a "Not installed" pill whose tooltip names the path
  and says when the drive itself is not connected (ExecutablePresenceProbe, off the UI thread on
  each listing, never stored; nothing is removed).
- The page reloads itself while on screen when a session ends (SessionCompleted) or an import adds
  games (LibraryChanges): navigating to the page already on screen does nothing in WPF UI 4.3.0, so
  an import from the menu showed only after leaving the page.

Import (FR-1.2): the games already in the library - at this path or under another drive letter -
are hidden by default; "Show the N games already in the library" brings them back dimmed; a row
that cannot be imported has its box disabled (the XAML said "cannot be ticked" while a tick was
taken and ignored).

Strings en/vi/ja; 08_UI, 06_DATA_MODEL (ui.library_view), CHANGELOG. Tests: GamesViewModelTests
(reload on import and session end, not after Detach; presence; column math), ImportLibraryFlowTests
(refresh offers only new games; hidden until asked), PagesLoadTests (the grid fills its width; the
list replaces it and is remembered; the checklist renders with existing rows shown). Rendered to
PNG in a hosted window to look at it (1270 px: three columns; 900 px: two; the list).

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

* refactor(app): the library's Not installed pill reads the file the game page's way - GameLibrary.ExecutableExists and its sentence - instead of a second probe and two more strings

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:22 +07:00
poli0981andClaude Opus 5.5 0e03d07dac feat: the user-mode anti-cheat exception needs no earlier sessions - its first two are a trial that ends it for good if one goes badly (D38, schema 0017, Disclaimer 2.9, EULA 1.4) (#248)
The owner deleted their ledger and found GIRLS' FRONTLINE 2 "Not eligible: 0 successful hooked
session(s), two are needed" - for good. D33's rule was a catch-22 for every game it could meet
again: since beta.8 the library sweep blocks a game the moment it is added, a blocked game is
never hooked without a grant (CaptureSession sends it to Tier 2 before the resolver), so it could
never earn the two sessions, and a reset ledger lost the ones it had. Asked with that (2026-10-03),
the owner chose D38: a grant needs no session; the first two hooked sessions under it are a trial;
any end during the trial ends the exception for good.

Agent / Application:
- UserModeExceptionRules: TrialSessions = 2 replaces RequiredSessions; IsEligible(block, verdict,
  trialFailed) - the guard's answer and the trial mark, no count; InTrial(successfulBefore).
- UserModeExceptionLapse.TrialFailed; UserModeExceptionLapsePolicy judges a session against the
  grant in force: during its trial every D33 end, or a stored hooked session with no frames or an
  abnormal exit, revokes it with trialFailed; a session too short to store, or never hooked, is
  not judged. The recorder passes the row it stored (SessionForTrial).
- ISessionRepository.CountSuccessfulUnderGrantAsync (family + started >= grant) replaces
  CountSuccessfulHookedAsync; ac_exception_sessions is now the trial's progress.
- AgentCommandHandler: TooFewSessions is gone; a game whose trial failed is refused before
  anything is scanned (Refused TrialFailed, signal = unix ms). AntiCheatExceptionCommands drops
  the session repository.
- The sweep answers a blocked entry whose executable cannot be read ("PreScanFailed", no bytes in
  the key) instead of leaving it "Checking..." for ever.

Infrastructure: schema 0017 games.ac_exception_trial_failed_at; the revoke sets it once
(COALESCE), eligibility is never written eligible over it and a grant is refused over it, both in
SQL; Change executable does not name it; a twin merge keeps the earlier mark.

App: the disclosure is ac-exception-dialog/2 (Why names no count, a Trial paragraph); the card
says "trial: N of 2", a failed trial "none can be made again", a scan that found nothing "was not
found" (not "could not finish"); an eligible game's Anti-cheat card no longer says "cannot be
turned on" beside Make exception...; the Settings list shows only games it can act on, without
the duplicated count, and Refresh only while a row is checking. Strings en/vi/ja (ja safety text
English until reviewed).

Docs and legal: CLAUDE.md rule 2 amendment, 19_SAFETY, FR-2.8, 06_DATA_MODEL (0017), 07_IPC,
08_UI, 20_OPEN_QUESTIONS, LIMITATIONS, SECURITY, the accuracy block (README, Disclaimer),
Disclaimer 2.9 (2A), EULA 1.4, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:25:42 +07:00
poli0981andClaude Opus 5.5 5ab297b7b7 feat(rules): three CrackProof titles on the anti-cheat title list - Umamusume, Heaven Burns Red, Madoka Magica Magia Exedra by Steam id (rules 2026.10.1, beta.11) (#247)
The owner asked for "a few" games protected by HyperTech's CrackProof, by Steam id where needed.
Three are listed, each on the evidence of its own Steam store page, which states "Uses Kernel
Level Anti-Cheat" and names CrackProof (read 2026-10-03):

- 3224770 Umamusume: Pretty Derby (Cygames)
- 1973710 Heaven Burns Red (WRIGHT FLYER STUDIOS / Key; the Steam app is the Japanese release)
- 2987800 Madoka Magica Magia Exedra (Aniplex)

ANOTHER EDEN (1252600) is named by a community list (AreWeAntiCheatYet) but its store page says
nothing of the kind, so it is left out.

Why a title list and not a family: a Proton log of Umamusume shows the driver loaded from
C:\Windows\System32 under a numbered name (usrdrv017864.sys, ValveSoftware/Proton#8853) - outside
the game's folder, so the .sys rule cannot see it before the first run, and no driver token
could name it. Steam ids only: no executable name was verified, and a guessed one is a false
refusal waiting for an unrelated game. A title-list finding is never excepted by the user-mode
exception.

- rules/detection-rules.json: blockedStoreIds +3 (family "CrackProof"), rulesVersion 2026.10.1 -
  every library entry is pre-scanned again once; the floor regenerates from the file.
- guard_test: the three ids refuse as BlockedStoreId naming CrackProof, from the floor.
- 19_SAFETY check 3 (counts, the evidence, why no executables) and a seed-table row like VAC's;
  20_OPEN_QUESTIONS S14's row; CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:06:50 +07:00
1171 changed files with 15312 additions and 1191 deletions

No files matched your search

+7 -4
View File
@@ -149,7 +149,10 @@ jobs:
run: |
$ErrorActionPreference = 'Stop'
$v = '${{ steps.version.outputs.version }}'
dotnet publish src/FrameLedger.App -c Release -r win-x64 --self-contained -p:PublishReadyToRun=true -p:Version=$v -o out/app
# beta.12: the App's links into the repository open the documents of THIS release (Services/RepositoryLinks.cs):
# the tag, or for a rehearsal - which has no tag - the commit it was built from.
$ref = if ('${{ steps.version.outputs.dry_run }}' -eq 'true') { '${{ github.sha }}' } else { "v$v" }
dotnet publish src/FrameLedger.App -c Release -r win-x64 --self-contained -p:PublishReadyToRun=true -p:Version=$v -p:FrameLedgerSourceRef=$ref -o out/app
if ($LASTEXITCODE -ne 0) { throw 'App publish failed' }
dotnet publish src/FrameLedger.Agent -c Release -r win-x64 --self-contained -p:PublishReadyToRun=true -p:Version=$v -o out/app
if ($LASTEXITCODE -ne 0) { throw 'Agent publish failed' }
@@ -178,7 +181,7 @@ jobs:
}
Get-ChildItem $dest | ForEach-Object { Write-Host (" {0,-64} {1,8:N0}" -f $_.Name, $_.Length) }
# What ships is what matters: the two entry points and the four shipped native
# What ships is what matters: the two entry points and the five shipped native
# binaries (versioninfo-check's list) must be in the tree, and the unshipped
# capture host must not be (package-closure-check proves it statically; this
# reads the directory).
@@ -186,8 +189,8 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$required = 'FrameLedger.exe', 'FrameLedger.Agent.exe', 'FrameLedger.Overlay.dll', 'FrameLedger.VkLayer.dll', 'FrameLedger.Guard.dll', 'FrameLedger.NvapiBridge.dll', 'rules/detection-rules.json',
'licenses/nuget/INDEX.md', 'licenses/THIRD_PARTY_NOTICES.md', 'licenses/FrameLedger-GPL-3.0.txt', 'licenses/mpl-2.0.txt', 'licenses/apache-2.0.txt'
$required = 'FrameLedger.exe', 'FrameLedger.Agent.exe', 'FrameLedger.Overlay.dll', 'FrameLedger.VkLayer.dll', 'FrameLedger.Guard.dll', 'FrameLedger.NvapiBridge.dll', 'FrameLedger.ProcessStats.dll', 'rules/detection-rules.json',
'licenses/nuget/INDEX.md', 'licenses/THIRD_PARTY_NOTICES.md', 'licenses/FrameLedger-GPL-3.0.txt', 'licenses/NOTICE.txt', 'licenses/mpl-2.0.txt', 'licenses/apache-2.0.txt'
$missing = @($required | Where-Object { -not (Test-Path (Join-Path out/app $_)) })
if ($missing.Count -gt 0) { throw "out/app is missing: $($missing -join ', ')" }
if (Test-Path out/app/FrameLedger.CaptureHost.exe) { throw 'out/app contains the unshipped capture host (12_BUILD: exactly two roots)' }
+6 -4
View File
@@ -1,9 +1,11 @@
# Gate changes to the detection + anti-cheat rules (docs/13_CI_CD.md).
#
# The raw file on `main` IS the distribution endpoint (docs/05_DETECTION.md),
# so there is nothing to publish — this workflow only gates correctness. That
# also means a bad merge ships to every user on their next rules check, which
# is why the anticheat block gets extra scrutiny here.
# There is nothing to publish: no rules feed exists (docs/20_OPEN_QUESTIONS.md
# §S20 feed half), so a rules change reaches users inside a release, seeded by
# the Agent from the packaged copy. This header said the raw file on `main` was
# the distribution endpoint until 2026-10-04. This workflow only gates
# correctness, and the anticheat block still gets the extra scrutiny, because
# whatever merges here ships in the next release.
name: Rules
+219 -1
View File
@@ -10,7 +10,8 @@ bumps for a database schema or IPC protocol break (`docs/11_UPDATER.md`).
uses it as the GitHub release body. A missing or empty `## [x.y.z]` section is a **red
release**, not an empty note — so cutting a release means moving the `[Unreleased]` entries
under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, then tagging
(`docs/13_CI_CD.md` §Branch & release policy).
(`docs/13_CI_CD.md` §Branch & release policy). *(For a pre-release, `vX.Y.Z-beta.N`, `VERSION` already holds the
numeric core and does not move; the heading is the full version — corrected 2026-10-04.)*
> **Built 2026-09-14 (P4 PR-5).** From 2026-08-06 until then this paragraph said the workflow
> "will" exist and that a missing section "will mean an empty release note"; the second half
@@ -27,6 +28,223 @@ under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, the
## [Unreleased]
### Added
- **The game's own memory, measured from outside the game, in every session** (owner decision D43, beta.12). A new
C++ library loaded by the Agent — never into a game — `FrameLedger.ProcessStats.dll`, reads once a second the game
process's **dedicated and shared GPU memory** (the documented `GPU Process Memory` performance counters, which need no
handle to the game) and its **private working set, working set and commit** (`GetProcessMemoryInfo` with
`PROCESS_QUERY_LIMITED_INFORMATION` only) — the numbers Task Manager's Details tab shows. A hooked game is read through
the handle the session already holds; a game that is not measured (anti-cheat, hooking off) through a handle opened for
the read and closed after it, the same least right the watcher already uses on every process, every process running its
executable added up, a reused pid refused. Measured before it was written in (`spike-notes` §16): a 512 MiB allocation
read +512.0 MiB, the private working set equals Windows' own counter, one read costs 0.1 ms, 600 reads leak nothing.
Stored as five new sensor series and, in schema **0018**, the median / mean / peak columns
(`game_vram_dedicated_*`, `game_ram_private_*`, …), the process count, the sources, and every sensor series'
n / mean / median / min / max in `sensor_stats_json`; carried live to the Dashboard (`SessionProgress`, `SessionHeld`)
and through the crash-recovery file (a new chunk type; beta.11's files still recover). The video-memory **budget** is
still not measured (`20_OPEN_QUESTIONS` §M11). The App shows all of it in the next change.
- **Sensor statistics have a median and a minimum** beside the mean and the maximum (`SeriesAggregates`).
- **The App shows the game's own memory everywhere a session is** (D43, beta.12), in Task Manager's units — MB below
1 GB, GB to two decimals, 1 GB = 1024 MB. The **session summary** has two new cards, *VRAM (this game)* and *RAM (this
game)*: the median, with the peak (and the shared GPU memory's or the commit's peak) beneath, and a new table,
**Statistics per series** — every series' mean, median, minimum, peak and number of readings, each in its own unit, as
stored when the session ended. The **Sessions** tab has *VRAM (game)* and *RAM (game)* columns (median · peak, the rest
in the tooltip); the **Trend** has *Median / Peak VRAM (game)* and *Median / Peak RAM (game)*; **Compare** has the same
four rows; the **Sensors** charts draw *Video memory* (this game's dedicated and shared beside the whole graphics card's)
and *Memory* (this game's private working set beside the whole PC's) in GB; the **live card** reads "This game: VRAM …
· RAM …", for a game that is not measured too; and the CSV export has a `# game_memory:` header line. Where Windows does
not report the private working set (before the September 2023 update) the working set is shown in its place and says
so. A session recorded before beta.12 reads N/A, and its summary says the statistics table did not exist yet.
- **Documents are shown rendered, not as raw Markdown** (owner request 4, beta.12): the Legal Gate, Help ▸ Limitations,
the update notes and the new About window draw headings, lists, tables, code and links (Markdig 1.4.0, BSD-2-Clause;
HTML in a document is shown as text and no image is fetched). The GPL is shown as written. Selectable and copyable;
links open in the browser, scroll to a section, or open another document the window holds; a `file:` or
`javascript:` link is never followed. **Help ▸ About** is a window with three tabs: the program's legal notices
(copyright, no warranty, the licence with the NOTICE terms, this version's source code), the third-party licences
with every shipped package's version and a button that opens the licences folder, and the legal documents (EULA,
GPL, Disclaimer, Privacy Policy, NOTICE, Trademarks). Help ▸ Limitations is a window of its own.
- **Links into the repository open the documents of the version you run**: a release stamps its tag into the App
(`-p:FrameLedgerSourceRef`), so *View on GitHub*, the safety document and every document link go to that tag rather
than to `main`, where the text may have changed since.
- **A user guide** (owner decision D44, beta.12): eight short pages for players — install and first start, record a
game, read your results, anti-cheat and safety, your data, questions and answers, and the terms in plain words — in
the app under **Help ▸ User guide** (the first item of the Help menu) and in the repository's `guide/` folder. The
README now opens with a pointer to it and keeps a separate section for developers and forks.
- **`NOTICE`, and the licence header in every source file** (owner decision D45, beta.12). FrameLedger's own material is
GPL-3.0-only with three additional terms of the kinds GPLv3 §7 permits: keep the copyright line and the attribution in
the program's legal notices (b), mark a modified version as different and do not call it "FrameLedger" alone (c), and
no trademark rights in the name (e). Section 7 wants such terms named in the source files themselves, so every
first-party `.cs`, `.cpp`, `.h`, `.inl`, `.ps1` and `.xaml` file now opens with an `SPDX-License-Identifier:
GPL-3.0-only` line and a line pointing at `NOTICE` (1,053 files; `src/native/third_party/` excluded). A new gate,
`tools/notice-check.ps1` (six self-test cases, both directions; `-Fix` writes a missing header), keeps it true, and
`tools/resx-gen.ps1` generates the string accessors with it. `NOTICE` ships in every package as
`licenses\NOTICE.txt`, and `release.yml` refuses a published tree without it.
- **For people who build, contribute or redistribute:** `CONTRIBUTING.md` (the gate, the definition of done, what will
not be merged, and that a contribution is licensed GPL-3.0-only with the `NOTICE` terms — no CLA), `FORKING.md` (what
the GPL asks of someone who distributes builds, and the names a fork must change so that it does not share
FrameLedger's update feed, install folder, database, pipe, shared memory or Vulkan layer), `CODE_OF_CONDUCT.md` (the
Contributor Covenant 2.1, adopted by reference) and `legal/TRADEMARKS.md` (third-party names, no affiliation, and how
the name FrameLedger may be used).
### Changed
- **The GPL is no longer accepted at the first start** (owner decision D45): it is your licence to FrameLedger and is
shown beside the documents for information — GPLv3 §9 needs no acceptance to run the program. **Accept** covers the
End User License Agreement, the Disclaimer and the Privacy Policy; a row an earlier version wrote for the GPL stays,
unread.
- **The documents you accept change, and are shown again once:** **EULA 1.5** (an unmeasured session also records the
game's own memory use; the GPL needs no acceptance; where the third-party notices are in an installed copy; your
rights as a consumer that no agreement can limit, and severability), **Disclaimer 2.10** (what it reads about a game
from outside it: the game's memory use, opened with the least access Windows offers; §2 names everything the thread
it runs inside the game does, which it understated; the maintainers' preface moves to
`docs/legal-drift-history.md`), **Privacy Policy 2.6** (the game's memory use, replacing a video-memory figure the
software never read; a new §3A on what an export or a bug report can carry about you before you share it; the version
history notes move to `docs/legal-drift-history.md`).
- **Help ▸ Documentation is Help ▸ Online documentation**, and opens the README of the version you run.
### Removed
- **Settings ▸ Recording no longer shows "Record games launched outside FrameLedger".** Nothing ever read that switch —
turning it off recorded every game anyway — and the App has no way to start a game itself, so "off" could only have
meant recording nothing. Its stored value is kept, unread, until a launch path exists.
### Fixed
- **The Logs page's Warning and Error filters showed no line from the Agent.** The Agent's log starts each line with a
date (Serilog's default form) and the filter read only the App's `[HH:mm:ss.fff LVL]` prefix; its test had fed App-form
lines into the fake Agent log. Both forms are read now.
- **The developer documentation is corrected in place** (owner decision D46): about a hundred statements across
`docs/01`–`20`, `HANDOFF`, `CLAUDE.md` and `FORKING.md` that the code contradicted, each struck with a dated
correction — among them a rules feed that does not exist (rules reach you with a release, as `LIMITATIONS.md` says),
hooks that were never built, the in-game thread described as doing less than it does, a delta update package that was
never published, the release steps for a pre-release, the Legal Gate's row count and the logging configuration. The
rules file's own comment and the rules workflow's header made the feed claim too, and are corrected. `docs/README.md`
is a new index for developers. Code comments that said what is not so (a sparkline, a flyout, a layer flag "false by
construction", two self-test counts) are corrected with them.
- **The first start's summary said "there is no way to override that refusal"** although a per-game user-mode exception
has existed since beta.9, and **"Nothing is sent anywhere"** although the update check is a request to GitHub; it now
names the exception and the one request. The README's safety table still said an exception needed two earlier
successful sessions — the rule until beta.11 (D38) made them a trial — and its feature list promised "per-process VRAM
and whether the driver was exceeding its budget"; both now say what the software does. The tier tooltip names the
game's memory beside the duration and the sensors.
- **The Legal Gate showed the documents as raw Markdown** (`**bold**`, `| --- |`) in a text box, and Help ▸ Limitations
and the update notes the same; they are rendered now (above). The Legal Gate's *View on GitHub* went around the App's
link opener; it goes through it.
- **The third-party notices' component table did not render as a table** in a Markdown renderer that follows the spec
strictly: a note line sat between its rows. The note is moved below the table, unchanged.
- **"Max VRAM (game)" on the Trend never had a point, the live card's VRAM was always empty, and the Sensors chart's
"VRAM used by this game" line was never drawn**: all three read the Overlay's in-game per-present figure, which nothing
ever produced. They read the game's memory measured from outside it now (above), and the CSV's note no longer calls
the always-empty `vram_mb` column "a held 1 Hz sample".
- **"Avg RAM in use" on the Trend is labelled as the whole PC's**, in GB like every other memory figure, so it is not
read as the game's.
- **A licence header written by a contributor no longer has to name poli0981**: `tools/notice-check.ps1` accepts any
holder and year in the same form (`Copyright (C) <year> <holder> - additional terms under GPLv3 section 7: see NOTICE`),
and `CONTRIBUTING.md` says so; seven self-test cases.
- **Documents that described a per-process VRAM figure the Overlay never produced** are corrected in place
(`03_METRICS`, `17_HOOK_ENGINE`, `18_GPU_VENDOR_APIS`, `20_OPEN_QUESTIONS` §M7/§H10), and the two that said an unmeasured
session opens no process (`04_CAPTURE`, `19_SAFETY`) now say what it opens, with which right, and why. The accuracy block
and `LIMITATIONS.md` say what is measured now. `ITelemetryPoller`'s remark that the descriptor is read at finalize — it is
read at session start — is corrected.
- **The native binaries' version block named the wrong licence.** Every DLL's `LegalCopyright` read
`GPL-3.0-or-later` while `LICENSE`, the EULA, the README and the third-party notices all say GPL-3.0-only; it now reads
`Copyright (C) 2026 poli0981. GPL-3.0-only with additional terms: see NOTICE`.
## [0.1.0-beta.11] - 2026-10-03
**The eleventh pre-release: a user-mode anti-cheat exception that can be reached, a library that fills the window, and
charts and clean-up across a game's sessions.** The same unsigned installer: verify its hash against `SHA256SUMS.txt`,
then *More info → Run anyway*. What changed for a user:
- **The user-mode anti-cheat exception no longer needs earlier sessions.** A game blocked the moment it was added could
never qualify; now its first two sessions under the exception are a trial, and one that does not go well ends the
exception for good. Everything else it requires is unchanged, and a ban remains possible.
- **The Games library** fills the window at any width, can be shown as a list, counts its games and has **Refresh**: it
reads the library again, offers the games your stores installed since, and marks games whose executable is gone.
- **Import** hides the games already in the library — you can show them, dimmed.
- **Delete all sessions** — of one game on its page, or of every game in Settings ▸ Data.
- **Charts across a game's sessions**: *Sessions at a glance* on the Sessions tab, and the Trend draws more metrics at once.
- **Settings** has no row without a control.
- **Three CrackProof games** are on the anti-cheat list (Umamusume: Pretty Derby, Heaven Burns Red, Madoka Magica Magia
Exedra).
- **The Disclaimer (2.9) and the EULA (1.4) say how the exception works now**, so the Legal Gate opens once after the
update. The Privacy Policy is unchanged.
**Updating from `0.1.0-beta.10`:**
- Quit the App (tray icon → Exit) and end `FrameLedger.Agent.exe` before running the installer.
- Schema 0017 adds one column; the database opens in place, and an older version cannot open it again.
- Every game is re-checked once for anti-cheat (rules `2026.10.1`).
- An exception made under beta.9 or beta.10 stays in force; if fewer than two sessions were played under it, the rest of
its trial applies.
### Added
- **The Games library fills the window, switches to a list, counts its games and refreshes** (owner requests, beta.11).
The cards were 300 px in a plain wrap, so a wide window left up to a card's width empty at the right and the third pill
("Hooking off") was cut; the grid now has as many columns as fit at 300 px or wider, every card an equal share of the
width, and the pills wrap. A button beside the sort switches to a **list** — one row per game with its store, engine,
status, sessions, playtime and last played — and the choice is remembered (`ui.library_view`). The title counts the
games. **Refresh** reads the library again, looks in the stores for games installed since and offers only those (*No
new games* when there are none), and marks every entry whose executable is gone **Not installed** — the tooltip says
when it is the drive that is not connected; nothing is removed. The page also reloads by itself when a session ends or
an import adds games while it is open (an import made from the menu used to show only after leaving the page).
- **Import hides the games already in the library** (owner request, beta.11): on a re-import they were most of the list
and pushed the new ones out of sight. *Show the N games already in the library* brings them back, dimmed, and a row
that cannot be imported has its box disabled (a tick on it was taken and ignored).
- **Delete all sessions** (owner decision D40, beta.11): on a game's page, every session of that game; in Settings ▸
**Data**, every session of every game — with their frame and sensor data and notes, after a confirmation that says how
many. The library, the settings and every game's hooking consent stay. The capture agent deletes them (the rows are its)
and refuses while a session is being recorded; an older agent is told to restart. A summary window still open on a
deleted session closes. A new pipe request, `DeleteSessions`.
- **Charts across a game's sessions** (owner decision D39, beta.11): the Sessions tab opens with *Sessions at a glance* —
every hooked session's frame rate (Presented FPS, or Native and Displayed where frame generation was measured, never one
inflated line) and its 1% and 0.1% lows, oldest first; click a point to select that session. The Trend keeps its metric
and can **draw more beside it** (*Also draw*), a second unit against the right axis, two units at most.
- **Three CrackProof titles on the anti-cheat title list** (owner request, beta.11): Umamusume: Pretty Derby (Steam
`3224770`), Heaven Burns Red (`1973710`) and Madoka Magica Magia Exedra (`2987800`). Each store page states *"Uses
Kernel Level Anti-Cheat"* and names HyperTech's CrackProof; its driver loads from `System32` under a numbered name,
outside the game's folder, so nothing of the game's own can name it and the list does, by Steam id only (no executable
name was verified). ANOTHER EDEN, which a community list also names, is left out: its store page says nothing of the
kind. Rules `2026.10.1` — every game is re-checked once, and these games' hooking is turned off like any title-list
finding, never under a user-mode exception (`19_SAFETY` check 3).
### Changed
- **The user-mode anti-cheat exception no longer needs sessions measured before it — its first two sessions are a
trial** (owner decision D38, beta.11). D33 asked for two successful hooked sessions before a grant, but since beta.8 a
game is blocked the moment it is added, so a blocked game could never earn them, and a reset ledger lost the ones it
had: after the owner deleted theirs, GIRLS' FRONTLINE 2 read *"Not eligible: 0 successful hooked session(s), two are
needed"* for good. A grant now needs no session. Until two sessions under it have succeeded, the game page says
*trial: N of 2*, and any end during the trial — a crash, a safety unhook, the Overlay's own stop, a new finding, or a
stored hooked session that recorded no frame or did not end normally — ends the exception **for good** (schema 0017,
`games.ac_exception_trial_failed_at`, set once and never cleared; the Agent refuses a grant with `TrialFailed` and the
store refuses one in SQL; a twin merge keeps the mark). Every other condition is unchanged — one user-mode family, no
`.sys` in the game's folder, no title list — and after the trial an end is what it was. The disclosure is
`ac-exception-dialog/2`: it names no session count and has a *Trial* paragraph (`ja` stays English until reviewed).
**Legal text:** Disclaimer 2.9 (§2A) and EULA 1.4, so the Legal Gate opens once; the accuracy block, `SECURITY.md` and
`LIMITATIONS.md` say the same; CLAUDE.md rule 2 carries the amendment (`19_SAFETY` §The user-mode exception).
### Fixed
- **Settings has no row without a control** (owner request, beta.11): *Games with hooking on* shows only while a game has
hooking on, the *Elevation* row became the admin mode row's status line, and the note under the language row is gone.
The retention message now names Settings ▸ Recording, where retention lives.
- **The exception's card and list say what is true** (found with D38): an eligible game's *Anti-cheat* card said hooking
"cannot be turned on" beside a usable *Make exception…* — it now says hooking is off unless you make one; the Settings
list showed each game's session count twice and listed games that could never qualify, with no action — it lists only
games it can act on; a tolerant scan that found nothing of the family was said as "the check could not finish" — it
says the family was not found; and a blocked game whose executable could not be read stayed *Checking…* for ever — the
sweep now answers it. **Refresh** shows only while a row is being checked, the one time it can change anything.
## [0.1.0-beta.10] - 2026-09-28
**The tenth pre-release: how each game was shown, the agent as administrator if you choose it, and the exact Unreal
+34 -12
View File
@@ -17,12 +17,13 @@ A C++ DLL (`FrameLedger.Overlay.dll`) is injected into games the user explicitly
>
> **A finding turns the game's hooking off** (`19_SAFETY` §What a finding does to the game). An anti-cheat named in the game itself — its process, its title lists, its folder — is written to the row exactly as the pre-scan always wrote it (`hook_enabled = 0`, `hook_blocked_reason`, `hook_prescan_state = 'blocked'`), and since 2026-09-22 also when the guard finds it at a session's start or at the 30 s re-scan (`AntiCheatVerdict.IsFindingAboutTheGame`). A machine-wide driver or service refuses that session only. The notice, the game's page, the session's notes and the Agent's log all say it happened. Nothing clears the block, as before.
> **Amended 2026-09-26 (owner decision D33): one narrow, evidence-bound exception.** Asked with the 2026-09-22 withdrawal and this rule quoted back, the owner chose a per-game exception for anti-cheat that is **user-mode throughout** — a Settings option off by default, then the user ticks each eligible game through a versioned disclosure (bans are possible and can arrive days later). Eligible only when every finding about the game is `BlockedModule` / `AntiCheatFile` / `AntiCheatDirectory` of ONE family whose floor-and-file footprint has no driver, service or `.sys` (`fl::guard::FamilyIsUserModeOnly` — the GUARD decides, from a family NAME the caller passes), no `.sys` is anywhere in the install tree, no title list names the game, and the ledger holds ≥ 2 successful Tier-1 sessions of it. Drivers, services, title lists, the `.sys` rule, the fuzzy tier, scan failures, `TargetUnreadable`, 32-bit, the kill switch and Vulkan are never excepted. The guard runs every check and keeps scanning past the tolerated family (`kAllowedUserModeException`, reason 28); the Overlay learns the family from `Local\FrameLedger.Tolerate.<pid>` before its loader detour exists. A new finding, a crash / safety unhook / floor stop under it, or an executable change ends it; the block is never cleared. **No other form of override is to be added** (`19_SAFETY` §The user-mode exception).
> **Amended 2026-10-03 (owner decision D38): the evidence moved from before the grant to its trial.** "≥ 2 successful Tier-1 sessions" above could never be met by a game blocked at add time — since beta.8 that is every blocked game — nor after a ledger reset. Asked with that, the owner chose: a grant needs no session; the first two hooked sessions under it are a trial, and any end during the trial (a crash, a safety unhook, a floor stop, a new finding, or a stored hooked session with no frames or an abnormal exit) ends the exception **for good** (`games.ac_exception_trial_failed_at`, schema 0017, never cleared). Every other condition above is unchanged, and so is the last sentence.
3. **Never implement evasion.** No manual mapping, no PE header erasure, no thread hiding, no signature obfuscation, no unlinking from the PEB module list. Injection uses documented `LoadLibraryW`. The DLL keeps its real name, real exports, and version info. A performance tool must be *visible* to anti-cheat, not hidden from it. Any PR that makes FrameLedger harder to detect is rejected on principle.
4. **Never read or write game memory outside our own hooks.** We read arguments passed to APIs we hooked and COM/handle objects we legitimately own. No pattern scanning for game internals, no reading player/entity state, no writing to game memory. Ever.
5. **The hook must never crash the game.** Every hook body: SEH-guarded, allocation-free, lock-free, no logging, no exceptions crossing the boundary. On repeated faults, self-disable (`17_HOOK_ENGINE` §Fault policy).
6. **FPS display rule (product requirement):** wherever FPS is shown and Frame Generation is active, show *Native FPS*, *Displayed FPS*, and the FG factor together (`62 → 118 FPS (×1.9 FG)`). Never a single inflated number. See `docs/03_METRICS.md`.
> **Amended 2026-09-03 (owner decision).** When frame generation is *not measured* — `FL_MEASURED_FG` clear, which is every title on today's writer — the one number that may stand alone is **Presented FPS** (`presents / D`), with a mandatory qualifier from the **runtime census** (`FlWriterState.runtimeCensus`): "no frame-generation runtime was loaded, so this cannot include in-process generated frames" or "a frame-generation runtime is loaded and nothing was observed — this MAY include generated frames". The word "Native" never appears alone. **The census never produces `none`**: a statically linked FSR has no module to see, and a census-`none` there would be exactly the inflated number this rule forbids.
> **Amended 2026-09-03 (owner decision).** When frame generation is *not measured* — `FL_MEASURED_FG` clear, ~~which is every title on today's writer~~ which is every title with no Streamline or FidelityFX hook live *(corrected 2026-10-04: the writer sets it since #103, 2026-09-03)* — the one number that may stand alone is **Presented FPS** (`presents / D`), with a mandatory qualifier from the **runtime census** (`FlWriterState.runtimeCensus`): "no frame-generation runtime was loaded, so this cannot include in-process generated frames" or "a frame-generation runtime is loaded and nothing was observed — this MAY include generated frames". The word "Native" never appears alone. **The census never produces `none`**: a statically linked FSR has no module to see, and a census-`none` there would be exactly the inflated number this rule forbids.
>
> **Amended 2026-09-05.** A counted `none` (`presents = application frames`) is **withheld** — Presented FPS with a third qualifier, "this number counts application frames; the Displayed rate is unknown" — on the one shape measured to produce a false `none`: Streamline ≥ 2.8.0 with `sl.dlss_g.dll` loaded (Dying Light: The Beast, five captures, DLSS FG ×4 per the owner). `docs/03_METRICS.md` §Frame Generation carries the key and why it is the Streamline plugin rather than `nvngx_dlssg.dll`; `20_OPEN_QUESTIONS` §H5 carries the session that keeps or withdraws it.
>
@@ -46,7 +47,8 @@ A C++ DLL (`FrameLedger.Overlay.dll`) is injected into games the user explicitly
| UI | WPF + WPF UI (`WPF-UI` pinned = 4.3.0) + CommunityToolkit.Mvvm — `docs/16_WPFUI_SYNTAX.md` |
| App composition | .NET Generic Host + DI in `FrameLedger.App` |
| Charts | ScottPlot 5 |
| GPU telemetry | Layered: DXGI + PDH counters (all vendors) → LibreHardwareMonitorLib (MPL-2.0, all vendors) → **NVAPI (MIT, headers + `amd64/nvapi64.lib` vendored 2026-08-05** at `src/native/third_party/nvapi/`, consumed via the `fl_nvapi` target; NVIDIA extras + Reflex). **No AMD/Intel vendor SDK** — `docs/18_GPU_VENDOR_APIS.md`. ~~**No telemetry source exists in code yet**~~ **`LhmTelemetrySource` (L2) exists since 2026-09-03 (`20_OPEN_QUESTIONS` §M5 row R1, eight GPU fields unelevated); L1 (`BaselineTelemetrySource`: DXGI identity + the PDH adapter-memory counter, the first CsWin32 consumer), `CompositeTelemetrySource` and the 1 Hz `TelemetryPoller` since 2026-09-09; L3 (`NvapiTelemetrySource` over the native `FrameLedger.NvapiBridge.dll` — the only shipped binary linking `nvapi64.lib`, loaded by the Agent into its own process and never into a game) since 2026-09-10 (PR-E2)** — `ctest fl_nvapi_probe` was the only NVAPI consumer until then, and it exists so the vendoring is verified rather than asserted. This row said no source existed for six days after one did, recorded 2026-09-09 rather than repaired quietly. This row previously claimed the vendoring in the present tense while `third_party/` held only `vulkan-headers`; `legal/` had already caught the identical claim about itself and gained a bidirectional gate, which is what made the real vendoring a red-then-green |
| Markdown in the App | **Markdig** (BSD-2-Clause, pinned 1.4.0) → WPF `FlowDocument`, HTML off, no image fetched — the Legal Gate, the user guide, Help ▸ Limitations, the update notes, About (beta.12; row added 2026-10-04) |
| GPU telemetry | **The game process's own memory since beta.12 (D43):** `FrameLedger.ProcessStats.dll` (C++, loaded by the Agent, never into a game) reads its dedicated/shared GPU memory from the `GPU Process Memory` counters and its working sets from `GetProcessMemoryInfo` — `18_GPU_VENDOR_APIS` §The game process's memory. Layered: DXGI + PDH counters (all vendors) → LibreHardwareMonitorLib (MPL-2.0, all vendors) → **NVAPI (MIT, headers + `amd64/nvapi64.lib` vendored 2026-08-05** at `src/native/third_party/nvapi/`, consumed via the `fl_nvapi` target; NVIDIA extras + Reflex). **No AMD/Intel vendor SDK** — `docs/18_GPU_VENDOR_APIS.md`. ~~**No telemetry source exists in code yet**~~ **`LhmTelemetrySource` (L2) exists since 2026-09-03 (`20_OPEN_QUESTIONS` §M5 row R1, eight GPU fields unelevated); L1 (`BaselineTelemetrySource`: DXGI identity + the PDH adapter-memory counter, the first CsWin32 consumer), `CompositeTelemetrySource` and the 1 Hz `TelemetryPoller` since 2026-09-09; L3 (`NvapiTelemetrySource` over the native `FrameLedger.NvapiBridge.dll` — the only shipped binary linking `nvapi64.lib`, loaded by the Agent into its own process and never into a game) since 2026-09-10 (PR-E2)** — `ctest fl_nvapi_probe` was the only NVAPI consumer until then, and it exists so the vendoring is verified rather than asserted. This row said no source existed for six days after one did, recorded 2026-09-09 rather than repaired quietly. This row previously claimed the vendoring in the present tense while `third_party/` held only `vulkan-headers`; `legal/` had already caught the identical claim about itself and gained a bidirectional gate, which is what made the real vendoring a red-then-green |
| CPU/board sensors | LibreHardwareMonitorLib ≥ 0.9.6 (PawnIO) — **optional**, elevated only |
| Tier-2 fallback | **There is none, and Tier 2 is not a measurement.** Owner decision 2026-08-28: the ladder is two rungs — hooked, or duration + sensors + the reason. ~~ETW-based, no injection~~; ~~Intel PresentMon console binary~~ dropped 2026-08-27 after §S31 retired it. Whether a shipped build ever regains a no-injection measurement is `docs/20_OPEN_QUESTIONS.md` §G |
| Storage | SQLite via Microsoft.Data.Sqlite + Dapper (no EF) |
@@ -61,6 +63,8 @@ A C++ DLL (`FrameLedger.Overlay.dll`) is injected into games the user explicitly
```
FrameLedger.slnx # XML solution format (SDK default since .NET 10)
NOTICE # copyright + the GPLv3 section 7 additional terms (beta.12, D45)
CONTRIBUTING.md FORKING.md CODE_OF_CONDUCT.md # for people who build, contribute or redistribute
global.json # pins the SDK band — see 12_BUILD
build.ps1 # the quality gate; CI runs this identical script
src/
@@ -69,6 +73,10 @@ src/
FrameLedger.Injector/ # C++20 static lib: launch/attach injection, AC guard probe
FrameLedger.VkLayer/ # C++20 Vulkan implicit layer DLL + manifest JSON
FrameLedger.Shm/ # header-only: ring buffer + record layout, shared by native & C# (mirrored)
FrameLedger.NvapiBridge/ # C++ DLL loaded by the Agent (never a game): NVAPI telemetry, NGX state (P2 PR-E2)
FrameLedger.ProcessStats/ # C++ DLL loaded by the Agent (never a game): the game process's memory (beta.12, D43)
tests/ tools/ third_party/ # ctest suites; probes, hook-harness, vendor stubs; vendored headers
# (these five lines added 2026-10-04 — the list stopped at Shm)
FrameLedger.Domain/ # entities, metric calculators — zero dependencies
# (Metrics/ WRITTEN 2026-09-09, P2 PR-A: frame times,
# percentiles, lows, stutter, the FG window and its
@@ -87,7 +95,8 @@ src/
# and Capture/ (PR-C): ShmRingAttacher/ShmCaptureSink over the
# reader, HeldProcessLivenessSource, TargetResolver (path only,
# never a pid), ProcessLauncher, the module snapshot, the marker scan
FrameLedger.Shared/ # IPC contracts (System.Text.Json source-gen) + ShmRecord struct mirror
FrameLedger.Shared/ # IPC contracts (System.Text.Json source-gen) + the struct mirror (ShmLayout.cs;
# it said "ShmRecord", a type that never existed, until 2026-10-04)
FrameLedger.Agent/ # capture orchestrator: watcher, injector control, shm drain, recorder
# BUILT 2026-09-10 (P2 PR-F): a Generic Host. `--serve` = watcher
# (Application.Watch: ProcessWatcher, ProcessTree, DescendantElection,
@@ -117,12 +126,18 @@ src/
# is not what holds rule 1.
tests/
FrameLedger.Domain.Tests/ FrameLedger.Application.Tests/ FrameLedger.Infrastructure.Tests/
FrameLedger.Agent.Tests/ FrameLedger.App.Tests/
FrameLedger.CaptureHost.Tests/ # incl. the Category=Integration end-to-end case
native/FrameLedger.Overlay.Tests/ # Catch2: ring buffer, record encode, fault policy
tools/ # changelog-check, chokepoint-check, coverage-gate, gen-ac-floor,
# hookinventory-check, license-check, package-closure-check,
# rules-validate, vendor-exports, versioninfo-check,
# vklayer-blastradius
Shared/ fixtures/ # test helpers; the detection corpus and other fixtures
~~native/FrameLedger.Overlay.Tests/~~ # never existed (corrected 2026-10-04): the native tests are
# src/native/tests/ (ctest, mostly Catch2 — ring, guard, layout,
# vklayer, unhook, rules budget, NVAPI bridge, process stats)
tools/ # accuracy-check, changelog-check, chokepoint-check, coverage-gate,
# gen-ac-floor, hookinventory-check, license-check, license-gather
# (+ license-overrides/), notice-check, package-closure-check,
# release-notes, rules-validate, test-artifacts-check, vendor-exports,
# versioninfo-check, vklayer-blastradius, fps-impact-runbook
# (six names added 2026-10-04)
# (PowerShell). This line used to name three, one of which
# — resx-audit — ~~does not exist~~ exists since 2026-09-13 with
# resx-gen (the committed Strings.Designer.cs generator).
@@ -130,19 +145,26 @@ tools/ # changelog-check, chokepoint-check, coverage-gat
# fl-layout-dump -> struct offsets for the C# mirror test
# hook-harness -> dummy D3D11 + D3D12 + Vulkan + OpenGL app
# (--vulkan since #140, --opengl since #141)
# fl-probe-* -> guard, hook profile, interposer, NVAPI, process
# stats, signer, Vulkan layer; fl-baseline-probe;
# vendor-stubs/ -> fixture DLLs with the vendors' export names
rules/detection-rules.json # engine/platform/capability + anticheat blocklist
guide/ # the user guide (beta.12, D44): eight short English pages for players, embedded in the
# App (Help > User guide); README.md is its contents. docs/ is for developers.
docs/ legal/ legal/licenses/
```
Dependency direction: `App/Agent → Application → Domain`; **`Application → Shared` since 2026-09-09** (P2 PR-A, decision D1 — `Application.Metrics.FrameSampleMapper` is where `FlFrameRecord` becomes Domain's `FrameSample`, and `Application.Capture.CaptureSession`, hosted there since PR-C the same day, is written over the record; `DrainResult` moved to Shared with it); `Infrastructure` implements `Application` ports; Domain references nothing. **The native layer is reachable only through `Infrastructure`** — no P/Invoke anywhere else. **Two facades since 2026-09-10:** `NativeAntiCheatGuard` (required — absent throws) and `NativeNvapiBridge` (optional — absent is a missing telemetry layer that reports itself), both by absolute path beside the assembly through its one `DllImport` resolver, `Infrastructure.Native.BesideThisAssembly`; the runtime allows one resolver per assembly, which is why a third facade claims a name there rather than setting its own.
Dependency direction: `App/Agent → Application → Domain`; **`Application → Shared` since 2026-09-09** (P2 PR-A, decision D1 — `Application.Metrics.FrameSampleMapper` is where `FlFrameRecord` becomes Domain's `FrameSample`, and `Application.Capture.CaptureSession`, hosted there since PR-C the same day, is written over the record; `DrainResult` moved to Shared with it); `Infrastructure` implements `Application` ports; Domain references nothing. **The native layer is reachable only through `Infrastructure`** — no P/Invoke anywhere else. **~~Two~~ Three facades since ~~2026-09-10~~ 2026-10-03:** `NativeAntiCheatGuard` (required — absent throws), `NativeNvapiBridge` (optional — absent is a missing telemetry layer that reports itself) and, since beta.12 (D43), `NativeProcessStats` (optional — the game process's own memory, read from outside the game; absent reads N/A), all by absolute path beside the assembly through its one `DllImport` resolver, `Infrastructure.Native.BesideThisAssembly`; the runtime allows one resolver per assembly, which is why the third facade claims a name there rather than setting its own.
## Coding conventions
**C# —** `Nullable enable`, `TreatWarningsAsErrors`, `AnalysisLevel latest-all`, file-scoped namespaces, Roslynator + Meziantou + VS Threading analyzers, `dotnet format` clean. Async suffixed `Async`, `ConfigureAwait(false)` off the UI. All user-visible strings from `.resx`. Timestamps UTC (unix-ms in SQLite); QPC ticks only inside the capture pipeline.
**C++ —** `clang-format` (LLVM base, 4-space, 120 col) enforced in CI. No STL containers that allocate in hook paths. No `std::mutex` in hook paths. `-D_HAS_EXCEPTIONS=0` in the Overlay target. Every hook entry point wrapped per the `FL_HOOK_GUARD` macro (`17_HOOK_ENGINE`). Static analysis: `/analyze` + clang-tidy (`bugprone-*`, `cert-*`, `concurrency-*`).
**C++ —** `clang-format` (LLVM base, 4-space, 120 col) enforced in CI. No STL containers that allocate in hook paths. No `std::mutex` in hook paths. `-D_HAS_EXCEPTIONS=0` in the Overlay target. Every hook entry point wrapped per the `FL_HOOK_GUARD` macro (`17_HOOK_ENGINE`). Static analysis: ~~`/analyze` + clang-tidy (`bugprone-*`, `cert-*`, `concurrency-*`)~~ CodeQL (`codeql.yml`, a required check); `/analyze` and clang-tidy are not configured *(corrected 2026-10-04)*.
**Struct mirroring —** `FlFrameRecord`, `FlShmHandshake`, `FlWriterState` and `FlControlBlock` each exist twice: `src/native/FrameLedger.Shm/include/fl_shm.h` (**normative**) and `src/FrameLedger.Shared/ShmLayout.cs` as `[StructLayout(LayoutKind.Sequential)]`. `ShmLayoutMirrorTests` asserts size and every field offset on both sides **against JSON emitted by `tools/fl-layout-dump`**, never a transcribed table, and walks the field list in both directions so a field added on either side alone fails.
**Licence header —** every first-party source file (`.cs .cpp .h .inl .ps1 .xaml`) opens with two comment lines, `SPDX-License-Identifier: GPL-3.0-only` and `Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE` (beta.12, owner decision D45). GPLv3 §7 requires additional terms to be named in the source files, and `NOTICE` holds them — (b) preserve the notices, (c) mark modified versions, (e) no trademark rights in the name. `tools/notice-check.ps1` is a `build.ps1` gate; `-Fix` writes a missing header. `src/native/third_party/` is excluded.
**Struct mirroring —** ~~`FlFrameRecord`, `FlShmHandshake`, `FlWriterState` and `FlControlBlock`~~ `FlShmHandshake`, `FlWriterState`, `FlControlBlock`, `FlDisplayState` (layout 4, beta.10), `FlFrameRecord` and `FlTolerance` (D33, beta.9) each exist twice *(corrected 2026-10-04)*: `src/native/FrameLedger.Shm/include/fl_shm.h` / `fl_tolerance.h` (**normative**) and `src/FrameLedger.Shared/ShmLayout.cs` as `[StructLayout(LayoutKind.Sequential)]`. `ShmLayoutMirrorTests` asserts size and every field offset on both sides **against JSON emitted by ~~`tools/fl-layout-dump`~~ `src/native/tools/fl-layout-dump`**, never a transcribed table, and walks the field list in both directions so a field added on either side alone fails.
It also asserts **blittability** (`RuntimeHelpers.IsReferenceOrContainsReferences`), because offsets cannot see it: measured 2026-08-05, swapping the `fixed byte BuildId[32]` for this repo's own `[MarshalAs(ByValTStr)] string` idiom keeps `Marshal.SizeOf` at 64 and every offset correct while `Unsafe.SizeOf` collapses to **40** — a mirror that passes the obvious checks and cannot be read out of a memory-mapped view.
@@ -150,7 +172,7 @@ It also asserts **blittability** (`RuntimeHelpers.IsReferenceOrContainsReference
The version handshake is wired end to end as of 2026-08-05: `FlGuardBuildId` gives the Agent a build id of its own and `ShmHandshakeValidator` performs the refuse-to-attach comparison `07_IPC` specifies (§S23-1). **Its default is `NotEvaluated`, not `Ok`** — a result nobody produced has validated nothing, the same rule `AntiCheatVerdict` follows.
**Dev mode —** `FL_MOCK=1` is **specified but not implemented** — `grep -rn FL_MOCK src tests tools build.ps1` returns nothing (recorded 2026-08-04). When it exists it runs the whole app with a synthetic frame source and no injection at all, and it is how the UI is meant to be developed; until then, do not plan work on the assumption that it is there. `tools/hook-harness` is a dummy **D3D11 + D3D12 + Vulkan + OpenGL** app used to exercise hooks without a real game — `--vulkan` since #140 and `--opengl` since #141 (2026-09-06); this sentence said both were unwritten until 2026-09-09 (`docs/12_BUILD.md` §Targets is the accurate list).
**Dev mode —** `FL_MOCK=1` is **specified but not implemented** — `grep -rn FL_MOCK src tests tools build.ps1` returns nothing (recorded 2026-08-04). When it exists it runs the whole app with a synthetic frame source and no injection at all, and it is how the UI is meant to be developed; until then, do not plan work on the assumption that it is there. ~~`tools/hook-harness`~~ `src/native/tools/hook-harness` (path corrected 2026-10-04) is a dummy **D3D11 + D3D12 + Vulkan + OpenGL** app used to exercise hooks without a real game — `--vulkan` since #140 and `--opengl` since #141 (2026-09-06); this sentence said both were unwritten until 2026-09-09 (`docs/12_BUILD.md` §Targets is the accurate list).
## Definition of done (per PR)
+14
View File
@@ -0,0 +1,14 @@
# Code of conduct
FrameLedger adopts the **[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)**
(© Contributor Covenant contributors, licensed CC BY 4.0) as its code of conduct, for everyone who takes part in the
project — in issues, pull requests, discussions and any other project space.
In short: be respectful and welcoming, criticise ideas rather than people, and do not harass, insult or demean anyone.
The full text linked above is the code; this summary does not replace it.
## Reporting
Report behaviour that breaks the code to the maintainer at **contact@poli0981.dev**. Reports are read in confidence,
and the maintainer decides on the response in line with the Covenant's enforcement guidelines — from a private note to
a ban from the project's spaces.
+71
View File
@@ -0,0 +1,71 @@
# Contributing to FrameLedger
Thank you for looking. FrameLedger is a small project with strict rules, because it loads code into games and a mistake
can cost a user their account. This page says how to build it, what a change has to bring with it, what will not be
merged, and under what licence your contribution is accepted.
## Before you start
- **Read `CLAUDE.md`'s *Non-negotiable rules* and `docs/19_SAFETY_AND_ANTICHEAT.md` first.** They constrain everything
that touches a game.
- **Open an issue before anything larger than a fix**, so the approach can be agreed before the work is done.
- **A game with anti-cheat that FrameLedger fails to detect** is a safety bug: use the *Safety gap* issue form.
- **A vulnerability in FrameLedger itself** goes the private route in `SECURITY.md`, never a public issue.
- Everyone who takes part follows the `CODE_OF_CONDUCT.md`.
## Building
You need Windows 10 22H2 or later (x64), Visual Studio 2022 with the C++ workload (MSVC v143), CMake 3.28 or later,
PowerShell 7, and the .NET SDK that `global.json` pins. Then:
```powershell
./build.ps1 check
```
That is the whole quality gate, and continuous integration runs the identical script: the native build and its tests,
`clang-format`, the managed build with warnings as errors, `dotnet format`, every test project, and the repository's own
checks (licences, the accuracy blocks, the licence headers, the changelog rules, …). `docs/12_BUILD.md` describes each
step and the build profiles. Run it in your main checkout: a fresh `git worktree` cannot configure the native build.
## What a pull request brings with it
The definition of done is the one in `CLAUDE.md`:
- it builds without warnings (C# and C++), the tests are green, and `dotnet format` and `clang-format` are clean;
- a change to the hook path states its measured overhead in the PR (`docs/14_TESTING.md` §Hook overhead);
- a new hook is listed in `docs/17_HOOK_ENGINE.md` §Hook inventory and justified against rule 4;
- every new user-visible string exists in `en`, `vi` and `ja` (`docs/09_I18N.md`);
- a change that makes a document wrong updates that document in the same PR;
- a change under `src/` adds an entry under `## [Unreleased]` in `CHANGELOG.md`;
- every new source file carries the licence header — `./tools/notice-check.ps1 -Fix` writes it. A file you wrote
yourself may name you in its second line instead, in the same form:
`Copyright (C) <year> <your name> - additional terms under GPLv3 section 7: see NOTICE`.
The pull-request template lists the safety checks for changes to the capture layer.
## What will not be merged
Whatever its other merits, a change that
- adds any way to override, weaken or skip the anti-cheat guard (rule 2);
- makes FrameLedger harder to detect — manual mapping, header erasure, thread hiding, unlinking modules, obfuscation,
renamed binaries (rules 3 and 9);
- reads or writes game memory outside the hooked calls (rule 4), or makes a hook able to crash a game (rule 5);
- adds telemetry, analytics or any network request beyond the ones `legal/PRIVACY_POLICY.md` lists (rule 8);
- turns injection on for a game the user did not individually enable (rule 1).
## Licensing of contributions
FrameLedger is licensed under the GNU GPL, version 3 only, with the additional terms in `NOTICE`. **By opening a pull
request you confirm that you have the right to submit the change, and you license it under GPL-3.0-only, with the
additional terms in `NOTICE` (GPLv3 §7 (b), (c) and (e)) applying to it as they apply to the rest of FrameLedger's own
material.** There is no contributor licence agreement and no copyright assignment: you keep the copyright in your
contribution. Code from elsewhere must come with a licence compatible with GPL-3.0-only and be listed in
`legal/THIRD_PARTY_NOTICES.md`.
Changes written with AI assistance are welcome on the same terms — you are responsible for what you submit, as for any
other change.
## Questions
Open an issue, or write to contact@poli0981.dev.
+7
View File
@@ -25,6 +25,13 @@
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageVersion Include="ScottPlot.WPF" Version="5.1.59" />
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.4.1" />
<!--
Markdig (Alexandre Mutel): Markdown rendered in the App (beta.12, owner request 4) - the Legal Gate, Help,
About and the user guide show their documents rendered, not as raw text. BSD-2-Clause, no dependency on
net10.0. The package ships no licence file, so its text is a reviewed override
(tools/license-overrides/Markdig.txt). HTML is disabled in the pipeline (App/Markdown/MarkdownRenderer.cs).
-->
<PackageVersion Include="Markdig" Version="1.4.0" />
</ItemGroup>
<ItemGroup Label="Hosting and logging">
+94
View File
@@ -0,0 +1,94 @@
# Forking and redistributing FrameLedger
This page is for anyone who clones or forks FrameLedger — and above all for anyone who **gives builds of a modified
FrameLedger to other people**. It says what the licence lets you do, what it asks of you when you distribute, and the
practical things a fork has to change so that its users and FrameLedger's users do not get each other's updates, data
or blame. It is written to be useful, not as legal advice; the texts that decide are `LICENSE` (the GNU GPL, version 3)
and `NOTICE`.
## What the licence lets you do
FrameLedger is free software under the **GNU General Public License, version 3 only** (`GPL-3.0-only`). You may run it
for any purpose, study and change its source, and share copies — changed or not — free of charge or for a fee. You do
not need anyone's permission, and you do not have to accept the licence just to run the program (GPLv3 §9).
## What it asks when you distribute a build
"Distribute" here is the GPL's *convey*: giving a copy to someone else, including publishing an installer. Running
FrameLedger yourself, or changing it for yourself, asks nothing of you.
- **The source goes with the build.** Whoever receives your binaries must be able to get the complete source code
that builds them, under the same licence (GPLv3 §6) — the C++ and C# sources, the build scripts (`build.ps1`,
`src/native/CMakeLists.txt`, the workflows) and everything else needed to rebuild them. Publishing the exact source
tree at the tag you built from, next to the release, is the simplest way. An installer such as the Velopack
`Setup.exe` counts as a binary.
- **Keep the notices.** Ship `LICENSE`, `NOTICE` and the third-party licences with every copy. The release workflow
already does this: the App's publish step copies them into `licenses\` beside the executables (`licenses\NOTICE.txt`,
`licenses\FrameLedger-GPL-3.0.txt`, `licenses\THIRD_PARTY_NOTICES.md`, `licenses\nuget\`), and
`.github/workflows/release.yml` refuses a published tree without them. Do not remove the copyright and licence
headers from the source files.
- **Say that it is changed.** A modified version must carry prominent notices that you modified it, and when
(GPLv3 §5(a)).
- **Add no restrictions.** You may not impose terms that take away the rights the GPL gives your users (GPLv3 §10) —
an end-user agreement that forbids what the GPL permits is not allowed. FrameLedger's own EULA says that nothing in
it limits those rights.
### The additional terms in `NOTICE`
FrameLedger's own material is licensed with three additional terms of the kinds GPLv3 §7 permits. In short:
- **(b)** keep the copyright line and the attribution *"Based on FrameLedger by poli0981 —
https://github.com/poli0981/frameledger"* in your build's Appropriate Legal Notices (FrameLedger shows them under
Help ▸ About);
- **(c)** do not name a modified version "FrameLedger" alone, say in its notices and documentation that it is modified
and by whom, and do not present its builds, installers or update feed as the original project's;
- **(e)** no rights are granted in the name "FrameLedger" or the project's logo and icon, beyond saying truthfully
where your work comes from ("based on FrameLedger", "a fork of FrameLedger").
`NOTICE` has the exact wording. These terms cover material written by FrameLedger's developer; how far they reach
depends on the copyright in that material — parts of FrameLedger were written with AI assistance under the developer's
direction. If the difference matters to you, ask a lawyer, not this page.
## What a fork that ships builds has to change
FrameLedger installs into the user's profile, keeps one database there, runs a background agent and registers a few
system-wide names. A fork that keeps them **collides with an installed FrameLedger**: the two would update each other,
share — and migrate — one database, and fight over the same pipe and shared memory. Change all of these together:
| What | Where | Why |
|---|---|---|
| Product name, icon, title | the App's resources, `--packTitle` in `release.yml`, `Strings.resx` | NOTICE (c) and (e) |
| Update feed | `VelopackUpdateClient.RepositoryUrl` (`src/FrameLedger.App/Update/VelopackUpdateClient.cs`) | otherwise your users are offered FrameLedger's releases, and FrameLedger's users yours |
| Install folder | `--packId` in `release.yml` (today `FrameLedger.App`) | Velopack installs into `%LOCALAPPDATA%\<packId>` and **deletes that folder on uninstall** — never choose a packId that equals any data folder |
| Data folder | `LedgerPaths` (`src/FrameLedger.Infrastructure/Persistence/LedgerPaths.cs`) and the other `%LOCALAPPDATA%\FrameLedger` paths (`DetectionRulesFile`, `VkLayerLaunchEnvironment`, the Overlay's log folder, and the guard's own `fl::guard::RulesFilePath` in `src/native/FrameLedger.Injector/src/fl_ac_rules.cpp`) | a newer schema migrates the database in place and an older build cannot open it again |
| Agent pipe | `IpcProtocol.PipeName` (`src/FrameLedger.Shared/Ipc/IpcProtocol.cs`) | the App talks to whichever agent owns the pipe |
| Shared memory and mutex names | `Local\FrameLedger.*` (the ring, the tolerance channel, `SingleInstance`, the agent's instance lock) — in C# and in `src/native` | two programs must not open each other's ring |
| Vulkan layer | `VK_LAYER_FRAMELEDGER_overlay`, its `HKCU\SOFTWARE\Khronos\Vulkan\ImplicitLayers` registration, and its `FRAMELEDGER_ENABLE_VK_LAYER` / `DISABLE_FRAMELEDGER_VK_LAYER` variables (the manifest template in `src/native/FrameLedger.VkLayer/` and `VkLayerLaunchEnvironment`) | one implicit layer per name — and a fork that keeps the variables is switched on by every FrameLedger launch |
| Start with Windows | `RunAtLogon.DefaultValueName` (`src/FrameLedger.Infrastructure/Startup/RunAtLogon.cs`) | one `HKCU\…\Run` value per name |
| Logon task | `LogonTask` (the Agent's maintenance verbs) | one task per name |
| Issue and help links | `IssueLink.Repository` (`src/FrameLedger.App/Services/IssueLink.cs`) — `RepositoryLinks` builds every document link in the App from it and the source ref `release.yml` passes — plus the Releases link in `guide/01-install.md` and `.github/ISSUE_TEMPLATE/` | your users' reports belong in your tracker |
| Who the documents name | `legal/EULA.md`, `legal/DISCLAIMER.md`, `legal/PRIVACY_POLICY.md` name poli0981 as the Developer, with a contact | the person who distributes a build is the one its users deal with; review every claim they make, too — they describe FrameLedger's builds, not yours |
| Version information | `FL_COMPANY_NAME` / `FL_PRODUCT_NAME` in `src/native/CMakeLists.txt`, and the `ProductName` that `tools/versioninfo-check.ps1` requires | anti-cheat vendors and users identify the DLLs loaded into games by it (`docs/19_SAFETY_AND_ANTICHEAT.md`); it must name your project |
| Checksums | your own `SHA256SUMS.txt` | users verify what *you* built |
The detection rules and the anti-cheat blocklist (`rules/detection-rules.json`) ship with each build; keeping them
current for your users becomes your job.
## What we ask, and cannot require
The GPL does not allow adding restrictions, so the following is a request, not a condition. FrameLedger is built
around a few rules (`CLAUDE.md`, *Non-negotiable rules*), and the reason is the people who use it:
- the anti-cheat guard is a hard gate with no override switch;
- injection is opt-in, per game, and never automatic;
- nothing is hidden from security software — no manual mapping, no header erasure, no renamed or obfuscated binaries;
- the game's memory is never read or written outside the hooked calls;
- no telemetry and no silent network requests.
A build that drops any of these can get its users' accounts banned. It is not FrameLedger, must not say it is
(NOTICE (c)), and the original developer is not responsible for it.
## See also
`NOTICE` · `LICENSE` · `CONTRIBUTING.md` (if you would rather send your change upstream) ·
`legal/TRADEMARKS.md` · `legal/THIRD_PARTY_NOTICES.md` · `docs/12_BUILD.md` (building from source)
+34
View File
@@ -0,0 +1,34 @@
<Project>
<!--
Ships FrameLedger.ProcessStats.dll beside the importing project's output (beta.12, owner decision D43).
The third P/Invoke facade after the guard's and the NVAPI bridge's (docs/18_GPU_VENDOR_APIS.md §L1, the game
process's memory): NativeProcessStats loads it BY ABSOLUTE PATH from AppContext.BaseDirectory and never falls back
to a search, so it has to actually be there. Read-only, and NEVER loaded into a game — the Agent (and the unshipped
capture host) load it into their own process for the 1 Hz read of a game's dedicated/shared GPU memory (the
GPU Process Memory counters) and its working sets (GetProcessMemoryInfo).
Imported by the same three projects as the bridge: FrameLedger.Agent, FrameLedger.CaptureHost and
FrameLedger.Infrastructure.Tests (the mirror test and the real read P/Invoke into the real DLL).
Warn rather than fail when absent, as the bridge does: an absent reader is a missing measurement (every game-memory
field reads N/A), not a safety hole.
-->
<PropertyGroup>
<FlProcessStatsOutDir>$(MSBuildThisFileDirectory)build\native\x64-release\FrameLedger.ProcessStats\</FlProcessStatsOutDir>
</PropertyGroup>
<ItemGroup>
<None Include="$(FlProcessStatsOutDir)FrameLedger.ProcessStats.dll" Condition="Exists('$(FlProcessStatsOutDir)FrameLedger.ProcessStats.dll')">
<Link>FrameLedger.ProcessStats.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="FlWarnOnMissingProcessStats" AfterTargets="Build"
Condition="!Exists('$(FlProcessStatsOutDir)FrameLedger.ProcessStats.dll')">
<Warning Text="FrameLedger.ProcessStats.dll was not found at $(FlProcessStatsOutDir). Run build.ps1 native first; the game's memory will read N/A." />
</Target>
</Project>
+21 -7
View File
@@ -5,14 +5,15 @@ hooking on for — and reading the graphics calls the game makes. That is why it
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
page lists them in plain words; each item links to the document that has the details.
*Beta software: this page describes version 0.1.0-beta.10.*
*Beta software: this page describes version 0.1.0-beta.11.*
## Games it will not measure
- **Games with anti-cheat.** FrameLedger looks for anti-cheat before it touches a game and refuses when it
finds one — there is no switch that overrides this. The one exception is an anti-cheat that runs entirely
inside the game (no driver, no service), which you can allow per game after a warning and two good
sessions; a ban is still possible and may come days later. Kernel anti-cheat is never allowed.
inside the game (no driver, no service), which you can allow per game after a warning; its first two
sessions are a trial, and one that does not go well ends the exception for good. A ban is still possible and
may come days later. Kernel anti-cheat is never allowed.
([Safety](docs/19_SAFETY_AND_ANTICHEAT.md))
- **Anti-cheat FrameLedger does not know about.** The list of anti-cheat products is FrameLedger's own and
can be incomplete. A game protected by something unknown may be hooked; that is a risk to your account
@@ -33,7 +34,8 @@ page lists them in plain words; each item links to the document that has the det
## What an unmeasured session contains
When a game is not measured — any of the reasons above — its session still records **how long it ran, the
machine's sensors (GPU temperature, load, power; CPU load; memory) and why nothing was measured.** Every
machine's sensors (GPU temperature, load, power; CPU load; memory), how much memory the game itself used (read from
Windows, outside the game) and why nothing was measured.** Every
frame-rate, upscaler, frame-generation and ray-tracing value reads **N/A**, never 0. How the game's window was
shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
@@ -62,9 +64,21 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
- **Ray tracing** is *Yes*, *No* or *N/A* — measured from the game's ray-tracing calls on Direct3D 12, and
N/A where FrameLedger could not look. **Path tracing is never stated as a fact**: there is no API signal
for it. You can correct any of these by hand, and your correction is labelled as yours.
- HDR output, NVIDIA Reflex latency, each game's own video-memory use and shader-compilation stutter are
**not measured yet** — they read N/A. Video memory in use on the whole graphics card is recorded.
([Accuracy](legal/ACCURACY.md))
- HDR output, NVIDIA Reflex latency, the video-memory budget Windows gives a game, and shader-compilation
stutter are **not measured yet** — they read N/A. ([Accuracy](legal/ACCURACY.md))
## The game's memory
- **What is shown is what Task Manager's Details tab shows** for the game's process — *Dedicated GPU memory*,
*Shared GPU memory* and *Memory* (the private working set) — read from Windows once a second, from outside
the game. FrameLedger never looks inside the game's memory to get it.
- **One process.** A measured game is its own process; for a game that is not measured, every process running
the game's executable is added together. Launchers, crash reporters and other helper programs are not counted.
- **The private working set needs a recent Windows**: Windows 10 22H2 or Windows 11 with the September 2023
update or later. Without it the working set is shown instead, labelled as such.
- A game that has not created anything on the graphics card yet (its first second, a launcher screen) reads
N/A for video memory. AMD and Intel graphics cards have not been tested.
([Metrics](docs/03_METRICS.md))
## Display mode (full-screen, borderless, windowed)
+45
View File
@@ -0,0 +1,45 @@
FrameLedger
Copyright (C) 2026 poli0981 <contact@poli0981.dev>
FrameLedger is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, version 3 of the
License only (GPL-3.0-only).
FrameLedger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. Its full text is in the file LICENSE
and at <https://www.gnu.org/licenses/gpl-3.0.html>.
ADDITIONAL TERMS UNDER SECTION 7 OF THE GNU GENERAL PUBLIC LICENSE, VERSION 3
These terms apply to the material in this repository authored by poli0981. They do not
apply to third-party components, which keep their own licences (legal/THIRD_PARTY_NOTICES.md).
Every first-party source file points here with the line
"Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE".
(b) Preservation of notices. You must preserve this notice, the copyright line above, and
the attribution "Based on FrameLedger by poli0981 - https://github.com/poli0981/frameledger"
in the Appropriate Legal Notices displayed by any work that contains this material
(in FrameLedger itself: Help > About).
(c) Marking of modified versions. A modified version you convey must be marked in
reasonable ways as different from the original version: it must not be named
"FrameLedger" alone, it must say in its Appropriate Legal Notices and in its
documentation that it is modified and by whom, and it must not present its builds,
installers or update feed as those of the original project.
(e) Trademarks. These terms grant no rights under trademark law to use the name
"FrameLedger", or the project's logo and icon, beyond describing the origin of a work
truthfully (for example "based on FrameLedger").
Section 7 of the GPL permits additional terms of the kinds its paragraphs (a) to (f) list;
the three above are of the kinds named in paragraphs (b), (c) and (e).
SEE ALSO
FORKING.md what a redistributor of a modified version is asked to change
legal/TRADEMARKS.md third-party names and marks
legal/THIRD_PARTY_NOTICES.md the third-party components and their licences
LICENSE the GNU General Public License, version 3
+48 -28
View File
@@ -4,9 +4,13 @@
> No telemetry. No accounts. All data stays on your machine.
**New here? Start with the [user guide](guide/README.md)** — install, record a game, read your results, stay safe with
anti-cheat, and look after your data, a page each. What FrameLedger cannot do is on one page:
[Limitations](LIMITATIONS.md). Both are in the app too (Help ▸ User guide, Help ▸ Limitations).
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-09-28.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.10`** (2026-09-28), an unsigned installer built from that tag with its
> ⚠ **What FrameLedger actually measures today — 2026-10-03.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.11`** (2026-10-03), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -59,8 +63,14 @@
> - **Engine version:** the exact Unreal Engine 4 or 5 version, read from the game's executable on disk and
> labelled with what it rests on; `N/A` where the executable names none. Other engines show what their own
> files state.
> - **The game's own memory (since beta.12):** its dedicated and shared GPU memory and its private
> working set — the numbers Task Manager's Details tab shows — with its working set and commit, read
> once a second from Windows' own counters, from outside the game, in every session: a game
> FrameLedger injects into through the handle it already holds, any other by opening it briefly with
> the least access Windows offers (and adding up every process running its executable). Shown with
> mean, median and peak. The game's other processes (launchers, helpers) are not counted.
> - **Video memory:** in use on the whole graphics card, recorded from Windows and GPU-driver telemetry
> and charted. **Not measured at all:** each game's own video-memory use and budget, which frame
> and charted. **Not measured at all:** the video-memory budget Windows gives a game, which frame
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
> measured from frame times.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
@@ -78,8 +88,8 @@
> game in the library, before injection, at a session's start or by the 30 s re-check; the game's page says so,
> and nothing turns it back on for that executable — except a user-mode exception you make yourself, per game,
> in Settings (off by default): only where the only finding is one anti-cheat that runs entirely in user mode, with
> no driver file in the game's folder, on a game already measured successfully at least twice. The guard still
> runs every check under it and ends it on anything new; a ban remains possible.
> no driver file in the game's folder. Its first two sessions are a trial, and one that does not go well ends it
> for good. The guard still runs every check under it and ends it on anything new; a ban remains possible.
>
> Where a value is not measured it reads `N/A`, with two exceptions: FPS then shows Presented FPS with a
> note on what it may include, and ray-tracing flags may show a value you set yourself, labelled as
@@ -98,7 +108,7 @@ Most tools tell you your frame rate. FrameLedger tells you **what produced that
- **Which upscaler is running** — DLSS / FSR, read from the API the game calls, not guessed from files on disk. Intel XeSS is not read: its SDK licence forbids it.
- **Frame Generation, measured** — native and generated frames counted separately. Shown as `62 → 118 FPS (×1.9 FG)` when both are counted, and as a qualified Presented FPS when they are not — never as one inflated number.
- **Ray tracing, actually detected** — including inline ray tracing (DXR 1.1 `RayQuery`), which frame-counting tools miss entirely.
- **Per-process VRAM** and whether the driver was exceeding its budget (a real stutter explanation).
- **The game's own VRAM and RAM** — Task Manager's figures for the game's process, read from outside the game in every session, with mean, median and peak (since beta.12). ~~and whether the driver was exceeding its budget~~ — the video-memory budget is not measured yet.
- **Shader-compilation stutter attribution** — which frame spikes were pipeline compiles.
- **PC latency** when the game uses Reflex.
@@ -115,7 +125,7 @@ FrameLedger is built to keep that risk small and to be honest about it:
| Safeguard | |
|---|---|
| **Off by default** | Injection is disabled for every game until you enable it individually, after a consent prompt |
| **Hard refusal** | Known anti-cheat/anti-tamper components are detected before injection and every 30 s during a session. Detected ⇒ FrameLedger refuses, or stops capturing at the next scan — so up to 30 s can pass before it reacts to anti-cheat that loads mid-session. For Direct3D/OpenGL that means hooks are removed; for Vulkan it means the layer goes passthrough, because a layer cannot leave the loader chain of a running game. **There is no override — not in settings, not in a config file, not on the command line**<br><br>**One narrow exception since beta.9 (owner decision D33):** per game, after its own disclosure and only while a Settings option (off by default) is on, a game whose only finding is one anti-cheat that runs entirely in user mode — no driver file in its folder, on no title list — and that FrameLedger has measured successfully at least twice may be hooked under a user-mode exception. The guard still runs every check under it, refuses anything else it finds, and ends it on anything new; a ban remains possible (`legal/DISCLAIMER.md` §2A).<br><br>✅ **Both halves run since 2026-09-10.** The *pre-injection* refusal runs every documented check, and during every capture the Agent re-runs them every 30 s: the component inside the game removes its hooks within one frame of being told to, and within 65 s if it stops hearing from the scanner. *(Until 2026-09-15 this cell said the in-session re-scan did not run at all, which stopped being true when the Agent's capture loop landed.)* For a Vulkan title the stop is the layer's own: it checks the scanner's counter on every present and goes passthrough within one present of the stop flag, or after 65 s without a scan — a title that has stopped presenting is not stopped by that deadline, and presents nothing to be observed either. |
| **Hard refusal** | Known anti-cheat/anti-tamper components are detected before injection and every 30 s during a session. Detected ⇒ FrameLedger refuses, or stops capturing at the next scan — so up to 30 s can pass before it reacts to anti-cheat that loads mid-session. For Direct3D/OpenGL that means hooks are removed; for Vulkan it means the layer goes passthrough, because a layer cannot leave the loader chain of a running game. **There is no override — not in settings, not in a config file, not on the command line**<br><br>**One narrow exception since beta.9 (owner decisions D33, D38):** per game, after its own disclosure and only while a Settings option (off by default) is on, a game whose only finding is one anti-cheat that runs entirely in user mode — no driver file in its folder, on no title list — may be hooked under a user-mode exception. ~~and that FrameLedger has measured successfully at least twice~~ *(corrected 2026-10-03: since beta.11, D38, a grant needs no earlier session; its first two hooked sessions are a trial, and one that does not go well ends it for good.)* The guard still runs every check under it, refuses anything else it finds, and ends it on anything new; a ban remains possible (`legal/DISCLAIMER.md` §2A).<br><br>✅ **Both halves run since 2026-09-10.** The *pre-injection* refusal runs every documented check, and during every capture the Agent re-runs them every 30 s: the component inside the game removes its hooks within one frame of being told to, and within 65 s if it stops hearing from the scanner. *(Until 2026-09-15 this cell said the in-session re-scan did not run at all, which stopped being true when the Agent's capture loop landed.)* For a Vulkan title the stop is the layer's own: it checks the scanner's counter on every present and goes passthrough within one present of the stop flag, or after 65 s without a scan — a title that has stopped presenting is not stopped by that deadline, and presents nothing to be observed either. |
| **No evasion, ever** | FrameLedger does not hide, rename, obfuscate, or disguise itself. It keeps its real name, real exports, and version info. It is meant to be plainly visible to any security software that looks. This is an architectural rule, not a setting |
| **Read-only** | It never reads or writes game memory, never modifies game behavior, never touches saves or input, and never changes GPU clocks, fans, or power limits |
| **Always a way out** | FrameLedger refuses rather than pushes through. When the guard finds anti-cheat, or the hook fails, or you have not enabled a game, it **stops** — and records the session anyway: start, end, duration, whatever hardware sensors your machine provides, and the reason there is nothing else. Every measured value reads `N/A`; it never estimates one.<br><br>**The way out is that it does not inject, not that it measures another way.** An earlier version of this row promised a no-injection measurement mode. It was designed around Intel PresentMon, that was dropped on 2026-08-27 after measurement, and no replacement was chosen — so **frame times require hooking**. Said in this row rather than a footnote because the row is in the SAFETY table, and a reader deciding whether to enable a game needs the real alternative, not a comfortable one |
@@ -127,32 +137,23 @@ FrameLedger is built to keep that risk small and to be honest about it:
| Tier | How | What you get |
|---|---|---|
| **1** | Injected hooks (opt-in, per game) | Everything above |
| **2** | None — nothing is injected | **Session duration, whatever hardware telemetry your machine can provide, and why there is nothing else** (which check refused, or that the hook failed, was not enabled, or the game is 32-bit). On NVIDIA that telemetry is measured to be GPU temperature, load, power, clocks, VRAM in use and fan speed, with no elevation; AMD and Intel are untested. Everything else reads `N/A` |
| **2** | None — nothing is injected | **Session duration, whatever hardware telemetry your machine can provide, the game's own memory use (read from Windows, outside the game; since beta.12), and why there is nothing else** (which check refused, or that the hook failed, was not enabled, or the game is 32-bit). On NVIDIA that telemetry is measured to be GPU temperature, load, power, clocks, VRAM in use and fan speed, with no elevation; AMD and Intel are untested. Everything else reads `N/A` |
The tier is recorded on every session and shown in the UI. Metrics unavailable at a session's tier read `N/A` — FrameLedger never substitutes an estimate for a measurement.
> **This ladder used to have three rungs and a middle one that measured frame times without injecting.** It was to be built on Intel PresentMon; that was dropped on 2026-08-27 after measurement, and no replacement was chosen. **So frame times, FPS and the lows are now Tier-1-only.** Said plainly because the previous README promised them without injection, and a reader who remembers that would otherwise assume it still holds.
## Architecture
| Component | Runs as | Role |
|---|---|---|
| `FrameLedger.exe` | Standard user | Fluent desktop UI (WPF + [WPF UI](https://github.com/lepoco/wpfui)), charts, library, settings |
| `FrameLedger.Agent.exe` | Standard user — as administrator only when you turn that on in Settings, and Windows asks at every start (beta.10) | Injection control, safety guard, data collection, GPU telemetry, storage |
| `FrameLedger.Overlay.dll` | Inside the game | C++20 hooks + lock-free shared-memory writer. Records only; never analyzes, allocates, or blocks |
| `FrameLedger.VkLayer.dll` | Inside the game | Vulkan implicit layer (Vulkan titles use this instead of injection) |
Elevation is **optional — for everything.** Hooked capture is the normal path and runs as a standard user, and there is no longer any tier that needs more than that. Elevation unlocks exactly two extras: CPU temperature sensors (~~not read yet~~ read with PawnIO, not yet checked on real hardware — see the block above), and attaching to games that themselves run elevated. ~~and the Tier-2 ETW fallback. If you expect to rely on Tier 2, run the Agent elevated.~~ — there is no ETW fallback to rely on. **Since beta.10 it is a choice in Settings** — *Run the agent as administrator*, off by default: Windows asks every time the agent starts, games you start from FrameLedger still run as you, and `LIMITATIONS.md` says what it does not change.
## Requirements
- Windows 10 (22H2) or Windows 11, 64-bit
- A 64-bit DirectX 11/12 or OpenGL game, or a Vulkan game FrameLedger starts, for hooked (Tier-1) capture. **32-bit games — including most DirectX 9 titles — cannot be measured at all**: the component FrameLedger loads is x64 and an x64 DLL cannot enter a 32-bit process. Such a title records duration and hardware telemetry and nothing else. *(This line previously said "supported at Tier 2 only", which meant frame times without injection. That tier no longer exists.)*
- Optional: [PawnIO](https://pawnio.eu/) for CPU temperature, read only when the Agent runs as administrator (since 0.1.0-beta.3; not yet checked on real hardware). CPU load, memory in use and all GPU telemetry work without it
Elevation is **optional — for everything.** Hooked capture is the normal path and runs as a standard user, and there is no longer any tier that needs more than that. Elevation unlocks exactly two extras: CPU temperature sensors (~~not read yet~~ read with PawnIO, not yet checked on real hardware — see the block above), and attaching to games that themselves run elevated. ~~and the Tier-2 ETW fallback. If you expect to rely on Tier 2, run the Agent elevated.~~ — there is no ETW fallback to rely on. **Since beta.10 it is a choice in Settings** — *Run the agent as administrator*, off by default: Windows asks every time the agent starts, games you start from FrameLedger still run as you, and `LIMITATIONS.md` says what it does not change.
## Install
> **The latest pre-release is `v0.1.0-beta.10` (2026-09-28); before it `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
> **The latest pre-release is `v0.1.0-beta.11` (2026-10-03); before it `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
@@ -164,13 +165,7 @@ Everything lives locally in `%LOCALAPPDATA%\FrameLedger`. The only network calls
## License
GPL-3.0-only. See `LICENSE`. Third-party components: [`legal/THIRD_PARTY_NOTICES.md`](legal/THIRD_PARTY_NOTICES.md).
GPU telemetry is layered so the project never depends on a proprietary vendor licence: a vendor-neutral DXGI/performance-counter baseline, LibreHardwareMonitor (MPL-2.0) for sensors on all vendors, and NVIDIA's NVAPI SDK (MIT) for NVIDIA-only extras (telemetry and the driver's DLSS record today; Reflex latency is not read yet). No Intel or AMD GPU *telemetry* SDK is bundled — see `docs/18_GPU_VENDOR_APIS.md` for why. The one AMD component in the tree is five MIT headers from the FidelityFX SDK, used for types only so the upscaler hook can read an FSR title's own dispatch descriptor; nothing AMD-built is linked or redistributed.
## Documentation
Developer/AI-facing docs in [`docs/`](docs/). Start with `CLAUDE.md`, then `docs/19_SAFETY_AND_ANTICHEAT.md` (which constrains everything else), then `docs/01_ARCHITECTURE.md`.
GPL-3.0-only (see `LICENSE`), with the additional terms in [`NOTICE`](NOTICE) that GPLv3 section 7 permits: keep the copyright line and the attribution, mark a changed version as changed and do not call it "FrameLedger" alone, and no trademark rights in the name ([`legal/TRADEMARKS.md`](legal/TRADEMARKS.md)). In the app: Help ▸ About. Third-party components: [`legal/THIRD_PARTY_NOTICES.md`](legal/THIRD_PARTY_NOTICES.md).
## Reporting a safety gap
@@ -178,6 +173,31 @@ If you find a game with anti-cheat that FrameLedger fails to detect, please open
**How fast a fix can reach you, stated accurately.** Blocklist entries are data rather than code, so a fix is a one-line change here. But the software has **no rules-update path yet**: it installs the blocklist that shipped with your build and never fetches another (`docs/20_OPEN_QUESTIONS.md` §S20, feed half). Until that exists, a blocklist fix reaches you **only when you install a new release**. This paragraph previously said the opposite, and the sentence it said it in was a response-time promise attached to a security-priority commitment.
## For developers and forks
FrameLedger is GPL-3.0-only free software, and you are welcome to build it, change it and redistribute it.
- **Build it:** [`docs/12_BUILD.md`](docs/12_BUILD.md) — `./build.ps1 check` is the whole quality gate, the same one CI runs.
- **Contribute:** [`CONTRIBUTING.md`](CONTRIBUTING.md) — the definition of done, what will not be merged, and that a
contribution is licensed GPL-3.0-only with the [`NOTICE`](NOTICE) terms (no CLA). Conduct:
[`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md). Security reports: [`SECURITY.md`](SECURITY.md).
- **Fork or redistribute:** [`FORKING.md`](FORKING.md) — what the GPL asks of anyone who distributes builds, and the names
a fork must change so it does not share FrameLedger's update feed, install folder, data, pipe or Vulkan layer.
- **Read the design:** the developer documentation is in [`docs/`](docs/). Start with [`CLAUDE.md`](CLAUDE.md), then
[`docs/19_SAFETY_AND_ANTICHEAT.md`](docs/19_SAFETY_AND_ANTICHEAT.md) — which constrains everything else — then
[`docs/01_ARCHITECTURE.md`](docs/01_ARCHITECTURE.md).
### Architecture
| Component | Runs as | Role |
|---|---|---|
| `FrameLedger.exe` | Standard user | Fluent desktop UI (WPF + [WPF UI](https://github.com/lepoco/wpfui)), charts, library, settings |
| `FrameLedger.Agent.exe` | Standard user — as administrator only when you turn that on in Settings, and Windows asks at every start (beta.10) | Injection control, safety guard, data collection, GPU telemetry, storage |
| `FrameLedger.Overlay.dll` | Inside the game | C++20 hooks + lock-free shared-memory writer. Records only; never analyzes, allocates, or blocks |
| `FrameLedger.VkLayer.dll` | Inside the game | Vulkan implicit layer (Vulkan titles use this instead of injection) |
GPU telemetry is layered so the project never depends on a proprietary vendor licence: a vendor-neutral DXGI/performance-counter baseline, LibreHardwareMonitor (MPL-2.0) for sensors on all vendors, and NVIDIA's NVAPI SDK (MIT) for NVIDIA-only extras (telemetry and the driver's DLSS record today; Reflex latency is not read yet). No Intel or AMD GPU *telemetry* SDK is bundled — see `docs/18_GPU_VENDOR_APIS.md` for why. The one AMD component in the tree is five MIT headers from the FidelityFX SDK, used for types only so the upscaler hook can read an FSR title's own dispatch descriptor; nothing AMD-built is linked or redistributed.
---
**Status:** pre-release (beta). Ten tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
**Status:** pre-release (beta). Eleven tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
+4 -2
View File
@@ -37,8 +37,10 @@ check. The grant is a record in your own database, like the consent stamp; what
decides itself which family it may let through. So these are security reports too: the guard letting through a family
that has a driver, a service or a `.sys` in the floor or the rules; an exception applying to a game with a kernel
driver in its folder, on a title list, or with a second anti-cheat; the Agent writing a grant on a pipe message
without its own tolerant pre-scan and session count; an exception that survives a new finding, a crash or safety stop
under it, or a changed executable; and the Overlay tolerating a family the guard did not.
without its own tolerant pre-scan; an exception that survives a new finding, a crash or safety stop under it, or a
changed executable; since 0.1.0-beta.11 (D38), an exception that survives a session during its two-session trial that
did not go well, and any grant written for a game whose earlier exception failed its trial; and the Overlay tolerating
a family the guard did not.
## Running the agent as administrator
+12 -1
View File
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-only
# Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
#Requires -Version 7.0
<#
.SYNOPSIS
@@ -406,7 +409,7 @@ function Invoke-ProjectGates {
Write-Step 'license-check'
$licenseTool = Join-Path $repo 'tools/license-check.ps1'
if (Test-Path $licenseTool) {
# P4 PR-6: the NuGet half's generator proves itself first (fourteen cases, five that must be RED), then
# P4 PR-6: the NuGet half's generator proves itself first (sixteen cases since beta.12, six that must be RED), then
# license-check runs its live -Check over this build's restore output as its section 3.
Invoke-Checked 'license-gather (self-test)' { & (Join-Path $repo 'tools/license-gather.ps1') -SelfTest }
Invoke-Checked 'license-check' { & $licenseTool }
@@ -439,6 +442,14 @@ function Invoke-ProjectGates {
Skip-Gate 'accuracy-check' 'tools/accuracy-check.ps1 not implemented yet'
}
# beta.12 (D45): GPLv3 section 7 wants additional terms named "in the relevant source files", so every
# first-party source file opens with the SPDX line and the NOTICE pointer. Self-test first (seven cases, both
# directions), then the live pass over the tracked tree; ./tools/notice-check.ps1 -Fix writes a missing header.
Write-Step 'notice-check'
$noticeTool = Join-Path $repo 'tools/notice-check.ps1'
Invoke-Checked 'notice-check (self-test)' { & $noticeTool -SelfTest }
Invoke-Checked 'notice-check' { & $noticeTool -RepoRoot $repo }
Write-Step 'changelog-check'
$changelogTool = Join-Path $repo 'tools/changelog-check.ps1'
if (Test-Path $changelogTool) {
+16 -9
View File
@@ -23,11 +23,18 @@
│ ├ upscaler hooks: NGX · Streamline · FFX · XeSS │
│ ├ RT hooks: CreateStateObject · DispatchRays · BuildRaytracingAS │
│ ├ PSO hooks: pipeline creation (stutter attribution) │
│ ├ per-process VRAM: IDXGIAdapter3::QueryVideoMemoryInfo │
│ ├ (per-process VRAM via QueryVideoMemoryInfo: never built — D43 reads │
│ │ the game's memory from outside, in the Agent's ProcessStats.dll) │
│ └ ring writer (allocation-free, lock-free, SEH-guarded) │
└───────────────────────────────────────────────────────────────────────────┘
```
> **Corrected 2026-10-04 — the game-process box names hooks that were never built.** ~~NGX · XeSS ·
> CreateStateObject · PSO hooks~~: NGX is licence-blocked, XeSS stops at the runtime census by licence, and
> `CreateStateObject` and pipeline creation are unwritten rows of `17_HOOK_ENGINE` §Hook inventory. What the Overlay
> does install: the DXGI present path, `wglSwapBuffers`, the Streamline and FidelityFX entry points, the two
> `ID3D12GraphicsCommandList4` ray-tracing methods, and the `LoadLibraryExW` wake.
> `*` **`AntiCheatGuard` is a facade, not an implementation.** The guard is
> native (`20_OPEN_QUESTIONS` §S13(a)); the box above is the P/Invoke wrapper
> in `Infrastructure` that the Agent calls. Nothing managed parses rules or
@@ -57,8 +64,8 @@
| Tier | Mechanism | Gets you | When used |
|---|---|---|---|
| **1** | Injected hooks (default when the user enabled it and the guard passed) | Everything: exact render/output res, upscaler + quality, FG ground truth, RT/PT evidence, per-process VRAM, PSO stutter attribution, Reflex latency, present flags | Offline/single-player titles the user opted in |
| **2** | None | **Session duration, whatever hardware telemetry this machine can provide, and the REASON there is nothing else** — which check refused, or that the hook failed, was not enabled, or the target is 32-bit. Every measured field reads `N/A` (FR-4.9) | Guard refused, hook failed, user chose not to hook, or a target the Overlay structurally cannot enter |
| **1** | Injected hooks (default when the user enabled it and the guard passed) | Everything: exact render/output res, upscaler + quality, FG ground truth, RT ~~/PT~~ evidence, ~~per-process VRAM, PSO stutter attribution, Reflex latency,~~ present flags *(corrected 2026-10-04: path tracing, the in-game VRAM, PSO attribution and Reflex latency have no producer — `05_DETECTION` §Runtime facts)* | Offline/single-player titles the user opted in |
| **2** | None | **Session duration, whatever hardware telemetry this machine can provide, and the REASON there is nothing else** — which check refused, or that the hook failed, was not enabled, or the target is 32-bit. Every ~~measured~~ frame field reads `N/A` (FR-4.9) *(corrected 2026-10-04: two facts are measured from outside the game in both tiers — the display mode (beta.10) and the game process's memory (beta.12, D43))* | Guard refused, hook failed, user chose not to hook, or a target the Overlay structurally cannot enter |
Tier is recorded per session (`sessions.capture_tier`) and shown in the UI, because metric availability differs and comparing across tiers must be explicit.
@@ -90,7 +97,7 @@ Guard re-runs every 30 s for the life of the session; anti-cheat appearing late
- Agent idles at ~0% CPU: 1 Hz process poll. No capture machinery exists until a tracked game launches.
- Session ends when the process tree exits, or on safety unhook, or on user stop.
- The DLL is **not unloaded** from a live process after unhooking (threads may still be inside trampolines). It disables its hooks, stops writing, and goes dormant until the process exits. Documented, deliberate.
- UI exit does not stop the Agent when background capture is enabled; otherwise UI sends `Shutdown`.
- ~~UI exit does not stop the Agent when background capture is enabled; otherwise UI sends `Shutdown`.~~ *(Corrected 2026-10-04: closing the UI never stops the Agent. `Shutdown` is sent only for an update, by the uninstall hook and for the admin mode's restart; the background-capture setting was read by nothing, and its switch is gone since beta.12 — `06_DATA_MODEL` §Settings registry.)*
- Single instance via named mutexes; the ring name is per-PID so multiple games can be captured simultaneously (rare but supported).
> **The single instance was specified here and not built until 2026-09-17**, and 0.1.0-beta.1 ran four Agents: an
@@ -110,12 +117,12 @@ Guard re-runs every 30 s for the life of the session; anti-cheat appearing late
| Anti-cheat detected pre-injection | Refuse, explain which signal fired, offer Tier 2 |
| Anti-cheat detected mid-session | Immediate clean unhook, `exit_status = unhooked_safety`, prominent notice |
| Injection API fails (access denied, protected process) | Log, no retry loop, offer Tier 2 + "run Agent elevated" hint — elevation here is about *attaching to an elevated target*, not about reaching a tier; Tier 2 needs none |
| Hook faults 3× | DLL self-disables, sets fault flag in handshake block, Agent finalizes session as `degraded` |
| Hook faults 3× | DLL self-disables, sets ~~fault flag in handshake block~~ `FlWriterState.status` to `SELF_DISABLED` *(corrected 2026-10-04)*, Agent finalizes session as `degraded` |
| Game crashes ≤ 60 s after injection, twice | Hooking auto-disabled for that game, Tier 2 takes over |
| Ring overflow (Agent stalled) | Overwrite-oldest; dropped count published in the ring header → session flagged with a data-quality warning |
| Ring overflow (Agent stalled) | Overwrite-oldest; ~~dropped count published in the ring header~~ the Agent counts drops from its own read index *(corrected 2026-10-04: the writer keeps no reader index and publishes no count — `04_CAPTURE` §Ring draining)* → session flagged with a data-quality warning |
| Layout/version mismatch DLL ↔ Agent | Agent refuses to attach, tells user to restart the game after update |
| Vendor API unavailable (no NVAPI etc.) | GPU telemetry degrades to `N/A`; frame metrics unaffected |
| DB locked/corrupt | Integrity check + backup-and-recreate in Tools |
| DB locked/corrupt | Integrity check + backup~~-and-recreate~~ in Tools ▸ Database maintenance *(corrected 2026-10-04: there is no recreate action)* |
## Data directory
@@ -126,9 +133,9 @@ ledger.db SQLite (WAL)
rules\detection-rules.json engine/platform/feature + anticheat blocklist
logs\ui-*.log, agent-*.log, overlay-<pid>-*.log (native log flushed at session end, never mid-frame)
crashdumps\*.dmp
breadcrumbs\<pid>.json pre-injection breadcrumb (19_SAFETY §Crash safety)
breadcrumbs\<pid>.json (corrected 2026-10-04: never created — the breadcrumb is the .partial file's header and notes)
tmp\<sessionGuid>.partial crash-safety flush of raw buffers, every 60 s (04_CAPTURE §Ring draining)
covers\*.jpg
covers\*.jpg (corrected 2026-10-04: never created — nothing writes games.cover_path)
```
## Key design decisions (ADR)
+9 -7
View File
@@ -10,6 +10,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
- FR-1.3 Editable metadata (name, cover, publisher, version, notes); auto-detected fields badged and overridable.
- FR-1.4 Remove game (asks whether to keep or delete its sessions).
- FR-1.5 "Supports" row shows shipped-capability hints (DLSS/FSR/XeSS/FG) — visually distinct from measured per-session values (`05_DETECTION` §Capability hints).
- FR-1.7 Delete all sessions (beta.11, owner decision D40): of one game from its page, or of every game from Settings ▸ Data, after a confirmation that says how many — with their frame and sensor series and notes; the library, the settings and every consent stay. The Agent deletes them (the rows are its, `06_DATA_MODEL` §Writer ownership) and refuses while a session it would delete under is being recorded.
- FR-1.6 Recording switch per entry (2026-09-23, HANDOFF D29): off, the program is not watched at all — no session, no measurement, no injection — and a session of it that is running stops. On by default; entries an old import made for Steam's own tools start with it off. The library card says "Not recorded".
### FR-2 Hooking consent & control (new, safety-critical — see `19_SAFETY`)
@@ -18,7 +19,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
- FR-2.3 The runtime guard refuses injection and refuses to continue a session when anti-cheat is detected. **No override exists anywhere in the UI, config, or CLI.** *(Since 2026-09-26 one narrow, evidence-bound exception exists — FR-2.8. It is not an override: the guard still runs every check and decides itself which anti-cheat family it may let through.)*
- FR-2.4 Global "disable all hooking" kill switch in Settings; also honored by the Vulkan layer.
- FR-2.7 (owner decision 2026-09-22; it was a per-game override for one day, withdrawn) A finding about a game — anti-cheat named in its process, on its title lists or in its folder — turns hooking off for that game wherever the guard makes it: at the pre-scan, at a session's start, at the 30 s re-scan, or (since 2026-09-25) at the Agent's pre-scan of the library. The row carries the reason, the game's page and the notice say so, and nothing overrides it (`19_SAFETY` §What a finding does to the game).
- FR-2.8 (owner decision D33, 2026-09-26) **The user-mode anti-cheat exception.** A Settings option, off by default, lets the user grant a per-game exception to a game whose only anti-cheat findings are ONE family that is user-mode throughout (no driver, service or `.sys` in the floor or the rules), whose install tree holds no `.sys`, which is on no title list, and which FrameLedger has measured hooked at least twice (successful Tier-1 sessions). The Agent computes that eligibility itself; the user grants each game through a versioned disclosure that states the ban risk; hooking is then turned on through FR-2.1's dialog as ever. Machine-wide drivers and services, title lists, kernel drivers in the game folder, the fuzzy tier, a scan that could not finish, an unreadable process, a 32-bit game, the kill switch and Vulkan are never excepted. A new finding, a crash / safety unhook / Overlay stop under it, or a changed executable ends it; the option off suspends it; the block itself is never cleared and stays shown (FR-2.2). Sessions under it are marked with the family (`19_SAFETY` §The user-mode exception).
- FR-2.8 (owner decision D33, 2026-09-26) **The user-mode anti-cheat exception.** A Settings option, off by default, lets the user grant a per-game exception to a game whose only anti-cheat findings are ONE family that is user-mode throughout (no driver, service or `.sys` in the floor or the rules), whose install tree holds no `.sys`, which is on no title list, ~~and which FrameLedger has measured hooked at least twice (successful Tier-1 sessions)~~ and no exception of which ever ended during its trial (D38, 2026-10-03: a grant needs no session; its first two hooked sessions are a trial, and an end during the trial — any end below, or a stored hooked session with no frames or an abnormal exit — ends it for good, `games.ac_exception_trial_failed_at`). The Agent computes that eligibility itself; the user grants each game through a versioned disclosure that states the ban risk; hooking is then turned on through FR-2.1's dialog as ever. Machine-wide drivers and services, title lists, kernel drivers in the game folder, the fuzzy tier, a scan that could not finish, an unreadable process, a 32-bit game, the kill switch and Vulkan are never excepted. A new finding, a crash / safety unhook / Overlay stop under it, or a changed executable ends it; the option off suspends it; the block itself is never cleared and stays shown (FR-2.2). Sessions under it are marked with the family (`19_SAFETY` §The user-mode exception).
- FR-2.5 Repeated crashes shortly after injection auto-disable hooking for that game, with an explanation and a manual re-enable path.
- FR-2.6 Users can always see, per session, which tier produced the data.
@@ -29,7 +30,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
- FR-3.4 Track the process tree; capture the descendant that actually presents.
- FR-3.5 Per-frame records for the whole session; telemetry at 1 Hz (configurable 0.5–2 s).
- FR-3.6 Session ends on process-tree exit, safety unhook, or user stop. Sessions under the minimum length (default 30 s) are discarded.
- FR-3.7 Crash detection: nonzero exit code or matching Application Error 1000 / WER 1001 events → `exit_status = crashed`.
- FR-3.7 Crash detection: ~~nonzero exit code~~ an exception's exit code *(corrected 2026-10-04: since beta.8, `ExitStatusMapper.IsExceptionCode` — End task's exit code 1 is `normal`, the code kept in `capture_notes`; `04_CAPTURE` §Crash & exit classification)* or matching Application Error 1000 / WER 1001 events → `exit_status = crashed`.
- FR-3.8 Post-session toast with summary + "View".
- FR-3.9 Pause/resume capture globally from tray.
@@ -38,9 +39,9 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
- FR-4.2 **Native vs Displayed FPS + FG factor**, always shown together (`62 → 118 FPS (×1.9 FG)`).
- FR-4.3 *(Tier 1)* Measured upscaler identity, quality preset, render resolution, output resolution, upscale ratio; mid-session changes captured as segments.
- FR-4.4 *(Tier 1)* Measured RT activity (`rt_frame_pct`, `rays_per_pixel`, RT PSO count); RR from the NGX feature; PT as a confidence-scored suggestion only.
- FR-4.5 *(Tier 1)* Per-process VRAM usage/budget and budget-exceeded percentage.
- FR-4.5 *(Tier 1)* Per-process VRAM usage/budget and budget-exceeded percentage. *(beta.12, owner decision D43: the **usage** half is met for **both tiers** from outside the game — the game process's dedicated and shared GPU memory, Task Manager's columns — with its private working set, working set and commit beside it, mean / median / peak (`03_METRICS` §Game process memory). The budget and its exceeded percentage stay unmeasured, `20_OPEN_QUESTIONS` §M11.)*
- FR-4.6 *(Tier 1)* PSO-compilation stutter attribution; *(Tier 1 + Reflex)* PC latency avg/p95.
- FR-4.7 Telemetry aggregates: CPU/GPU temp, hotspot, loads, power, throttle %, RAM.
- FR-4.7 Telemetry aggregates: CPU/GPU temp, hotspot, loads, power, throttle %, RAM. *(beta.12: every stored series also has its median and minimum, in `sensor_stats_json`.)*
- FR-4.8 Sufficiency guards: 0.1% Low needs ≥ 10,000 app frames, 1% Low ≥ 1,000; else `N/A`.
- FR-4.9 Any metric unavailable at the session's tier renders `N/A` — never an estimate presented as measurement.
@@ -55,6 +56,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
- FR-6.1 Sessions table per game: date, duration, tier badge, Native, Displayed, FG×, lows, resolution + upscaler, RT/PT/RR chips, crash badge, tags.
- FR-6.2 Compare 2–5 sessions; **mixed-tier comparisons require explicit acknowledgement** and are marked on the chart.
- FR-6.3 Hardware snapshot per session; trend charts mark changes ("GPU driver 572.16 → 576.02").
- FR-6.6 Charts across a game's sessions (beta.11, owner decision D39): the Sessions tab opens with an overview of every hooked session's rate and lows (Presented FPS, or Native and Displayed where frame generation was measured; 1% and 0.1% lows), a click selecting the session; and the Trend draws more metrics beside the selected one, two units at most (the second against the right axis).
- FR-6.4 Sessions with mid-session settings changes are excluded from trends by default, with a toggle.
- FR-6.5 Session tags and notes.
@@ -62,7 +64,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
- FR-7.1 Static: engine, engine version, store platform, store id, publisher, game version (`05_DETECTION`; the Unreal Engine version since 2026-09-27, §Engine version).
- FR-7.2 Runtime: API, present mode, swap effect, HDR, upscaler, FG, RT — all Tier 1, all measured. (Present mode and HDR have no writer yet, `05_DETECTION` §Runtime facts; swap effect is written since beta.10 from the display-mode sample.)
- FR-7.4 Display mode (beta.10, owner request 2026-09-27): how each session's game was shown — exclusive fullscreen, borderless, windowed, minimised, or *fullscreen or borderless* where nothing could tell the two apart — as a share of the session's time, with the window, back buffer and monitor sizes; both tiers (Tier 2 from the window alone); shown on the session summary, the game page, the Trend (three share metrics) and Compare, and exported (`03_METRICS` §Display mode).
- FR-7.3 Rules ship as `detection-rules.json`, updatable independently of releases; **anticheat-block updates apply regardless of the user's rules auto-update preference.**
- FR-7.3 Rules ship as `detection-rules.json`, updatable independently of releases; **anticheat-block updates apply regardless of the user's rules auto-update preference.** *(Unmet — corrected 2026-10-04: there is no rules feed and no auto-update preference. Rules change only with a release: `RulesSeeder` installs them, Tools ▸ Update detection rules re-seeds them — `20_OPEN_QUESTIONS` §S20 feed half.)*
### FR-8 Tri-state flags
- FR-8.1 `Yes / No / N/A` for Ray Tracing, Path Tracing, Ray Reconstruction, per session, with source (`measured | manual | inherited`).
@@ -79,10 +81,10 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
> **beta.10 (D34):** "Agent elevation (optional — explains what it unlocks)" is the admin mode — *Run the agent as
> administrator*, off by default, a disclosure before it turns on, Windows' prompt at every Agent start (`01_ARCHITECTURE`
> ADR-9, `08_UI` §Settings).
Language (en/vi/ja), theme, start with Windows, minimize to tray, background capture, **global hooking kill switch**, min session length, telemetry interval, retention, Agent elevation (optional — explains what it unlocks), Vulkan layer registration state, update channel, online metadata opt-in, reopen legal documents.
Language (en/vi/ja), theme, start with Windows, minimize to tray, background capture, **global hooking kill switch**, min session length, telemetry interval, retention, Agent elevation (optional — explains what it unlocks), Vulkan layer registration state, update channel, ~~online metadata opt-in,~~ reopen legal documents *(corrected 2026-10-04: the opt-in has had no row since 2026-09-16 because no store request exists, and the background-capture switch — read by nothing — is gone since beta.12; `06_DATA_MODEL` §Settings registry)*. **beta.11 (owner request 2026-10-03: no row without a control):** Delete all sessions (FR-1.7, a *Data* section); the elevation state is a line of the admin mode's own row, not a row of its own; the hook-enabled list shows only while a game has hooking on; the language row carries no separate note.
### FR-11 Legal Gate
First run blocks until the user accepts EULA, GPLv3 notice, Disclaimer, Privacy Policy. Re-shown when a document version increments. The injection risk is stated in the Disclaimer *and* repeated at per-game consent (FR-2.1) — once is not enough for something that can cost an account.
First run blocks until the user accepts ~~EULA, GPLv3 notice, Disclaimer, Privacy Policy~~ the EULA, the Disclaimer and the Privacy Policy; **the GPLv3 is shown beside them for information and needs no acceptance** (GPLv3 §9 — "You are not required to accept this License in order to receive or run a copy of the Program"; changed beta.12, owner decision D45, `08_UI` §First-run flow). Re-shown when a document version increments. The injection risk is stated in the Disclaimer *and* repeated at per-game consent (FR-2.1) — once is not enough for something that can cost an account.
### FR-12 Updates
Velopack against GitHub Releases; silent startup check, manual check in Help; error dialogs mapped per `11_UPDATER`. **Updates never apply while a game is hooked** — deferred to session end (the DLL on disk must not change under a running game).
+59 -11
View File
@@ -1,6 +1,6 @@
# 03 — Metrics
**Single source of truth** for every number FrameLedger displays. ~~Implement in `FrameLedger.Domain.Metrics` with golden tests (`14_TESTING`).~~ **Implemented in `FrameLedger.Domain.Metrics` since 2026-09-09 (P2 PR-A), with the goldens `14_TESTING` names:** `FrameTimeSeries` (frame times from QPC, gaps excluded), `Percentile` (linear), `FrameStatistics` (median / lows / min / max / σ with the sufficiency guards), `RollingMedian` + `StutterDetector`, `FgWindow` + `FgRefusal` (the factor and every refusal, as facts — the English lives with the report), `UpscaleExtent`, `SegmentBuilder`, `RtVerdict` / `HdrVerdict` (the tri-states), `VramAggregates` / `LatencyAggregates` / `SeriesAggregates`. They consume `FrameSample` and `WriterFacts` — Domain's own types, since Domain references nothing — and `Application.Metrics.FrameSampleMapper` is the one place a shared-memory record becomes one; the Domain enums are pinned to `FrameLedger.Shared`'s in both directions by `MetricEnumMirrorTests`. The frame-generation LADDER (rung 0 / 1 / 3 / 4 as a verdict, and the withheld `none`) is not yet a Domain type: it is still the capture host's prose in `MeasuredFacts`, and lands with the recorder that stores `fg_mode` (PR-D).
**Single source of truth** for every number FrameLedger displays. ~~Implement in `FrameLedger.Domain.Metrics` with golden tests (`14_TESTING`).~~ **Implemented in `FrameLedger.Domain.Metrics` since 2026-09-09 (P2 PR-A), with the goldens `14_TESTING` names:** `FrameTimeSeries` (frame times from QPC, gaps excluded), `Percentile` (linear), `FrameStatistics` (median / lows / min / max / σ with the sufficiency guards), `RollingMedian` + `StutterDetector`, `FgWindow` + `FgRefusal` (the factor and every refusal, as facts — the English lives with the report), `UpscaleExtent`, `SegmentBuilder`, `RtVerdict` / `HdrVerdict` (the tri-states), `VramAggregates` / `LatencyAggregates` / `SeriesAggregates`. They consume `FrameSample` and `WriterFacts` — Domain's own types, since Domain references nothing — and `Application.Metrics.FrameSampleMapper` is the one place a shared-memory record becomes one; the Domain enums are pinned to `FrameLedger.Shared`'s in both directions by `MetricEnumMirrorTests`. The frame-generation LADDER (rung 0 / 1 / 3 / 4 as a verdict, and the withheld `none`) ~~is not yet a Domain type: it is still the capture host's prose in `MeasuredFacts`, and lands with the recorder that stores `fg_mode` (PR-D).~~ *(Corrected 2026-10-04: it landed with PR-D on 2026-09-10 as `Application.Recording.FgLadder` — in Application, not Domain. The session row (`SessionAggregator`), the live card (`SessionProgressCalculator`) and the capture host's report all read it; `MeasuredFacts` keeps only the host's strings.)*
Every metric declares which **capture tier** it requires (`01_ARCHITECTURE` §Capture tiers). A Tier-2 session simply has `N/A` where Tier-1 data is missing — never a silently degraded estimate presented as fact.
@@ -428,8 +428,13 @@ F_app = Σ fgEvaluations (APPLICATION frames, counted at the
> dividing them by presents dilutes each by the frame-generation factor — at ×4 a title that
> path-traces every application frame reports 25%. Whoever writes the RT hooks must choose a
> denominator and state it here.
>
> *(Settled 2026-08-20 with the RT hooks — §RT/PT/RR, "The denominator": `rt_frame_pct` is a share of presents
> and says so, and the tri-state is unaffected. Marked here 2026-10-04.)*
`fgEvaluations` is recorded per present by the NGX/Streamline/FFX/XeSS FG hooks
`fgEvaluations` is recorded per present by ~~the NGX/Streamline/FFX/XeSS FG hooks~~ the `slGetNewFrameToken`
detour; where Streamline never issued a token, by the FidelityFX dispatches — new PREPARE `frameID`s, else UPSCALE
dispatches, the FSR 3.0 host's included *(corrected 2026-10-04: NGX and XeSS have no hook)*
(`17_HOOK_ENGINE` §Upscaling / frame generation). `fg_factor = F_disp / F_app`.
> **`fgEvaluations` counts EVALUATIONS, not generated frames — owner ruling, 2026-08-14 —
@@ -512,7 +517,7 @@ carries the three shapes.
From the upscaler hooks we get, per frame:
- `upscaler`: the technology **actually executing** (`dlss`, `fsr2`, `fsr3`, `fsr4`, `xess`, `nis`, `none`) — from the API that was called, not from a DLL sitting on disk.
- `upscaler`: the technology **actually executing** (`dlss`, `fsr2`, `fsr3`, `fsr4`, `xess`, `nis`, `none`; **`fsr`** since 2026-09-04 — FSR through the SDK 2.x upscaler DLL, version not named) — from the API that was called, not from a DLL sitting on disk. *(Corrected 2026-10-04: `fsr` was missing here; `fsr4` is reserved and no writer produces it.)*
> **`dlss_rr` is NOT a value of this field, and this line listed it until 2026-08-06.** Layout
> v3 retired it and **reserved** the slot rather than reusing it, because it made Ray
@@ -745,15 +750,58 @@ its Sessions column, three Trend metrics — *Exclusive fullscreen share %*, *Bo
tier, and a mode switch is not a mid-session change for them (switching resizes the swap chain; the share is what that
switch was) — three Compare rows, never ranked, and the CSV's `# display:` line (§Export schema) and the JSON's aggregates.
## Per-process VRAM (Tier 1)
## Game process memory — both tiers (beta.12, owner decision D43)
`vramUsedMb` from `IDXGIAdapter3::QueryVideoMemoryInfo(LOCAL)` inside the game = **this game's** usage and budget. **MiB, truncating, and it must use the same divisor as `vramBudgetMb`** — the two are compared, and mismatched rounding would put a systematic bias into `budget_exceeded_pct`. Residual: a flip within 1 MiB of the budget, 0.004% of a 24 GiB card. Stored as its own series and clearly labelled apart from the adapter-wide figure from `18_GPU_VENDOR_APIS`. Aggregates: avg, max, and `budget_exceeded_pct` (share of samples where `CurrentUsage > Budget`, i.e. the driver was likely evicting — a genuinely useful stutter explanation).
**What is measured since 2026-10-03:** the game process's own memory, read from OUTSIDE the game once a second by the
Agent through `FrameLedger.ProcessStats.dll` (`18_GPU_VENDOR_APIS` §The game process's memory) — never from the game's
memory (CLAUDE.md rule 4):
| Figure | Source | What it is |
|---|---|---|
| **Dedicated GPU memory** (`game_vram_dedicated`) | PDH `\GPU Process Memory(pid_<pid>_luid_…_phys_<n>)\Dedicated Usage`, every instance naming the pid summed | the number Task Manager's Details tab shows under that name |
| Shared GPU memory (`game_vram_shared`) | the same counter set's `Shared Usage` | system memory the GPU uses on the game's behalf |
| **Memory — private working set** (`game_ram_private`) | `GetProcessMemoryInfo`, `PROCESS_MEMORY_COUNTERS_EX2.PrivateWorkingSetSize` | Task Manager's "Memory" column; N/A on a Windows that predates EX2 (Windows 10 22H2 / 11 22H2 without the September 2023 update) |
| Working set (`game_ram_ws`) | `WorkingSetSize` | the whole working set, shared pages included; what the card falls back to where the private working set is N/A |
| Commit (`game_commit`) | `PrivateUsage` | private memory committed, resident or not |
**Which process.** A hooked session — and any session refused after the loop pinned the process — reads the pinned pid
through the handle the session already holds (`SYNCHRONIZE | PROCESS_QUERY_LIMITED_INFORMATION`). An unpinned Tier-2 hold
(hooking off, blocked, unresolved, cannot pin) reads **every process running the game's executable** in the watcher's
snapshot, each opened for the read with `PROCESS_QUERY_LIMITED_INFORMATION` and closed after it, and SUMS them; a process
whose creation time is not the snapshot's (a reused pid), or that refuses even that right, is left out of both halves.
`game_memory_processes` says how many were summed. Child processes of another executable (a launcher, a crash handler, a
web view) are not counted.
**Dedicated is not the DXGI budget model's "local usage".** dwm.exe read 858 MB dedicated against 310 MB local at an idle
desktop, and a test process holding a buffer read 4.5 MiB more dedicated than its own `QueryVideoMemoryInfo(LOCAL)` at
both 8 MiB and 512 MiB (`spike-notes` §16, M3) — a constant per-device amount, not one that grows with the game's
allocations. So dedicated is defined as Task Manager's column and is **never compared with a budget**: the budget and
`budget_exceeded_pct` stay unmeasured (`20_OPEN_QUESTIONS` §M11), and `vram_proc_*` / `vram_budget_exceeded_pct` /
`FlFrameRecord.vramUsedMb` stay reserved for that in-process figure.
**Aggregates** (schema 0018): dedicated avg / median / max, shared max, private working set avg / median / max, working
set max, commit max, the process count, the sources (`counters,ex2,ex,held,opened`), and every series' n / mean / median /
min / max in `sensor_stats_json` (§Sensor aggregates). MiB stored; shown in GB as Task Manager does (1 GB = 1024 MiB).
> **The paragraph below is the design that was never built, kept as it stood** (struck 2026-10-03: the Overlay never
> called `QueryVideoMemoryInfo` — `dllmain.cpp` lists `FL_MEASURED_VRAM` as unproduced, §H10 never settled where in the
> game to call it — and D43 chose the outside read instead).
~~`vramUsedMb` from `IDXGIAdapter3::QueryVideoMemoryInfo(LOCAL)` inside the game = **this game's** usage and budget. **MiB, truncating, and it must use the same divisor as `vramBudgetMb`** — the two are compared, and mismatched rounding would put a systematic bias into `budget_exceeded_pct`. Residual: a flip within 1 MiB of the budget, 0.004% of a 24 GiB card. Stored as its own series and clearly labelled apart from the adapter-wide figure from `18_GPU_VENDOR_APIS`. Aggregates: avg, max, and `budget_exceeded_pct` (share of samples where `CurrentUsage > Budget`, i.e. the driver was likely evicting — a genuinely useful stutter explanation).~~
## Sensor aggregates
Per session over 1 Hz samples: `avg` (mean of non-null), `max`. Sensor timeline aligned to the frame timeline via the shared QPC epoch captured at session start. Fields with no data are `N/A`, never 0.
Per session over 1 Hz samples: `avg` (mean of non-null), `max` — and since beta.12 the `median` (the linear-interpolation
50th percentile: the middle sample of an odd count, the mean of the two middle ones of an even count) and the `min`
(`Domain.Metrics.SeriesAggregates`). Every stored series' n / mean / median / min / max is written once at finalize to
`sessions.sensor_stats_json`, so the summary's statistics read stored values and outlive a retention sweep of the raw
series. Sensor timeline aligned to the frame timeline via the shared QPC epoch captured at session start. Fields with no
data are `N/A`, never 0.
## Accuracy budget (shown in Help → About metrics)
## Accuracy budget ~~(shown in Help → About metrics)~~
*(Corrected 2026-10-04: no such page exists. Users read these limits in `LIMITATIONS.md` (Help ▸ Limitations) and in
`legal/ACCURACY.md`, which it links.)*
| Quantity | Tier 1 | Tier 2 |
|---|---|---|
@@ -762,7 +810,7 @@ Per session over 1 Hz samples: `avg` (mean of non-null), `max`. Sensor timeline
| Upscaler + render resolution | **exact** (vendor API arguments) | not available |
| RT active | measured per frame | not available |
| Path tracing | heuristic, confidence-scored, never asserted | not available |
| Per-process VRAM | exact | not available |
| ~~Per-process VRAM~~ Game process memory (beta.12) | ~~exact~~ dedicated / shared GPU memory as Task Manager counts it — a known 512 MiB allocation read +512.0 MiB (`spike-notes` §16); private working set equal to Windows' own counter; read from outside the game | ~~not available~~ the same, from outside; an unpinned hold sums the executable's processes |
| PC latency | as reported by Reflex | not available |
| Display mode (beta.10) | per 100 ms sample: exclusive fullscreen as the swap chain answers it (DXGI; OpenGL and Vulkan cannot say), borderless, windowed, minimised; the window's size from user32 | per 1 s sample, from the window alone: windowed, minimised, or *fullscreen or borderless* — never split |
| GPU temp / load / power | vendor API accuracy, ±1 s sampling | same |
@@ -788,13 +836,13 @@ Per-column sources, and what a *Tier-2* export does instead:
| Column | Tier-1 source | Tier 2 |
|---|---|---|
| `frame_index`, `qpc_ms`, `frametime_ms` | `frametimes` blob + session `qpcEpoch` | ~~from CSV~~ — no Tier-2 CSV exists; a Tier-2 session exports no per-frame rows at all |
| `native_or_generated` | `frame_flags` generated bit — set where `fgEvaluations == 0`, i.e. the presents that carried **no** application-frame evaluation. Inverted from the pre-2026-08-14 reading, and accurate to one frame per the note in §Frame Generation | `FrameType` (2.x) |
| `native_or_generated` | `frame_flags` generated bit — set where `fgEvaluations == 0`, i.e. the presents that carried **no** application-frame evaluation. Inverted from the pre-2026-08-14 reading, and accurate to one frame per the note in §Frame Generation | ~~`FrameType` (2.x)~~ — no Tier-2 CSV *(corrected 2026-10-04)* |
| `render_w/h`, `output_w/h` | `render_res` blob — **two `uint16` pairs per frame**, not one; `ResizeBuffers` is hooked precisely because output resolution changes mid-session | `N/A` |
| `upscaler`, `upscaler_quality`, `fg_mode` | segment table, joined by frame index | `N/A` |
| `rt_flags` | `rt_flags` blob, **one byte per frame** preserving all three bits (`asBuildObserved`, `dispatchObserved`, `psoCreatedEver`) — collapsing them to a single "rt-active" bit loses the inline-RayQuery distinction this project exists to measure. The third was `rtPsoAlive` until layout v3 renamed it: creation is observed at `CreateStateObject` and destruction is COM `Release`, which is not in the hook inventory and must not be added, so the bit latches and could only ever mean "created ever" | `N/A` |
| `dispatch_rays` | `dispatch_rays` blob (`uint32[]`, the volume) | `N/A` |
| `pso_created` | `pso_created` blob (`uint16[]`, the **count**, not a flag) | `N/A` |
| `vram_mb` | `vram_proc` per-frame blob. Note the value is refreshed at 1 Hz (`17_HOOK_ENGINE` §Memory) so it is a held sample, not a per-frame measurement — the header block says so | `N/A` |
| `vram_mb` | `vram_proc` per-frame blob. ~~Note the value is refreshed at 1 Hz (`17_HOOK_ENGINE` §Memory) so it is a held sample, not a per-frame measurement — the header block says so~~ **Corrected 2026-10-03: the Overlay never produced it, so the column has always been empty.** It stays in the list — the schema is fixed — and the header's note says so; the game's memory is the `# game_memory:` header line (beta.12, §Game process memory) | `N/A` |
| `reflex_latency_us` | `latency_us` blob; **finalize must write it** | `N/A` |
Plus a `#`-prefixed header block: game, date, **capture tier**, api, present mode, swap effect, **the display line** (beta.10: `# display:` with each mode's milliseconds, the changes, the source and the window / back buffer / monitor sizes, or `N/A` for a session recorded before — §Display mode; a mode is the session's, not a frame's, so it is not a column), hardware snapshot, segment list, the tri-state flags with their sources, and the note that `vram_mb` is 1 Hz-sampled. The tier belongs in the header because a Tier-2 export is missing whole columns and anyone reading it later must know why.
Plus a `#`-prefixed header block: game, date, **capture tier**, api, present mode, swap effect, **the display line** (beta.10: `# display:` with each mode's milliseconds, the changes, the source and the window / back buffer / monitor sizes, or `N/A` for a session recorded before — §Display mode; a mode is the session's, not a frame's, so it is not a column), hardware snapshot, segment list, the tri-state flags with their sources, ~~and the note that `vram_mb` is 1 Hz-sampled~~ **the game's memory** (beta.12: `# game_memory:` with the dedicated GPU memory's mean / median / max, the shared max, the private working set's mean / median / max, the working set's and the commit's max — MiB, invariant — the process count and the sources, or `N/A` for a session recorded before or one where nothing answered; the session's figure, read once a second, so a header line like the display's), and the note that `vram_mb` is the in-game figure this build does not produce. The tier belongs in the header because a Tier-2 export is missing whole columns and anyone reading it later must know why.
+13 -8
View File
@@ -22,6 +22,7 @@ public interface IFrameSource : IAsyncDisposable
> {
> FlWriterState WriterState { get; } FlShmHandshake Handshake { get; }
> long TotalDropped { get; } long TotalGaps { get; }
> FlDisplayState? DisplayState { get; } // region 4, beta.10 (added to this sketch 2026-10-04)
> DrainResult Drain(Span<FlFrameRecord> into, IList<ulong> gapIndices);
> void PublishGuardResult(uint completedEvaluations, bool unhookRequested);
> void SetPaused(bool paused); void RequestLogFlush();
@@ -86,7 +87,11 @@ it still holds.
> watcher's own 1 Hz snapshot** (`ITargetResolver.IsRunning` over `LatestProcessSnapshot`, 2026-09-23; a process
> whose path could not be read still counts by its name; the console verbs, where nothing polls, keep the name
> list) when it never opened the process — by name, another game's `Game.exe` held an RPG Maker game's session
> open. Nothing about the hold touches the target, and no process is opened for it. **And hooking-off is decided before the process is opened**: `RunAsync` reads the consent record
> open. Nothing about the hold touches the target, and no process is opened for it. *(Corrected 2026-10-03, beta.12, D43:
the hold now reads the game's own memory, once a second, by opening each process running the executable with
`PROCESS_QUERY_LIMITED_INFORMATION` for the read and closing it after — the right the watcher's own snapshot already uses
on every process each second; nothing is held, nothing is injected, and the memory's contents are never read. Its video
memory comes from performance counters that need no handle at all; `03_METRICS` §Game process memory.)* **And hooking-off is decided before the process is opened**: `RunAsync` reads the consent record
> first, and a row whose hooking is off — merely added, blocked by a finding, auto-disabled — goes straight to
> the hold with `RefusedHookNotEnabled` (its verdict is the row's block when it has one, `PreviouslyBlocked`).
> The resolver used to run first, and a hooking-off utility that runs elevated (Borderless Gaming, imported from
@@ -127,7 +132,7 @@ which makes the notification more important than it was, not less.
## Process watcher
- 1 Hz snapshot via `CreateToolhelp32Snapshot` (CsWin32): pid, ppid, exe path (`QueryFullProcessImageName`).
- Watchlist match on normalized full path (`GetFinalPathNameByHandle` — junctions/symlinks), ~~filename fallback with a stale-path warning badge~~ **and a file name alone never starts a session (2026-09-23, HANDOFF D25): it can only be the entry's own executable on a drive that changed its letter (the relocator's rule), or it is not in the library.**
- Watchlist match on normalized full path (~~`GetFinalPathNameByHandle`~~ `File.ResolveLinkTarget` *(corrected 2026-10-04 — `ExecutableIdentity` says why)* — junctions/symlinks), ~~filename fallback with a stale-path warning badge~~ **and a file name alone never starts a session (2026-09-23, HANDOFF D25): it can only be the entry's own executable on a drive that changed its letter (the relocator's rule), or it is not in the library.**
- Process tree assembled from ppid chains; the **capture target** is the descendant that actually presents. In launch mode we know it; in attach mode we wait for the first ring handshake. ~~or (Tier 2) elect the PID with the most presents in the first 10 s~~ — there is no Tier-2 present stream to elect from. Re-elect if the presenting PID dies while the tree lives (level-transition relaunches).
> **Built 2026-09-10 (P2 PR-F), in `Application.Watch` with one adapter.** `ToolhelpProcessSnapshotSource`
@@ -175,7 +180,7 @@ which makes the notification more important than it was, not less.
## Launch mode vs attach mode
**Launch mode (preferred).** User starts the game from FrameLedger (or FrameLedger is set as the launch wrapper): `CreateProcess(CREATE_SUSPENDED)` → guard → inject → `ResumeThread`. Catches swapchain creation and upscaler init, which attach mode can miss entirely — a game that creates its DLSS feature during startup will otherwise report `upscaler = unknown` for the whole session.
**Launch mode (preferred).** User starts the game from FrameLedger ~~(or FrameLedger is set as the launch wrapper)~~ *(corrected 2026-10-04: no wrapper exists, and no App button sends `LaunchGame` yet — the pipe command has no caller; launch mode runs from the Agent's developer verb `--console launch --exe`)*: `CreateProcess(CREATE_SUSPENDED)` → guard → inject → `ResumeThread`. Catches swapchain creation and upscaler init, which attach mode can miss entirely — a game that creates its DLSS feature during startup will otherwise report `upscaler = unknown` for the whole session.
> **An elevated Agent starts the game as a standard user (beta.10, the admin mode, D34).** `ProcessLauncher` checks its
> own token: elevated, it starts the game with the desktop shell's token (`Infrastructure.Startup.UnelevatedProcess` —
@@ -221,13 +226,13 @@ which makes the notification more important than it was, not less.
**Attach mode.** Game launched from Steam/GOG/Epic normally; watcher sees it, guard runs, inject. Feature hooks install late, so early-init facts may be missed; the Overlay compensates by re-reading state on the first `EvaluateFeature` call it does observe, and the session is flagged `late_attach = true` so the UI can note that startup-time settings may be incomplete.
Steam users can also set FrameLedger as a launch option wrapper; documented in the UI rather than automated (never modify a user's Steam config for them).
~~Steam users can also set FrameLedger as a launch option wrapper; documented in the UI rather than automated (never modify a user's Steam config for them).~~ *(Corrected 2026-10-04: not built — there is no wrapper entry point and no UI text; a game started from Steam is recorded in attach mode. The parenthesis still holds: never modify a user's Steam config for them.)*
## The guard
The guard is **native** (`20_OPEN_QUESTIONS` §S13(a)) and the Agent reaches it through `IAntiCheatGuard`, a **thin P/Invoke facade over the single implementation** — never a second one. Two blocklist matchers that can disagree is a fail-open by construction: the day they diverge, one is wrong and nothing says which. Nothing managed parses rules or matches a blocklist, and a test asserts it (§S15 item 1).
The facade exposes exactly two operations, and neither hands out a clearance:
The facade exposes ~~exactly two operations~~ four *(corrected 2026-10-04: `GuardedInjectWhenReadyAsync`, launch mode's waiting entry, and `PreScanGameAsync`, the advisory checks 3–4 behind FR-2.2 and the library pre-scan, joined the two below; since D33 each takes `toleratedFamily`, a family name the guard resolves itself)*, and none hands out a clearance:
- `GuardedInjectAsync(pid, payload)` — runs every pre-injection check and, only on a pass, injects. There is no overload that skips the checks and no way to supply evidence; the guard collects its own, so a caller can ask but only the guard answers (§S13(b)).
- `EvaluateAsync(pid)` — the same checks with no injection, for the 30 s in-session re-scan. It cannot be used to pre-authorise anything: it takes no payload and returns no token, so acting on a pass means calling `GuardedInjectAsync`, which re-collects.
@@ -312,7 +317,7 @@ What the Agent checks **before** asking the guard is the thing the native side s
> published at attach are counted separately as `RecordsBeforeAttach`; that is not
> a stall and must not raise this warning.
- **A torn record is a gap, not a skipped frame.** Silently dropping it merges two frame times into one double-length interval, i.e. fabricates a stutter. Record an explicit gap at that index; `03_METRICS` excludes gap-adjacent intervals from frame-time statistics.
- Records go into an in-memory buffer (`ArrayPool<FlFrameRecord>` segments). Every 60 s, a crash-safety flush writes raw buffers to `%LOCALAPPDATA%\FrameLedger\tmp\<sessionGuid>.partial`.
- Records go into an in-memory buffer (~~`ArrayPool<FlFrameRecord>` segments~~ a `List<FlFrameRecord>` — corrected 2026-10-04). Every 60 s, a crash-safety flush writes raw buffers to `%LOCALAPPDATA%\FrameLedger\tmp\<sessionGuid>.partial`.
## Threading model
@@ -345,7 +350,7 @@ the pipe's tasks touches the ring or the recorder, and the session loop never wa
## Telemetry poller
1 Hz on its own thread: `CompositeTelemetrySource.TryRead` (`18_GPU_VENDOR_APIS` — DXGI/PDH baseline, LibreHardwareMonitor sensors, NVAPI extras on NVIDIA) + optional CPU sample when the Agent is elevated and PawnIO is present. Never called from the game process, never faster than 500 ms. Samples carry the session QPC epoch for timeline alignment.
1 Hz (the session's `telemetry.interval_ms`, 500–2000 ms) on its own thread: `CompositeTelemetrySource.TryRead` (`18_GPU_VENDOR_APIS` — DXGI/PDH baseline, LibreHardwareMonitor sensors, NVAPI extras on NVIDIA) ~~+ optional CPU sample when the Agent is elevated and PawnIO is present~~ + *(corrected 2026-10-04)* the machine's reading on the same tick — CPU load and memory in use without elevation, CPU temperature only when elevated with PawnIO — and the game process's memory (beta.12, D43). Never called from the game process, never faster than 500 ms. Samples carry the session QPC epoch for timeline alignment.
## Session recorder — state machine
@@ -468,7 +473,7 @@ Crash-within-60s-of-injection happening twice for the same game ⇒ **hooking au
## Live progress
`SessionProgress` at 1 Hz to the UI (`07_IPC`): rolling 5 s Native FPS, Displayed FPS, FG factor, current render→output resolution, upscaler + quality, RT active flag, GPU/CPU temp, per-process VRAM, elapsed. Suppressed when no UI client is connected. This is what makes the Dashboard live card genuinely useful — it is showing *measured* settings, not guesses.
`SessionProgress` at 1 Hz to the UI (`07_IPC`): rolling 5 s Native FPS, Displayed FPS, FG factor, current render→output resolution, upscaler + quality, RT active flag, GPU/CPU temp, ~~per-process VRAM~~ the game process's dedicated GPU memory and private working set (beta.12, from the newest telemetry tick — `SessionHeld` carries the same two for a held session), elapsed. Suppressed when no UI client is connected. This is what makes the Dashboard live card genuinely useful — it is showing *measured* settings, not guesses.
> **Built 2026-09-13 (P3 PR-1, HANDOFF §P3 decision D13): `Application.Ipc.SessionProgressCalculator`**, over the last 5 s of the
> ring's records through the same calculators the row uses — `FrameTimeSeries` for the presented rate, `FgWindow` + the FG ladder for
+14 -7
View File
@@ -36,6 +36,10 @@ Derived in the Agent from the record stream; the mapping is in `03_METRICS`. Sum
> **2026-09-27 (beta.10):** the first row's *swap effect* has a writer since schema 0016 — region 4's `GetDesc`, stored
> in `sessions.swap_effect` as a name (`flip_discard`, …) — and the display-mode row is new. **Present mode has none**,
> and the block above did not list it: `sessions.present_mode` is null on every row, and the pages say N/A.
>
> **2026-10-04 (beta.12, D43):** the per-process VRAM row's *usage* is measured — not by `QueryVideoMemoryInfo` but
> from outside the game, in both tiers, with the game's RAM beside it (`game_vram_*`, `game_ram_*`; `03_METRICS`
> §Game process memory). The in-game figure, its budget and `vram_proc_*` stay unbuilt.
> **"present-count delta" is removed from the FG row, and it was not merely unreliable —
> it was structurally zero.** `03_METRICS` §Frame Generation retired that rung on
@@ -47,11 +51,11 @@ Derived in the Agent from the record stream; the mapping is in `03_METRICS`. Sum
> stale-by-not-being-touched failure this project keeps recording; `06_DATA_MODEL`'s
> `fg_source` enum carried the same value and is corrected in the same pass.
~~Tier-2 sessions have `upscaler = unknown`, resolutions `N/A`, RT `N/A`, and an FG mode only if cadence resolves it.~~ **Simpler since 2026-08-28: a Tier-2 session detects NOTHING.** It has no frames, so cadence has nothing to run over. `upscaler`, resolutions, RT and FG all read `N/A`, and the static-hint tier (below) is the only thing that says anything about such a title — which it labels *inference*, never measurement. **The one exception since beta.10 is how its window was shown** (the display-mode row), which the Agent reads from outside the game in either tier.
~~Tier-2 sessions have `upscaler = unknown`, resolutions `N/A`, RT `N/A`, and an FG mode only if cadence resolves it.~~ **Simpler since 2026-08-28: a Tier-2 session detects NOTHING.** It has no frames, so cadence has nothing to run over. `upscaler`, resolutions, RT and FG all read `N/A`, and the static-hint tier (below) is the only thing that says anything about such a title — which it labels *inference*, never measurement. **The ~~one exception~~ exceptions** *(corrected 2026-10-04)* are how its window was shown (the display-mode row, beta.10) and the game process's memory (beta.12), which the Agent reads from outside the game in either tier.
## Static hints — rules engine
Rules are **data, not code**: `rules/detection-rules.json`, bundled and updatable from the repo (raw GitHub URL, ETag-cached; manual "Update detection rules" in Tools + weekly auto-check). Schema:
Rules are **data, not code**: `rules/detection-rules.json`, bundled ~~and updatable from the repo (raw GitHub URL, ETag-cached; manual "Update detection rules" in Tools + weekly auto-check)~~ *(corrected 2026-10-04: nothing fetches. The rules ship with the build and `RulesSeeder` installs them in `%LOCALAPPDATA%\FrameLedger\rules\`; Tools ▸ Update detection rules re-seeds from the copy beside the binary and wakes the detection and anti-cheat sweeps. A rules change reaches users with a release — `20_OPEN_QUESTIONS` §S20 feed half)*. Schema:
```json
{
@@ -64,7 +68,7 @@ Rules are **data, not code**: `rules/detection-rules.json`, bundled and updatabl
}
```
The `anticheat` block is the same file that feeds the hard guard in `19_SAFETY` — shipping it as updatable data is what lets a newly-protected game be blocked without waiting for an app release. **Rules updates that touch the `anticheat` block are treated as security updates:** applied on next check regardless of the user's auto-update preference for other rules.
The `anticheat` block is the same file that feeds the hard guard in `19_SAFETY` — shipping it as updatable data is what lets a newly-protected game be blocked without waiting for an app release. ~~**Rules updates that touch the `anticheat` block are treated as security updates:** applied on next check regardless of the user's auto-update preference for other rules.~~ *(Corrected 2026-10-04: there is no feed and no auto-update preference, so today a newly-protected game waits for a release; the sentence is what a feed must do once built, §S20.)*
Signal types evaluated by `RuleEvaluator` (Domain): `file_exists`, `dir_exists`, `sibling_glob`, **`path_contains`**, `pe_company_contains`, `pe_product_contains`, `strings_contains` (bounded 8 MB scan), `manifest_field`. Combine with `all` / `any` — **not nested**, which schemaVersion 2 forbids. Version extractors: `pe_file_version` (of the sibling its `from` names, not of the executable), `pe_product_version_regex`, **`strings_regex`**, `manifest_field`, and since 2026-09-27 **`unreal_build`** (no parameter; decided in code, §Engine version). A regex extractor must capture exactly **one** group — the evaluator returns the first — and `rules-validate.ps1` refuses any other count and any pattern that does not compile (both promised by the rules file's `$comment` and enforced by nothing until beta.10).
@@ -88,7 +92,10 @@ Signal types evaluated by `RuleEvaluator` (Domain): `file_exists`, `dir_exists`,
### Trust and staleness of the rules feed
`20_OPEN_QUESTIONS` §S4. The file is fetched over HTTPS from a raw GitHub URL.
> **Specified, not built (corrected 2026-10-04):** there is no feed (§S20 feed half, §S4); these rules apply once one
> exists. Today the seeder validates the packaged copy with the guard's parser and keeps `detection-rules.json.bak`.
`20_OPEN_QUESTIONS` §S4. The file ~~is~~ would be fetched over HTTPS from a raw GitHub URL.
Three rules, because a gate whose data can silently go stale is a gate with an
expiry date nobody sees:
@@ -144,7 +151,7 @@ Recorded as a residual risk, not as a solved problem.
| RPG Maker XP/VX/VX Ace | `RGSS1*`/`RGSS2*`/`RGSS3*.dll` sibling **or** a `*.rgssad`/`*.rgss2a`/`*.rgss3a` archive (since 2026-09-16) | `N/A` — one rule, the variant unnamed |
| RE Engine (Capcom) | `re_chunk_000.pak` sibling, the exact name (since 2026-09-23) | `N/A` |
| FromSoftware | a `*.bhd` **and** a `*.bdt` sibling (since 2026-09-23) | `N/A` |
| Ren'Py | `renpy/` dir **or** `*.rpa` | `renpy/__init__` strings / `log.txt` first line |
| Ren'Py | `renpy/` dir **or** `*.rpa` | ~~`renpy/__init__` strings / `log.txt` first line~~ `N/A` *(corrected 2026-10-04: no extractor — `strings_regex` reads only the executable)* |
| CryEngine | `CrySystem.dll` | FileVersion |
| Source | `gameinfo.txt` + `bin/engine.dll` | `N/A` |
| Unknown | fallback | — |
@@ -245,7 +252,7 @@ wrote, where detection wrote it.
|---|---|---|
| Steam | `steam_api64.dll`/`steam_api.dll` sibling, or path contains `steamapps\common` | nearest `steamapps/appmanifest_<id>.acf` (walk up): `appid`, `name`, `buildid` → version |
| GOG | `goggame-<id>.info` sibling, or `Galaxy64.dll` | `.info` JSON: `gameId`, `name`, `version` |
| Epic | `EOSSDK-Win64-Shipping.dll`, or path under an Epic install | `%ProgramData%\Epic\EpicGamesLauncher\Data\Manifests\*.item` matched by `InstallLocation` |
| Epic | `EOSSDK-Win64-Shipping.dll`~~, or path under an Epic install~~ *(corrected 2026-10-04: the rule has no path signal)* | `%ProgramData%\Epic\EpicGamesLauncher\Data\Manifests\*.item` matched by `InstallLocation` |
| itch.io | `.itch\receipt.json.gz` | **`%APPDATA%\itch\db\butler.db`** (`install_locations` + `caves`, butler's `verdict` names the executable) since 2026-09-16, then the receipt JSON: title, id |
| None/Manual | fallback | PE VersionInfo |
@@ -349,7 +356,7 @@ Three things this section previously implied that are not true, and are worth st
- **The UI answer is advisory.** It decides whether the toggle is *offered*; it does not gate injection. The same scan runs a second time inside the guard's chokepoint against a directory derived from the target's own pid, so "prevention beats interception" is a convenience, not the enforcement.
- **A hit disables the toggle; "could not scan" must not.** The scan is tri-state. `Reason::kPreScanFailed` — directory absent, unlistable, past a bound, or behind a reparse point — is *neither* a hit nor a pass. It must surface as "could not verify", distinct from "anti-cheat found": disabling the toggle on it would be a false refusal with no appeal, and clearing it would be a fail-open.
- **The token list is thin.** `directories` and `files` carry three tokens today. Widening needs verified names; a guessed token fails closed by never firing, which is a silent hole (`19_SAFETY` §Blocklist seed).
- **The token list is thin.** `directories` and `files` ~~carry three tokens today~~ *(corrected 2026-10-04: rules 2026.10.1 carry 9 directory families (12 names) and 18 file families (55 names), and since 2026-09-25 any `*.sys` in the install tree is a finding by code, not data)*. Widening needs verified names; a guessed token fails closed by never firing, which is a silent hole (`19_SAFETY` §Blocklist seed).
## Caching & privacy constraints
+83 -25
View File
@@ -2,7 +2,7 @@
`%LOCALAPPDATA%\FrameLedger\ledger.db`. Pragmas: `journal_mode=WAL`, `synchronous=NORMAL`, `foreign_keys=ON`, `busy_timeout=5000`. `Microsoft.Data.Sqlite` + Dapper; all writes in explicit transactions.
**Writer ownership:** Agent writes `sessions`, `session_segments`, `frame_blobs`, `sensor_blobs`, `hardware_snapshots`, the hook-state columns on `games`, **and since P4 PR-1 (2026-09-14) the *detected* columns on `games`** — `engine`, `engine_version`, `platform` under the per-field provenance rule (`05_DETECTION` §Caching: a `user` field is never touched), `capability_flags` whole, and the cache key `detection_rules_version` / `detection_exe_size_bytes` / `detection_exe_mtime_ms`, and since schema 0011 (2026-09-25) the executable's own facts `exe_machine` / `exe_file_version` / `exe_product_version` / `library_versions`, written whole like the flags — through `IGameRepository.ApplyDetectionAsync` only. The UI and the Agent were both already writers of `games`; this adds columns to the Agent's half, not a third writer (HANDOFF §P4). **And since P4 PR-4 the UI's library import writes `platform`, `store_id` and `game_version` through `ApplyStoreMetadataAsync`** — the same per-field provenance rule, badged `detected` (a store's record is not the user's typing), on columns the UI already owned. **And since 2026-09-23 the Agent's relocator merges two entries for one executable under two drive letters** (`IGameMerge`, HANDOFF D26, `19_SAFETY` §A moved drive is the same executable): in one transaction it re-parents the dropped entry's `sessions` to the survivor (before the delete — `sessions.game_id` cascades), carries a block or a crash auto-disable still in force to the survivor (`hook_enabled` only ever to 0; `hook_blocked_reason` is copied, never originated or cleared), adds the crash counts, deletes the dropped `games` row, and then moves the survivor to the file's path (after the delete — `exe_path` is UNIQUE). It is the one Agent write that deletes a `games` row; it never touches a consent column. **And since 2026-09-23 the UI writes `record_sessions`** (schema 0009, FR-1.6): the entry's recording switch, which the Agent only reads — off, the watcher does not watch for the program. The script's one data change switches it off for entries an old import made for Steam's own tools (`SteamLibrarySource.KnownTools`, the ids as of the script); a twin merge keeps it off when either twin had it off. **And since 2026-09-25 the Agent's pre-scan of the library (`19_SAFETY` §What a finding does to the game) writes the hook-state columns of every entry, not only of those the user asked to hook** — `hook_prescan_state`, and on a finding `hook_enabled = 0` and `hook_blocked_reason` — and its own key, `hook_prescan_rules_version` / `hook_prescan_exe_size_bytes` / `hook_prescan_exe_mtime_ms` (schema 0010), through `IGameConsentStore.RecordPreScanAsync` only: columns that were already the Agent's, never over a block, never a new row. **And since 2026-09-26 (schema 0014, D33) the Agent writes the user-mode exception's columns** — `ac_exception_*` on `games` through `IGameConsentStore` only (eligibility from the sweep, a grant from the `SetAntiCheatException` command, every end), and `sessions.ac_exception_family` with the session — the grant only after the user accepted its disclosure in the UI, which asks and never writes. **Maintenance (P4 PR-7) adds no writer:** the retention sweep on demand is the Agent's, asked over the pipe; the UI's `VACUUM` rewrites pages with the same contents and changes no row (§Retention built note). UI writes `games` (user-editable fields — since P3 PR-3 that is the FR-1.3 metadata, the `*_default` tri-states, and `removed_at`; never a `hook_*` column), `session_annotations` (tags, notes, and since schema 0002 the FR-8.3 overrides — which is WHY they are on this table and not on `sessions`), `settings`, `legal_acceptance`. Both read everything. The ports say the same in their names: `IGameRepository.UpdateMetadataAsync` / `SetTriStateDefaultAsync` / `RemoveAsync`, `ISessionAnnotationRepository`, `RegisteredSettings`, `ILegalAcceptanceStore.RecordAsync` (all P3 PR-3).
**Writer ownership:** Agent writes `sessions`, `session_segments`, `frame_blobs`, `sensor_blobs`, `hardware_snapshots`, the hook-state columns on `games`, **and since P4 PR-1 (2026-09-14) the *detected* columns on `games`** — `engine`, `engine_version`, `platform` under the per-field provenance rule (`05_DETECTION` §Caching: a `user` field is never touched), `capability_flags` whole, and the cache key `detection_rules_version` / `detection_exe_size_bytes` / `detection_exe_mtime_ms`, and since schema 0011 (2026-09-25) the executable's own facts `exe_machine` / `exe_file_version` / `exe_product_version` / `library_versions`, written whole like the flags — through `IGameRepository.ApplyDetectionAsync` only. The UI and the Agent were both already writers of `games`; this adds columns to the Agent's half, not a third writer (HANDOFF §P4). **And since P4 PR-4 the UI's library import writes `platform`, `store_id` and `game_version` through `ApplyStoreMetadataAsync`** — the same per-field provenance rule, badged `detected` (a store's record is not the user's typing), on columns the UI already owned. **And since 2026-09-23 the Agent's relocator merges two entries for one executable under two drive letters** (`IGameMerge`, HANDOFF D26, `19_SAFETY` §A moved drive is the same executable): in one transaction it re-parents the dropped entry's `sessions` to the survivor (before the delete — `sessions.game_id` cascades), carries a block or a crash auto-disable still in force to the survivor (`hook_enabled` only ever to 0; `hook_blocked_reason` is copied, never originated or cleared), adds the crash counts, deletes the dropped `games` row, and then moves the survivor to the file's path (after the delete — `exe_path` is UNIQUE). It is the one Agent write that deletes a `games` row; it never touches a consent column. **And since 2026-09-23 the UI writes `record_sessions`** (schema 0009, FR-1.6): the entry's recording switch, which the Agent only reads — off, the watcher does not watch for the program. The script's one data change switches it off for entries an old import made for Steam's own tools (`SteamLibrarySource.KnownTools`, the ids as of the script); a twin merge keeps it off when either twin had it off. **And since 2026-09-25 the Agent's pre-scan of the library (`19_SAFETY` §What a finding does to the game) writes the hook-state columns of every entry, not only of those the user asked to hook** — `hook_prescan_state`, and on a finding `hook_enabled = 0` and `hook_blocked_reason` — and its own key, `hook_prescan_rules_version` / `hook_prescan_exe_size_bytes` / `hook_prescan_exe_mtime_ms` (schema 0010), through `IGameConsentStore.RecordPreScanAsync` only: columns that were already the Agent's, never over a block, never a new row. **And since 2026-09-26 (schema 0014, D33) the Agent writes the user-mode exception's columns** — `ac_exception_*` on `games` through `IGameConsentStore` only (eligibility from the sweep, a grant from the `SetAntiCheatException` command, every end), and `sessions.ac_exception_family` with the session — the grant only after the user accepted its disclosure in the UI, which asks and never writes. **And since 2026-10-03 (beta.11, D40) the Agent deletes sessions on request** — every session of one game or of every game, `DeleteSessions` over the pipe, through `ISessionRepository.DeleteSessionsAsync` in one transaction (segments, blobs and annotations cascade), never while one is being recorded; the UI asks and never deletes a session row itself *(for Delete all sessions; FR-1.4's removal is the App's own cascade, above — corrected 2026-10-04)*. **Maintenance (P4 PR-7) adds no writer:** the retention sweep on demand is the Agent's, asked over the pipe; the UI's `VACUUM` rewrites pages with the same contents and changes no row (§Retention built note). UI writes `games` (user-editable fields — since P3 PR-3 that is the FR-1.3 metadata, the `*_default` tri-states, and `removed_at`; ~~never a `hook_*` column~~ **and two downgrades** *(corrected 2026-10-04)*: *Change executable* (2026-09-21, `GameLibrary.ChangeExecutableAsync`) turns hooking off, clears the consent and pre-scan columns and ends an exception grant — it never writes a block or a grant — and *Remove game ▸ Delete sessions too* (FR-1.4) deletes the `games` row, cascading to its sessions, segments, blobs and annotations), `session_annotations` (tags, notes, and since schema 0002 the FR-8.3 overrides — which is WHY they are on this table and not on `sessions`), `settings`, `legal_acceptance`. Both read everything. The ports say the same in their names: `IGameRepository.UpdateMetadataAsync` / `SetTriStateDefaultAsync` / `RemoveAsync`, `ISessionAnnotationRepository`, `RegisteredSettings`, `ILegalAcceptanceStore.RecordAsync` (all P3 PR-3).
## Schema (v2 — hook architecture)
@@ -69,7 +69,7 @@ CREATE TABLE games (
-- schema 0014 (2026-09-26, D33): the user-mode anti-cheat exception, a layer OVER hook_blocked_reason, never its clearing
ac_exception_eligible INTEGER NOT NULL DEFAULT 0, -- the Agent's sweep: the exception may be granted now
ac_exception_verdict TEXT, -- its tolerant pre-scan, Reason|Family|Signal; NULL = nothing asked
ac_exception_sessions INTEGER NOT NULL DEFAULT 0, -- successful Tier-1 sessions counted
ac_exception_sessions INTEGER NOT NULL DEFAULT 0, -- D38: successful sessions under the grant in force (its trial)
ac_exception_checked_rules_version TEXT, -- the key the verdict was reached under: rules, executable size and
ac_exception_checked_exe_size_bytes INTEGER, -- mtime, and the block text itself
ac_exception_checked_exe_mtime_ms INTEGER,
@@ -81,7 +81,9 @@ CREATE TABLE games (
ac_exception_exe_mtime_ms INTEGER,
ac_exception_lapsed_at INTEGER, -- when and why the last grant ended (UserModeExceptionLapse:
ac_exception_lapsed_reason TEXT, -- Withdrawn|ExecutableChanged|NoLongerEligible|NewFinding|
-- SafetyUnhook|OverlayStopped|SessionCrashed)
-- SafetyUnhook|OverlayStopped|SessionCrashed|TrialFailed)
-- schema 0017 (2026-10-03, D38): an exception of this game ended during its trial — for good; never cleared
ac_exception_trial_failed_at INTEGER,
hook_autodisabled_reason TEXT, -- set after repeated crashes
hook_crash_count INTEGER NOT NULL DEFAULT 0,
capability_flags TEXT, -- JSON: what the game SHIPS — never a measurement. Since P4 PR-1 (2026-09-14) a JSON
@@ -121,15 +123,18 @@ CREATE TABLE games (
> human's typed value as auto-detected is a lie they cannot see through; failing to
> badge a detected value merely costs a badge on something they can still edit. The
> rule it exists to support — *detection never overwrites a `user` field* — is in
> `05_DETECTION` §Caching and is enforced by `StaticDetectionResult.ShouldWrite`,
> which is tested even though nothing persists yet.
> `05_DETECTION` §Caching and is enforced by ~~`StaticDetectionResult.ShouldWrite`,
> which is tested even though nothing persists yet~~ `SqliteGameRepository.FieldProvenance.Resolve`
> *(corrected 2026-10-04: applied per field since P4 PR-1, and it also fills an empty field that has no entry;
> `ShouldWrite` keeps its tests but has no production caller)*.
>
> ~~No migration is written here. There is no SQLite layer at all, and §Migrations
> forbids editing an applied script — so guessing the shape into `0001_init.sql`
> before its consumers exist maximises the chance of baking in a wrong guess that
> can only be appended to.~~ **Written 2026-09-09 (P2 PR-B), with its first consumer:** the
> column exists in `0001_init.sql`; the writer (the detection cache, P4) and the reader (the
> library card, P3) are still unbuilt, so it is decided, created, and empty.
> column exists in `0001_init.sql`; ~~the writer (the detection cache, P4) and the reader (the
> library card, P3) are still unbuilt, so it is decided, created, and empty~~ *(corrected 2026-10-04: written since
> 2026-09-14 by the detection sweep, the store import and Edit…; read for the Edit dialog's badges and the game page)*.
> **The three hook-state columns have a consumer before they have a table, and two
> fields it needs are not here.** Added 2026-08-06 with `IGameConsentStore`, whose
@@ -140,7 +145,8 @@ CREATE TABLE games (
> anything else — so a record could carry a consent time that nothing had ever
> disclosed anything for. `ConsentProvenance`'s zero value means *no disclosure was
> shown*, and it deliberately has **no FR-2.1 member**: that dialog needs reviewed
> `Safety_*` wording in en/vi/ja and no `.resx` exists anywhere in this tree.
> `Safety_*` wording in en/vi/ja and ~~no `.resx` exists anywhere in this tree~~ *(superseded: the dialog shipped in
> P3 PR-4 as `ConsentDialog`, below — corrected 2026-10-04)*.
> - **A disclosure/wording version.** `legal_acceptance` carries `(doc, version,
> accepted_at)` while this column carries a timestamp alone, so nothing could mark
> existing per-game consent stale when the reviewed wording changes. It is carried
@@ -162,7 +168,10 @@ CREATE TABLE games (
> shipped producer, still not FR-2.1, stamped by the Agent's clock; the store writes the NAME the
> acknowledgement carries and refuses `NotRecorded`.
>
> **Still unanswered, and it is an owner decision rather than a coding one:** who
> ~~**Still unanswered, and it is an owner decision rather than a coding one:**~~ **Answered by the owner on
> 2026-09-22: nothing clears it** *(corrected 2026-10-04)*. A clean re-scan, *Change executable*, a re-import and a twin
> merge all leave it, and the toggle stays disabled (`19_SAFETY` §What a finding does to the game); D33's exception
> sits on top of the block and never clears it. The question as it stood: who
> clears `hook_blocked_reason` when a re-scan comes back clean. `19_SAFETY` §A game
> already enabled can become blocked later makes a non-null value mean "toggle
> disabled" and makes re-enabling "a user action" — but if nothing clears the column
@@ -215,7 +224,7 @@ CREATE TABLE sessions (
sync_interval_mode TEXT, -- observed vsync behavior
-- upscaling / FG (measured at tier 1)
upscaler TEXT, -- none|dlss|fsr2|fsr3|fsr4|xess|nis|unknown
upscaler TEXT, -- none|dlss|fsr2|fsr3|fsr4|xess|nis|unknown, and fsr since 2026-09-04 (FL_UPSCALER_FSR_UNVERSIONED; added 2026-10-04)
upscaler_quality TEXT,
upscaler_sharpness INTEGER, -- percent; NULL when the API reports none
render_w INTEGER, render_h INTEGER, -- dominant segment
@@ -276,6 +285,16 @@ CREATE TABLE sessions (
avg_gpu_load REAL, avg_cpu_load REAL, avg_ram_mb REAL,
avg_gpu_power_w REAL, throttle_pct REAL,
-- schema 0018 (2026-10-03, beta.12, D43): the game process's own memory, read from outside it, both tiers
-- (03_METRICS §Game process memory), MiB; and every sensor series' n/mean/median/min/max as JSON
game_vram_dedicated_avg_mb REAL, game_vram_dedicated_median_mb REAL, game_vram_dedicated_max_mb REAL,
game_vram_shared_max_mb REAL,
game_ram_private_avg_mb REAL, game_ram_private_median_mb REAL, game_ram_private_max_mb REAL,
game_ram_ws_max_mb REAL, game_commit_max_mb REAL,
game_memory_processes INTEGER, -- processes summed: 1 pinned, every process of the executable for a held one
game_memory_source TEXT, -- counters,ex2,ex,held,opened — the reads that answered
sensor_stats_json TEXT, -- {"gpu_temp":{"N":…,"Mean":…,"Median":…,"Min":…,"Max":…}, …}
-- schema 0016 (2026-09-27, beta.10): the display mode, both tiers (03_METRICS §Display mode). Milliseconds per mode,
-- each sample standing for the time until the next (100 ms hooked, 1 s at Tier 2), a pause not counted; nowindow is
-- outside every share. NULL before, on a session recovered from its .partial file, and where the loop never sampled —
@@ -327,7 +346,7 @@ CREATE TABLE frame_blobs (
-- stored only when either varies
dispatch_rays BLOB, -- uint32[] : ray volume per frame, tier 1 only
pso_created BLOB, -- uint16[] : compile COUNT per frame, not a flag
vram_proc BLOB, -- uint32[] MB per frame; held 1 Hz sample, see 03_METRICS
vram_proc BLOB, -- uint32[] MB per frame; never written (corrected 2026-10-04: the Overlay never produced vramUsedMb)
latency_us BLOB, -- uint32[], tier 1 + Reflex only
first_present_ms REAL -- schema 0013 (beta.8): the dominant stream's first present, ms from qpc_epoch —
-- the sensors' zero (t_ms) against the frames'. NULL before; the charts then
@@ -341,6 +360,9 @@ CREATE TABLE sensor_blobs (
-- schema 0008 (2026-09-22) DROPPED them with the feature (19_SAFETY §What a finding does to the game). Sessions that
-- ran under it keep "guard-bypass=" in capture_notes.
series TEXT NOT NULL, -- cpu_temp|gpu_temp|gpu_hotspot|gpu_load|gpu_power|vram_proc|vram_adapter|cpu_load|ram_mb
-- (vram_proc was listed here from 0001 and never written); since schema 0018 (beta.12,
-- D43) also game_vram_dedicated|game_vram_shared|game_ram_private|game_ram_ws|game_commit,
-- MiB — the game process's own memory (Application.Recording.SensorSeriesCatalog)
-- cpu_load / ram_mb / cpu_temp and sessions.avg_cpu_load, avg_cpu_temp, max_cpu_temp,
-- avg_ram_mb were in schema 0001 with NO producer until 2026-09-21 (Telemetry.SystemTelemetrySource
-- on the poller's tick). Rows before that date hold NULL, which is what they measured; no migration.
@@ -370,6 +392,10 @@ CREATE TABLE legal_acceptance (doc TEXT PRIMARY KEY, version TEXT NOT NULL, acce
> App at build (`GPL-3.0-only` for the licence text) — the App is the only writer, one row per document per
> Accept, re-recorded when the embedded version differs from the row's. `20_OPEN_QUESTIONS` §G "Legal doc
> versioning" closes on that.
>
> **Three rows since beta.12 (D45).** The GPL is shown for information and needs no acceptance (GPLv3 §9), so Accept
> writes `eula`, `disclaimer` and `privacy` only, and the gate is not held open for `gpl`. A `gpl` row an earlier
> version wrote stays, unread (`LegalGate`).
## Settings registry
@@ -389,7 +415,8 @@ switch's rule); integers are invariant-culture within an inclusive range; choice
| `ui.minimize_to_tray` | bool | `0` | | UI (PR-8) |
| `ui.hide_anticheat_hooking` | bool | `1` | | UI (beta.8, 2026-09-25): the game page of an entry the guard found anti-cheat in shows the finding in place of its Hooking card (`08_UI` §Game detail) |
| `ui.fps_decimals` | bool | `0` | | UI (beta.8, 2026-09-25): every FPS figure with two decimals ("62.40") instead of a whole number |
| `capture.background` | bool | `1` | | Agent |
| `ui.library_view` | choice `grid`\|`list` | `grid` | | UI (beta.11, 2026-10-03): the Games library as a grid of cards that fills the width, or as a list; written by the page's own switch, no Settings row (`08_UI` §Games) |
| `capture.background` | bool | `1` | | ~~Agent~~ nobody *(corrected 2026-10-04: no Agent code ever read it, so the watcher recorded every tracked game whatever it said; beta.12 removed its switch from Settings and reserved the key — `SettingsRegistry.CaptureBackground`)* |
| `hooking.kill_switch` | bool | `0` | | Agent (FR-2.4, since P2 PR-F) |
| `hooking.usermode_ac_exceptions` | bool | `0` | | Agent, at every session start and command (FR-2.8, D33, 2026-09-26): off suspends every user-mode exception without deleting any; on, the user still grants each eligible game |
| `capture.run_elevated` | bool | `0` | | The App when it starts the Agent, and an Agent the logon task started — both BEFORE the Agent exists, through `Infrastructure.Startup.RunElevatedSetting` (one row, `PRAGMA query_only`, no version gate, anything but `1` is off) (D34, beta.10): on, Windows is asked for administrator rights at every Agent start (`01_ARCHITECTURE` ADR-9) |
@@ -410,7 +437,7 @@ Because Tier-1 and Tier-2 sessions carry different fields, every query that comp
## Blob encoding
`float32`/`uint16`/`uint32` little-endian arrays through `DeflateStream` (Optimal). One hour at 100 fps ≈ 360k frames ≈ 1.4 MB raw frametimes ≈ **≤ 0.7 MB stored**; flags compress far better; render-res only stored when it varies. Decode helpers in `Infrastructure.Blobs` with round-trip test
`float32`/`uint16`/`uint32` little-endian arrays through `DeflateStream` (Optimal). One hour at 100 fps ≈ 360k frames ≈ 1.4 MB raw frametimes ≈ **≤ 0.7 MB stored**; flags compress far better; render-res only stored when it varies. Decode helpers in `Infrastructure.Blobs` with round-trip tests (NaN forbidden — assert).
> **Two rules the finalizer applies (2026-09-10, P2 PR-D).** `frametimes[i]` is the interval from the previous
> record ON THE SAME SWAPCHAIN; the first record of a stream, and any record after a torn slot or an
@@ -420,7 +447,7 @@ Because Tier-1 and Tier-2 sessions carry different fields, every query that comp
> and the sensors from `qpc_epoch`, and nothing said how far apart the two zeros were. Gaps stay closed up on the frame
> axis (a gap's interval is stored as 0), so a series still drifts ahead of its sensors past each gap.
> Sensor series are aligned to `t_ms` (milliseconds from `qpc_epoch`) and a tick with no reading is stored as
> **−1** — never 0, which would be a reading — because temperatures, loads, power and memory are never negative.s (NaN forbidden — assert).
> **−1** — never 0, which would be a reading — because temperatures, loads, power and memory are never negative.
## The `.partial` file
@@ -438,10 +465,11 @@ Because Tier-1 and Tier-2 sessions carry different fields, every query that comp
> | 1 `Header` | UTF-8 JSON: format version, `session_guid`, `started_at`, `qpc_epoch`/`qpc_frequency`, `game_id`, `snapshot_id`, exe path, pid, tier, mode, Overlay build id, telemetry descriptor, launch wait | on create — the breadcrumb `19_SAFETY` §Crash safety asks for before injection |
> | 2 `Records` | `i64` first ordinal, then N raw `FlFrameRecord` (64 B each); a chunk that does not continue the sequence is refused | each flush |
> | 3 `Gaps` | N × `i32` gap-before record indices | each flush |
> | 4 `Sensors` | N × one telemetry sample: QPC, wall clock, layer, presence mask, then only the fields that carry a value — null stays null | each flush |
> | 4 `Sensors` | N × one telemetry sample: QPC, wall clock, layer, presence mask, then only the fields that carry a value — null stays null | ~~each flush~~ read only since beta.12, so a beta.11 file still recovers *(corrected 2026-10-04)* |
> | 5 `Tick` | drain/foreground ticks, dropped, gaps, guard ticks, wall clock, the raw `FlWriterState`; the last one wins | each flush |
> | 6 `Note` | wall clock + UTF-8 text: a state transition | each transition |
> | 7 `Touches` | N × `i64` QPC at which the host touched the target | each flush |
> | 8 `SensorsWide` | the same samples under a 32-bit presence mask that carries the game process's memory (D43) | each flush, since beta.12 *(row added 2026-10-04)* |
>
> Recovery (`PartialRecovery`): a file whose guid is already a row is deleted (the finalize had landed);
> one under the minimum session length is discarded; one with no readable header is dropped; the rest
@@ -485,11 +513,6 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> columns on `session_annotations` and `games.removed_at`. `LedgerDatabaseTests` asserts one
> `schema_migrations` row per script, so `LatestVersion` is 2.
> **`0002_annotation_overrides_and_removal.sql` (P3 PR-3, 2026-09-13) — the first append**, and the first
> time the runner ran two scripts on a real file: `ALTER TABLE ADD COLUMN` only — the three override
> columns on `session_annotations` and `games.removed_at`. `LedgerDatabaseTests` asserts one
> `schema_migrations` row per script, so `LatestVersion` is 2.
> **`0003_fg_refusal.sql` (2026-09-14) — `sessions.fg_refusal`.** The owner's ledger held two hooked rows with
> `fg_mode = 'dlssg'`, `fg_source = 'api'` and `fg_factor` NULL — the identity stood, the count refused — and
> nothing recorded which refusal; every FG surface said N/A beside a detection that had succeeded. One
@@ -523,6 +546,11 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> absence). "Never edit an applied script; only append" holds: 0007 stays as applied and 0008 is the append. The
> data dropped is the override acknowledgements themselves, which is the decision. `LatestVersion` is 8.
> **`0009_record_sessions.sql` (2026-09-23, D29) — `games.record_sessions`** *(entry added 2026-10-04; it was
> missing)*. FR-1.6's recording switch, `NOT NULL DEFAULT 1`; the App writes it, the Agent only reads it. Its one data
> change switches it off for entries an old import made for Steam's own tools (`SteamLibrarySource.KnownTools` as of the
> script). `LatestVersion` is 9; `LedgerDatabaseTests.ScriptNineAddsTheRecordingSwitchOffForSteamToolsOnly`.
> **`0010_prescan_key.sql` (2026-09-25) — `games.hook_prescan_rules_version` / `hook_prescan_exe_size_bytes` /
> `hook_prescan_exe_mtime_ms`.** The Agent pre-scans every library entry for anti-cheat since beta.8, and again
> whenever the rules or the executable change, so it needs what each row was last scanned against — its own key, as
@@ -548,6 +576,11 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> `FgPreset`, `FgMode` beside its masks (additive JSON fields; older rows lack them). `LatestVersion` is 12;
> `LedgerDatabaseTests.ScriptTwelveAddsTheDriverProfileColumn`.
> **`0013_first_present.sql` (beta.8, 2026-09-25) — `frame_blobs.first_present_ms`** *(entry added 2026-10-04; it was
> missing)*. The charted stream's first present, in milliseconds from `qpc_epoch`, written by the finalizer
> (§Blob encoding); NULL before, and such a row's sensor overlay stays off rather than drawn out of step. `LatestVersion`
> is 13; `LedgerDatabaseTests.ScriptThirteenAddsTheFirstPresentColumn`.
> **`0014_usermode_ac_exception.sql` (beta.9, 2026-09-26, owner decision D33) — the user-mode anti-cheat exception.**
> Fourteen `games.ac_exception_*` columns in three groups — the Agent's eligibility answer about a blocked row and its
> key, the user's grant, and how the last grant ended — and `sessions.ac_exception_family`, the family a HOOKED session
@@ -577,6 +610,29 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> 16; `LedgerDatabaseTests.ScriptSixteenAddsTheDisplayColumnsAndAnEarlierSessionHasNone`,
> `SqliteSessionRepositoryTests.ASessionRoundTripsColumnForColumn`.
> **`0017_exception_trial.sql` (beta.11, 2026-10-03, owner decision D38) — the exception's trial.** One column,
> `games.ac_exception_trial_failed_at`: when an exception of the game ended during its trial (`19_SAFETY` §The user-mode
> exception), NULL when none did. ADD COLUMN only, no data change: a grant made under D33 stays in force and carries no
> mark. Written by the Agent's revoke only (`IGameConsentStore.RevokeAntiCheatExceptionAsync(…, trialFailed)`), set once
> (`COALESCE`), cleared by nothing — not by `ChangeExecutableAsync`, which does not name it — and carried by a twin merge
> (the earlier of two). The store applies it in SQL: no eligibility is written as eligible and no grant is written over
> it. `ac_exception_sessions` (0014) changes meaning without a script: since D38 it is the trial's progress under the grant
> in force, which the sweep rewrites on its first pass. `LatestVersion` is 17;
> `LedgerDatabaseTests.ScriptSeventeenAddsTheTrialMarkAndChangesNoRow`,
> `SqliteGameConsentStoreTests.AnEndDuringTheTrialMarksTheGameAndNothingClearsIt`,
> `SqliteGameMergeTests.AFailedExceptionTrialOnEitherTwinMarksTheSurvivor`.
> **`0018_game_memory.sql` (beta.12, 2026-10-03, owner decision D43) — the game process's own memory.** Twelve
> columns, ADD COLUMN only: `game_vram_dedicated_{avg,median,max}_mb`, `game_vram_shared_max_mb`,
> `game_ram_private_{avg,median,max}_mb`, `game_ram_ws_max_mb`, `game_commit_max_mb`, `game_memory_processes`,
> `game_memory_source` and `sensor_stats_json`. Written by the recorder's aggregation for both tiers
> (`SessionAggregator.WithSensorAggregates`); a session before it reads N/A. **Not `vram_proc_*`**: those name the
> in-process DXGI figure compared with a budget (a different quantity, `03_METRICS` §Game process memory) and stay
> reserved. The `.partial` gains chunk type 8 (`SensorsWide`, a 32-bit mask with the game fields); type 4 is still read,
> so a beta.11 crash file recovers. `LatestVersion` is 18; `LedgerDatabaseTests.ScriptEighteenAddsTheGameMemoryColumnsAndAnEarlierSessionHasNone`,
> `SqliteSessionRepositoryTests.ASessionRoundTripsColumnForColumn`,
> `PartialSessionFileTests.TheGameMemoryRoundTripsAndANarrowSensorsChunkFromBeta11StillReads`.
> **Every open used to migrate, and one that should not have did — 2026-09-16.** The Agent's `--console sessions`,
> a verb that prints, was run against the owner's ledger while the file on disk was at schema 2 and applied 0003 and
> 0004 to it. `LedgerDatabase.OpenReadOnlyAsync` exists since that day: an existing file, `PRAGMA query_only`, no
@@ -616,14 +672,16 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> insert leaves no session row behind (`SqliteSessionRepositoryTests`).
**`0001_init.sql` creates the schema above directly.** There is no v1 → v2
upgrade path, because there is no released v1: nothing has shipped, so no
FrameLedger database exists anywhere in the world. Writing and testing a
upgrade path, because there is no released v1: ~~nothing has shipped, so no
FrameLedger database exists anywhere in the world~~ *(corrected 2026-10-04: eleven pre-releases shipped from
0.1.0-beta.1 on 2026-09-16, and the appended scripts carry their ledgers forward; no schema older than 0001 ever
shipped, so there is still no v1 → v2 path)*. Writing and testing a
migration from a schema that never existed is work with no user on the other end
of it. The `schema_migrations` machinery still ships from day one — it is what
makes the *next* migration safe, and `11_UPDATER` §Versioning already requires
migrations to cover every released `MAJOR-1`. That obligation begins at the first
release, not before it.
migrations to cover every released `MAJOR-1`. ~~That obligation begins at the first
release, not before it.~~ It began with 0.1.0-beta.1.
## Hardware change markers (FR-6.3)
Snapshot captured per session, hashed, deduped. Trend queries join consecutive sessions' snapshots; differing fields emit a marker `{after_session_id, field, old, new}`. GPU driver version now comes from the vendor API (`18_GPU_VENDOR_APIS`) rather than WMI, which makes it accurate enough to be worth charting.
Snapshot captured per session, hashed, deduped. Trend queries join consecutive sessions' snapshots; differing fields emit a marker `{after_session_id, field, old, new}`. GPU driver version now comes from ~~the vendor API (`18_GPU_VENDOR_APIS`)~~ DXGI's four-part user-mode driver version (`HardwareSnapshotSource`; corrected 2026-10-04) rather than WMI, which makes it accurate enough to be worth charting.
+13 -8
View File
@@ -1,12 +1,14 @@
# 07 — IPC
Three channels, each chosen for its constraints:
~~Three~~ Four channels, each chosen for its constraints *(corrected 2026-10-04: §D, the tolerance mapping, arrived
in beta.9 without a row here)*:
| Channel | Between | Transport | Why |
|---|---|---|---|
| **A. Frame ring** | Overlay DLL → Agent | Shared memory, lock-free SPSC | Hot path: no syscall allowed |
| **B. Control block** | Agent ↔ Overlay DLL | Same shared memory, atomics | Tiny, infrequent, must work even if the game is unresponsive |
| **C. Command pipe** | UI ↔ Agent | Named pipe, JSON | Rich, versioned, human-debuggable |
| **D. Tolerance mapping** | Agent → Overlay DLL, once, before injection | Its own shared memory, read-only to the Overlay | Must exist before the Overlay's loader detour does (§D, D33) |
## A + B — shared memory (`Local\FrameLedger.Ring.<pid>`)
@@ -380,28 +382,31 @@ Unchanged in spirit from v1, bumped to `v2` for the new message set.
makes an additive field safe.)*
- A request the Agent cannot answer gets `Error { code, message }` with the request's `id`: `UnknownType`,
`Malformed` (no `id` when the envelope itself could not be read), `ProtocolMismatch`, `HandlerFaulted`. The
connection survives all four.
connection survives all four. *(Added 2026-10-04: `SetHookEnabled` and `SetAntiCheatException` also answer
`Error UnknownGame` — no row has that id — and `Error ExecutableUnreadable` — nothing scanned, stamped or granted;
the App branches on the second.)*
### Messages
| Type | Dir | Payload / notes |
|---|---|---|
| `Hello` | UI→A | `{ appVersion, protocol: 2 }` → `HelloAck { agentVersion, protocol, pid, elevated, overlayBuildId, vulkanLayerRegistered, telemetrySource /* composite, e.g. l1+lhm+nvapi */, cpuTempAvailable, disclosureVersion /* P3 PR-4, D14: the FR-2.1 text this Agent stamps against */, exceptionDisclosureVersion /* D33, 2026-09-26: the user-mode exception's disclosure this Agent grants against */, elevationOutcome /* beta.10, D34: the admin mode's answer at this start — granted, declined, other-account, failed — or null when nobody asked */, ~~etwAvailable~~ }` — `etwAvailable` struck 2026-09-13 with the tier it described (2026-08-28); `pid` added. `vulkanLayerRegistered` is **false by construction** today (the layer is per-launch, never registered) and `cpuTempAvailable` false unelevated; `telemetrySource` is the composite stood up once on the first `Hello` |
| `Hello` | UI→A | `{ appVersion, protocol: 2 }` → `HelloAck { agentVersion, protocol, pid, elevated, overlayBuildId, vulkanLayerRegistered, telemetrySource /* composite, e.g. l1+lhm+nvapi */, cpuTempAvailable, disclosureVersion /* P3 PR-4, D14: the FR-2.1 text this Agent stamps against */, exceptionDisclosureVersion /* D33, 2026-09-26: the user-mode exception's disclosure this Agent grants against */, elevationOutcome /* beta.10, D34: the admin mode's answer at this start — granted, declined, other-account, failed — or null when nobody asked */, ~~etwAvailable~~ }` — `etwAvailable` struck 2026-09-13 with the tier it described (2026-08-28); `pid` added. ~~`vulkanLayerRegistered` is **false by construction** today (the layer is per-launch, never registered)~~ `vulkanLayerRegistered` is the HKCU implicit-layer registration as the Agent found it at start *(corrected 2026-10-04: since P3 PR-8b; true while `VkLayerReconciler` keeps the layer registered for a hook-enabled Vulkan game, P4 PR-2)* and `cpuTempAvailable` false unelevated; `telemetrySource` is the composite stood up once on the first `Hello` |
| `GetStatus` | UI→A | → `StatusAck { state, activeSession?, tier? }` — and `activeSessions[]`, one `{ sessionGuid, gameId, gameName?, pid, tier, startedAt, hold? }` per running session. **`hold` added 2026-09-23, optional:** present on a session held unhooked (Tier 2), with the same words `SessionStarted.hold` carries; a session listed at tier 2 WITHOUT a `hold` has not attached yet — it is starting, not held. The App reads this list on every (re)connect (§Client behavior) |
| `SetWatchlist` | UI→A | `{ entries: [{ gameId?, exePath }] }` — ~~full replace~~ **ensure, never remove** (built 2026-09-13, PR-1b): each entry's path is normalised by the Agent, its row ensured with hooking OFF when new, and the ack is `WatchlistAck { games: [{ gameId, exePath, name }], unreadable: [exePath] }`; `gameId` in a request is a hint and never trusted over the path. UI re-sends on connect. **Carries no hooking state** (see §The pipe is not a trust boundary). *Since the App writes `games` rows itself under `06_DATA_MODEL` §Writer ownership (HANDOFF §P3 D15), this is the pipe's way of adding a row, not the only one; the watcher reads the table at 1 Hz either way.* |
| `LaunchGame` | UI→A | `{ gameId, arguments? }` → ~~suspended-launch~~ launch mode as built ("inject late", `04_CAPTURE` §Launch mode) → `LaunchAck { gameId, accepted, outcome, sessionGuid? }` — `outcome` is `Accepted` · `UnknownGame` · `SessionRunning` (one per game at a time) · `Unavailable` · `RecordingOff` (2026-09-23: the entry's recording switch is off, FR-1.6 — FrameLedger does not start what it will not record). *(Built 2026-09-13, PR-1b: `CaptureOrchestrator.LaunchAsync` over an `ILaunchRecorderFactory` the Agent composes with the Vulkan layer's environment — or none when FR-2.4's switch is on — and the launcher election runs after, as the console's `launch` does; the elected session is not addressable by the launch's guid.)* |
| `SetHookEnabled` | UI→A | `{ gameId, enabled, disclosureVersion? }` — Agent re-runs the static AC pre-scan and may reply `Refused`. **The Agent stamps the consent timestamp itself.** *(Built 2026-09-13, PR-1b, as far as it can be: `enabled: false` → `RevokeAsync` → `HookEnabledAck { gameId, enabled: false, outcome }`; `enabled: true` → the pre-scan of the executable's directory, a refusal or a "could not verify" recorded through `RecordGuardBlockAsync` and answered `Refused { gameId, reason, family?, signal? }`; a clean scan → ~~**`Error DisclosureUnavailable`, nothing stamped** — the reviewed FR-2.1 text does not exist, and a client's `disclosureVersion` is a claim, not a disclosure shown. PR-4 replaces that last branch with the stamp~~ **since PR-4 (2026-09-13): the client's `disclosureVersion` compared with the Agent's own `SafetyDisclosure.Version`; equal → the stamp from the Agent's clock with `ConsentProvenance.ConsentDialog`, answered `HookEnabledAck { enabled, outcome, prescan: "clean" }`; anything else → `Error DisclosureVersionMismatch`, nothing written (D14). `DisclosureUnavailable` remains for a composition that wired no version, which `--serve` never is.)* **Since beta.8 (2026-09-25):** the pre-scan is of the executable (the guard resolves the install root, PR-2 of that train), and BEFORE it an executable known not to run as x64 is answered `Refused { gameId, reason: "ExecutableNotX64", signal: "x86" | "anycpu32" | "arm64" | "arm" }` with nothing scanned and nothing written — not a guard reason and not a block (`05_DETECTION` §What the files say about themselves). **Since D33 (2026-09-26):** for a blocked game whose user-mode exception is in force for the executable on disk (the option on, a grant made on these bytes, the block naming that family) the pre-scan NAMES the family, and a pass under it is stamped as ever and answered `prescan: "exception"`; a finding about the game under it also ends the exception. |
| `SetAntiCheatException` | UI→A | **Added 2026-09-26 (D33).** `{ gameId, enabled, disclosureVersion? }` — grant or withdraw a game's user-mode anti-cheat exception (`19_SAFETY` §The user-mode exception). `enabled: false` → the exception ends (`Withdrawn`), hooking goes off while the block stands → `AntiCheatExceptionAck { gameId, granted: false, outcome, family? }`. `enabled: true` → `Error DisclosureVersionMismatch` unless `disclosureVersion` is the Agent's `AntiCheatExceptionDisclosure.Version`; `Error ExceptionsOff` while `hooking.usermode_ac_exceptions` is off; `Refused { reason: "BlockNotExceptionable" }` for a title list or an unreadable block; then the Agent's OWN facts — a tolerant pre-scan of the executable on disk naming the block's family (`Refused { reason, family, signal }` unless the guard let exactly that family through) and the successful Tier-1 sessions (`Refused { reason: "TooFewSessions", signal: <count> }` under two) — and the store writes the grant only over facts that make the game eligible → `AntiCheatExceptionAck { granted, outcome, family }`. **A grant turns nothing on**: hooking is FR-2.1's `SetHookEnabled`, afterwards. Not answered (`UnknownType`) by an Agent composed without the exception. |
| `SetAntiCheatException` | UI→A | **Added 2026-09-26 (D33).** `{ gameId, enabled, disclosureVersion? }` — grant or withdraw a game's user-mode anti-cheat exception (`19_SAFETY` §The user-mode exception). `enabled: false` → the exception ends (`Withdrawn`), hooking goes off while the block stands → `AntiCheatExceptionAck { gameId, granted: false, outcome, family? }`. `enabled: true` → `Error DisclosureVersionMismatch` unless `disclosureVersion` is the Agent's `AntiCheatExceptionDisclosure.Version`; `Error ExceptionsOff` while `hooking.usermode_ac_exceptions` is off; `Refused { reason: "BlockNotExceptionable" }` for a title list or an unreadable block; then the Agent's OWN facts — ~~the successful Tier-1 sessions (`Refused { reason: "TooFewSessions", signal: <count> }` under two)~~ *(D38, 2026-10-03: no session is needed)*; a game an exception of which ended during its trial is refused before anything is scanned (`Refused { reason: "TrialFailed", family, signal: <unix ms> }`); a tolerant pre-scan of the executable on disk naming the block's family (`Refused { reason, family, signal }` unless the guard let exactly that family through) — and the store writes the grant only over facts that make the game eligible, and never over a failed trial → `AntiCheatExceptionAck { granted, outcome, family }`. **A grant turns nothing on**: hooking is FR-2.1's `SetHookEnabled`, afterwards. Not answered (`UnknownType`) by an Agent composed without the exception. |
| `PauseCapture` / `ResumeCapture` | UI→A | global → `PauseAck { paused }`; `StatusAck.paused` reports it. *(Built 2026-09-13, PR-1b: one in-memory flag, `CapturePause`, read by every session loop at its tick and told to the ring once per transition; supervision — the guard scan, the kill switch, the safety stop — never pauses. Not persisted: an Agent that restarts resumes.)* |
| `StopSession` | UI→A | `{ sessionGuid }` — graceful ~~unhook~~ stop + finalize → `StopAck { sessionGuid, accepted, reason? }`. *(Built 2026-09-13, PR-1b: the orchestrator names every session it starts and cancels THAT session's stop token; the loop reads it at its next tick, drains once more, and ends as `SessionEndReason.StoppedByUser` — `exit_status = normal`, the row stored like any other, the target left running. A guid nobody runs is `accepted: false`. Distinct from the host's cancellation, which leaves a `.partial`.)* |
| `UpdateRules` | UI→A | **no payload** — a trigger, not a source. The Agent re-reads only its own `%LOCALAPPDATA%\FrameLedger\rules\` copy → `UpdateRulesAck { outcome }`. *(Built 2026-09-13, PR-1b: the seeder's `EnsureSeededAsync` outcome; a payload naming a path is ignored, and a test sends one to prove it.)* |
| `Shutdown` | UI→A | graceful stop → `ShutdownAck`, then the host stops (sessions finalize inside its grace window). *(Built 2026-09-13, PR-1b: `IAgentLifetime`, the host's under `--serve`, a logged no-op under `--console`.)* |
| `DeleteSessions` | UI→A | **Added 2026-10-03 (beta.11, D40).** `{ gameId? }` — every session of that game, or of every game when it is null, with their segments, frame and sensor series and annotations (they cascade) → `DeleteSessionsAck { gameId?, games, sessions }`. `Error SessionRunning` and nothing deleted while a session of that game — of any game, for all — is being recorded (`CaptureOrchestrator.IsRecording` / `IsRecordingAny`). The client names no rows beyond the game: they are the Agent's (§Writer ownership). Additive: an older Agent answers `Error UnknownType`, which the App says as "restart the agent". Carries no safety fact. |
| `SweepRetention` | UI→A | **no payload** — a trigger, like `UpdateRules`: the Agent applies `06_DATA_MODEL` §Retention to every game with the `retention.raw_sessions_per_game` it reads itself → `SweepRetentionAck { keep, games, sessions }` (`keep` 0 = unlimited, and then nothing was swept). *(Built 2026-09-15, P4 PR-7, for Tools ▸ Database maintenance: `Application.Recording.RetentionSweep` over `ISessionRepository.SweepRetentionAllAsync`, composed into `AgentCommandHandler` under `--serve`. The client names no number because the rows are the Agent's (§Writer ownership). Additive: an older Agent answers `Error UnknownType`, which the dialog reads as "restart the Agent". Carries no safety fact.)* |
| `SessionStarted` | A→UI | `{ sessionGuid, gameId, gameName, pid, tier, startedAt, hold? }` — **published once per session**: at the attach (tier 1, `startedAt` the attach), or — **since 2026-09-23** — at the first tick of a session held unhooked (tier 2, `startedAt` the session's start, `pid` 0 when the loop never opened the process, as a hooking-off hold never does). ~~a session that never attaches has no `SessionStarted`, only its `SessionCompleted` (tier 2)~~ — that was the beta.5 wire, and every hooking-off, refused or unreadable game read "Nothing is being captured." for as long as it ran. **`hold` (optional, tier 2 only)** is why nothing is measured: `{ reason, guardReason?, family?, signal?, hookingTurnedOff }` — the loop's `SessionEndReason` and, when the guard said anything but allow, its reason, family and signal: the same words the row's `capture_notes` will carry, so the live card and the summary read one sentence (`Formats.Tier2HoldReason` / `Tier2Reason`). The refusal's own event (`CaptureRefused` and the rest, below) goes out with this start rather than when the game exits, and is not repeated at the end |
| `SessionHeld` | A→UI | **Added 2026-09-23.** 1 Hz while a client listens, for a session held unhooked only: `{ sessionGuid, elapsedS, gpuTempC?, cpuTempC?, gpuLoadPct?, cpuLoadPct? }` — how long it has run and the machine's sensors. **Never `SessionProgress`**: its `presents5s`, `presentedQualifier` and `fgMode` are required, and zeros there would put measured-looking numbers on the wire for a session that measures nothing (rule 6 has nothing to show and shows nothing) |
| `SessionProgress` | A→UI | 1 Hz: `{ sessionGuid, elapsedS, presents5s, presentedFps5s?, presentedQualifier, nativeFps5s?, displayedFps5s?, fgFactor?, fgMode, upscaler?, upscalerQuality?, upscalerDriverReported?, renderW/H?, outputW/H?, rtActive?, gpuTempC?, cpuTempC?, cpuLoadPct?, vramProcMb?, latencyUs?, fgRefusal?, fgRuntimeCensus? }` — a 5 s rolling window over the ring through the SAME Domain calculators the row uses (`SessionProgressCalculator`, D13). **`upscalerDriverReported` added 2026-09-21, optional:** `dlss` when the NVIDIA driver reports an NGX super-resolution feature created and evaluated in the target (`03_METRICS` §The driver-reported rung), so the live card says `DLSS (driver-reported)` where no hook can name the upscaler; identity only. **`cpuLoadPct` added 2026-09-21, optional** (CPU time busy over the last telemetry tick, 0–100; `cpuTempC` has a producer from the same date, present only when the Agent is elevated with PawnIO). **Two fields added 2026-09-14, both optional (an older client ignores them, §C):** `fgRefusal` is the row's `fg_refusal` (schema 0003) — present when `fgMode` names a technology and `fgFactor` is absent, so the live card can say "DLSS-G active — factor not counted" rather than N/A; `fgRuntimeCensus` is the raw census so the `fg_runtime_loaded` chip can name the module. **Rule 6 at the wire (2026-09-13):** `nativeFps5s` / `displayedFps5s` / `fgFactor` are present only when frame generation was measured in the window; otherwise `presentedFps5s` stands alone with `presentedQualifier` (`census_not_run` · `no_fg_runtime` · `fg_runtime_loaded` · `none_withheld`, the row's `presented_qualifier` from the same function). Every unmeasured field is absent, never 0. Suppressed when no client is connected |
| `SessionHeld` | A→UI | **Added 2026-09-23.** 1 Hz while a client listens, for a session held unhooked only: `{ sessionGuid, elapsedS, gpuTempC?, cpuTempC?, gpuLoadPct?, cpuLoadPct?, gameVramDedicatedMb?, gameRamPrivateMb? }` — how long it has run and the machine's sensors (and since beta.12 the game process's own memory, read from outside it — optional, an older client ignores them). **Never `SessionProgress`**: its `presents5s`, `presentedQualifier` and `fgMode` are required, and zeros there would put measured-looking numbers on the wire for a session that measures nothing (rule 6 has nothing to show and shows nothing) |
| `SessionProgress` | A→UI | 1 Hz: `{ sessionGuid, elapsedS, presents5s, presentedFps5s?, presentedQualifier, nativeFps5s?, displayedFps5s?, fgFactor?, fgMode, upscaler?, upscalerQuality?, upscalerDriverReported?, renderW/H?, outputW/H?, rtActive?, gpuTempC?, cpuTempC?, cpuLoadPct?, vramProcMb?, latencyUs?, fgRefusal?, fgRuntimeCensus?, gameVramDedicatedMb?, gameRamPrivateMb? }` (the last two added 2026-10-03, beta.12, optional: the game process's dedicated GPU memory and private working set, MiB, from the newest telemetry tick; `vramProcMb` stays reserved for the in-process figure and has no producer) — a 5 s rolling window over the ring through the SAME Domain calculators the row uses (`SessionProgressCalculator`, D13). **`upscalerDriverReported` added 2026-09-21, optional:** `dlss` when the NVIDIA driver reports an NGX super-resolution feature created and evaluated in the target (`03_METRICS` §The driver-reported rung), so the live card says `DLSS (driver-reported)` where no hook can name the upscaler; identity only. **`cpuLoadPct` added 2026-09-21, optional** (CPU time busy over the last telemetry tick, 0–100; `cpuTempC` has a producer from the same date, present only when the Agent is elevated with PawnIO). **Two fields added 2026-09-14, both optional (an older client ignores them, §C):** `fgRefusal` is the row's `fg_refusal` (schema 0003) — present when `fgMode` names a technology and `fgFactor` is absent, so the live card can say "DLSS-G active — factor not counted" rather than N/A; `fgRuntimeCensus` is the raw census so the `fg_runtime_loaded` chip can name the module. **Rule 6 at the wire (2026-09-13):** `nativeFps5s` / `displayedFps5s` / `fgFactor` are present only when frame generation was measured in the window; otherwise `presentedFps5s` stands alone with `presentedQualifier` (`census_not_run` · `no_fg_runtime` · `fg_runtime_loaded` · `none_withheld`, the row's `presented_qualifier` from the same function). Every unmeasured field is absent, never 0. Suppressed when no client is connected |
| `SessionCompleted` | A→UI | `{ sessionGuid, sessionId?, exitStatus, tier, finalize, reason, gameId?, gameName? }` — UI loads the full row from SQLite; `sessionId` is null and `finalize` is `discarded` when the row was not stored (under the minimum length), or `game_removed` when its entry was removed with its sessions while it ran (2026-09-23), or **`faulted` when the session's task threw before it could finalize** (2026-09-23: it follows the `CaptureError SessionFaulted`, with `exitStatus` `interrupted` and `reason` `SessionFaulted`, so the live card and the tray let go of a session that no longer runs; the `.partial` stays for recovery); `exitStatus` is the row's vocabulary (`normal` · `crashed` · `unhooked_safety` · `degraded`); `reason` is the loop's `SessionEndReason`. **`gameId` / `gameName` added 2026-09-23, optional:** the entry the session was stored under — the finalizer's owner when it re-keyed a session whose entry was removed, else the one it started under — so the notice names the session that completed, not whatever the live card last showed |
| `CaptureRefused` | A→UI | `{ gameId, gameName, reason, family?, signal?, hookingTurnedOff }` — **guard fired**; `hookingTurnedOff` (2026-09-22) is true when the finding turned the game's hooking off (`19_SAFETY` §What a finding does to the game); UI shows the plain-language explanation — ~~and the Tier-2 offer~~; there is no alternative measurement to offer, only the option to record the session unmeasured (`08_UI` §Safety events). *(Built: for `RefusedByGuard`, `RefusedPreviouslyBlocked`, `RefusedKillSwitch` and `PreScanCouldNotVerify` — the last with no family, because "could not verify" is neither a hit nor a pass; `family`/`signal` are the verdict's. A game merely not enabled or not consented raises nothing: that is an ordinary Tier-2 row, not a refusal to explain.)* |
| `CaptureRefused` | A→UI | `{ gameId, gameName, reason, family?, signal?, hookingTurnedOff }` — **guard fired**; `hookingTurnedOff` (2026-09-22) is true when the finding turned the game's hooking off (`19_SAFETY` §What a finding does to the game); UI shows the plain-language explanation — ~~and the Tier-2 offer~~; there is no alternative measurement to offer, only the option to record the session unmeasured (`08_UI` §Safety events). *(Built: for `RefusedByGuard`, `RefusedPreviouslyBlocked`, `RefusedKillSwitch`, `PreScanCouldNotVerify` and, since 2026-09-21 (beta.4), `TargetUnreadable` — a protected process the Agent could not open (added 2026-10-04) — `PreScanCouldNotVerify` with no family, because "could not verify" is neither a hit nor a pass; `family`/`signal` are the verdict's. A game merely not enabled or not consented raises nothing: that is an ordinary Tier-2 row, not a refusal to explain.)* |
| `CaptureDegraded` | A→UI | `{ sessionGuid, from: 1, to: 2, reason }` — Tier 1 → Tier 2 mid-flight, or overlay self-disabled. **Under a two-rung ladder this means measurement STOPPED**, not that it continued at lower fidelity, and the notice must say so. *(Built: `SupervisionLost`, `WriterSelfDisabled`, `WriterStoppedBlocklisted`, `WriterNeverInstalledHooks`, `SupervisionFaulted`, `KillSwitchEngaged` — `RecordedSessionEvents.Classify` is the table.)* |
| `SafetyUnhook` | A→UI | `{ sessionGuid, family?, signal?, hookingTurnedOff }` — anti-cheat appeared mid-session; prominent UI notice; `hookingTurnedOff` as on `CaptureRefused`. *(Built: the verdict that FIRED, not the pass that started the session — `CaptureOutcome.Verdict` carries the supervisor's last verdict on this reason since 2026-09-13.)* |
| `HookingTurnedOff` | A→UI | `{ gameId, gameName?, reason, family?, signal? }` — **since 2026-09-25 (beta.8):** the Agent's pre-scan of the library (`19_SAFETY` §What a finding does to the game) found anti-cheat in a game whose hooking the user had turned on, and turned it off. Not a session event — no session is running — so the UI's notice carries no "record without measuring" action, only Dismiss (`SafetyNoticeKind.HookingOff`). A finding on a game whose hooking was already off sends nothing: its page and its library card change, nothing the user switched on did. Additive: a client that does not know the type ignores it (§Versioning). |
@@ -453,7 +458,7 @@ message, and that message always re-scans.
own from the same status. Before this a Dashboard opened after a game started read "Nothing is being captured.",
the tray stayed idle for a session that began before the App connected, and the updater held an update at
*Deferred* on a status read hours earlier.
- Connect with 250 ms × 8 backoff; on failure start the Agent, retry; then show an Agent status banner with Repair.
- Connect with 250 ms × 8 backoff; on failure start the Agent, retry; then show an Agent status banner with ~~Repair~~ Retry *(corrected 2026-10-04)*.
> **Amended 2026-09-17: never a second Agent.** A round that ends without a connection starts one only when no
> process holds the user's data folder (`AgentInstanceLock`, probed through `IAgentLauncher.RunningAgent`) and the
+152 -29
View File
@@ -24,11 +24,42 @@ WPF + **WPF UI (Wpf.Ui, Fluent)**. Shell = `ui:FluentWindow` with custom `ui:Tit
**Menu bar**
- **File:** Add game… · Import library (Steam / GOG / Epic / itch.io) · Export ▸ (Session CSV / Session JSON / Chart PNG) · Exit
- **Tools:** Agent status… · Update detection rules · Vulkan layer registration… · Open data folder · Database maintenance…
- **Help:** Check for updates · Report a bug… · Documentation · Limitations · About FrameLedger (App / Developer / Third-party licenses tabs)
- **Help:** User guide (beta.12) · Check for updates · Report a bug… · ~~Documentation~~ Online documentation · Limitations · About FrameLedger (~~App / Developer / Third-party licenses tabs~~ — built beta.12 as *This app* / *Third-party licences* / *Legal documents*, below)
> **Help ▸ Limitations, beta.10 (D36):** `LIMITATIONS.md` as the build embeds it (`Services.LimitationsDocument`), in a
> read-only, scrolling WPF UI `MessageBox` with *Open on GitHub*. It is information, not one of FR-11's documents:
> ~~read-only, scrolling WPF UI `MessageBox` with *Open on GitHub*~~ window of its own since beta.12 (`Windows/DocumentWindow`,
> rendered — below; corrected 2026-10-04). It is information, not one of FR-11's documents:
> nothing is accepted or recorded, and the Disclaimer points at it.
>
> **Help ▸ User guide, beta.12 (D44).** `guide/` — eight short English pages for players (install, record a game, read
> your results, anti-cheat and safety, your data, questions and answers, the terms in plain words) — embedded in the
> App (`Services.EmbeddedDocuments.Guide`, titles from each page's first heading) and shown in a `Windows/DocumentWindow`
> with a page list, Limitations last; a link between guide pages opens the page in the window. Help ▸ Documentation is
> *Online documentation*: the README at this build's source. `GuideDocumentsTests` holds every page listed and titled and
> every link leading somewhere.
>
> **Documents are rendered, beta.12 (owner request 4, D45).** Every Markdown document the App shows — the Legal Gate's
> three texts, Help ▸ Limitations, the update notes, About's documents — is drawn by `Markdown/MarkdownRenderer`
> (Markdig 1.4.0, BSD-2-Clause) into a WPF `FlowDocument` inside `Controls/MarkdownView` (a read-only
> `FlowDocumentScrollViewer`: selectable, Ctrl+C, Ctrl+wheel zoom): headings, emphasis and strikethrough, inline and
> fenced code in monospace, quotes, nested and numbered lists, pipe tables with a header row, rules, links. **HTML is
> off** — a tag is shown as the text it is; **no image is fetched** — its description stands in; a node the renderer
> does not know is shown as its own source text, and `MarkdownRendererTests` proves for every embedded document that
> no word of its plain text is lost and no table is left as `|---|` source. The GPL's `LICENSE` is not Markdown: it is
> shown as written, monospace. Colours and the font are theme resources (`16_WPFUI_SYNTAX` §FlowDocument). Links
> follow `Markdown/MarkdownLinks`: http, https and mailto through `IUrlOpener`; `#section` scrolls to the heading
> (GitHub's anchors); a relative path resolves against the document's place in the repository and opens in the App
> when the window holds that page, on GitHub otherwise — **at this build's own source** (`Services/RepositoryLinks`:
> the release's tag, stamped by `release.yml`; `main` for a local build — every link said `blob/main` before); any
> other scheme (`file:`, `javascript:`, a drive or UNC path) is not followed, its address shown beside its text.
> **Help ▸ Limitations** is a window of its own (`Windows/DocumentWindow`, one page, *Open on GitHub*); **Help ▸ About**
> is `Windows/AboutWindow`, three tabs: *This app* — the version, and the program's Appropriate Legal Notices (GPLv3
> §0, §5(d)): the copyright line, no warranty, the licence with the NOTICE terms, this version's source, *View the
> licence* / *View NOTICE* / *Open the source code*; *Third-party licences* — `legal/THIRD_PARTY_NOTICES.md` and the
> package index, rendered, and *Open the licences folder* (the published `licenses\`; a development build says it has
> none); *Legal documents* — EULA, GPL, Disclaimer, Privacy Policy, NOTICE, Trademarks. Asking again brings the open
> window forward (`Services/DocumentWindows`). Tests: `MarkdownRendererTests`, `MarkdownLinksTests`,
> `DocumentWindowsTests`.
The Menu sits in its own row **below** the TitleBar (never inside the drag region — 16 §Gotchas).
@@ -138,7 +169,7 @@ Reusable control `FpsReadout` (custom control styled with WPF UI theme brushes):
## Tri-state feature chips (RT / PT / RR)
`TriStateChip` custom control (WPF UI has no Chip primitive — build on `Border` + theme brushes, 16 §Custom controls): **Yes** = filled (accent) · **No** = outlined · **N/A** = dashed outline, muted foreground. Suffix icon shows source: 🔍 detected · ✎ manual · ↧ inherited. Click → `ui:Flyout` to override (session-level) with "set as default for this game" checkbox (FR-8.3). Chips appear on session rows, session summary header, and game header.
`TriStateChip` custom control (WPF UI has no Chip primitive — build on `Border` + theme brushes, 16 §Custom controls): **Yes** = filled (accent) · **No** = outlined · **N/A** = dashed outline, muted foreground. ~~Suffix icon shows source: 🔍 detected · ✎ manual · ↧ inherited. Click → `ui:Flyout` to override~~ *(corrected 2026-10-04: the source is the chip's tooltip, and a click opens FR-8.3's dialog, `TriStateOverridePrompt` — no flyout exists)* (session-level) with "set as default for this game" checkbox (FR-8.3). Chips appear on session rows, session summary header, and game header.
## Screens
@@ -146,7 +177,7 @@ All screens are `Page`s registered with the navigation page provider and navigat
### Dashboard
- Agent status `ui:CardControl` (state, capability badges as `InfoBadge`: telemetry source, Vulkan layer, ~~ETW fallback~~, PawnIO/CPU-temp, elevation — Repair button on error).
- **Live capture card** (visible during capture): game name, **tier badge**, elapsed, live `FpsReadout` (5 s rolling), **measured** `renderW×H → outputW×H` with upscaler + quality, RT-active dot, CPU/GPU temp, per-process VRAM, sparkline (last 120 s) fed by `SessionProgress`. Tier 1 shows measured settings — this is the payoff of hooking and should read as facts, not guesses.
- **Live capture card** (visible during capture): game name, **tier badge**, elapsed, live `FpsReadout` (5 s rolling), **measured** `renderW×H → outputW×H` with upscaler + quality, RT-active dot, CPU/GPU temp, ~~per-process VRAM~~ the game's own VRAM and RAM (beta.12: read from outside the game, so a held session has them too), sparkline (last 120 s) fed by `SessionProgress`. Tier 1 shows measured settings — this is the payoff of hooking and should read as facts, not guesses.
- Recent sessions list (last 10 across games) → click opens session summary.
- Totals strip: games tracked, total playtime, sessions this week (`ui:Card` row).
@@ -154,11 +185,15 @@ All screens are `Page`s registered with the navigation page provider and navigat
> is `LiveCaptureViewModel` over the pipe's `SessionStarted` / `SessionProgress` / `SessionCompleted`
> (marshalled through the captured `SynchronizationContext`): game, tier badge, elapsed, the `FpsReadout` at
> 1 Hz under the display rule (Presented FPS with its census chip until frame generation is measured), the
> measured `renderW×H → outputW×H` with upscaler + quality, the RT chip, GPU/CPU temperature, per-process VRAM.
> The sparkline is PR-6's. Recent = `ISessionRepository.ListRecentAsync(10)` with game names; a completed
> measured `renderW×H → outputW×H` with upscaler + quality, the RT chip, GPU/CPU temperature, ~~per-process VRAM~~
> (corrected 2026-10-03: that line read the Overlay's per-present VRAM, which nothing produced, so it was always empty;
> since beta.12 it is "This game: VRAM … · RAM …" from the newest telemetry tick, `GameMemoryText.Live`).
> ~~The sparkline is PR-6's.~~ Recent = `ISessionRepository.ListRecentAsync(10)` with game names; a completed
> session reloads the lists (the row is in SQLite, `07_IPC` §Client behavior). Totals = the library's games,
> `SummariseByGameAsync` playtime, `CountSinceAsync(now − 7 d)`. Capability badges and the Repair button are
> PR-8's with the Agent section.
> `SummariseByGameAsync` playtime, `CountSinceAsync(now − 7 d)`. ~~Capability badges and the Repair button are
> PR-8's with the Agent section.~~ *(Corrected 2026-10-04: PR-6 and PR-8 shipped without them. No sparkline exists,
> here or on the Games cards; the Agent card shows its facts as text, and the Vulkan layer state and the logon
> task's Repair are on Settings.)*
>
> **Amended 2026-09-23: the card shows every running session, measured or not.** A session held unhooked
> (Tier 2 — hooking off, refused, unreadable) shows its name, the T2 badge, the elapsed time and the
@@ -175,6 +210,25 @@ All screens are `Page`s registered with the navigation page provider and navigat
### Games (grid → detail)
- `GridView`-style panel of cover cards (`ui:CardAction`): name, platform badge, engine badge, total playtime, last played, mini trend sparkline (avg Native FPS last 10 sessions). Sort/filter/`ui:AutoSuggestBox` search.
> **The library, beta.11 (owner requests 2026-10-03).** *The empty band on the right:* the cards were 300 px in a plain
> `WrapPanel`, so at ~1350 px three fitted and a card's width was left unused; the grid is now
> `Controls.UniformWrapPanel` — as many columns as fit at 300 px or wider, every card an equal share of the width, each row
> as tall as its tallest card — and the pill row wraps instead of cutting its last pill. **Grid or list** (owner's choice:
> switch between the two): the button beside the sort shows the other view; the list is one row per game (name, store,
> engine, status, sessions, played, last played; double-click or Enter opens it), and the choice is `ui.library_view`.
> **The count** is in the title (*Games · 42*). **Refresh** reads the library again, then asks the stores for games installed
> since (`ImportLibraryFlow.RunAsync(onlyNew: true)`: *No new games* and no checklist when there are none), and every entry
> whose executable is not on disk carries a **Not installed** pill — its tooltip is the game page's own sentence for it,
> the drive that is not connected or the path the file is gone from (`GameLibrary.ExecutableExists` and
> `Formats.ExecutableMissingText`, asked off the UI thread on every listing, never stored; nothing is removed for it). **The page reloads by itself** while it is on screen when a session ends (`SessionCompleted`) or an
> import adds games (`LibraryChanges` — navigating to the page already on screen does nothing in WPF UI 4.3.0, so an
> import from the menu never showed until the page was left). **Import** (FR-1.2): the games already in the library — at
> this path or under another drive letter — are hidden by default (*Show the N games already in the library* brings them
> back, dimmed), and a row that cannot be imported has its box disabled; the XAML comment said "cannot be ticked" while a
> tick was taken and ignored. Tests: `GamesViewModelTests`, `ImportLibraryFlowTests.RefreshOffersOnlyNewGamesAndSaysWhenThereAreNone`,
> `…GamesAlreadyInTheLibraryAreHiddenUntilAskedFor`, `PagesLoadTests.TheLibraryGridFillsItsWidthAndTheListViewReplacesIt`,
> `…TheImportChecklistRendersWithTheExistingRowsShown`.
>
- **Game detail:**
- Header: cover, name, publisher, version, platform, engine+version, API + Present Mode of last session, `FpsReadout` (lifetime avg), TriState chips, Edit button.
- **Two clearly separated rows** (`05_DETECTION` §Capability hints — conflating these was the old design's core mistake):
@@ -184,7 +238,7 @@ All screens are `Page`s registered with the navigation page provider and navigat
> **Built 2026-09-14 (P3 PR-5): the grid, the detail page's header, the two rows, the hooking control and
> the Sessions tab.** Grid: `ui:CardAction` cards with platform / engine / hooking badges, sessions, playtime,
> last played (the sparkline is PR-6's); search and sort in memory; FR-1.1 by File ▸ Add game…, the page's
> last played (~~the sparkline is PR-6's~~ no sparkline was built — corrected 2026-10-04); search and sort in memory; FR-1.1 by File ▸ Add game…, the page's
> button, or an `.exe` dropped on the page (a `.lnk` needs the shell-link reader, later); FR-1.4 through
> `Wpf.Ui.Controls.MessageBox` with **Keep sessions / Delete sessions too**, revoking consent over the pipe
> FIRST when it was on. Detail: header (name, publisher · version · store · engine, last session's date and
@@ -228,6 +282,16 @@ All screens are `Page`s registered with the navigation page provider and navigat
> blocked row: its one action could only be refused. Tests: `GameDetailViewModelTests` (hidden, shown, the card
> pill), `BlockedReasonTextTests`, `PagesLoadTests.AnAntiCheatGamesPageRendersTheFindingInPlaceOfTheHookingCard`.
>
> **D38 (2026-10-03, beta.11): the trial.** *Not eligible: N successful hooked session(s), two are needed* is gone — a
> grant needs no session. The card reads *Exception in force since … — trial: N of 2 good sessions so far* until the
> trial is over, *Not eligible: an exception of this game ended during its trial on …, so none can be made again* after
> a failed one, and *Not eligible now: {family} was not found in the game's folder when it was checked* where the
> tolerant scan found nothing of the family (it used to say the check "could not finish"). The **Anti-cheat** card of an
> eligible game says hooking is off *unless you make a user-mode exception for it (below)* — "cannot be turned on" beside
> a usable *Make exception…* contradicted itself. The disclosure (`ac-exception-dialog/2`) names no session count and
> has a **Trial** paragraph. Tests: `GameDetailViewModelTests.WhyAGameIsNotEligibleIsSaidOnItsPage`,
> `SettingsViewModelTests.TheExceptionOptionIsOffByDefaultAndItsListFollowsTheAgentsColumns`, `AntiCheatExceptionsTests`.
>
> **The user-mode exception (2026-09-26, beta.9, owner decision D33).** While Settings' option is on, a blocked
> game's page shows a **User-mode exception** card with the Agent's answer about it (`Services.ExceptionView` over
> `GameRow.AcException` — the App reads those columns and writes none): *Eligible — no exception made* with **Make
@@ -259,11 +323,24 @@ All screens are `Page`s registered with the navigation page provider and navigat
> is the newest session that read a driver profile, in the same words; no row where none did. Tests:
> `NvidiaOverridesTests`, `GameDetailViewModelTests.TheDetailsCardNamesTheNvidiaAppsOverridesFromTheNewestSessionThatReadThem`.
- Tabs (WPF `TabControl`, Fluent-styled):
1. **Sessions** — `DataGrid`: date, duration, **tier badge (T1/T2)**, Native, Displayed, FG×, 1% Low, 0.1% Low, resolution + upscaler, max GPU temp, API, chips, ⚠ crash badge, tags. Row → Session summary. Multi-select → "Compare". Tier-2 rows render `—` (not blank, not zero) in Tier-1-only columns, with a tooltip explaining why.
1. **Sessions** — `DataGrid`: date, duration, **tier badge (T1/T2)**, Native, Displayed, FG×, 1% Low, 0.1% Low, resolution + upscaler, max GPU temp, API, chips, ⚠ crash badge, tags. Row → Session summary. ~~Multi-select → "Compare".~~ (not built; Compare's own picker chooses) Tier-2 rows render ~~`—`~~ `N/A` (not blank, not zero) in Tier-1-only columns, with a tooltip explaining why *(corrected 2026-10-04: as built — `—` means a measured none, §FPS display rule)*.
2. **Frametime** — ScottPlot timeline of selected session (decimated), stutter markers, sensor overlay toggle (temp on right axis).
3. **Distribution** — FPS histogram + percentile curve of selected session(s).
4. **Trend** — metric-over-date line (selector: Native avg / Displayed avg / 1% Low / 0.1% Low / max GPU temp), vertical **hardware-change markers** with tooltip "GPU driver 572.16 → 576.02" (FR-6.3).
> **Across sessions, beta.11 (owner decision D39, FR-6.6).** The **Sessions** tab opens with *Sessions at a glance*: a
> `TrendChart` of every hooked session's Presented FPS (sessions that counted no generated frame), Native and Displayed
> (sessions where frame generation was measured — rule 6, never one inflated line) and 1% / 0.1% lows, oldest first,
> partial sessions hollow (`TrendSeriesBuilder.Overview`); a click near a session's points selects it in the grid and
> scrolls to it (`TrendChart.SessionClicked`). Under it, **Delete all sessions…** (FR-1.7) for this game. The **Trend**
> keeps its selector and adds *Also draw*: any other metric ticked is drawn on the same chart, its unit
> (`TrendSeriesBuilder.UnitOf`: FPS, °C, %, W, MB, ×) on the left axis when it is the selected metric's and on the right
> when it is a second one (marked ▸ in the legend); a metric in a third unit cannot be ticked, and when the selected
> metric changes to a third unit only the first ticked unit in the list stays ticked, so every ticked box has its line;
> the selected metric is not offered beside itself. One line alone keeps its name on the axis, as before. After any delete — here or in
> Settings — a summary window still open on a deleted session closes, and File ▸ Export lets go of it (`SessionDeletion`;
> ids are reused once the newest is gone). Tests: `SessionDeletionAndOverviewTests`.
>
> **The display mode, beta.10 (FR-7.4, `03_METRICS` §Display mode).** The **Last session measured** row adds how that
> session was shown — the mode that lasted longest with its share and the window's size (`Display: Borderless 92% ·
> 2560×1440`); the **Sessions** tab has a *Display* column for every session, Tier 2 included (the mode shown longest,
@@ -272,7 +349,30 @@ All screens are `Page`s registered with the navigation page provider and navigat
> share %*, *Windowed share %* — over every session whatever its tier, never left out as a mid-session change (a mode
> switch resizes the swap chain, and the share is what that switch was), with no exclusive or borderless point for a
> session that had any time nothing could split (`Services.DisplayText`, `Charts.TrendSeriesBuilder.DisplayShare`).
5. **Sensors** — temp/load/power/VRAM timelines per session; per-process VRAM and adapter-wide VRAM as separate, differently-labelled series.
>
> **The game's own memory, beta.12 (owner decision D43, `03_METRICS` §Game process memory).** Read from outside the game
> once a second in either tier, it is shown wherever a session is (`Services.GameMemoryText`, from the stored columns and
> `sensor_stats_json` — never recomputed). The **Sessions** tab has *VRAM (game)* and *RAM (game)*: the median · the
> peak, in Task Manager's units (MB below 1 GB, GB to two decimals, 1 GB = 1024 MB, `Formats.Memory`), the tooltip
> carrying the mean, the shared GPU memory's peak, the working set's and the commit's peaks, and how many processes were
> added together where an unpinned hold summed more than one. Where Windows did not report the private working set, the
> working set is shown and SAYS so ("(working set)") — never passed off as Task Manager's "Memory". The **Trend** replaces
> *Max VRAM (game)* — which read `vram_proc_max_mb`, a column nothing ever wrote, so it never had a point — with *Median /
> Peak VRAM (game)* and *Median / Peak RAM (game)* in GB, machine metrics that count Tier-2 sessions (the RAM lines are the
> private working set only: a working-set-only session has no point there rather than another quantity on the line);
> *Avg RAM in use* is the whole PC's, now in GB too. **Compare** adds the four as rows that rank nothing — a game that uses
> more of a card it has is not worse. The **Sensors** tab and the summary's Sensors section draw two memory plots in GB:
> *Video memory (VRAM)* — this game's dedicated and shared beside the whole graphics card's — and *Memory (RAM)* — this
> game's private working set (or its working set, labelled) beside the whole PC's; this game is one colour on both. The
> **summary** adds two cards, *VRAM (this game)* and *RAM (this game)* — the median, with "median · peak … · shared …" /
> "… · commit …" beneath — and a table, **Statistics per series**: every stored series' mean, median, minimum, peak and
> number of readings, each in its own unit (`Services.SensorStatsTable`); a session recorded before beta.12 shows one
> sentence instead of the table. The **live card** shows "This game: VRAM … · RAM …" from the newest tick, a held session
> included, and the CSV gains the `# game_memory:` header line. Tests: `GameMemoryTextTests`,
> `SessionSummaryViewModelTests.TheGamesMemoryAndTheStoredStatisticsAreShownForASessionThatWasNotHooked`,
> `TrendSeriesBuilderTests`, `CompareViewModelTests`, `ChartMathTests.TheMemoryPlotFallsBackToTheWorkingSetUnderItsOwnName`,
> `LiveCaptureViewModelTests`, `SessionExporterTests`.
5. **Sensors** — temp/load/power/VRAM timelines per session; per-process VRAM and adapter-wide VRAM as separate, differently-labelled series. Since beta.12 two memory plots in GB: *Video memory (VRAM)* (this game's dedicated and shared, the whole graphics card's) and *Memory (RAM)* (this game's private working set, the whole PC's).
6. **Latency** *(Tier 1 + Reflex only)* — PC latency timeline, avg/p95.
> **Built 2026-09-14 (P3 PR-7): tabs 2–6.** Frametime and Distribution show the session selected in the
@@ -283,9 +383,10 @@ All screens are `Page`s registered with the navigation page provider and navigat
> GPU °C), FR-6.4's exclusion of `settings_changed_midsession` sessions by default with the toggle and the
> excluded count, and FR-6.3's markers — labelled dashed lines wherever two consecutive sessions' hardware
> snapshots differ in GPU driver, GPU, CPU, display mode or OS ("GPU driver: 572.16 → 576.02"). **Sensors**:
> GPU core / hotspot °C, load % and power W (right axis) on one plot; VRAM on another with the game's own
> per-present `vram_proc` (a held 1 Hz sample) and the adapter-wide `vram_adapter` sensor as two
> differently-labelled series. **Latency**: the `latency_us` blob with the stored avg / p95 lines, shown only
> GPU core / hotspot °C, load % and power W (right axis) on one plot; VRAM on another with ~~the game's own
> per-present `vram_proc` (a held 1 Hz sample) and~~ the adapter-wide `vram_adapter` sensor ~~as two
> differently-labelled series~~ (corrected 2026-10-03: the Overlay never produced `vram_proc`, so the game's line was
> never drawn on any session; beta.12's two memory plots are described above). **Latency**: the `latency_us` blob with the stored avg / p95 lines, shown only
> when Reflex reported (`reflex_active`); otherwise the tab says so.
>
> **Trend, corrected 2026-09-25 (beta.8, owner item 6: "does Trend really work?").** It did not, on first open: the
@@ -316,7 +417,7 @@ All screens are `Page`s registered with the navigation page provider and navigat
> PNGs have an opaque background (`ChartTheme.SavePng`: the window's colour under the transparent figure).
### Session summary (secondary `FluentWindow`, also the post-session toast target)
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers; **VRAM (this game)** and **RAM (this game)** — beta.12: the median with the peak beneath, both tiers), **Statistics per series** (beta.12: every stored series' mean / median / minimum / peak), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
> **Built 2026-09-14 (P3 PR-6).** `Windows/SessionSummaryWindow` (a secondary `FluentWindow` with its own
> `ContentDialogHost`), opened from a Sessions-tab row (double-click or Open) and from the Dashboard's recent
@@ -361,8 +462,9 @@ Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutte
> beyond a percentile on each side — FR-4.8's rule, generalised — so its 1% and 0.1% lows are marked exactly where
> the stat cards publish them, and the single shortest interval no longer sets the axis; the 0–100 axis holds.
> - **Sensors** (the tab and a new section of the summary window): power on a watt axis at the right, the second
> plot is *Memory* (the game's VRAM, the adapter's, the system's RAM), a per-present VRAM of 0 is a present the sample
> did not reach and is left out, the time axis says where its zero is, and every line has its own colour in both
> plot is *Memory* (the game's VRAM, the adapter's, the system's RAM), ~~a per-present VRAM of 0 is a present the sample
> did not reach and is left out~~ (corrected 2026-10-03: there was no per-present VRAM to draw — the Overlay never
> produced it; beta.12 replaced the plot with two, above), the time axis says where its zero is, and every line has its own colour in both
> themes (the light theme drew power and CPU temperature in one gold). **A session that was not hooked charts its
> sensors** — kept since 2026-09-22, shown nowhere until now.
> - **The game page follows the Agent while it is shown**: a `SessionCompleted` for this game reloads it
@@ -371,7 +473,8 @@ Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutte
> **FR-5.3:** `Charts/Decimator` — every bucket's min and max in order, ≤ 4000 points per series per draw, a
> 500k-point series keeps its spike and its dip (`DecimatorTests`). Zoom and pan are ScottPlot's.
> **FR-9:** `SessionExporter` — the CSV with `03_METRICS` §Export schema's column line verbatim and the `#`
> header block (tier, api, hardware, the tri-states with sources, the segments, the 1 Hz VRAM note),
> header block (tier, api, hardware, the tri-states with sources, the segments, ~~the 1 Hz VRAM note~~ — since beta.12
> the `# game_memory:` line, and a note that `vram_mb` is the in-game figure this build does not produce),
> InvariantCulture throughout, no rows for Tier 2; the JSON (`frameledger-session/1`: metadata, the row as
> aggregates with N/A omitted, segments, the annotation); PNG through `Plot.SavePng`. Tags (comma-separated,
> de-duplicated) and notes save to the annotation row. **FR-3.8** is an in-app notice on `SessionCompleted`
@@ -428,18 +531,27 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
> (App / Agent) read with `FileShare.ReadWrite` — Serilog keeps it open — capped at the last 2 MB with the partial
> first line dropped, refreshed every 2 s while the page is on screen (the page's Loaded/Unloaded start and stop
> the timer) and never while paused; the level filter reads the `[HH:mm:ss.fff LVL]` prefix of 10_LOGGING's
> template (continuation lines such as stack frames keep only under All); the search is a plain `ui:TextBox`, not
> template ~~(continuation lines such as stack frames keep only under All)~~ — the App's; *(corrected 2026-10-04: the
> Agent writes Serilog's default template, a date first, which the filter did not read, so Warning and Error showed no
> Agent line; since beta.12 `LogTail.LevelOf` reads both)* — continuation lines such as stack frames keep only under All; the search is a plain `ui:TextBox`, not
> an `AutoSuggestBox` — there is nothing to suggest. The view is a read-only `TextBox` in Consolas that scrolls to
> the end on every refresh unless paused. "Export bug bundle" is 10_LOGGING's step 2 and nothing more (see there).
> The status line says shown / total / file. Tests: `LogTailTests`, `LogsViewModelTests`, and the page renders in
> `PagesLoadTests`.
### Settings
> **beta.11 (owner request 2026-10-03: "remove the Settings rows that have no button or similar").** Every row has a control
> now: the *Games with hooking on* card shows only while a game has hooking on (its empty sentence is gone); the *Elevation*
> card is gone and its state is the third line of *Run the agent as administrator* (its explanation a tooltip on it); the
> sentence under the language row is gone. A **Data** section has one row, **Delete all sessions…** (FR-1.7): the
> confirmation names how many, the Agent deletes them (`DeleteSessions`), and the strip says what happened or why nothing
> was deleted (a session being recorded, no agent, an older agent). Tests: `SettingsViewModelTests.DeleteAllSessionsAsksWithTheTotalThenGoesThroughTheAgent`.
Sections per FR-10 using the WPF UI settings idiom: `ui:CardControl`/`ui:CardExpander` rows with `ToggleSwitch`, `ComboBox`, `ui:NumberBox` (numeric inputs — min session length, sensor interval, retention). Language switch applies immediately (09_I18N). Theme selector (Light/Dark/System) drives `ApplicationThemeManager` (16 §Theming). **Capture section (top, most important):** the global **hooking kill switch** (`ToggleSwitch`, prominent) with a one-line summary of what it does; a list of games currently hook-enabled with a per-game revoke; Vulkan layer registration state + Register/Unregister; a link to the safety documentation. Turning the global switch off must take effect immediately, including for the Vulkan layer.
**System (2026-09-21, FR "show the user's hardware"):** a card above Legal stating this PC as a session's hardware snapshot would record it right now — processor, graphics card, graphics driver, memory, Windows build, primary display — through the same `IHardwareSnapshotSource` the Agent stamps sessions with, read on the thread pool when the page opens, a field that could not be read as N/A, with **Copy** (the same lines as text) and a note that nothing is sent anywhere and what CPU temperature needs. Its own `SystemInfoViewModel`, not `SettingsViewModel`'s. The same snapshot is one tertiary line under the session summary's header (it was loaded for the export and shown nowhere), and `--diag` prints it; the bug bundle's `sysinfo.json` is deliberately NOT given it — its keys are the issue link's prefill.
Agent section: elevation state with a plain explanation of what elevation *optionally* unlocks (CPU temperature, elevated-game attach — ~~ETW fallback~~, which no longer exists) and that it is **not required by any capture tier**; task state, Register/Repair/Remove task, "Start agent at logon", background capture toggle. Privacy: online-metadata opt-in with plain-language explanation. Legal: reopen documents.
Agent section: elevation state with a plain explanation of what elevation *optionally* unlocks (CPU temperature, elevated-game attach — ~~ETW fallback~~, which no longer exists) and that it is **not required by any capture tier**; task state, Register/Repair/Remove task, "Start agent at logon", ~~background capture toggle~~ *(removed in beta.12 — nothing read it; corrected 2026-10-04)*. Privacy: online-metadata opt-in with plain-language explanation. Legal: reopen documents.
> **The admin mode, beta.10 (owner decision D34; `01_ARCHITECTURE` ADR-9).** The Agent section has a switch, *Run the agent
> as administrator* (`capture.run_elevated`, off by default). Turning it on opens a `ContentDialog`
@@ -466,8 +578,10 @@ Agent section: elevation state with a plain explanation of what elevation *optio
> `19_SAFETY_AND_ANTICHEAT.md` at the public repository in the user's browser (nothing is fetched).
> **Recording:** minimum session length, sensor interval and raw-series retention as `ui:NumberBox`es bounded by
> the registry; a value outside the range is refused in place (the previous value comes back, a warning names the
> range, nothing is written); background capture as a toggle with the honest sentence (recorded, measured only if
> hook-enabled and not Vulkan). **Agent:** the elevation state from `HelloAck.Elevated` with the paragraph above
> range, nothing is written); ~~background capture as a toggle with the honest sentence (recorded, measured only if
> hook-enabled and not Vulkan)~~ *(removed in beta.12, 2026-10-04: the toggle wrote `capture.background`, which no Agent
> code read, so turning it off recorded every game anyway; with no way to start a game from the App, "off" could only
> have meant recording nothing. The key is reserved — `06_DATA_MODEL` §Settings registry)*. **Agent:** the elevation state from `HelloAck.Elevated` with the paragraph above
> (not required by any tier; unlocks CPU temperature through PawnIO and attaching to elevated games); the logon
> task row says the scheduled task arrives with the tray build. **Window:** "Start FrameLedger with Windows" is
> `Infrastructure.Startup.RunAtLogon` — this user's `HKCU\…\Run` value, quoted executable path, never HKLM —
@@ -501,9 +615,16 @@ Agent section: elevation state with a plain explanation of what elevation *optio
> the option off only kept exceptions are listed, *suspended*. *Checking…* shows until the Agent has answered about
> every blocked game, and **Refresh** re-reads the list (the Agent's sweep runs every 15 s). The option is an
> Agent-read key and takes effect at the next session start and command.
>
> **2026-10-03 (beta.11, D38):** the option reads *Allow hooking in games whose only anti-cheat runs in user mode*, and
> its body names the trial. The list shows **only rows with an action** — eligible (**Make exception…**) or carrying an
> exception (**Withdraw**); "held back only by the session count" is gone with the count, and a game that can never
> qualify is explained on its own page. Each row is the game, its finding and its state — the state carries a grant's
> trial (*Exception in force since … — trial: 1 of 2 good sessions so far*), so the separate count line that repeated it
> is gone. **Refresh** shows only while a row is *Checking…*, the one time it can change anything.
### First-run flow
1. Legal Gate (FR-11): four documents, scrollable, links to GitHub-hosted versions, single Accept.
1. Legal Gate (FR-11): four documents, scrollable, links to GitHub-hosted versions, single Accept. **Since beta.12 (D45) Accept covers three** — the EULA, the Disclaimer, the Privacy Policy; the GPL is listed as *your licence*, with a line saying it needs no acceptance (GPLv3 §9), and gets no `legal_acceptance` row (`06_DATA_MODEL`). **Rendered since beta.12** (§Menu, *Documents are rendered*): the Markdown texts drawn, the GPL as written; a link from one document to another the gate shows opens it in the gate; *View on GitHub* opens the document at this build's source, through `IUrlOpener`.
2. Agent setup: runs **unelevated by default** — a short, honest paragraph explains that elevation is optional and unlocks CPU temperature and elevated-game attach. ~~and the Tier-2 ETW fallback. It must be explicit that **without elevation there is no Tier 2**~~ — **struck 2026-08-28: no tier needs elevation, so there is nothing to warn about here.** Capability check results shown afterwards. ~~with Tier-2 availability listed as its own badge~~ — there is no availability to report.
3. Hooking explainer: what Tier 1 vs Tier 2 means — **and it must be explicit that Tier 2 measures nothing**, because the honest version of this screen is the one where a user who declines knows what they are declining — and that hooking stays off until enabled per game.
4. Optional library import.
@@ -514,16 +635,17 @@ Agent section: elevation state with a plain explanation of what elevation *optio
> in read-only mode. **(1) The gate:** the four documents ride in the assembly (`LegalDocuments`: `legal/EULA.md`,
> the root `LICENSE` as the GPLv3 text, `legal/DISCLAIMER.md`, `legal/PRIVACY_POLICY.md`, embedded at build so the
> App shows the text this build was reviewed with; HTML authoring comments stripped; `{{RELEASE_DATE}}` left for
> `release.yml`), a list on the left, the text in a read-only box, "View on GitHub" per document, **one Accept**
> that writes four `legal_acceptance` rows with each document's own `**Version:**` line (`GPL-3.0-only` for the
> licence), and Decline, which ends the host — the shell never appears. Closing the window without deciding is a
> `release.yml`), a list on the left, the text in a read-only box (~~raw Markdown~~ rendered since beta.12), "View on GitHub" per document, **one Accept**
> that writes ~~four~~ three `legal_acceptance` rows with each document's own `**Version:**` line ~~(`GPL-3.0-only` for the
> licence)~~ *(corrected 2026-10-04: since beta.12, D45, the GPL is shown for information and gets no row; an older
> `gpl` row is left as written)*, and Decline, which ends the host — the shell never appears. Closing the window without deciding is a
> decline. **(2) Agent setup:** the honest paragraph (unelevated by default; elevation optional, unlocks CPU
> temperature and elevated-game attach, required by no tier) and the facts from `HelloAck` as they arrive —
> state, version, telemetry source, overlay build, CPU temperature, elevated — N/A until the Agent answers.
> **(3) The explainer:** the consent dialog's own reviewed Tier 1 / Tier 2 paragraphs (`Safety_Consent_Hooked` /
> `_NotHooked`, so the two screens cannot drift), that hooking stays off until enabled per game, and that the
> Disclaimer states the risk. **(4)** ~~the import placeholder (P4)~~ **since P4 PR-4 (2026-09-14) a real pointer: the stores' libraries are imported from File ▸ Import library… once inside, every row hooking off** (the step itself stays text — the review dialog needs the shell's dialog host, which the first-run window has not). D8 unchanged: the gate is not a consent
> precondition. Tests: `LegalDocumentsTests`, `FirstRunViewModelTests` (required on empty, one Accept = four
> precondition. Tests: `LegalDocumentsTests`, `FirstRunViewModelTests` (required on empty, one Accept = ~~four~~ three
> rows at the documents' versions, a moved version re-shows only that document, decline/close write nothing,
> read-only records nothing, the Agent facts), the two steps rendered in `PagesLoadTests`.
>
@@ -570,8 +692,9 @@ which is why the handler is ours.
- Every interactive control that shows no text of its own carries `AutomationProperties.Name` from `.resx` — the
toggles and choice boxes on Settings, the hooking switch on a game's page, and the icon-only close button in the
`InfoBar` template. A control *with* visible text needs nothing: its text is its name.
- `PagesLoadTests`-style scan (`AccessibilityTests.EveryTextlessControlHasAName`): every `Button`, `ToggleSwitch`,
`ToggleButton`, `CheckBox`, `ComboBox` and `HyperlinkButton` in the App's XAML either has content or a name. A new
- `PagesLoadTests`-style scan (`AccessibilityTests.~~EveryTextlessControlHasAName~~ EveryInputThatShowsNoTextHasAnAutomationName`
— corrected 2026-10-04): every `Button`, `ToggleButton`, `ToggleSwitch`, `CheckBox`, `RadioButton`, `ComboBox`,
`TextBox`, `NumberBox`, `PasswordBox`, `Slider` and `HyperlinkButton` in the App's XAML either has content or a name. A new
unnamed one is red.
- Status lines that change after an action (the Database maintenance result) are `AutomationProperties.LiveSetting="Polite"`.
+12 -4
View File
@@ -2,6 +2,9 @@
Languages: **en** (neutral/default) · **vi** · **ja**. Same `.resx` pattern as the rest of the poli0981 portfolio.
> **The user guide is English (beta.12, owner decision D44)**, like the legal documents: `guide/` is Markdown the App
> embeds and renders, not `.resx` text. The UI around it — the menu item, the window's title — is translated.
> **Both string families are given the UI culture explicitly (2026-09-21).** `App.ApplyCulture` sets `Strings.Culture`
> AND `FrameLedger.Shared.Strings.Culture`. The second was missing: the safety family fell back to the thread's
> `CurrentUICulture`, and a culture set inside the App's async start flows with that async context, not to the
@@ -11,10 +14,10 @@ Languages: **en** (neutral/default) · **vi** · **ja**. Same `.resx` pattern as
## Mechanics
- One `Strings.resx` (+ `Strings.vi.resx`, `Strings.ja.resx`) per assembly that has user-visible text (`App`, `Shared` for error codes). Access through a generated strongly-typed class; **no string literals in XAML/C# for user-visible text** (analyzer TODO: Meziantou MA0011/manual review in PR checklist). **As built (P3 PR-2, 2026-09-13):** the class is `Strings.Designer.cs`, written by `tools/resx-gen.ps1 -Resx <file>` and **committed** — not the SDK's `ResXFileCodeGenerator`, which the SDK-style WPF project does not run — with `Culture`, `ResourceManager`, `Keys`, and one property per key; the audit below fails when it is stale. The first family is `src/FrameLedger.App/Strings.resx` (65 keys); `Shared`'s arrives with PR-4's `Safety_*` text, because an empty family is what the audit refuses.
- XAML binding via `{x:Static res:Strings.Key}` plus a `LocalizeExtension` for the few dynamic cases.
- One `Strings.resx` (+ `Strings.vi.resx`, `Strings.ja.resx`) per assembly that has user-visible text (`App`, `Shared` ~~for error codes~~ for the safety family, the `Safety_*` keys — corrected 2026-10-04). Access through a generated strongly-typed class; **no string literals in XAML/C# for user-visible text** (analyzer TODO: Meziantou MA0011/manual review in PR checklist). **As built (P3 PR-2, 2026-09-13):** the class is `Strings.Designer.cs`, written by `tools/resx-gen.ps1 -Resx <file>` and **committed** — not the SDK's `ResXFileCodeGenerator`, which the SDK-style WPF project does not run — with `Culture`, `ResourceManager`, `Keys`, and one property per key; the audit below fails when it is stale. The first family is `src/FrameLedger.App/Strings.resx` (65 keys); `Shared`'s arrives with PR-4's `Safety_*` text, because an empty family is what the audit refuses.
- XAML binding via `{x:Static res:Strings.Key}` ~~plus a `LocalizeExtension` for the few dynamic cases~~ *(corrected 2026-10-04: no `LocalizeExtension` exists; text that varies is composed in the view model from `Strings.*`)*.
- **Runtime switching:** setting change → set `CultureInfo.CurrentUICulture` + `Thread` defaults → re-create the main window shell (cheap; state preserved via VM). Persist in `settings`.
- `SatelliteResourceLanguages` = `en;vi;ja` in the App csproj to keep publish size down.
- `SatelliteResourceLanguages` = `en;vi;ja` in ~~the App csproj~~ `Directory.Build.props` (corrected 2026-10-04) to keep publish size down.
## Key conventions
@@ -31,7 +34,7 @@ Languages: **en** (neutral/default) · **vi** · **ja**. Same `.resx` pattern as
- `en` written first, is authoritative.
- `vi` authored by the maintainer.
- `ja` machine-drafted, each entry marked with `<comment>review</comment>` until reviewed; the About dialog credits reviewers.
- `ja` machine-drafted, each entry marked with `<comment>review</comment>` until reviewed; ~~the About dialog credits reviewers~~ *(corrected 2026-10-04: no screen credits reviewers yet, and no `ja` entry has been reviewed — owner-only)*.
- CI check (`tools/resx-audit`): every key present in all three files; ~~missing → build warning list artifact~~ **missing is RED (2026-09-13)**: `tools/resx-audit.ps1` exists since P3 PR-2 as `build.ps1` step 15, self-test first (11 fixture cases, at least four must go red) then the live pass over every `Strings.resx` under `src/`. Per family it requires C#-identifier keys with non-empty neutral values, **exactly** the neutral key set in `vi` and `ja` (a missing key would fall back to English silently; an extra one is dead text), the `Safety_*` rule below, and a current `Strings.Designer.cs`. A tree with no family is red, not green — the gate must not be vacuous.
## Glossary (fixed translations)
@@ -52,6 +55,11 @@ Languages: **en** (neutral/default) · **vi** · **ja**. Same `.resx` pattern as
| Anti-cheat | Anti-cheat (giữ nguyên) | アンチチート |
| Capture tier | Mức thu thập | 計測ティア |
| Measured / Supports | Đo được / Hỗ trợ | 実測 / 対応 |
| VRAM / RAM (beta.12) | VRAM / RAM (giữ nguyên) | VRAM / RAM |
| Dedicated / Shared GPU memory | Bộ nhớ GPU chuyên dụng / dùng chung | 専用 / 共有 GPU メモリ |
| Private working set / Working set / Commit | giữ nguyên | プライベート ワーキング セット / ワーキング セット / コミット |
| this game / whole graphics card / whole PC | game này / cả card đồ họa / cả máy | このゲーム / グラフィックス カード全体 / PC 全体 |
| Median / Mean / Peak | Trung vị / Trung bình / Đỉnh | 中央値 / 平均 / ピーク |
Technical benchmark vocabulary stays in English across all locales where the community convention is English (1% Low, stutter, present mode, frame pacing).
+13 -4
View File
@@ -4,8 +4,16 @@
- Sinks: rolling file per process — `logs/ui-.log`, `logs/agent-.log` (`rollingInterval: Day`, `retainedFileCountLimit: 7`, `fileSizeLimitBytes: 10 MB`, `rollOnFileSizeLimit: true`). Console sink in DEBUG builds. *(`ui-.log` is written since 2026-09-13, P3 PR-2, with `Process=ui` enriched and every unhandled path — Dispatcher, AppDomain, unobserved task — logged as Fatal/Error; ~~the crash dialog and minidump of §Crash handling are still P4's~~ — built 2026-09-15, P4 PR-9, §Crash handling's note.)*
- Minimum level `Information` (`Debug` toggle in Settings → applies live via `LoggingLevelSwitch`).
- Enrichers: process name, version, `SessionGuid` and `GamePid` scoped properties during capture (`LogContext.PushProperty`).
- ~~Enrichers: process name, version, `SessionGuid` and `GamePid` scoped properties during capture (`LogContext.PushProperty`).~~
- Template: `[{Timestamp:HH:mm:ss.fff} {Level:u3}] {SourceContext} {Message:lj} {Properties:j}{NewLine}{Exception}`.
> **Corrected 2026-10-04 — the four lines above are `ui-.log`'s configuration, not both processes'.** `agent-.log`
> (`FrameLedger.Agent/Program.cs`, since 2026-09-10) is daily with **14** files kept and no size cap, writes Serilog's
> **default** template — `2026-10-04 09:15:02.123 +07:00 [INF] …`, a date first — and its level is fixed at
> Information with `Microsoft.*` at Warning: `log.debug` is the App's alone. Neither process has a console sink, and no
> enricher exists beyond the App's `Process=ui`. The Logs page reads both shapes since beta.12 — until then its level
> filter recognised only the App's `[HH:mm:ss.fff LVL]` prefix, so Warning and Error showed no Agent line at all
> (`LogTail.LevelOf`, `LogTailTests.TheAgentsTemplateIsReadToo`).
- **Never log:** full user paths outside `%LOCALAPPDATA%\FrameLedger` (redact to `<user>`), machine name, any exe arguments of games. ~~A `RedactingEnricher` enforces the path rule.~~ *(No such enricher was ever written: found 2026-09-15, checking `legal/PRIVACY_POLICY.md` §3's "logs are redacted (user directory paths removed) before bundling" against the bundle, which copied the logs verbatim. An enricher could not have kept the rule anyway: exception text and the Overlay's native log never pass through one, and the data directory itself sits under the user's profile, so every run logs a user name. The rule is enforced where a log leaves the machine instead: `App/Services/LogRedactor` over every log copy in the bug bundle, §Bug report flow step 2. The files in `logs\` keep their full paths; they leave the PC only if the user copies them.)*
- Capture hot path logs nothing per-frame; counters summarized at finalize.
@@ -151,7 +159,7 @@ Tails the active files (shared read), level filter, text search, pause autoscrol
## Diagnostics extras
- `Tools → Agent status…` shows the `HelloAck` capability set (telemetry source, overlay build id, Vulkan layer — ~~tier availability~~, which meant "is the ETW fallback reachable" and has no meaning under a two-rung ladder) + last 20 Agent log lines.
- `Tools → Agent status…` ~~shows the `HelloAck` capability set (telemetry source, overlay build id, Vulkan layer~~ — ~~tier availability~~, which meant "is the ETW fallback reachable" and has no meaning under a two-rung ladder ~~) + last 20 Agent log lines~~. *(Corrected 2026-10-04: it opens the Dashboard's Agent card — state, version, telemetry source, overlay build id, elevated, running sessions. The Vulkan layer state is on Settings ▸ Capture and the Agent's log on the Logs page.)*
- **Never include a game's own logs, saves, or config files** in a bug bundle, even when a crash looks game-related. We ship our logs only.
- `--diag` CLI flag on the App prints environment + capability report to stdout (support requests).
@@ -162,8 +170,9 @@ Tails the active files (shared read), level filter, text search, pause autoscrol
> **Built 2026-09-14 (P3 PR-8a).** `App.OnStartup` sees `--diag` and runs `DiagAsync` instead of the host: no
> window, no Agent, the ledger opened read-only for its schema version and the settings, then
> `Services/DiagReport.Build` (app version, OS and bitness, runtime, locale, elevation, data and logs
> directories, ledger schema or "could not open", whether `FrameLedger.Agent.exe` is beside the App, every
> registry key's effective value) written to `logs/diag-<yyyyMMdd-HHmmss>.txt` **and** to stdout — the App is
> directories, ledger schema or "could not open", whether `FrameLedger.Agent.exe` is beside the App, since
> 2026-09-21 the machine as a session's hardware snapshot records it — CPU, GPU, driver, RAM, display — added to this
> list 2026-10-04, and every registry key's effective value) written to `logs/diag-<yyyyMMdd-HHmmss>.txt` **and** to stdout — the App is
> a WinExe with no console of its own, so stdout carries the report only when the caller attached one or piped
> it (`FrameLedger.exe --diag | more` works; a double-click leaves the file). Exit 0, or 1 with a Fatal line in
> `ui-*.log`. The Agent's `--diag` stays on its `NotImplementedFlags` list — 10_LOGGING names the flag as the
+13 -10
View File
@@ -1,6 +1,6 @@
# 11 — Updater
Velopack, feeding from GitHub Releases of `https://github.com/poli0981/frameledger`. Stable channel only in v1.
Velopack, feeding from GitHub Releases of `https://github.com/poli0981/frameledger`. ~~Stable channel only in v1.~~ *(Corrected 2026-10-04: two channels since P4 PR-5 — `update.channel`, stable by default or beta, which adds pre-releases. Every release so far is a pre-release; see §Built, Channels.)*
## Flow
@@ -8,7 +8,7 @@ Velopack, feeding from GitHub Releases of `https://github.com/poli0981/frameledg
- **Manual check** (Help → Check for updates): progress dialog; all failures produce the mapped dialog below.
- **Never apply an update while a game is hooked** (FR-12): the Overlay DLL on disk must not change under a running game, and a mid-session swap would invalidate the ring layout handshake. If a capture is active, defer the prompt and the apply until the session ends.
- Apply: `WaitExitThenApplyUpdates` on restart. Agent is stopped via `Shutdown` before applying and the scheduled task action path is re-validated after update (Velopack keeps a stable `current` path, but verify in P4 and re-register task if the action path changed).
- Release notes (GitHub release body, Markdown) rendered in the update dialog.
- Release notes (GitHub release body, Markdown) rendered in the update dialog. ~~(shown as plain text until beta.12 — §Flow and §Limits below said so)~~ **Rendered since beta.12** by `Controls/MarkdownView` (`08_UI` §Menu, *Documents are rendered*), relative links resolved against `CHANGELOG.md` at this build's source.
## Error mapping (FR-12)
@@ -21,7 +21,7 @@ Velopack, feeding from GitHub Releases of `https://github.com/poli0981/frameledg
| Package hash mismatch | `Update_Err_Corrupt` | Auto-retry once, then dialog |
| Unknown | `Update_Err_Unknown` + exception logged | "Report a bug" shortcut |
Detection-rules updates share this client, but the **`anticheat` block is fetched and applied on its own schedule regardless of the user's rules-update preference** (`05_DETECTION` FR-7.3) — a user who turned off rules updates must still receive new anti-cheat entries.
~~Detection-rules updates share this client, but the **`anticheat` block is fetched and applied on its own schedule regardless of the user's rules-update preference** (`05_DETECTION` FR-7.3) — a user who turned off rules updates must still receive new anti-cheat entries.~~ *(Corrected 2026-10-04: there is no rules fetch and no rules-update preference. Tools ▸ Update detection rules re-reads the copy seeded from the install (`07_IPC`); FR-7.3 is unmet (`20_OPEN_QUESTIONS` §S20). The sentence is what a fetch must do once built.)*
All update HTTP goes through one `GitHubHttpClient` (also used by rules updates) with: UA `FrameLedger/{version}`, 10 s timeout, ETag cache in `settings`, single retry with jitter for transient failures.
@@ -29,7 +29,7 @@ All update HTTP goes through one `GitHubHttpClient` (also used by rules updates)
Binaries are not code-signed (project policy). Consequences and mitigations, documented in README and the update dialog footer:
- SmartScreen warning on first run of a new version — expected; SHA-256 checksums (`SHA256SUMS.txt`) published with every release; CI prints them into release notes.
- Velopack delta packages reduce download size; full package fallback automatic.
- ~~Velopack delta packages reduce download size; full package fallback automatic.~~ *(Corrected 2026-10-04: no delta has been published — `release.yml` never puts the previous release in `out/release` before `vpk pack`, so every update downloads the full package; a delta needs a `vpk download github` step first.)*
- Never bypass or suppress OS warnings programmatically.
## Versioning
@@ -37,7 +37,7 @@ Binaries are not code-signed (project policy). Consequences and mitigations, doc
SemVer `MAJOR.MINOR.PATCH`. Tag `vX.Y.Z` triggers the release workflow (13_CI_CD). `MAJOR` bumps for DB schema or IPC protocol breaks; migrations must cover every released `MAJOR-1` version.
> **Under `0.x` this rule is not applied, and every pre-release says so by shipping one anyway** (SemVer §4: a major version
> zero is initial development). Schemas 0008–0015 and the shared-memory layout 4 (2026-09-27, beta.10) each shipped in a
> zero is initial development). Schemas ~~0008–0015~~ 0008–0017 *(corrected 2026-10-04: 0016 shipped in beta.10 beside 0015, 0017 in beta.11; 0018 rides beta.12)* and the shared-memory layout 4 (2026-09-27, beta.10) each shipped in a
> `0.1.0-beta.N`. What protects a user is not the number: the ledger migrates in place (`06_DATA_MODEL` §Migrations), and a
> layout mismatch is refused at attach with "restart the game" (`07_IPC` §Protocol rules). The rule applies from `1.0.0`.
@@ -55,8 +55,8 @@ flow, and the tests run the flow over a fake client because nothing here may tou
window is off screen (`08_UI` §Notifications policy), and the shell's persistent InfoBar carries the download
and the **Restart to update** button.
- **Manual check:** Help ▸ Check for updates → `UpdateService.CheckInteractivelyAsync` and the dialogs in
`UpdatePrompts` (WPF-UI `MessageBox`): the offer with the release notes (the GitHub release body, shown as text —
no Markdown renderer is shipped), the unsigned-release footer, Download / Later; "up to date"; "not an
`UpdatePrompts` (WPF-UI `MessageBox`): the offer with the release notes (the GitHub release body, ~~shown as text —
no Markdown renderer is shipped~~ rendered since beta.12, at most 260 px tall and scrolling), the unsigned-release footer, Download / Later; "up to date"; "not an
installed copy"; and the error table below. There is no progress *dialog*: progress is the banner's percent. A
package that fails its checksum is downloaded once more before the Corrupt row is shown (the table's "auto-retry
once").
@@ -104,8 +104,11 @@ flow, and the tests run the flow over a fake client because nothing here may tou
empty token — measured on 1.2.0 by reflection, so the request identifies the product and nothing else. When the rules fetch is built
(`05_DETECTION` FR-7.3, `20_OPEN_QUESTIONS` §S20 feed half) it needs a client of its own; this paragraph no
longer claims the updater provides one.
- Release notes are rendered as plain text, not Markdown.
- ~~Release notes are rendered as plain text, not Markdown.~~ Corrected 2026-10-03: rendered since beta.12 (Markdig; HTML off, no image fetched).
`UpdateServiceTests` (App.Tests/Update) cover the two skips, the channels, Deferred ↔ Ready, each error row, and
the apply's three endings; `UpdateFailureMapperTests` the table; `UninstallHookTests` the hook; a real feed has
not been exercised — the first tag is the measurement (`13_CI_CD` §release.yml).
the apply's three endings; `UpdateFailureMapperTests` the table; `UninstallHookTests` the hook; ~~a real feed has
not been exercised — the first tag is the measurement~~ *(corrected 2026-10-04: the feed has existed since
v0.1.0-beta.1, 2026-09-16, and every release since carries `releases.win.json`; whether an installed copy has updated
through it is not recorded here)*
(`13_CI_CD` §release.yml).
+31 -16
View File
@@ -5,7 +5,7 @@ Mixed toolchain: .NET 10 for managed projects, MSVC for the native layer.
## Prerequisites
- Windows 11 (dev), **.NET 10 SDK**, **Visual Studio 2026** with: .NET desktop development, **Desktop development with C++** (MSVC v143+, Windows 11 SDK ≥ 10.0.22621), C++ ATL not required.
- **Vulkan SDK** (for the layer + validation layers during development).
- **Vulkan SDK** (~~for the layer +~~ validation layers during development, and to run `tools/vklayer-blastradius.ps1`) *(corrected 2026-10-04: the layer builds against the vendored `third_party/vulkan-headers`; CI installs no SDK)*.
- CMake ≥ 3.28 (native projects use CMake; consumed by the solution via a build target — see below).
- Optional: PawnIO for CPU-temperature testing; an NVIDIA GPU for the NVAPI/Reflex paths (dev machine: RTX 5080). AMD/Intel telemetry paths need no SDK — if you have such hardware, testing L1/L2 coverage there is valuable.
- **No admin needed for normal development.** `FL_MOCK=1` is **specified but not implemented** — `grep -rn FL_MOCK src tests tools build.ps1` returns nothing (CLAUDE.md §Dev mode records the same, and this line contradicted it in the present tense until 2026-08-05). When it exists it runs the whole app with a synthetic source and zero injection. Until then the no-injection development path is `hook-harness`, which needs no admin either.
@@ -23,8 +23,9 @@ Targets:
- `FrameLedger.Overlay` → `FrameLedger.Overlay.dll`
- `FrameLedger.VkLayer` → `FrameLedger.VkLayer.dll` + `VkLayer_FRAMELEDGER_overlay.json`
- `FrameLedger.Injector` → **static lib only.** There is no `FrameLedger.Injector.exe` and none ships (`20_OPEN_QUESTIONS` §S9, decided 2026-08-02). A standalone `LoadLibraryW` injector that users can run is a path into a game process that the guard does not stand in front of — a bypass, and a bad look for a project whose position is "we refuse where we are not welcome". The Agent links the static lib; the guard owns the chokepoint inside it (§S13(b)), so there is no callable entry point that skips the gate. Manual testing uses `hook-harness`, never a real game (§Debugging).
- `FrameLedger.NvapiBridge` → `FrameLedger.NvapiBridge.dll` (**2026-09-10, P2 PR-E2**): the C ABI the Agent reaches NVAPI through (`18_GPU_VENDOR_APIS` §L3) and the **only shipped binary that links `nvapi64.lib`**. Read-only by construction, loaded by the Agent into **its own process** by absolute path through `/FrameLedger.NvapiBridge.targets`, and **never into a game** — its name carries none of the words the guard's §S18 heuristic scans for. `fl_native_flags` only, not the hostile-environment set. `versioninfo-check.ps1` requires its version block like the other three shipped natives. ctest `fl_nvapi_bridge` (`src/native/tests/nvapi_bridge_test.cpp`) exercises every export and requires `BRANCH: AVAILABLE` or `BRANCH: DEGRADED` in the output, so a bridge gutted to `return 0` is red on a runner without the driver too.
- `FrameLedger.Overlay.Tests` → Catch2 unit tests (ring buffer, record layout, fault filter, seqlock) **and the guard's fail-closed matrix** (`14_TESTING` §Safety-guard tests) — the guard is native, so its tests are too
- `FrameLedger.NvapiBridge` → `FrameLedger.NvapiBridge.dll` (**2026-09-10, P2 PR-E2**): the C ABI the Agent reaches NVAPI through (`18_GPU_VENDOR_APIS` §L3) and the **only shipped binary that links `nvapi64.lib`**. Read-only by construction, loaded by the Agent into **its own process** by absolute path through `/FrameLedger.NvapiBridge.targets`, and **never into a game** — its name carries none of the words the guard's §S18 heuristic scans for. `fl_native_flags` only, not the hostile-environment set. `versioninfo-check.ps1` requires its version block like the other ~~three~~ shipped natives (five in all since beta.12 — corrected 2026-10-04). ctest `fl_nvapi_bridge` (`src/native/tests/nvapi_bridge_test.cpp`) exercises every export and requires `BRANCH: AVAILABLE` or `BRANCH: DEGRADED` in the output, so a bridge gutted to `return 0` is red on a runner without the driver too.
- `FrameLedger.Guard` → `FrameLedger.Guard.dll` (the guard's C ABI over the Injector library, `src/native/FrameLedger.Injector/CMakeLists.txt`; loaded by the Agent) and `FrameLedger.ProcessStats` → `FrameLedger.ProcessStats.dll` (beta.12, D43: the game process's memory, read by the Agent from outside the game; probe `fl-probe-processstats`) *(both bullets added 2026-10-04; they were missing)*
- ~~`FrameLedger.Overlay.Tests`~~ the ctest executables in `src/native/tests/` (`fl_ring_test`, `fl_guard_test`, `fl_vklayer_test`, … — corrected 2026-10-04: no target of that name has existed) → Catch2 unit tests (ring buffer, record layout, fault filter, seqlock) **and the guard's fail-closed matrix** (`14_TESTING` §Safety-guard tests) — the guard is native, so its tests are too
- `hook-harness` → the dummy **D3D11 + D3D12** app, WARP + composition swapchain so it runs headless on CI (`17_HOOK_ENGINE` §Test harness). D3D12 is device → command queue → swapchain, which is the acquisition asymmetry a D3D11-only fixture cannot exercise. ~~Vulkan and OpenGL modes to follow as those hooks land.~~ **`--vulkan --hold-presenting N` since 2026-09-06 (P1 item 3):** a real swapchain on a hidden window through the real loader, reached by `LoadLibraryW("vulkan-1.dll")` so only the vendored headers are needed and CI (no loader) still builds it; exit 77 = cannot run here, which the ctest reads as SKIP. **`--opengl --hold-presenting N` since the same day (P1 item 4):** a real context on a hidden window, `SwapBuffers`'d through gdi32 as a title does, on Microsoft's generic renderer — so it runs on CI.
- `fl-probe-hookprofile` → build-profile probes for `/guard:cf` and `-D_HAS_EXCEPTIONS=0` (`20_OPEN_QUESTIONS` §H1/§H3)
- `fl-probe-guard` → measures the Windows APIs the guard is built on, unelevated (`spike-notes.md` §1). Not the guard, and takes no injection rights.
@@ -43,7 +44,7 @@ Compiler/linker flags (enforced in CMake, not per-target ad hoc): `/std:c++20 /M
**No AMD or Intel GPU *telemetry* SDK is vendored.** Those vendors' sensors are covered by LibreHardwareMonitor and the DXGI/PDH baseline (`18_GPU_VENDOR_APIS`). A build that pulls in Intel IGCL or AMD ADLX material is a licensing regression, not a feature — CI greps for it. **The AMD FidelityFX ffx-api headers (MIT by exception, tag v2.3.0) ARE vendored since 2026-09-04**, for the Overlay's upscaler hook and for types only — `fl_fidelityfx_headers` above, `18_GPU_VENDOR_APIS` §AMD for the licence reading, and `license-check.ps1` §2d for the per-file gate. Intel's XeSS SDK failed the checklist and nothing of it is here.
**VERSIONINFO is mandatory** on `FrameLedger.Overlay.dll` and `FrameLedger.VkLayer.dll`: real `CompanyName`, `ProductName=FrameLedger`, `FileDescription`, version. Identifiability is a requirement (`19_SAFETY`), and a CI check fails the build if the resource block is missing.
**VERSIONINFO is mandatory** on ~~`FrameLedger.Overlay.dll` and `FrameLedger.VkLayer.dll`~~ every shipped native — the five `tools/versioninfo-check.ps1` lists (corrected 2026-10-04): real `CompanyName`, `ProductName=FrameLedger`, `FileDescription`, version. Identifiability is a requirement (`19_SAFETY`), and a CI check fails the build if the resource block is missing.
## Managed build & native integration
@@ -55,7 +56,7 @@ Compiler/linker flags (enforced in CMake, not per-target ad hoc): `/std:c++20 /M
> **`RuntimeIdentifier` is NOT set here, and this bullet claimed it was until 2026-08-06.** The props file's own comment explains why: forcing a RID onto class libraries pulls RID-specific assets into their restore for no benefit, so each executable sets it — `FrameLedger.App`, `FrameLedger.Agent` and now `FrameLedger.CaptureHost`, plus its test project, which needs the same RID to reference a RID'd exe. A new project copying this document rather than the props file would have inherited nothing.
- Nullable enable, ImplicitUsings enable, `TreatWarningsAsErrors=true`, `AnalysisLevel=latest-all`, deterministic, `ContinuousIntegrationBuild` on CI.
- `Directory.Packages.props`: central package management, all versions pinned (including `WPF-UI` = 4.3.0 exactly — `16_WPFUI_SYNTAX` §Version hygiene).
- **Native output reaches the managed side through `.targets` files imported by `FrameLedger.Agent`**, not through `FrameLedger.Infrastructure`: `/FrameLedger.Guard.targets` (the guard DLL), `/FrameLedger.Overlay.targets` (the payload, §S22), `/FrameLedger.Rules.targets` (the blocklist seed) and, since 2026-09-10, `/FrameLedger.NvapiBridge.targets` (the L3 bridge; it **warns rather than fails** when the DLL is absent, because a missing telemetry layer reports itself where a missing guard would be a safety hole). Ordering comes from `build.ps1`, which runs the native build first — **not** from the solution: `FrameLedger.slnx` contains no native project.
- **Native output reaches the managed side through `.targets` files imported by `FrameLedger.Agent`**, not through `FrameLedger.Infrastructure`: `/FrameLedger.Guard.targets` (the guard DLL), `/FrameLedger.Overlay.targets` (the payload, §S22), `/FrameLedger.Rules.targets` (the blocklist seed) and, since 2026-09-10, `/FrameLedger.NvapiBridge.targets` (the L3 bridge; it **warns rather than fails** when the DLL is absent, because a missing telemetry layer reports itself where a missing guard would be a safety hole), and since beta.12 `/FrameLedger.ProcessStats.targets` (the game-memory reader, D43; it also warns rather than fails — an absent reader reads N/A; added 2026-10-04). Ordering comes from `build.ps1`, which runs the native build first — **not** from the solution: `FrameLedger.slnx` contains no native project.
> **This bullet was wrong in four ways and is corrected 2026-08-04.** It named a copy of `FrameLedger.Injector.exe`, which §S9 closed and which line 25 above says does not exist, 24 lines earlier in the same document. It attributed the copying to a build target in `FrameLedger.Infrastructure.csproj`, which contains no `<Target>` at all. It said the copies happen there, when the guard DLL was deliberately moved out to a `.targets` file so it would stop flowing to every referencing project (§S18 blocker 3). And it credited the solution with an ordering the solution cannot express.
- **Struct mirror check — ✅ built 2026-08-05.** `ShmLayoutMirrorTests` runs `tools/fl-layout-dump`, reads its JSON, and asserts size plus every field offset against the C# `[StructLayout]` mirrors in `FrameLedger.Shared` — in **both directions**, so a field on either side alone fails. It also asserts blittability, which offsets cannot see. The `struct-mirror` gate reads the run's `.trx` and fails when that test class did not execute, so deleting the test is red as well as breaking it. Struct drift between the two layers is the most dangerous silent bug in this architecture; the build now genuinely catches it.
@@ -64,10 +65,15 @@ Compiler/linker flags (enforced in CMake, not per-target ad hoc): `/std:c++20 /M
## Debugging
Launch profiles:
- **"UI + Mock"** — `FL_MOCK=1`, no Agent, no injection. Default for UI work.
- **"UI + Agent"** — both managed processes, real capture against `hook-harness`.
- **"Harness + Overlay"** — starts `hook-harness` under the debugger with the Overlay injected at launch; attach a second native debugger to step hook code.
~~Launch profiles:~~
- ~~**"UI + Mock"** — `FL_MOCK=1`, no Agent, no injection. Default for UI work.~~
- ~~**"UI + Agent"** — both managed processes, real capture against `hook-harness`.~~
- ~~**"Harness + Overlay"** — starts `hook-harness` under the debugger with the Overlay injected at launch; attach a second native debugger to step hook code.~~
*(Corrected 2026-10-04: none of these is committed, and "UI + Mock" needs `FL_MOCK`, which §Prerequisites says is not
implemented. What exists: `FrameLedger.exe` starts `FrameLedger.Agent.exe --serve` beside itself. To capture against the
harness, run `hook-harness.exe --real --hold-presenting N`, then the Agent's `--console --data-dir <scratch>` verbs
`consent grant --exe` and `capture --exe`, as `AgentEndToEndTests` does — never against your own data folder.)*
**Toolchain gotchas, both hit on a real machine and both handled by `build.ps1`:**
@@ -172,15 +178,17 @@ assumed to.
```
cmake --build --preset x64-release
dotnet publish src/FrameLedger.App -c Release -r win-x64 --self-contained -p:PublishReadyToRun=true -o out/app
dotnet publish src/FrameLedger.App -c Release -r win-x64 --self-contained -p:PublishReadyToRun=true -p:FrameLedgerSourceRef={tag} -o out/app
dotnet publish src/FrameLedger.Agent -c Release -r win-x64 --self-contained -p:PublishReadyToRun=true -o out/app
vpk pack --packId FrameLedger.App --packVersion {ver} --packDir out/app --mainExe FrameLedger.exe --packTitle FrameLedger --releaseNotes out/notes.md --outputDir out/release
vpk pack --packId FrameLedger.App --packVersion {ver} --packDir out/app --mainExe FrameLedger.exe --packTitle FrameLedger --packAuthors FrameLedger --releaseNotes out/notes.md --outputDir out/release
```
> **Run by `release.yml` since 2026-09-14 (P4 PR-5)** — `13_CI_CD` §release.yml carries the steps around it
> (the version gate, `{{RELEASE_DATE}}`, the published-tree assertion, checksums, the release). Both publishes
> take `-p:Version=<tag>` (§Version). No `--icon`: `assets/icon.ico` does not exist, and this line named it
> for six weeks.
> for six weeks. **Since beta.12 the App also takes `-p:FrameLedgerSourceRef`** — the tag, or for a rehearsal the
> commit — stamped as assembly metadata so its links into the repository open THIS version's documents
> (`Services/RepositoryLinks`); a build without it links to `main`.
>
> **The package id is `FrameLedger.App`, and this line said `FrameLedger` until 2026-09-14 — which would have
> deleted every user's ledger on uninstall.** Velopack installs into `%LOCALAPPDATA%\<packId>` and removes that
@@ -223,7 +231,7 @@ vpk pack --packId FrameLedger.App --packVersion {ver} --packDir out/app --mainEx
the repository, and it is deliberate: the effective date of a legal document is
the date it ships, which is not knowable at authoring time. `release.yml` (**built 2026-09-14**, P4 PR-5 — the step runs before the
build, because the App embeds `legal/*.md`)
substitutes it with the tag date when packaging, and `ci.yml` fails the build if
substitutes it with ~~the tag date~~ the run's UTC date (corrected 2026-10-04) when packaging, and `ci.yml` fails the build if
**any other** `{{` token appears in `README.md` or `legal/*.md` (`13_CI_CD.md`
§ci.yml). Everything else — repository URL, slug, developer identity, contact
address — is resolved in the source files, because an unsubstituted token in a
@@ -232,13 +240,18 @@ document the app displays for acceptance (FR-11) is a defect, not a template.
## Local quality gate (pre-push)
`./build.ps1 check`:
1. `cmake --build --preset x64-release` (C++ `/W4 /WX`)
1. `cmake --build --preset x64-release` (C++ `/W4 /WX`) — since beta.12 also `FrameLedger.ProcessStats.dll` (the game
process's memory, D43; staged beside the Agent, CaptureHost and Infrastructure.Tests by
`FrameLedger.ProcessStats.targets`), its ctest `fl_process_stats` (GPU_INSTANCE on a machine with a hardware adapter,
NO_GPU_INSTANCE elsewhere) and the instrument `fl-probe-processstats` (`spike-notes` §16)
2. native tests (Catch2)
3. `clang-format --dry-run -Werror` over `src/native`
4. `dotnet restore` + build (warnings as errors)
5. `dotnet format --verify-no-changes`
6. `dotnet test --logger trx` — including `ShmLayoutMirrorTests`; with no switches it also runs the
`Category=Integration` classes, which CI excludes
`Category=Integration` classes, ~~which CI excludes~~ which CI runs too *(corrected 2026-10-04: `ci.yml` and
`release.yml` call `./build.ps1 check` with no switches since 2026-09-06, as the paragraph after this list says;
only `-SkipIntegration`, which nobody passes, leaves them out, loudly)*
7. `tools/coverage-gate.ps1` — reads this run's cobertura reports; self-arming, and armed today for
`FrameLedger.Domain` and `FrameLedger.Application`
8. `tools/rules-validate.ps1` (schema + `anticheat` block sanity — a malformed or empty blocklist is a safety bug)
@@ -246,8 +259,10 @@ document the app displays for acceptance (FR-11) is a defect, not a template.
10. `tools/chokepoint-check.ps1` — injection and evasion primitives confined to one file, native **and** managed, plus the `FL_GUARD_TESTABLE` symbol check against the shipped artifacts
11. **`tools/hookinventory-check.ps1`** — three passes: A resolves every vendor symbol the Overlay names against `docs/vendor-exports.json`, B sweeps for stray literals, C reads the BUILT Overlay's import table and asserts it imports no vendor module. C skips loudly under `-SkipNative`. **Missing from this list until 2026-08-28**, which is §R10 happening again
12. **`tools/package-closure-check.ps1`** — both halves: the self-test (5 cases, 4 of which must go RED) **and** a live pass over this repository. It walks the transitive `ProjectReference` closure of the two publish roots below and fails on anything outside the allowlist, naming the reference edge. `FrameLedger.CaptureHost` is an injecting entry point kept out of the package by construction, and `20_OPEN_QUESTIONS` §S27 is closed on exactly that basis
13. `tools/license-check.ps1` — asserts every vendored third-party has a licence copy in `legal/licenses/`, and that no Intel IGCL / AMD ADLX material has appeared in the tree; since P4 PR-6 (§3) also that `legal/licenses/nuget/` is exactly what `tools/license-gather.ps1` writes for this build's restore output — every NuGet package the App and the Agent ship (77), both directions. `license-gather.ps1 -SelfTest` runs first: fourteen fixture cases, five that must be RED (a hand edit, a package that no longer ships, a URL-only licence with no reviewed override, an applied MPL Exhibit B, a missing restore output), and one run under tr-TR in a child process, because the output must not depend on the machine's culture
13. `tools/license-check.ps1` — asserts every vendored third-party has a licence copy in `legal/licenses/`, and that no Intel IGCL / AMD ADLX material has appeared in the tree; since P4 PR-6 (§3) also that `legal/licenses/nuget/` is exactly what `tools/license-gather.ps1` writes for this build's restore output — every NuGet package the App and the Agent ship (77), both directions. `license-gather.ps1 -SelfTest` runs first: ~~fourteen~~ sixteen fixture cases, ~~five~~ six that must be RED (a hand edit, a package that no longer ships, a URL-only licence with no reviewed override, an expression with no text in the script and no reviewed override, an applied MPL Exhibit B, a missing restore output), and one run under tr-TR in a child process, because the output must not depend on the machine's culture. **Since beta.12 (78 packages):** a reviewed override also answers for an expression the script has no text for — Markdig declares BSD-2-Clause and ships no file, and `tools/license-overrides/Markdig.txt` is the project's own `license.txt` at the packaged commit
13b. `tools/accuracy-check.ps1 -SelfTest`, then live — the accuracy block is ONE text (`legal/ACCURACY.md`) embedded verbatim in `README.md` and `legal/DISCLAIMER.md` §4; a copy that drifted, a copy with no markers, or an empty source is red. Four self-test cases, both directions (§S23-6, 2026-09-06)
13c. **`tools/notice-check.ps1 -SelfTest`, then live** (beta.12, owner decision D45, 2026-10-03) — every first-party source file (`.cs .cpp .h .inl .ps1 .xaml`, tracked or new, minus `src/native/third_party/`) opens with `SPDX-License-Identifier: GPL-3.0-only` and `Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE` in its own comment syntax, because GPLv3 §7 wants additional terms named "in the relevant source files" (`NOTICE` carries them); the second line may name another holder and year in the same form (a contributor's own file).
Seven self-test cases, both directions; `./tools/notice-check.ps1 -Fix` writes a missing header, and `tools/resx-gen.ps1` generates the accessor with it
14. `tools/changelog-check.ps1 -SelfTest` — nine cases, five expected RED. The live half needs a pull request's changed-file list and is supplied by `ci.yml`
14b. `tools/release-notes.ps1 -SelfTest` — five cases over a fixture changelog (a dated and an undated section, a missing one, a prefix that must not match, an empty one). The live half needs a tag's version and runs in `release.yml`, where a missing or empty section is a red release (P4 PR-5)
15. `tools/resx-audit.ps1` — ~~**skipped loudly; it does not exist, and no `.resx` file does either**~~ **built 2026-09-13 (P3 PR-2)**: `-SelfTest` first (11 fixture cases, both directions), then the live pass over every `Strings.resx` family under `src/` — key sets equal across en/vi/ja, `Safety_*` in `ja` marked for review or signed, `Strings.Designer.cs` current with `tools/resx-gen.ps1`. A tree with no family is red (`09_I18N` §Translation workflow)
+12 -11
View File
@@ -6,7 +6,7 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
## Workflows (`.github/workflows/`)
### `ci.yml` — push to `main` + all PRs · **repo-local**
### `ci.yml` — push to `main` + all PRs + `workflow_dispatch` (added 2026-10-04) · **repo-local**
- `runs-on: windows-latest`, .NET SDK pinned by `global.json` via `actions/setup-dotnet`, MSVC via `ilammy/msvc-dev-cmd`, NuGet cached.
- Single step of substance: **`./build.ps1 check`** — the same script, with the same switches (none), a developer runs before pushing. The gate list lives in `12_BUILD` §Local quality gate, **once**, rather than being restated here where it goes stale.
- ~~**`-SkipIntegration` is the one place local and CI deliberately differ**~~ — **gone since 2026-09-06.** From 2026-08-05 CI passed it for a measured reason: §S16 puts the injecting process's ancestors in the scan set, a .NET test host loads `System.Security.Cryptography.ProtectedData.dll`, and the guard's `protect` fragment refused our own harness (§S19(b)). The signer half now verifies that module's embedded signature offline and reads `O=Microsoft Corporation` on the compiled-in bound, so the `Category=Integration` cases run here — **nine** when this was written, **20 across six classes** as of 2026-09-13 (Agent 6, CaptureHost 7, Infrastructure 7); count them with `grep -rl 'Category", "Integration' tests` rather than trusting either number — and a green CI IS evidence for the managed drain and the capture host's end-to-end behaviour. The switch remains in `build.ps1`, loud, for a developer who must.
@@ -81,8 +81,8 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
> `ShmLayoutMirrorTests` did not execute. `12_BUILD` carried the identical stale sentence and is
> corrected with it; restating the gate list in two documents is what let one of them rot.
- **Licence guard:** `tools/license-check` fails the build if a vendored dependency is missing its licence copy, or if Intel IGCL / AMD ADLX headers appear anywhere in the tree (`docs/18_GPU_VENDOR_APIS.md` §Vendor SDKs we deliberately do not use), or — since P4 PR-6 — if `legal/licenses/nuget/` is not what `tools/license-gather.ps1` writes for the NuGet packages this build ships. A Dependabot bump therefore goes red until someone re-runs the script and commits the texts, which is the point: the new version's licence is read by a person before it ships. Licensing regressions are silent and hard to unwind later — catch them at PR time.
- **Placeholder guard:** fails if any `{{` token survives in `README.md` or `legal/*.md`. Those are shipped, legally operative documents (FR-11 displays them in the first-run Legal Gate); an unsubstituted `{{DEVELOPER_NAME}}` in an EULA is not a cosmetic defect.
- `permissions: contents: read`.
- **Placeholder guard:** fails if any `{{` token survives in `README.md` or `legal/*.md` *(other than `{{RELEASE_DATE}}`, which `release.yml` substitutes — added 2026-10-04)*. Those are shipped, legally operative documents (FR-11 displays them in the first-run Legal Gate); an unsubstituted `{{DEVELOPER_NAME}}` in an EULA is not a cosmetic defect.
- ~~`permissions: contents: read`.~~ `permissions: contents: read, pull-requests: read` — the second for the Changelog step's list of a pull request's files, read-only *(corrected 2026-10-04)*.
### `codeql.yml` — push, PR, weekly cron · **repo-local**
@@ -132,8 +132,8 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
- **The identical gate** — `./build.ps1 check`, native first, every tool including `versioninfo-check` against
`VERSION`. A release never skips it.
- `dotnet publish` App + Agent, self-contained + ReadyToRun, `-p:Version=<tag>`, into one `out/app`.
- **The published tree asserted by name**: `FrameLedger.exe`, `FrameLedger.Agent.exe`, the four shipped natives
`versioninfo-check` lists, `rules/detection-rules.json`; `FrameLedger.CaptureHost.exe` absent (`12_BUILD`:
- **The published tree asserted by name**: `FrameLedger.exe`, `FrameLedger.Agent.exe`, the ~~four~~ five shipped natives
`versioninfo-check` lists (`FrameLedger.ProcessStats.dll` since beta.12 — corrected 2026-10-04), `rules/detection-rules.json`; `FrameLedger.CaptureHost.exe` absent (`12_BUILD`:
exactly two roots — `package-closure-check` proves it statically, this reads the directory); `versioninfo-check`
run again over `out/app`, because a `.targets`-staged DLL that failed to copy is a warning to `dotnet publish`.
- `vpk pack --packId FrameLedger.App` (the `vpk` tool pinned to the library's 1.2.0) with the release notes;
@@ -148,8 +148,8 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
- ~~Optional final step: submit installer hash to VirusTotal~~ — not built; an upload of the installer to a third
party is a decision the owner makes, not a step a workflow adds quietly.
### `rules-publish.yml` — on change to `rules/detection-rules.json` in `main`
- Runs `tools/rules-validate` and fails on anti-cheat removals. The raw file on `main` **is** the distribution endpoint (05_DETECTION), so this workflow only gates correctness.
### `rules-publish.yml` — ~~on change to `rules/detection-rules.json` in `main`~~ on a PR or push to `main` touching the rules file, its schema, `rules-validate.ps1` or this workflow (corrected 2026-10-04)
- Runs `tools/rules-validate` and fails on anti-cheat removals. ~~The raw file on `main` **is** the distribution endpoint (05_DETECTION), so this workflow only gates correctness.~~ *(Corrected 2026-10-04: there is no feed — §S20's feed half is deferred and nothing in `src` fetches. A rules change reaches users only inside a release, seeded by the Agent from the packaged copy; this workflow only gates correctness.)*
> **There is no `rulesVersion` bump check, and this line used to claim one.**
> `rules-validate.ps1` checks the field's *format* and nothing compares it
@@ -173,7 +173,7 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
> evaluator through the real probe. Both halves run on the same PR; only the
> coverage half fires on a rules-only change, which is why the two are
> described separately rather than as one gate.
- **The `anticheat` block gets extra scrutiny:** schema-valid, non-empty, no entry removed without a justification in the PR body. Removing a blocklist entry is a safety change and requires the same review as a security fix.
- **The `anticheat` block gets extra scrutiny:** schema-valid, non-empty, no entry removed without a justification in the PR body. Removing a blocklist entry is a safety change and requires the same review as a security fix. *(Added 2026-10-04: the PR-only removal step fails the job on any removal, a shrunk per-title list or an added trusted signer, whatever the body says — the justification is for the reviewer, and the job stays red.)*
- `permissions: contents: read`.
## Dependabot (`.github/dependabot.yml`)
@@ -195,7 +195,7 @@ Central package management makes Dependabot PRs single-file diffs.
## Branch & release policy
- `main` protected: CI + CodeQL required, linear history, no direct pushes.
- Release: in ONE commit, bump `VERSION` and move the `[Unreleased]` entries of `CHANGELOG.md` under `## [X.Y.Z] - date` (Keep a Changelog format) → tag `vX.Y.Z` → `release.yml` does the rest (and refuses a tag that disagrees with either file) → smoke-test the produced installer on a clean Win 10 VM + Win 11 (manual checklist in 14_TESTING §Release smoke).
- Release: in ONE commit, bump `VERSION` and move the `[Unreleased]` entries of `CHANGELOG.md` under `## [X.Y.Z] - date` (Keep a Changelog format) → tag `vX.Y.Z` → `release.yml` does the rest (and refuses a tag that disagrees with either file) *(corrected 2026-10-04: for a pre-release tag `vX.Y.Z-beta.N`, do not bump `VERSION` — it already holds the numeric core the gate compares, and it read `0.1.0` through eleven betas; the section is `## [X.Y.Z-beta.N] - date`, the full version. Bump `VERSION` only when the numeric core moves)* → smoke-test the produced installer on a clean Win 10 VM + Win 11 (manual checklist in 14_TESTING §Release smoke).
- Pre-releases: `vX.Y.Z-beta.N` tags mark the GitHub release as pre-release; the App's `stable` channel ignores them and its `beta` channel (Settings ▸ Updates, `update.channel`) includes them — built with P4 PR-5, so ~~explicit beta channel is v2 backlog~~ is struck. The managed assemblies carry the full tag version; the native VERSIONINFO blocks carry the numeric core (`12_BUILD` §Version).
## Repo hygiene checklist
@@ -215,7 +215,8 @@ Central package management makes Dependabot PRs single-file diffs.
**GitHub settings — the owner's (`HANDOFF` §Owner-only):**
- [ ] Branch protection as §Branch & release policy states; `Rules / validate` as a required check (§S23-2, after its skip-shim)
- [x] Branch protection as §Branch & release policy states *(marked 2026-10-04, read from the API: required checks `check`, `analyze (csharp, none)` and `analyze (cpp, manual)`; linear history; a pull request required; force pushes off; enforced for admins)*
- [ ] `Rules / validate` as a required check (§S23-2, after its skip-shim)
- [ ] Dependabot alerts + security updates (the manifest is in the tree; the alerts are a setting)
- [ ] Private vulnerability reporting enabled (Settings ▸ Security), so `config.yml`'s link resolves
- [x] Private vulnerability reporting enabled (Settings ▸ Security), so `config.yml`'s link resolves *(marked 2026-10-04: GitHub reports it enabled)*
- [ ] Repo topics: `windows`, `wpf`, `benchmark`, `fps`, `game-performance` (~~`presentmon`~~ — dropped 2026-08-27, §G)
+4 -4
View File
@@ -6,9 +6,9 @@ Managed: xUnit.net v3 4.x (the `xunit.v3.mtp-off` variant since 2026-09-21 — `
The anti-cheat guard is the one component where a bug can cost someone an account. It gets the most rigorous treatment in the codebase:
**These are Catch2 tests, not xUnit.** `20_OPEN_QUESTIONS` §S13(a) settled the guard into the C++ `FrameLedger.Injector`, so the fail-closed matrix below lives in the native suite and the guard needs seams — injectable enumerator function pointers — before any of these failures can be forced at all. ~~Landing Catch2 is a prerequisite of the guard, not a later nicety (§S15).~~ **Landed long since** — `ctest` runs 31 native suites on every gate (`fl_guard` alone is ~100 s); the sentence was left in the future tense until 2026-09-21.
**These are Catch2 tests, not xUnit.** `20_OPEN_QUESTIONS` §S13(a) settled the guard into the C++ `FrameLedger.Injector`, so the fail-closed matrix below lives in the native suite and the guard needs seams — injectable enumerator function pointers — before any of these failures can be forced at all. ~~Landing Catch2 is a prerequisite of the guard, not a later nicety (§S15).~~ **Landed long since** — `ctest` runs ~~31~~ 32 native suites on every gate (`fl_process_stats` since beta.12 — corrected 2026-10-04) (`fl_guard` alone is ~100 s); the sentence was left in the future tense until 2026-09-21.
- Blocklist matching: exact, case-insensitive, prefix rules; every family in `19_SAFETY` §Blocklist seed has a fixture. Two families (Activision Ricochet, Valve VAC) have **no data yet**, so their fixtures must assert that absence explicitly rather than quietly passing on an empty rule set. **Since 2026-09-25** the fixture is generated from the shipped seed (`rules_budget_test.cpp`: every entry's every value matches its own family in its own group, which also catches a row an earlier prefix shadows), and Ricochet's fixture asserts its data; VAC's still asserts that no family entry fakes it.
- Blocklist matching: exact, case-insensitive, prefix rules; every family in `19_SAFETY` §Blocklist seed has a fixture. ~~Two families (Activision Ricochet, Valve VAC) have **no data yet**, so their fixtures must assert that absence explicitly rather than quietly passing on an empty rule set.~~ *(Corrected 2026-10-04: both have data since 2026-09-25 — Ricochet a driver and services, VAC per-title lists of Steam ids and executables, which `rules_budget_test.cpp` matches back to "Valve VAC".)* **Since 2026-09-25** the fixture is generated from the shipped seed (`rules_budget_test.cpp`: every entry's every value matches its own family in its own group, which also catches a row an earlier prefix shadows), and Ricochet's fixture asserts its data; VAC's still asserts that no family entry fakes it.
- **A finding turns the game's hooking off (2026-09-22), and the proofs are about WHICH findings.** `AntiCheatVerdictTests` pins `IsFindingAboutTheGame` per reason (in the game: yes; machine-wide driver or service, heuristics, failed scans, the latch: no) and that a finding without a family is not one; `CaptureSessionTests` that a start-time `BlockedModule` writes the block, keeps the consent stamp and says `HookingTurnedOff`, that a `BlockedDriver` refuses the session and leaves the row alone, and that the 30 s re-scan's finding writes the same block; `RecordedSessionEventsTests` and `SafetyNoticesTests` that the flag travels to the notice. The override of 2026-09-21 had its own proofs for one day; they went with it, and `NoSecondMatcherTests` counts the port's four methods again.
- **Fail-closed proofs:** malformed `detection-rules.json`, missing `anticheat` block, unreadable target process, `EnumProcessModulesEx` failure, partial module list → **all must refuse injection**, never allow. Each is a named test.
- **Measured error paths that must be named tests** (`spike-notes.md` §1): `ERROR_PARTIAL_COPY (299)` from a suspended target, `ERROR_ACCESS_DENIED (5)` from a protected one, a driver-list parse whose paths are not native paths, and a service query returning `ACCESS_DENIED` — the last of which **cannot be produced on real services by a standard user**, so it exists only as a fake. Every one means REFUSE.
@@ -21,7 +21,7 @@ The anti-cheat guard is the one component where a bug can cost someone an accoun
- **Ring buffer:** SPSC correctness under a hammering writer thread; seqlock torn-read detection; wrap and overwrite-oldest semantics; power-of-two capacity assumptions. Include the **one-full-lap case**: a reader stalled exactly `capacity` records must not validate a different frame as unchanged (this is what the never-reset `seq` counter defends, `07_IPC` §Protocol rules).
- **Drop accounting:** the reader-side computation (`writeIndex - readIndex > capacity`) reports the right count and resumes at the right index. The writer has no drop counter to test — by design.
- **Torn records produce gap markers,** not silently shortened streams; a golden test asserts the gap does not appear as a stutter.
- **Record and header layout:** `static_assert(sizeof(...) == 64)` and `offsetof` assertions for `FlFrameRecord` **and all three header structs** (`FlShmHandshake`, `FlWriterState`, `FlControlBlock`) — the Agent reads across the process boundary in every one of them. Both halves exist as of 2026-08-05: the native side is `layout_test.cpp` plus the `static_assert`s (ctest `fl_shm_layout`), and the runtime offset dump from `tools/fl-layout-dump` is consumed by `ShmLayoutMirrorTests`, which walks the field list in **both directions** and additionally asserts blittability — `Marshal.SizeOf` and every offset stay correct for a mirror that uses `[MarshalAs(ByValTStr)] string`, while `Unsafe.SizeOf` drops from 64 to 40 and the struct can no longer be read from a mapped view.
- **Record and header layout:** `static_assert(sizeof(...) == 64)` and `offsetof` assertions for `FlFrameRecord` **and all ~~three~~ four header structs** (`FlShmHandshake`, `FlWriterState`, `FlControlBlock`, and `FlDisplayState` since layout 4, beta.10) — plus D33's `FlTolerance`, mirrored the same way *(corrected 2026-10-04)* — the Agent reads across the process boundary in every one of them. Both halves exist as of 2026-08-05: the native side is `layout_test.cpp` plus the `static_assert`s (ctest `fl_shm_layout`), and the runtime offset dump from `tools/fl-layout-dump` is consumed by `ShmLayoutMirrorTests`, which walks the field list in **both directions** and additionally asserts blittability — `Marshal.SizeOf` and every offset stay correct for a mirror that uses `[MarshalAs(ByValTStr)] string`, while `Unsafe.SizeOf` drops from 64 to 40 and the struct can no longer be read from a mapped view.
- **Fault policy:** injected SEH faults in a fake hook body → counter increments, original still called, self-disable at 3.
- **Hook index verification, by behaviour.** A vtable slot carries no identity, so "check that slot 8 *is* `Present`" is not a question the runtime can answer — the earlier wording here required something unimplementable. What is answerable: patch the slot, call the method, see whether the detour ran (`17_HOOK_ENGINE` §Getting vtable addresses; proved for slots 8, 13 and 22 in `spike-notes.md` §H4). Runs headless on CI via WARP and `CreateSwapChainForComposition`. A deliberate mismatch aborts installation instead of patching.
- **Every probe must be shown to fail.** A probe that ends in an unconditional assertion is green by construction and its ctest is decorative — `fl_proxy_swapchain` shipped in exactly that state. Before a probe counts as a regression net, break the thing it watches and watch it go red.
@@ -131,7 +131,7 @@ that it was checked against anything.
| Mode | launch mode · attach mode · mid-session settings change |
| Safety | game with anti-cheat → toggle disabled · simulated late AC load → unhook · double-crash → auto-disable |
| Tier | forced Tier 2 (records duration, available sensors and the reason — and nothing else) · Tier 1 → Tier 2 degradation notice |
| Update | Velopack delta; update deferred while a game is hooked (FR-12) — *a delta needs a previous release, so this row is reachable from the second release, not the first* |
| Update | Velopack delta; update deferred while a game is hooked (FR-12) — *a delta needs a previous release, so this row is reachable from the second release, not the first* *(corrected 2026-10-04: no release has carried a delta — `release.yml` never fetches the previous release before `vpk pack`, `11_UPDATER` §Built — so the update leg is a full package)* |
## Release smoke
+16 -8
View File
@@ -151,7 +151,7 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
> the hard gate, against NFR-10 — but the evidence changed, and the consequence is
> live: the drain tests are skipped in CI until it is fixed.
0. **The guard.** Module + driver enumeration, blocklist matching, fail-closed behaviour on every error path. **Moved from item 8**: items 1 and 6 below inject into real games, and CLAUDE.md rule 2 plus P1's own "it ships before the first real injection, not after" both forbid that ordering. **◐ Every documented check now has a call site; one half of one check does not.** `EvaluateImpl` runs checks 1, 2, 2b, 3 (executable half) and 4 — five, not four, because 2b (`services`) is the only tier ever measured firing on real anti-cheat and every count that says "four" omits it. The guard is built (`FrameLedger.Injector`, native per §S13(a)), owns the chokepoint, and its fail-closed matrix is Catch2-driven. The injection primitive landed after it, in that order. Reached from managed code through one P/Invoke facade — never a second matcher (§S15). Evidence: `spike-notes.md` §1; §S7, §S8, §S16 closed.
0. **The guard.** Module + driver enumeration, blocklist matching, fail-closed behaviour on every error path. **Moved from item 8**: items 1 and 6 below inject into real games, and CLAUDE.md rule 2 plus P1's own "it ships before the first real injection, not after" both forbid that ordering. ~~**◐ Every documented check now has a call site; one half of one check does not.**~~ **Every documented check has a call site since 2026-09-25 (§S14) — corrected 2026-10-04.** `EvaluateImpl` runs checks 1, 2, 2b, 3 (executable half) and 4 — five, not four, because 2b (`services`) is the only tier ever measured firing on real anti-cheat and every count that says "four" omits it. The guard is built (`FrameLedger.Injector`, native per §S13(a)), owns the chokepoint, and its fail-closed matrix is Catch2-driven. The injection primitive landed after it, in that order. Reached from managed code through one P/Invoke facade — never a second matcher (§S15). Evidence: `spike-notes.md` §1; §S7, §S8, §S16 closed.
> **This line said ✅ DONE, and it was wrong in a way worth recording.**
> `19_SAFETY` specifies four pre-injection checks. **Check 4** (the static
@@ -174,6 +174,12 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
> > deleted: it is the third place that had to be corrected for one PR, and the
> > count is the point.
> >
> > *(Corrected 2026-10-04: the paragraphs below were overtaken on 2026-09-25 — both halves of check 3 are wired
> > and seeded. `CheckBlockedStoreId` reads Steam's `appmanifest_*.acf` and GOG's `goggame-*.info` through a
> > guard-owned seam; an install no store names is not refused, unreadable store metadata is; Epic has no reader.
> > Rules 2026.10.1 list 33 executables and 33 Steam ids, floored. The owner question about a permanently
> > uncallable sub-check is moot.)*
> >
> > **This item stays ◐, on a different and narrower reason.** Check 3's
> > **store-id half** has no call site and cannot be given one: nothing produces
> > a `store_id` — the platform metadata extractors are unbuilt, which is the
@@ -186,7 +192,7 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
> > uncallable is an owner decision, not a coding one. And unchanged either way:
> > `blockedExecutables` **ships empty**, so check 3 refuses nothing today. What
> > #52 changed is that populating it would now do something.
1. **Vulkan layer passthrough.** Minimal implicit layer registered under `HKCU`, with the opt-in checks that keep it passthrough for non-enabled processes. **Moved from item 7**: a passthrough bug loads FrameLedger into every Vulkan process on the machine, which is the highest blast radius in the spike. **◐ Gates done, interception not started.** `enable_environment` measured against loader 1.4.357, blast radius verified, in-layer blocklist self-scan built and proven both directions. `vkQueuePresentKHR` is **not** hooked — that is P1, and §S2's in-layer supervision check lands with it.
1. **Vulkan layer passthrough.** Minimal implicit layer registered under `HKCU`, with the opt-in checks that keep it passthrough for non-enabled processes. **Moved from item 7**: a passthrough bug loads FrameLedger into every Vulkan process on the machine, which is the highest blast radius in the spike. **◐ Gates done, ~~interception not started~~.** `enable_environment` measured against loader 1.4.357, blast radius verified, in-layer blocklist self-scan built and proven both directions. ~~`vkQueuePresentKHR` is **not** hooked — that is P1, and §S2's in-layer supervision check lands with it.~~ *(Corrected 2026-10-04: landed 2026-09-06, P1 item 3 — present and swapchain interception plus §S2's in-layer supervision, ctests `fl_vklayer_real` and `fl_vklayer_supervision`. The ray-tracing and pipeline entries are still unbuilt.)*
2. **Hook viability.** `hook-harness` (D3D11 + D3D12) + MinHook: dummy-device vtable probe, verify present indices at runtime, install/uninstall cleanly, measure per-present cost. Confirm `/MT` DLL loads into a real (offline, non-AC) game without incident. **✅ DONE.** Vtable indices proved by behaviour (§H4), unhook proved not to clobber a later hooker (§H7), per-present cost measured at 8.4 ns against a 1,000 ns budget — and **the `/MT` DLL is now loaded into a real title**: Lies of P, attach mode, guard passing, module verified present by re-enumeration, game still rendering afterwards (`spike-notes.md` §7).
> **Attach mode only when this ran.** Launch mode was blocked by §S18 — the
@@ -224,7 +230,9 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
> (Steam `.acf`, GOG `.info`, Epic `.item`) — every platform rule is
> `sibling_glob`/`path_contains`, so identification is unaffected but
> **`store_id` is null for every title**. No SQLite, so nothing is persisted
> and `field_provenance` is decided-but-unimplemented (P2). The engine and
> and `field_provenance` is decided-but-unimplemented (P2). *(Overtaken — corrected 2026-10-04: the store import
> writes `store_id` since P4 PR-4, the guard reads the stores' metadata for check 3 since 2026-09-25, and
> `field_provenance` is written since 2026-09-14.)* The engine and
> platform fixture families are **P4 library metadata shipped early** under
> P0's name.
>
@@ -264,7 +272,7 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
8. **Telemetry layering.** Fill the `18_GPU_VENDOR_APIS` capability matrix on real hardware:
- L1 baseline (DXGI + PDH counters) working vendor-neutrally; decide whether the `D3DKMT` perf-data probe is stable enough on Win 10 **and** Win 11 to keep. **🅓 Deferred to Win 11 only, 2026-08-05** — one machine, and it is Win 11. Win 10 22H2 stays a supported floor and is explicitly unmeasured; the deferral holds only for as long as the probe stays non-load-bearing, which `18_GPU_VENDOR_APIS` §L1 now states as the condition rather than as advice.
- L2: which fields LibreHardwareMonitor actually returns per vendor, and **whether GPU sensors work unelevated without PawnIO** — this decides whether the default unelevated Agent has temperatures. **◐ NVIDIA measured 2026-09-03: yes (§M5 row R1), eight fields unelevated, `LhmTelemetrySource` written.** AMD / Intel remain 🅓 (§R5/§R6).
- L3: NVAPI linked from vendored MIT headers; Reflex latency, throttle reasons, per-domain utilisation.
- L3: NVAPI linked from vendored MIT headers; Reflex latency, throttle reasons, per-domain utilisation. *(Status added 2026-10-04: built 2026-09-10, P2 PR-E2, as `FrameLedger.NvapiBridge.dll` — throttle reasons and utilisation; Reflex latency has no producer.)*
- ~~**Licence confirmations:** LHM free of MPL-2.0 Exhibit B; NVAPI SPDX blocks intact~~ — **done before P0 began, both clear** (`spike-notes.md` §0). `tools/license-check` is in place and proven to fail on a planted violation.
*(The former items 7 "Vulkan layer" and 8 "Guard prototype" are now items 1 and 0. §R1/§R2 are folded in, not pending.)*
@@ -313,14 +321,14 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
## P2 — Capture pipeline (1 week)
Agent: watcher, tier selection, injection orchestration, shm drain, telemetry poller (NVAPI first), session recorder, segments, `.partial` recovery, ~~Tier-2 `EtwFrameSource` retained as fallback.~~ **There is nothing to retain: Tier 2 has no mechanism as of 2026-08-27** (§G). `EtwFrameSource` is a port with no adapter, and P2 should not be planned as though writing one were scoped. SQLite v2 schema + migrations. Domain metric calculators + golden tests. **Milestone: first real hooked session persisted with measured upscaler/RT data.** *Technical half reached 2026-09-10 (P2 PR-F): the shipped `FrameLedger.Agent.exe --console capture` against `hook-harness` ends as one hooked `sessions` row, in the merge gate (`AgentEndToEndTests`). **P2's code is complete as of PR-G (2026-09-10)** — kill-and-recover is in the gate too (`PartialRecoveryEndToEndTests`) and `tools/fps-impact-runbook.ps1` exists. What P2 still owes is two MEASUREMENTS, not code: the real-title milestone read against the game's own menus, and the ≤ 0.5 % FPS-impact run. Both are the owner's; `spike-notes` §14 holds their slots and the exact commands. **The milestone's row half exists as of 2026-09-16** — the shipped Agent's Lies of P session with `fsr3`, 1506×848 → 2560×1440, FG ×2.04 and `rt = no` (`spike-notes` §14.1); the menu column is still the owner's, as is the FPS-impact run.*
## P3 — UI (1 week) — **code-complete 2026-09-14 (P3 PR-0 … PR-9; `docs/HANDOFF.md` §P3 carries the slice table, each row struck with its PR; the owner's merges of the stack are the remaining act)**
WPF UI shell (`16_WPFUI_SYNTAX`), library, per-game hooking consent flow, Dashboard live card showing *measured* settings, session summary, ScottPlot charts, game detail tabs, Compare with tier guarding, segment ribbon, tri-state chips with override, refusal/degradation/unhook notices as first-class UI. **Plus, moved here from P4 on 2026-09-13 (owner):** the command pipe (`07_IPC` §C — P2's decision D10 put it here), i18n en/vi/ja with `tools/resx-audit` (the consent dialog is the first thing that needs a reviewed `.resx`, so it cannot wait), the Legal Gate (FR-11), Settings (FR-10, the kill switch first), the Logs page, tray + toasts. The owner chose the whole of `08_UI` over a shell-first cut; HANDOFF §P3 carries the slice order and the decisions (D11–D17). *Not started as of 2026-09-13: `FrameLedger.App` is the scaffold, `FrameLedger.Shared` has no IPC type, and no `.resx` exists in the tree.*
## P3 — UI (1 week) — **code-complete 2026-09-14 (P3 PR-0 … PR-9; `docs/HANDOFF.md` §P3 carries the slice table, each row struck with its PR; ~~the owner's merges of the stack are the remaining act~~ merged 2026-09-13/14, #152–#165)**
WPF UI shell (`16_WPFUI_SYNTAX`), library, per-game hooking consent flow, Dashboard live card showing *measured* settings, session summary, ScottPlot charts, game detail tabs, Compare with tier guarding, segment ribbon, tri-state chips with override, refusal/degradation/unhook notices as first-class UI. **Plus, moved here from P4 on 2026-09-13 (owner):** the command pipe (`07_IPC` §C — P2's decision D10 put it here), i18n en/vi/ja with `tools/resx-audit` (the consent dialog is the first thing that needs a reviewed `.resx`, so it cannot wait), the Legal Gate (FR-11), Settings (FR-10, the kill switch first), the Logs page, tray + toasts. The owner chose the whole of `08_UI` over a shell-first cut; HANDOFF §P3 carries the slice order and the decisions (D11–D17). ~~*Not started as of 2026-09-13: `FrameLedger.App` is the scaffold, `FrameLedger.Shared` has no IPC type, and no `.resx` exists in the tree.*~~ *(Struck 2026-10-04: false since PR-2 — the App shell, the en/vi/ja `.resx`, `Shared/Ipc`.)*
## P4 — Detection & product polish (1 week)
~~Static rules engine + `detection-rules.json` (engines, platforms, capabilities, **anticheat blocklist**) + validator + fixtures~~ **landed 2026-09-14 (P4 PR-1: the engine existed since P0; the Agent's `DetectionSweep` is its first caller, `ApplyDetectionAsync` its first writer — HANDOFF §P4)**; ~~store auto-import~~ **landed 2026-09-14 (P4 PR-4)**; ~~capability-vs-measured UI separation~~ **(PR-1: the Supports row reads the sweep's flags)**; ~~i18n en/vi/ja; Legal Gate;~~ ~~Velopack + updater (with the hooked-session deferral)~~ **landed 2026-09-14 (P4 PR-5 — the deferral is `UpdateService`'s shape, not a flag)**; ~~bug bundle incl. overlay logs~~ **landed (overlay logs since P3 PR-8a; 2026-09-15, P4 PR-9: the crash dialog, the minidump in both processes and the dump as the bundle's opt-in — `10_LOGGING` built notes)**; ~~tray + toasts; Settings;~~ ~~DB maintenance~~ **landed 2026-09-15 (P4 PR-7: the sweep is the Agent's over `SweepRetention`; integrity, backup and compaction in the App)**; ~~accessibility pass~~ **landed 2026-09-15 (P4 PR-8: `08_UI` §Accessibility written first — Ctrl+1…5, Esc on every dialog, an automation name on every textless input, theme colours only — each held by `AccessibilityTests`)**; ~~the scheduled task (`--install-task`)~~ (P3 PR-8b) and ~~the Velopack install hooks~~ **(PR-5: the uninstall hook; install registers nothing, by design — `12_BUILD` §The Vulkan layer is not registered at install time)**. *(The struck items moved to P3 on 2026-09-13 — see §P3.)*
## P5 — Ship (3–4 days)
CI/CD with the native build (`release.yml` exists since P4 PR-5, 2026-09-14 — ~~untested by a tag yet~~ **ran on the first tag 2026-09-16** (`13_CI_CD` §release.yml: cancelled by a test hang once, green on the re-run); **rehearsable without one since 2026-09-16**, `13_CI_CD` §release.yml's dry run); CodeQL (C# + C++); Dependabot; CHANGELOG; README with the P0 accuracy comparison — **which is not a percentage, and this line used to send its author looking for one**. The decision is recorded under item 3 and in `spike-notes.md` §8: the baseline can answer **none** of item 4's four runtime questions, so the defensible claim is *"the baseline cannot answer four of these five questions at all"*, not *"N% more accurate"*. Overhead + tier cross-validation measurements; release smoke on clean VMs; ~~`v0.1.0-beta.1`~~ **tagged and published 2026-09-16** (pre-release, unsigned, `SHA256SUMS.txt` beside the assets). What P5 still owes: the clean-VM smoke (`14_TESTING` §Release smoke — Win 10 22H2 is unmeasured), the overhead run (`spike-notes` §14.3), and the README's accuracy comparison sentence.
CI/CD with the native build (`release.yml` exists since P4 PR-5, 2026-09-14 — ~~untested by a tag yet~~ **ran on the first tag 2026-09-16** (`13_CI_CD` §release.yml: cancelled by a test hang once, green on the re-run); **rehearsable without one since 2026-09-16**, `13_CI_CD` §release.yml's dry run); CodeQL (C# + C++); Dependabot; CHANGELOG; README with the P0 accuracy comparison — **which is not a percentage, and this line used to send its author looking for one**. The decision is recorded under item 3 and in `spike-notes.md` §8: the baseline can answer **none** of item 4's four runtime questions, so the defensible claim is *"the baseline cannot answer four of these five questions at all"*, not *"N% more accurate"*. Overhead + tier cross-validation measurements; release smoke on clean VMs; ~~`v0.1.0-beta.1`~~ **tagged and published 2026-09-16** — eleven pre-releases through `0.1.0-beta.11` (2026-10-03), added 2026-10-04 — (pre-release, unsigned, `SHA256SUMS.txt` beside the assets). What P5 still owes: the clean-VM smoke (`14_TESTING` §Release smoke — Win 10 22H2 is unmeasured), the overhead run (`spike-notes` §14.3), and the README's accuracy comparison sentence.
**Total ≈ 5.5–6.5 weeks full-time** — roughly 1.5–2 weeks more than the ETW design, which is the honest price of the accuracy.
@@ -339,7 +347,7 @@ CI/CD with the native build (`release.yml` exists since P4 PR-5, 2026-09-14 —
- Microsoft Store / Game Pass titles (packaged-app injection constraints)
- AFK segmentation via `GetLastInputInfo`
- GPU frame time via timestamp queries (needs care: injecting queries into the game's command lists is more invasive than anything in v1 — needs its own risk review)
- Beta update channel; ARM64
- ~~Beta update channel;~~ ARM64 *(struck 2026-10-04: the beta channel shipped with P4 PR-5 — `update.channel`, Settings ▸ Updates; `13_CI_CD` §Branch & release policy)*
## Permanently out of scope
+20 -5
View File
@@ -7,7 +7,7 @@ Mandatory conventions for all XAML/C# in `FrameLedger.App`. WPF UI = lepoco's Fl
| Package (NuGet id) | Pin | Notes |
|---|---|---|
| `WPF-UI` | **= 4.3.0** (exact; bump deliberately) | Assembly/namespace is `Wpf.Ui`. Targets `net8.0-windows` → resolves cleanly for our `net10.0-windows10.0.22621.0` TFM (`12_BUILD` §Managed build; this row said `19041` until 2026-09-21, which is no TFM this repository ever built — `Directory.Build.props` has been `22621` with a 19045 floor throughout) |
| `WPF-UI.Abstractions` | transitive | Navigation abstractions (`INavigationViewPageProvider`) |
| `WPF-UI.Abstractions` | ~~transitive~~ **= 4.3.0**, referenced directly (corrected 2026-10-04) | Navigation abstractions (`INavigationViewPageProvider`) |
| `WPF-UI.DependencyInjection` | match `WPF-UI` | DI glue (`services.AddNavigationViewPageProvider()`); verify exact id/version at scaffold |
| `WPF-UI.Tray` | **not used** | Tray stays on H.NotifyIcon.Wpf (CLAUDE.md stack table) |
@@ -81,7 +81,7 @@ Theme rules:
<RowDefinition Height="*"/> <!-- NavigationView -->
</Grid.RowDefinitions>
<ui:TitleBar Grid.Row="0" Title="FrameLedger" Icon="pack://application:,,,/Assets/icon.ico" />
<ui:TitleBar Grid.Row="0" Title="FrameLedger" /> <!-- no Icon: no icon file exists yet (corrected 2026-10-04) -->
<Menu Grid.Row="1"> <!-- classic menu, Fluent-restyled automatically --> </Menu>
@@ -103,7 +103,7 @@ Theme rules:
</ui:NavigationView>
<ui:SnackbarPresenter x:Name="SnackbarPresenter" Grid.Row="2" VerticalAlignment="Bottom" />
<ContentPresenter x:Name="DialogHost" Grid.Row="2" /> <!-- ContentDialogService host -->
<ui:ContentDialogHost x:Name="DialogHost" Grid.Row="2" /> <!-- §Dialogs; a ContentPresenter stood here until 2026-10-04 -->
</Grid>
</ui:FluentWindow>
```
@@ -152,7 +152,22 @@ Native `Menu`, `TabControl`, `ComboBox`, `Slider`, `ListView` are fine — the `
styles (`Styles/FrameLedger.xaml`), or the `Pill` style with a `SystemFillColor*BackgroundBrush` and an explicit text
brush; `ContrastTests` refuses all five (`08_UI` §Contrast).
- Do **not** set `Background` on `FluentWindow` (kills Mica). Page backgrounds transparent by default.
- Exception to the no-hex rule: the chart palette — defined once per theme in `Styles/ChartPalette.xaml` (two dictionaries), never inline.
- Exception to the no-hex rule: the chart palette — defined once per theme in ~~`Styles/ChartPalette.xaml` (two dictionaries)~~ `Styles/ChartPalette.Dark.xaml` and `ChartPalette.Light.xaml` (corrected 2026-10-04), never inline.
## FlowDocument (rendered documents, beta.12)
- **WPF UI 4.3.0 styles no `FlowDocument`.** Its own defaults are black Georgia on white, so a document in the dark theme
is unreadable unless the document is themed in code: `Markdown/MarkdownRenderer` sets `TextElement.Foreground` to
`TextFillColorPrimaryBrush` and `TextElement.FontFamily` to `ContentControlThemeFontFamily` **by resource reference**
(`SetResourceReference`, the code form of `DynamicResource`), a transparent background, and resource references for
every other colour (`AccentTextFillColorPrimaryBrush` links, `SubtleFillColorSecondaryBrush` code and table headers,
`ControlStrokeColorDefaultBrush` rules, quote bars and table borders). Never a literal brush.
- Host it in `Controls/MarkdownView` (a `FlowDocumentScrollViewer`, toolbar hidden) — not a `RichTextBox`, which is an
editor. A `Hyperlink` there does not navigate by itself: the view handles `RequestNavigate` and decides
(`Markdown/MarkdownLinks`).
- `AccentTextFillColorPrimaryBrush` is the light accent in the dark theme only after `ApplicationThemeManager.Apply(…,
updateAccent: true)` — measured 2026-10-03 in the test host, which skips it: links drew #003E92 on #202020 there and
#73C2FF once the accent was applied as `WpfThemeApplier` applies it.
## Custom controls (`FpsReadout`, `TriStateChip`, sparklines)
@@ -176,7 +191,7 @@ var box = new Wpf.Ui.Controls.MessageBox
var result = await box.ShowDialogAsync(); // Wpf.Ui.Controls.MessageBoxResult.Primary
```
⚠ Name clash with `System.Windows.MessageBox` — in App code, `using MessageBox = Wpf.Ui.Controls.MessageBox;` and ban the System one (BannedSymbols/analyzer note).
⚠ Name clash with `System.Windows.MessageBox` — in App code, `using MessageBox = Wpf.Ui.Controls.MessageBox;` ~~and ban the System one (BannedSymbols/analyzer note)~~ *(corrected 2026-10-04: nothing bans it. Three paths use the Win32 box on purpose — the crash dialog, the startup-failure dialog and the uninstall question — because they run when the shell's dialog host cannot be trusted. Use the WPF UI one everywhere else.)*
- Rich in-flow dialogs: `IContentDialogService` (host wired in MainWindow — a `ui:ContentDialogHost`, since 4.3.0 marks `SetDialogHost(ContentPresenter)` obsolete).
- Transient in-app: `ISnackbarService.Show(title, message, ControlAppearance.Success, new SymbolIcon(SymbolRegular.Checkmark24), TimeSpan.FromSeconds(4))`.
- System/tray notifications: H.NotifyIcon only (08_UI §Notifications policy).
+38 -21
View File
@@ -22,7 +22,7 @@ The injected DLL. Its whole job: install hooks, write 64-byte records into a rin
> ⚠ The CFG result was measured with **strict mode off**. A host that enables CFG strict mode does not auto-validate dynamically generated code and could still `__fastfail`. Rare, but real, and not something the fault policy can catch — see §Fault policy and `20_OPEN_QUESTIONS` §H8.
- No STL container that allocates in a hook path. `std::atomic` and fixed arrays are fine.
- VERSIONINFO populated (`ProductName=FrameLedger`, real company/version) — being identifiable is required by `19_SAFETY`.
- Exports: `FlGetBuildId()`, `FlRequestUnhook()`, `FlGetStatus()`. Real names, no ordinal-only tricks.
- Exports: `FlGetLayoutVersion()` (added to this line 2026-10-04), `FlGetBuildId()`, `FlRequestUnhook()`, `FlGetStatus()`. Real names, no ordinal-only tricks.
## DLL entry
@@ -82,7 +82,7 @@ void** vtbl = *reinterpret_cast<void***>(dummySwapChain);
MH_CreateHook(vtbl[kPresentIndex], &Hook_Present, reinterpret_cast<void**>(&Orig_Present));
```
Index constants (`IDXGISwapChain::Present = 8`, `Present1 = 22` on `IDXGISwapChain1`, `ResizeBuffers = 13`) live in `HookIndices.h`.
Index constants (`IDXGISwapChain::Present = 8`, `Present1 = 22` on `IDXGISwapChain1`, `ResizeBuffers = 13`) live in ~~`HookIndices.h`~~ `FrameLedger.Overlay/include/fl_dxgi_vtable.h`, shared with the harness; the D3D12 command-list slots in `fl_d3d12_vtable.h` (corrected 2026-10-04: no `HookIndices.h` exists).
> ⚠ **"Verified at runtime against the dummy object" is not implementable, and
> must not be reintroduced.** A vtable slot holds a bare function pointer: no
@@ -112,15 +112,18 @@ Index constants (`IDXGISwapChain::Present = 8`, `Present1 = 22` on `IDXGISwapCha
> restore-only-if-unchanged rule matters, since another overlay may have
> patched the same shared slot after us.
Prefer hooking the **vtable entry** over inline-patching for COM methods (cleaner uninstall, no trampoline hazards); use MinHook inline hooks for flat C exports (`wglSwapBuffers`, NGX/FFX/XeSS entry points).
~~Prefer hooking the **vtable entry** over inline-patching for COM methods (cleaner uninstall, no trampoline hazards);~~ *(corrected 2026-10-04: the Overlay swaps no vtable entry. It reads the slot off a throwaway object and MinHooks the function it points at, so one patch covers every instance (§Ray tracing); §Compare-and-restore explains why the swap is not the cleaner uninstall.)* Use MinHook inline hooks for flat C exports too (`wglSwapBuffers`, the Streamline and FidelityFX entry points ~~, NGX/FFX/XeSS~~ — NGX and XeSS have none).
## Hook inventory
Every hook must be listed here with a purpose. Anything not on this list is not allowed to exist (`19_SAFETY` review checklist).
> **This table is a SPECIFICATION. As of 2026-09-04 the Overlay installs TWELVE DETOURS —
> **This table is a SPECIFICATION. ~~As of 2026-09-04 the Overlay installs TWELVE DETOURS —
> the eight of 2026-09-03 plus four `ffxDispatch` trampolines, one per AMD module a game
> calls — and the FidelityFX row below is the ninth ✅.** The counts differed until 2026-09-03, because a
> calls — and the FidelityFX row below is the ninth ✅.~~** *(Corrected 2026-10-04: as of 2026-09-06 it installs up
> to SIXTEEN — the nine `FL_HOOK_INVENTORY` rows (four Streamline including `slSetTagForFrame`, four `ffxDispatch`,
> `ffxFsr3ContextDispatchUpscale`), the three DXGI slots, the two `ID3D12GraphicsCommandList4` methods,
> `wglSwapBuffers` and `LoadLibraryExW`; four hooks landed without this banner moving.)* The counts differed until 2026-09-03, because a
> row is a *capability* and a detour is a *patch*, and the FG-count row rode on the
> evaluate detour; it has its own now, `sl.interposer.dll!slGetNewFrameToken`. The AMD row
> is the opposite shape — **one row-family, four modules, four patches from one
@@ -161,12 +164,12 @@ Every hook must be listed here with a purpose. Anything not on this list is not
> so a shipped hook missing from here is invisible to every gate. Flip the row **and this
> banner** in the same PR that builds a hook.
### The one system-module detour — a hook, and the asymmetry stated
### ~~The one system-module detour~~ The two system exports patched by name — a hook, and the asymmetry stated *(heading corrected 2026-10-04: `wglSwapBuffers` above is the other)*
| Hook | Purpose |
|---|---|
| ✅ `opengl32.dll!wglSwapBuffers` (2026-09-06, P1 item 4) | The OpenGL present hook (§Presentation). A system module, not a vendor one, so — like the row below — it is deliberately **not** in `FL_HOOK_INVENTORY` and `hookinventory-check` does not cover it; listed here so the table above and these two rows together are the whole inventory |
| ✅ `kernelbase.dll!LoadLibraryExW` (2026-09-06, P1 item 1) | The wake for lazily loaded runtimes and the in-process anti-cheat stop — §DLL entry step 3 above carries the mechanism. **Rule 4:** it reads one argument the API was given (`flags`) and one property of a handle the loader just returned to *its own caller* (the module file name); nothing of the game's. **It is the only hook on a system module, and it is deliberately not in `FL_HOOK_INVENTORY`:** that table is *vendor* symbols resolved by name and gated by `hookinventory-check` against `vendor-exports.json`, and `LoadLibraryExW` is neither vendor nor uncertain. It is listed here instead so the table above and this row together are the whole inventory. It **never** installs, uninstalls or patches anything itself (§H2) |
| ✅ `kernelbase.dll!LoadLibraryExW` (2026-09-06, P1 item 1) | The wake for lazily loaded runtimes and the in-process anti-cheat stop — §DLL entry step 3 above carries the mechanism. **Rule 4:** it reads one argument the API was given (`flags`) and one property of a handle the loader just returned to *its own caller* (the module file name); nothing of the game's. **~~It is the only hook on a system module, and~~ Like `wglSwapBuffers` above it, it is deliberately not in `FL_HOOK_INVENTORY` (corrected 2026-10-04):** that table is *vendor* symbols resolved by name and gated by `hookinventory-check` against `vendor-exports.json`, and `LoadLibraryExW` is neither vendor nor uncertain. It is listed here instead so the table above and this row together are the whole inventory. It **never** installs, uninstalls or patches anything itself (§H2) |
### Watchdog observations — not hooks, and listed here so nobody mistakes them for one
@@ -194,7 +197,7 @@ Every hook must be listed here with a purpose. Anything not on this list is not
| ✅ Streamline: `slSetTag` — **and, since 2026-09-05, every tag's TYPE** (`slTagCensus`; a HUD-less / UI tag marks the present `FL_FG_DLSS_G`, rule 4: the same argument) | The **global** resource tags, where a title states the size of the buffer it is upscaling *from*: `kBufferTypeScalingInputColor`'s extent → `renderW/H` — **or, since 2026-09-05, the size the tagged `sl::Resource` declares when the extent is zero** (`TagSize` in `fl_sl_inputs.h`, shared by all three tag routes; GUID-checked; a Resource declaring no size is still the honest unknown). **Built 2026-08-15** (`FL_HOOK_UPSCALER_PARAMS`), and it is an ALTERNATIVE to the local tags in `slEvaluateFeature`'s `inputs`, not a layer over them — `sl_core_api.h:258` says global and local tags "do NOT interact", so a title using one yields nothing from the other and both are read. Published only on a frame where an evaluation was also seen, because a tag is viewport state that outlives any one frame. This row was MISSING from this table while the hook shipped, which is the gap the banner above now names |
| ✅ Streamline: `slSetTagForFrame` — **and every tag's TYPE, as above** | The same global tags through **Streamline 2.8's frame-based entry point**, which deprecates `slSetTag`: `(const FrameToken&, const ViewportHandle&, const ResourceTag*, uint32_t, CommandBuffer*)` — the token first, then exactly `slSetTag`'s list, handed to the same tag walk. **Built 2026-09-04** (`FL_HOOK_UPSCALER_PARAMS`, its own trampoline; the family is now **published when whole** — once every tag export the loaded interposer has is patched — because publishing on the first row entitled records the second was not yet producing, 38 of 41 on the fixture: the ffx leaves' #110 defect again, fixed the same way). Measured need: Dying Light: The Beast (SL 2.8.0) published `Dlss` identity on every batch and the params bit on none across three captures, because a 2.8 title that tags per frame never calls the deprecated export. The token is not read; the frame count stays with `slGetNewFrameToken`. The installer picks this detour by SYMBOL (`kSymbolSlSetTagForFrame`, bound to the row by `static_assert`), not by family, since the two rows share a family bit and differ in signature |
| ✅ **FidelityFX ffx-api: `ffxDispatch` on the FOUR modules a game calls** — `amd_fidelityfx_dx12.dll` (SDK 1.1.x monolith), `amd_fidelityfx_upscaler_dx12.dll`, `amd_fidelityfx_framegeneration_dx12.dll`, **and `amd_fidelityfx_loader_dx12.dll`** (added the evening of 2026-09-04: three loader-shipping titles at FSR produced zero dispatches at any leaf export, so the loader is where their calls arrive) · ⏳ FSR 3.0 host route `ffx_fsr3_x64.dll!ffxFsr3ContextDispatchUpscale` / `ffxFsr3DispatchFrameGeneration` · ~~`ffxFsr2ContextCreate`~~ · ~~`ffxCreateContext`~~ | **Built 2026-09-04** (`HANDOFF` item 7c). One observer behind three trampolines reads the DESCRIPTOR the title passed — head type first, body only after the type matched a constant from the vendored MIT headers (`third_party/fidelityfx/`, tag v2.3.0): **UPSCALE** → identity (`FSR3` from the monolith, `FSR_UNVERSIONED` from the 2.x upscaler DLL, which hosts FSR 3.1 and FSR 4 behind one type) + `renderSize` → `renderW/H` (quality and sharpness `0xFF`: the dispatch carries neither) + one COUNT; **PREPARE / PREPARE_V2** → `frameID` counted on a *new* index only — this vendor's `slGetNewFrameToken`, the `fgEvaluations` producer once a title has ever prepared, with the UPSCALE count as the fallback for a title that never does; **FRAMEGENERATION** → `fgMode = FSR_FG` on that present. Rule 4: the argument of the API we hooked, never `context`, `pNext`, a command list or a resource. **Why all four:** a UE5 title ships the two leaves with no loader and calls their exports; a loader-shipping title calls the loader's export and the signed loader reaches its providers through an object, not the leaves' exports (measured: Dying Light: The Beast, KCD2, Wukong). The morning's "never the loader" rested on the export tables alone and was reversed by the run. What guards against a loader that DID re-enter a leaf's export is the K = 1 control with all four hooked and the consumer's `frames/upscale-drained`, both of which read 2× in that case. `ffxCreateContext` is deliberately NOT a row — nothing it carries fills a field the dispatch does not, and its honest family would collide with `slEvaluateFeature`'s under the installer's equality binding. The family is compound (`IDENTITY \| PARAMS \| FG_EVALUATIONS`), pinned by `static_assert`s that also bind the leaf table to the rows both ways and refuse the loader as a row. Streamline keeps precedence for the count once it has ever issued a token, so every §S31-validated title is byte-identical. Second count: the consumer prints `frames/upscale-drained`, the AMD `tokens/batch`. **FSR 3.0 — BUILT 2026-09-05 as a fifth AMD target:** `ffx_fsr3_x64.dll!ffxFsr3ContextDispatchUpscale` (Cyberpunk's copy; named export, its own descriptor, vendored from tag **`fsr3-v3.0.4`** — the tag whose twelve `ffxFsr3*` declarations match the shipped module, not the `v1.1.4` first named). Rule 4: the detour reads `renderSize` of the descriptor the title passed and nothing else — never the context, a resource or the command list; the offset is pinned to a literal (1256) so a re-vendoring that moved it fails to compile. Same family and publish point as the four rows (`PublishFfxFamilyIfWhole` waits for a loaded host too), keyed by module in the installer; identity `FSR3` as a fact. `ffxFsr3DispatchFrameGeneration` is deliberately not a row (§H11 carries the reversal condition); the `ffx_fsr3upscaler_x64.dll` leaf is the pre-committed alternative if the facade reads silent (row B2) — never both, or `frames/upscale-drained` reads 2.00 |
| XeSS: `xessD3D12CreateContext`, `xessD3D12Init`, `xessD3D12Execute` | `outputResolution`, `qualitySetting`, XeSS version; `xess_fg` variants for XeFG |
| ~~XeSS: `xessD3D12CreateContext`, `xessD3D12Init`, `xessD3D12Execute`~~ **Closed at the census by licence, 2026-09-04** (`20_OPEN_QUESTIONS` §Scope decisions, `18_GPU_VENDOR_APIS` §Intel XeSS SDK): no hook on any `libxess*.dll` export *(corrected 2026-10-04)* | ~~`outputResolution`, `qualitySetting`, XeSS version; `xess_fg` variants for XeFG~~ |
| ✅ **Application frames per present** (`fgEvaluations`) — **`sl.interposer.dll!slGetNewFrameToken` since 2026-09-03** | Native vs Displayed frame counts at Tier 1 — see `03_METRICS` §Frame Generation. **The producer is the frame-token export**: Streamline hands a title one token per application frame and the title must ask; the detour counts distinct tokens between two presents (pointer changes, nothing dereferenced), `FL_HOOK_FG_EVALUATIONS` is its family, and it installs on every Streamline 2 title including the ones that evaluate nothing through `slEvaluateFeature`. Rule 4: the out-parameter of an API we hooked. Premise and its gate in `03_METRICS`; pre-committed table in `20_OPEN_QUESTIONS` §S31. *The row as it stood before:* ~~NGX/SL/FFX/XeSS FG feature evaluations per present. **Built 2026-08-15 for Streamline, and MEASURED TO YIELD NOTHING ON THAT ROUTE**~~ — `slEvaluateFeature(kFeatureDLSS_G)` is never called by Cyberpunk 2077 (0 across ~14,000 batches, four FG settings), so this row installs, is honest, and counts zero; see `docs/HANDOFF.md` item 3. Built on the detour that was already there: `kFeatureDLSS_G` contributes to a saturating COUNT in the same word the feature bits live in (`fl_sl_seen.h`) rather than to a bit, because a bit collapses several evaluations between two presents into one — and under multi-frame generation that is the common case, not the edge. The row's family is therefore compound (`FL_HOOK_UPSCALER_IDENTITY \| FL_HOOK_FG_EVALUATIONS`), pinned by a `static_assert` because `hookinventory-check` reads that column as an opaque identifier. **Counts EVALUATIONS, not generated frames** — the 2026-08-14 owner ruling; the multiplier lives in `sl::DLSSGOptions`, which is only reachable by the route §2b refused. ~~Non-NVIDIA FG vendors are **deferred with a written rationale**: `amd_fidelityfx_framegeneration_dx12.dll` 3.1.5 exports only the five generic `ffx*` entry points, identical to five sibling modules, so identity is in the arguments and we have no headers~~ — **AMD has a producer since 2026-09-04** (the FidelityFX row above: the PREPARE dispatch's `frameID`, or the UPSCALE count on a title that never prepares, feeds `fgEvaluations` when Streamline has never issued a token); Intel stays at the census (`20_OPEN_QUESTIONS` §Scope decisions, by licence); the FSR 3.0 host DLL's UPSCALE (`ffxFsr3ContextDispatchUpscale`, since 2026-09-05) counts like an ffx-api UPSCALE when neither Streamline nor a PREPARE has spoken |
> `GetFrameStatistics().PresentCount` is **not** in this inventory and must not be
@@ -328,7 +331,7 @@ So:
### Memory / latency
| Hook / call | Yields |
|---|---|
| `IDXGIAdapter3::QueryVideoMemoryInfo` (we **call** it, not hook it, once per second from our own thread) | **Per-process VRAM** `CurrentUsage` + `Budget` — previously impossible; now exact |
| ~~`IDXGIAdapter3::QueryVideoMemoryInfo` (we **call** it, not hook it, once per second from our own thread)~~ | ~~**Per-process VRAM** `CurrentUsage` + `Budget` — previously impossible; now exact~~ **Never built; superseded 2026-10-03 (D43):** the game's memory is read from OUTSIDE the game by the Agent (`18_GPU_VENDOR_APIS` §The game process's memory), so nothing in the Overlay calls it. Only the budget would need it, and that stays open (`20_OPEN_QUESTIONS` §M11) |
| NVAPI Reflex: hook `NvAPI_D3D_SetSleepMode`, `NvAPI_D3D_SetLatencyMarker`; call `NvAPI_D3D_GetLatency` | Reflex on/off + PC latency breakdown. Declarations come from the vendored MIT NVAPI headers (`18_GPU_VENDOR_APIS` §L3); the Overlay links them like any other header. NVIDIA-only — the whole block compiles out to a no-op capability flag elsewhere |
### Explicitly not hooked
@@ -359,7 +362,9 @@ Vulkan gets an **implicit layer** (`FrameLedger.VkLayer`), not injection — it
DLL**, and it compares the variable's **value**, so a stray
`FRAMELEDGER_ENABLE_VK_LAYER=0` does not enable us. **This makes Vulkan
Tier 1 launch-mode-only** — the Agent sets the variable when it starts an
opted-in game, so a Vulkan title launched from Steam or GOG is not hooked.
opted-in game, so a Vulkan title launched from Steam or GOG is not ~~hooked~~ observed by the layer *(corrected
2026-10-04: attach mode has no Vulkan rule, so such a title gets the Overlay injected like a D3D one, and what its
DXGI hooks record there is unverified; `kTargetIsVulkanLayered` applies to launch mode only)*.
It is a *loading* gate, not a security gate: anything running as the user can
set the variable.
@@ -487,7 +492,9 @@ struct alignas(64) FlFrameRecord { // 64 bytes exactly, static_assert'd
uint8_t fgEvaluations; // @43 FG feature evaluations observed this frame
uint32_t vramUsedMb; // @44 MiB, matching vramBudgetMb
uint32_t reflexLatencyUs; // @48 0 = unavailable
uint32_t reserved; // @52 must be zero
uint8_t dxgiUnseen; // @52 DXGI-counted presents the hook did not see (2026-09-05; this listing
// showed a uint32 reserved here until 2026-10-04)
uint8_t reserved[3]; // @53..55 must be zero
uint32_t seq; // @56 seqlock counter (see 07_IPC §Protocol rules)
uint32_t swapchainId; // @60 which swapchain this present came through; 0 = unidentified
};
@@ -525,8 +532,9 @@ Field notes — each of these was a defect in an earlier revision:
uncomputable from a pinned counter. `rays_per_pixel` divides this by output
pixels.
- **`maxTraceRecursionDepth`** is the second of the four stated inputs to
`pt_confidence`. It is read at `CreateStateObject` (§Hook inventory) but
previously had no transport to the Agent and no column to land in.
`pt_confidence`. It ~~is~~ would be read at `CreateStateObject` (§Hook inventory) but
previously had no transport to the Agent and no column to land in. *(Corrected 2026-10-04: `CreateStateObject` is
not hooked, so nothing writes it yet.)*
- **`_pad0` and `_pad1` were explicit holes and are now carrying data.** Both were
named only so every offset could be asserted; spending them costs nothing,
because both bytes ranges were already inside the record and already written
@@ -561,14 +569,15 @@ Field notes — each of these was a defect in an earlier revision:
- **SPSC lock-free ring**, capacity a power of two (default 8192 records = 512 KB), overwrite-oldest.
- Writer/reader seqlock protocol, including the rule that the payload write must
**exclude** the `seq` field and that `seq` is never reset: `07_IPC` §Protocol rules.
- Header: three separate 64-byte lines before the ring — `FlShmHandshake` (write-once),
- Header: ~~three~~ **four** separate 64-byte lines before the ring *(corrected 2026-10-04: since layout 4, 2026-09-27,
beta.10, `FlDisplayState` at 0xC0 — Overlay-written at most every 500 ms; the ring starts at 0x100)* — `FlShmHandshake` (write-once),
`FlWriterState` (Overlay-written: `writeIndex`, `status`, `apiMask`, `faultCount`),
and `FlControlBlock` (**Agent**-written: `pauseRequested`, `unhookRequested`,
`overlayEnabled`, `guardTicks`). The control flags are *not* in the Overlay's
header — they are written by the other process, and mixing them into an
Overlay-written line reintroduces exactly the false sharing the split exists to
prevent. Layout is normative in `07_IPC` §A + B.
- **The hot path performs: one QPC read, a few field reads from cached state, one 60-byte store, two relaxed atomic stores and two compiler fences.** No syscall, no allocation, no lock, no logging. Target ≤ 1 µs per present.
- **The hot path performs: one QPC read, a few field reads from cached state, one 60-byte store, two relaxed atomic stores and two compiler fences.** No syscall, no allocation, no lock, no logging. Target ≤ 1 µs per present. *(Added 2026-10-04: the summary leaves out the per-present `IDXGISwapChain::GetLastPresentCount` call (§H5, the `dxgiUnseen` count) and the display sample every 500 ms at most (region 4).)*
- Per-frame mutable state (current upscaler, render res, dispatch counts) lives in a small struct updated by the feature hooks and *read* by the present hook; counters reset at present.
## The watchdog thread — the only thread we add to the game
@@ -577,6 +586,11 @@ One thread, started on the init thread *after* the hooks are installed, sleeping
`1000 ms` at a time. It evaluates `unhookRequested` and the `guardTicks` deadline,
calls `StopObserving` when either fires, and **exits** once stopped.
> **Corrected 2026-10-04 — this describes the thread as it was first written.** Since the lazy installers landed
> (`slEvaluateFeature`, 2026-08-09) the loop also installs feature hooks, runs the runtime census, publishes counters,
> appends the native log, and stops on the loader detour's early-stop family; it waits on that detour's wake event with
> a 1000 ms timeout rather than sleeping. `legal/DISCLAIMER.md` §2 says so to users since beta.12 (Disclaimer 2.10).
**Why it exists.** Both stops used to be evaluated only on the present path, and
`MayObserve` is reachable only from `RecordPresent`, which is reachable only from
the two present hooks. In a process that had stopped presenting — hung,
@@ -600,9 +614,12 @@ we do not own; the re-scan it would have run allocates ~1.15 MB transiently; and
it would have called `NtQuerySystemInformation` and probed the SCM from inside a
game, which is the behavioural signature of anti-analysis code (CLAUDE.md rule 3).
None applies to the Overlay, which is loaded by documented `LoadLibraryW` and is
never `FreeLibrary`'d from a live process. **This thread enumerates nothing,
never `FreeLibrary`'d from a live process. ~~**This thread enumerates nothing,
probes nothing and allocates nothing** — it reads two `uint32`s from our own
mapping and sleeps. That distinction is the whole justification and must survive
mapping and sleeps.~~ *(Corrected 2026-10-04: it enumerates no process, module list or service — the rule-3 line, which
holds — but it asks the loader for fixed module names, allocates through MinHook and, for ray tracing, creates one
command allocator and list on the game's own D3D12 device, and writes the log file. The justification below is
restated for that scope: what it must never start doing is scanning.)* That distinction is the whole justification and must survive
any future change: a watchdog that starts scanning is a different object under
rule 3.
@@ -645,7 +662,7 @@ Every hook body is wrapped:
> against the injected Overlay in ctest `fl_guard` `[log]`, where every patch reads `UNHOOK_RESTORED`
> because the harness is alone in its process.
`FlRequestUnhook()` (or the control flag) ⇒ `MH_DisableHook(MH_ALL_HOOKS)`, restore vtable entries **only where they are still ours**, flush the ring, set status. **The DLL is not `FreeLibrary`'d from the live process** — a thread could still be inside a trampoline. It goes dormant and unloads with the process. This is deliberate and documented.
~~`FlRequestUnhook()` (or the control flag) ⇒ `MH_DisableHook(MH_ALL_HOOKS)`, restore vtable entries **only where they are still ours**, flush the ring, set status.~~ *(Corrected 2026-10-04: both reach `StopObserving` — compare-and-restore per patch as the note above says, then the status; there is no `MH_ALL_HOOKS`, no vtable entry and no ring flush. The watchdog flushes the native log on its way out.)* **The DLL is not `FreeLibrary`'d from the live process** — a thread could still be inside a trampoline. It goes dormant and unloads with the process. This is deliberate and documented.
### Compare-and-restore, never unconditional restore
@@ -714,7 +731,7 @@ No logging in hook bodies. A small fixed-size in-memory ring of structured event
## Test harness
`src/native/tools/hook-harness` — a minimal D3D11 app that presents at a controlled rate. It lets CI and local dev exercise hook paths with **no game and no anti-cheat surface at all** (`14_TESTING`).
`src/native/tools/hook-harness` — a ~~minimal D3D11~~ D3D11/D3D12 app (plus `--vulkan` / `--opengl` modes — corrected 2026-10-04) that presents at a controlled rate. It lets CI and local dev exercise hook paths with **no game and no anti-cheat surface at all** (`14_TESTING`).
Two choices make it run on a hosted CI runner, which is what made vtable-index
verification a dev-machine-only affair before:
@@ -722,8 +739,8 @@ verification a dev-machine-only affair before:
- **WARP** (`D3D_DRIVER_TYPE_WARP`) — a software rasteriser, so no adapter is required.
- **`CreateSwapChainForComposition`** — no `HWND`, so no dependency on a window station or an interactive session.
Current modes: `--probe-vtable` (§H4, ctest `fl_vtable_indices`), `--probe-proxy` (§H5, ctest `fl_proxy_swapchain`), `--probe-unhook` (§H7, ctest `fl_unhook_preserves_foreign`), `--probe-cost` (NFR-1, measurement only), **`--probe-frames`** (ctest `fl_frame_identity` — what counts as a frame, against `GetLastPresentCount`), **`--probe-d3d12`** (ctest `fl_d3d12_acquisition` — device → command queue → swapchain), `--present N`, `--hold N`, **`--real`** and **`--plus-ui K``**, **`--vulkan --hold-presenting N`** (P1 item 3, real loader, exit 77 = cannot run here) and **`--opengl --hold-presenting N`** (P1 item 4, gdi32 `SwapBuffers` on a hidden window, Microsoft's generic renderer — runs on CI).
Current modes: `--probe-vtable` (§H4, ctest `fl_vtable_indices`), `--probe-proxy` (§H5, ctest `fl_proxy_swapchain`), `--probe-unhook` (§H7, ctest `fl_unhook_preserves_foreign`), `--probe-cost` (NFR-1, measurement only), **`--probe-frames`** (ctest `fl_frame_identity` — what counts as a frame, against `GetLastPresentCount`), **`--probe-d3d12`** (ctest `fl_d3d12_acquisition` — device → command queue → swapchain), `--present N`, `--hold N`, **`--real`** and **`--plus-ui K``**, **`--vulkan --hold-presenting N`** (P1 item 3, real loader, exit 77 = cannot run here) and **`--opengl --hold-presenting N`** (P1 item 4, gdi32 `SwapBuffers` on a hidden window, Microsoft's generic renderer — runs on CI). *(Added 2026-10-04, each with its own ctest: `--probe-d3d12-vtable`, `--probe-dxr`, `--probe-dxr-inputs`, `--probe-upscaler-resolve`, `--probe-sl-abi`, `--probe-ffx-resolve`, `--probe-sl-inputs`, `--probe-sl-seen`, `--probe-dxgi-count`; and the `--hold-presenting-*` injection fixtures with `--load` / `--load-after-ms`.)*
> **Every present here used to carry `DXGI_PRESENT_TEST`, which submits nothing.** Measured: 500 of them leave `GetLastPresentCount` at 0 while 37 real presents move it by 37. "N presents → N records" was therefore satisfiable only by a writer counting non-frames. `--real` issues real presents; the test-present path is kept as a named mode because it is what an alt-tabbed title actually runs.
Still to add as the hook layer grows: Vulkan devices, RT PSO creation and ray dispatch, stub upscaler exports with the real vendor names, a PSO-compile spike generator, and a fault-injecting hook body for the self-disable path (`14_TESTING` §Integration tests).
Still to add as the hook layer grows: ~~Vulkan devices, RT PSO creation and ray dispatch, stub upscaler exports with the real vendor names,~~ *(the struck three exist — corrected 2026-10-04)* a PSO-compile spike generator, and a fault-injecting hook body for the self-disable path (`14_TESTING` §Integration tests).
+43 -11
View File
@@ -33,7 +33,7 @@ public interface IGpuTelemetrySource : IDisposable
Implementations compose rather than compete:
- `BaselineTelemetrySource` (L1) — always constructed.
- `LhmTelemetrySource` (L2) — constructed when LHM initialises.
- `LhmTelemetrySource` (L2) — ~~constructed when LHM initialises~~ always constructed; a `Computer` that will not open disables the layer for the session (corrected 2026-10-04).
- `NvapiTelemetrySource` (L3) — ~~constructed only on NVIDIA hardware~~ **always constructed since 2026-09-10 (P2 PR-E2)** and disables itself when the bridge DLL or the NVIDIA driver is absent, so the composite's descriptor simply omits `nvapi` and no caller has to know the vendor before composing.
- `CompositeTelemetrySource` merges them with a fixed precedence per field (**L3 > L2 > L1**) and records which layer supplied each value.
@@ -52,20 +52,50 @@ Implementations compose rather than compete:
> `LayerOf(field)` answers per field. It also applies the two-fault rule one level up — a layer
> whose `TryRead` throws (which the port forbids) is excluded on the second throw, the others
> untouched. (3) Identity is its own record, `GpuAdapterIdentity` (name, LUID, ids, memory sizes,
> user-mode driver version), read once per session from DXGI; the Agent hands the handshake's
> `adapterLuid` to `SelectAdapter` so samples describe the adapter the game presented on. Every
> user-mode driver version), read once per session from DXGI; ~~the Agent hands the handshake's
> `adapterLuid` to `SelectAdapter` so samples describe the adapter the game presented on.~~ *(Corrected 2026-10-04:
> nothing calls `SelectAdapter` outside tests. L1 stays on the first hardware adapter in DXGI's high-performance order,
> as `HardwareSnapshotSource` does, and the handshake's `adapterLuid` is read by no managed code — so on a
> multi-adapter machine L1 can describe an adapter the game did not present on. The game's own memory, D43, is
> summed over every adapter and is not affected.)* Every
> poller sample is stamped with QPC (`TelemetrySample.QpcTicks`), the ring's clock, and
> `QpcClockTests` pins `Stopwatch` / `TimeProvider.GetTimestamp` to the real counter.
> Per-process VRAM comes from the **Overlay** (`IDXGIAdapter3::QueryVideoMemoryInfo` inside the game), not from here. Adapter-wide VRAM is a separate series with a different label — they answer different questions and users will otherwise think one of them is broken.
> ~~Per-process VRAM comes from the **Overlay** (`IDXGIAdapter3::QueryVideoMemoryInfo` inside the game), not from here.~~
> **Corrected 2026-10-03 (beta.12, D43): the game process's memory is read from OUTSIDE the game** — §The game process's
> memory below; the Overlay never called `QueryVideoMemoryInfo`. Adapter-wide VRAM is a separate series with a different
> label — they answer different questions and users will otherwise think one of them is broken.
### The game process's memory (beta.12, owner decision D43)
`FrameLedger.ProcessStats.dll` — the third native facade the Agent loads beside itself (`NativeProcessStats`, after the
guard's and the NVAPI bridge's), never into a game — reads one process's memory per call:
- **Video memory:** the documented performance counters `\GPU Process Memory(pid_<pid>_luid_…_phys_<n>)\Dedicated
Usage` and `\Shared Usage` (`PdhAddEnglishCounterW` with a `*` instance, so a localised counter name does not matter;
`PdhGetFormattedCounterArrayW` after each collection), every instance naming the pid **summed** — each adapter and
physical index the process allocated on. This is the per-process figure, so the adapter-wide rule below ("filter to our
adapter, don't sum blindly") does not apply to it. **No handle to the game is needed.**
- **System memory:** `GetProcessMemoryInfo` with `PROCESS_MEMORY_COUNTERS_EX2` (its `PrivateWorkingSetSize` is Task
Manager's "Memory"), retried with `PROCESS_MEMORY_COUNTERS_EX` where the OS refuses the larger structure; an EX2
answer whose private working set was left as written (a sentinel) or reads zero beside a nonzero working set is N/A,
never a measured zero. It needs `PROCESS_QUERY_LIMITED_INFORMATION` and
nothing more: the session's held handle when it has one, else a handle opened for the read and closed after it, whose
creation time must be the watcher's (a reused pid is refused, not read).
- **Not `D3DKMTQueryStatistics`.** It answers the same per-process segment figures, but Microsoft documents it as
"Reserved for system use"; the counters are the documented face of the same accounting.
- Measured on the dev box (`spike-notes` §16): one collect + read costs 0.1 ms (max 0.22 ms), a 512 MiB allocation reads
+512.0 MiB, the private working set equals `\Process V2(…)\Working Set - Private`, 600 collections leak nothing. One
`GameMemoryReader` per session, on the session's `fl-telemetry` thread (`TelemetryPoller`'s third source).
## L1 — baseline (no licence, all vendors)
- **DXGI:** `IDXGIFactory6::EnumAdapterByGpuPreference` → adapter description, LUID (matches the swapchain adapter from the Overlay handshake), dedicated/shared memory sizes. ~~`IDXGIAdapter3::QueryVideoMemoryInfo` for adapter-wide usage/budget.~~ **Measured wrong, 2026-09-09:** `DXGI_QUERY_VIDEO_MEMORY_INFO.CurrentUsage` is the *calling process's* usage by the structure's own definition — which is exactly why the Overlay reads it inside the game for `vram_proc` — and from the Agent it read **0 bytes** beside a 16 GB adapter. Adapter-wide usage is the PDH counter below, as this list always said; DXGI is identity only (`DxgiAdapters`, the first CsWin32 consumer in the tree).
- **DXGI:** `IDXGIFactory6::EnumAdapterByGpuPreference` → adapter description, LUID (matches the swapchain adapter from the Overlay handshake), dedicated/shared memory sizes. ~~`IDXGIAdapter3::QueryVideoMemoryInfo` for adapter-wide usage/budget.~~ **Measured wrong, 2026-09-09:** `DXGI_QUERY_VIDEO_MEMORY_INFO.CurrentUsage` is the *calling process's* usage by the structure's own definition ~~— which is exactly why the Overlay reads it inside the game for `vram_proc` —~~ *(corrected 2026-10-04: the Overlay never read it, and `vram_proc` was never produced — §The game process's memory)* and from the Agent it read **0 bytes** beside a 16 GB adapter. Adapter-wide usage is the PDH counter below, as this list always said; DXGI is identity only (`DxgiAdapters`, the first CsWin32 consumer in the tree).
- **PDH performance counters** — the same source Task Manager uses, fully documented, vendor-neutral:
- `\GPU Engine(*)\Utilization Percentage` (sum per engine type: 3D, Compute, Copy, VideoDecode)
- `\GPU Adapter Memory(*)\Dedicated Usage`
- `\GPU Process Memory(*)\Dedicated Usage` (cross-check against the Overlay's figure)
- `\GPU Process Memory(*)\Dedicated Usage` ~~(cross-check against the Overlay's figure)~~ — **read since 2026-10-03
as the game process's own figure** (§The game process's memory; the Overlay never produced one)
- Instance names embed the LUID — parse and filter to our adapter, don't sum blindly across GPUs.
> **Built 2026-09-09 (PR-E1), one counter of the three:** `PdhAdapterMemoryCounter` binds
@@ -75,8 +105,10 @@ Implementations compose rather than compete:
> idle desktop, moving tick to tick. A machine without the counter set fails the open and the
> field is N/A with the layer standing — not a fault. **`Utilization Percentage` is deliberately
> not read** (`20_OPEN_QUESTIONS` §M10, decided): `LoadPct` is L2's vendor-reported load and is
> labelled as such. `GPU Process Memory` is not read either — the Overlay's in-process figure is
> the one the pipeline stores, and a cross-check is a diagnostic, not a field.
> labelled as such. ~~`GPU Process Memory` is not read either — the Overlay's in-process figure is
> the one the pipeline stores, and a cross-check is a diagnostic, not a field.~~ **Since 2026-10-03 (D43) `GPU Process
> Memory` IS read** — by `FrameLedger.ProcessStats.dll`, as the game process's dedicated and shared GPU memory; there was
> never an in-process figure to cross-check.
- **Driver version:** ~~`SetupAPI` / registry adapter properties.~~ **`IDXGIAdapter::CheckInterfaceSupport(IDXGIDevice)`** — its documented second output is the user-mode driver version for that interface, four 16-bit fields of one 64-bit value (`32.0.16.1664` on the dev box, 2026-09-09; the WARP adapter answers with the OS build). Neither SetupAPI nor the registry is walked: both need a device-instance enumeration nothing else here has a reason to carry. Feeds the hardware snapshot and the trend-chart change markers (`06_DATA_MODEL`). This is the four-part form the vendor's own tooling shows, not the marketing number (`561.09`), which only L3 knows.
- **Optional probe, P0 evaluation only:** `D3DKMTQueryAdapterInfo` with `KMTQAITYPE_ADAPTERPERFDATA` reportedly exposes temperature, power and fan for any vendor. The D3DKMT structures are **not fully documented and have changed across Windows builds**. Treat as an experiment: if it proves stable on both Win 10 22H2 and Win 11 during P0, keep it as an L1 extra behind a capability flag; if it looks fragile, drop it and let L2 handle temperatures. Never let it be load-bearing.
@@ -105,7 +137,7 @@ L1 gives no temperatures on its own (unless the D3DKMT probe pans out). That is
`LibreHardwareMonitorLib` ≥ 0.9.6, consumed as an **unmodified NuGet package**. It already implements per-vendor GPU sensor access internally — which means the vendor-interop licensing problem is one LHM has solved upstream, under a licence that works for us. That is the entire reason this layer exists.
- `Computer` opened with `IsGpuEnabled` always; `IsCpuEnabled` + `IsMemoryEnabled` only when the Agent is elevated and PawnIO is available.
- `Computer` opened with `IsGpuEnabled` always; ~~`IsCpuEnabled` + `IsMemoryEnabled` only when the Agent is elevated and PawnIO is available~~ nothing else, ever — the CPU temperature uses a separate `Computer` (below) (corrected 2026-10-04).
- Poll on a dedicated thread: `computer.Accept(updateVisitor)` then read mapped sensors. Never faster than 500 ms; default 1000 ms.
- Sensor mapping by `SensorType` + name heuristics per vendor (`GPU Core`, `GPU Hot Spot`, `GPU Memory`, `GPU Package Power`, …), kept in `SensorMap.cs` with unit tests against captured sensor-tree fixtures.
- **P0 verification items:** (a) which fields LHM actually returns per vendor on real hardware — fill the capability matrix below — **NVIDIA filled 2026-09-03, AMD/Intel deferred (§R5/§R6)**; (b) ~~whether GPU-only usage works **without** elevation and without PawnIO (expected yes, since GPU sensors go through user-mode vendor paths, but confirm — it determines whether the default unelevated Agent has temperatures at all)~~ — **confirmed 2026-09-03, §M5 row R1**: eight fields unelevated, the same eight elevated, PawnIO never opened; (c) ~~confirm LHM's sources are not marked with MPL-2.0 Exhibit B~~ — **done, 2026-08-02: clear.** No source file applies the notice; the only repository hit is the `LICENSE` template itself, and every file we depend on carries the permissive Exhibit A. Method and evidence in `docs/spike-notes.md` §0. Re-check on every version bump, and check *source headers*, never the LICENSE file — MPL-2.0's own text contains Exhibit B as a template, so grepping the licence finds it in every MPL project ever published.
@@ -118,7 +150,7 @@ CPU and motherboard sensors remain LHM-only, elevated-only, PawnIO-dependent, an
> attribution above mean nothing for "how busy was the CPU". Two unprivileged Win32 calls, no process opened:
> `GetSystemTimes` (busy = (kernel + user) − idle over the interval; kernel INCLUDES idle in that API; the first tick has
> no interval and is null) and `GlobalMemoryStatusEx` (physical memory in use). **CPU temperature is the one privileged
> reading**: `LhmCpuTemperatureReader.TryOpen` opens a SEPARATE `Computer` (CPU group only — L2's stays GPU-only and
> reading**: `LhmCpuTemperatureReader.TryOpen` opens a SEPARATE `Computer` (~~CPU group only~~ CPU and memory groups, GPU off — corrected 2026-10-04 — L2's stays GPU-only and
> unelevated by design, so the unprivileged layer's behaviour never depends on privilege) only when the process is
> elevated AND `PawnIo.IsInstalled`; it takes the package sensor (`CPU Package`, `Core (Tctl/Tdie)`) and falls back to the
> hottest core. **Unmeasured on real hardware**: exercised against a fake `ILhmComputer` only; the first elevated run
@@ -338,7 +370,7 @@ as the same thing.
|---|---|---|---|
| GPU utilisation | **deferred by decision** (§M10, 2026-09-09) — L2's vendor-reported load is what `LoadPct` carries, labelled as such; the engine counters are not read | untested | untested |
| Adapter VRAM | ✓ **measured 2026-09-09** — PDH `GPU Adapter Memory … Dedicated Usage`, 1301 MB at an idle desktop, RTX 5080 (`QueryVideoMemoryInfo` measured **not** adapter-wide: 0 bytes from the Agent) | untested | untested |
| Per-process VRAM | `arch` for L1 — the Overlay's in-process `QueryVideoMemoryInfo` is the figure stored; `GPU Process Memory` is not read | `arch` | `arch` |
| Per-process VRAM | ~~`arch` for L1 — the Overlay's in-process `QueryVideoMemoryInfo` is the figure stored; `GPU Process Memory` is not read~~ ✓ **measured 2026-10-03** — `GPU Process Memory` Dedicated/Shared by pid from outside the game, +512.0 MiB for a 512 MiB buffer (`spike-notes` §16) | untested | untested |
| Driver version | ✓ **measured 2026-09-09** — `CheckInterfaceSupport(IDXGIDevice)` → `32.0.16.1664` | untested | untested |
| Core temp | ? (D3DKMT probe, Win 11 only — see below) | untested | untested |
| Power | ? (D3DKMT probe) | untested | untested |
+80 -25
View File
@@ -217,8 +217,10 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> `NtQuerySystemInformation` is a documented-as-unsupported API and its
> `RTL_PROCESS_MODULE_INFORMATION` layout is version-sensitive; the struct
> offsets must be asserted, not assumed. Treat a parse failure as *refuse*,
> never as *clean*. `20_OPEN_QUESTIONS` §S7 tracks the remaining work.
3. **Rules blocklist** — `detection-rules.json` carries `anticheat.blockedExecutables` (exe names) and `anticheat.blockedStoreIds` (Steam appids etc.) for known competitive/online titles, updatable independently of app releases (`05_DETECTION` §Rules updates).
> never as *clean*. ~~`20_OPEN_QUESTIONS` §S7 tracks the remaining work.~~ *(Corrected 2026-10-04: done —
> `fl_guard_sources.cpp` asserts the layout and refuses a parse that yields non-native paths; §S7, closed, is about
> handle rights and WOW64.)*
3. **Rules blocklist** — `detection-rules.json` carries `anticheat.blockedExecutables` (exe names) and `anticheat.blockedStoreIds` (Steam appids etc.) for known competitive/online titles, ~~updatable independently of app releases (`05_DETECTION` §Rules updates)~~ shipped with each release; there is no rules-update path yet *(corrected 2026-10-04: `20_OPEN_QUESTIONS` §S20 feed half; `05_DETECTION` §Trust and staleness of the rules feed)*.
> **Both halves are wired and seeded since 2026-09-25** (owner: "as many and as strict as possible"; rules
> `2026.09.4`). The block below is the history it replaces, kept for the reasoning.
@@ -235,12 +237,20 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> be read (a manifest that will not open, more than 4096 of them, a listing error) refuses as `PreScanFailed`. With
> nothing listed, nothing is read. Epic has no reader: an Epic install carries no identity to this check.
>
> **What is listed, and why a title list at all:** 30 Steam app ids and 33 executable names across nine families —
> **What is listed, and why a title list at all:** 33 Steam app ids and 33 executable names across ten families —
> Valve VAC (CS2, Dota 2, TF2, Deadlock and Valve's older VAC titles), Riot Vanguard, Roblox Hyperion, Blizzard's
> online titles ("Blizzard Warden"), Call of Duty (Activision Ricochet), NetEase (Marvel Rivals, NARAKA, FragPunk,
> Once Human), ACE (Delta Force, Arena Breakout: Infinite), HoYoverse and EA (Battlefield 2042/6, EA SPORTS FC 25/26).
> Once Human), ACE (Delta Force, Arena Breakout: Infinite), HoYoverse and EA (Battlefield 2042/6, EA SPORTS FC 25/26),
> and since 2026-10-03 (rules `2026.10.1`, owner's list) HyperTech's **CrackProof** (Umamusume: Pretty Derby
> `3224770`, Heaven Burns Red `1973710`, Madoka Magica Magia Exedra `2987800` — Steam ids only: no executable name
> was verified, and a guessed one is a false refusal waiting for an unrelated game).
> These are the titles whose anti-cheat leaves nothing of the game's own for checks 1, 2 and 4 to find — VAC runs
> inside Steam, Blizzard's scanner is built into the game — or whose kernel driver loads only after the checks run.
> CrackProof is the second kind: a Proton log of Umamusume shows its driver loaded from `C:\Windows\System32` under a
> numbered name (`usrdrv017864.sys`, ValveSoftware/Proton#8853), outside the game's folder, so the `.sys` rule cannot
> see it before the first run and no driver token could name it. Each of the three store pages states *"Uses Kernel
> Level Anti-Cheat"* and CrackProof (read 2026-10-03); ANOTHER EDEN, which a community list also names, was left out
> because its store page says nothing of the kind.
> Every app id was checked against its Steam store page; Call of Duty's changed when Activision split CoD HQ, so only
> ids with a live store page are listed. The per-title lists are **floored** like the families: a rules file can
> add a title and cannot take one off. `rules-validate` refuses a name engines and tools share (`Game.exe`,
@@ -308,7 +318,7 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> nothing produced either.
>
> **It runs inside the chokepoint**, as the last of the four checks in
> `EvaluateImpl`. `FlStaticPreScan` also exports it for FR-2.2's pre-launch
> `EvaluateImpl`. ~~`FlStaticPreScan`~~ `FlStaticPreScanGame` (since 2026-09-25 — corrected 2026-10-04) also exports it for FR-2.2's pre-launch
> question, but that export is **advisory**: it gates nothing, and a caller who
> never asks it — or ignores the answer — changes nothing about what injection
> allows.
@@ -317,9 +327,11 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> could. Since 2026-08-04 `FrameLedger.Guard.dll` ships beside the **Agent
> only** (`FrameLedger.Guard.targets`, §S18 blocker 3), so `FrameLedger.App`
> has no `FlStaticPreScan` call site and no DLL to load. FR-2.2's advisory
> answer reaches the UI through the Agent over IPC (`07_IPC`) when that exists.
> answer reaches the UI through the Agent over IPC (`07_IPC`) ~~when that exists.
> Recorded rather than quietly reworded: an advisory export with no consumer is
> a claim about the product that is not true yet.
> a claim about the product that is not true yet.~~ *(corrected 2026-10-04: it does — the Agent's
> `SetHookEnabled` answer carries it since P3, `HookEnabledAck.Prescan`, and the library sweep's
> `hook_prescan_state` since beta.8 is shown on the game's page)*.
>
> **Which directory.** The **install root**, resolved by walking up from the
> executable to a known platform boundary (`steamapps\common\<X>` and
@@ -343,7 +355,8 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> **What it does not cover.** Beyond the above, the residual is an anti-cheat
> SDK sitting on disk whose service is not installed and whose module is not
> loaded; checks 1, 2 and 2b already cover the rest. And today the `directories` + `files`
> groups carry only three tokens between them, so "check 4 ran" is a much
> groups carry ~~only three tokens~~ 67 tokens between them since 2026-09-25, plus any `.sys` by code *(corrected
> 2026-10-04; documented names, not measured ones)*, so "check 4 ran" is a much
> narrower statement than "this game ships no anti-cheat". Widening it needs
> **verified** file and directory names — the seed table below deliberately
> carries "no data yet" rows rather than guesses, because a wrong token fails
@@ -475,24 +488,36 @@ unmeasured rule — NetEase Yidun, `AntiCheatFile NEP2.dll` — after FrameLedge
normal Tier-1 sessions in the owner's ledger, 474,143 frames). The owner asked for a way to keep measuring a game like
that, and chose, against the rule this document had kept since 2026-09-22 and with that rule quoted back to them, **an
exception the user grants per game, bound to evidence, and only for anti-cheat that is user-mode throughout.** The
reasons D22 withdrew the override are answered one by one: it "did nothing where it was wanted" — an exception is only
offered where FrameLedger has already measured the game hooked; it "only exposed the user to the risk its own disclosure
described" — that risk stands, and the disclosure says so, including that a ban can arrive days later and that FrameLedger
cannot know.
reasons D22 withdrew the override are answered one by one: it "did nothing where it was wanted" — ~~an exception is only
offered where FrameLedger has already measured the game hooked~~ *(D38 below: the measurement now comes under the grant,
as its trial)*; it "only exposed the user to the risk its own disclosure described" — that risk stands, and the disclosure
says so, including that a ban can arrive days later and that FrameLedger cannot know.
> **Amended 2026-10-03 (owner decision D38): the evidence comes after the grant, as a trial.** The owner deleted their
> ledger and found *GIRLS' FRONTLINE 2* "Not eligible: 0 successful hooked session(s), two are needed" — for good. The rule
> below was a catch-22 for every game it could ever meet again: since beta.8 the library sweep blocks a game the moment
> it is added, a blocked game is never hooked without a grant (`CaptureSession` sends it to Tier 2 before the resolver),
> so it can never earn the two sessions, and a reset ledger loses the ones it had. D33's evidence was reachable only for a
> game measured before its block, and only while those rows lasted. Asked with that, the owner chose: **a grant needs no
> session; the first two hooked sessions under it are a trial; any of them that does not go well ends the exception for
> good** (`games.ac_exception_trial_failed_at`, schema 0017, which nothing clears). Every other condition is unchanged.
**What may be excepted — all of it must hold:**
- every finding about the game is `BlockedModule`, `AntiCheatFile` or `AntiCheatDirectory` of **one** family;
- that family's whole footprint is user-mode — no `drivers` entry, no `services` entry and no `*.sys` among its `files`, in
the compiled floor or the rules file (`fl::guard::FamilyIsUserModeOnly`). The floor cannot be shrunk, so data can make a
family kernel-level and never the reverse. On today's data that leaves NetEase Yidun, AhnLab HackShield, Anybrain and
FredaikisAntiCheat; Easy Anti-Cheat, BattlEye, ACE, NetEase Anti-Cheat, mihoyo protect, Vanguard, Ricochet and every
family kernel-level and never the reverse. On today's data that leaves NetEase Yidun, AhnLab HackShield, Anybrain,
FredaikisAntiCheat and Roblox Hyperion *(Hyperion added 2026-10-04: its rows are one module and one file; its only title
is on the executable list, so it is never excepted in practice)*; Easy Anti-Cheat, BattlEye, ACE, NetEase Anti-Cheat, mihoyo protect, Vanguard, Ricochet and every
other family carry a driver or a service and are never excepted;
- no `*.sys` anywhere in the install tree — the kernel-driver rule (D30) is never excepted, whichever family a driver
belongs to (so *Aniimo*, which unpacks `NEPKernel.sys` beside `NEP2.dll` on its first run, stays blocked);
- the game is on no title list (`BlockedExecutable`, `BlockedStoreId` — the notorious titles are there by design);
- the ledger holds **at least two successful Tier-1 sessions** of the game: hooked, frames recorded, `exit_status = normal`
(which since beta.8 includes End task's exit code 1 and a user's stop), never crashed, never unhooked for safety.
- ~~the ledger holds **at least two successful Tier-1 sessions** of the game: hooked, frames recorded, `exit_status = normal`
(which since beta.8 includes End task's exit code 1 and a user's stop), never crashed, never unhooked for safety.~~
**Since D38 (2026-10-03): no session is needed** — and no exception of the game has ever ended during its trial
(`ac_exception_trial_failed_at` is NULL).
**Never excepted, whatever the user ticked:** a machine-wide `BlockedDriver` or `BlockedService`, the fuzzy tier
(`SuspiciousUnsigned`), a scan that could not look or finish, unusable rules, `TargetUnreadable` (D21), a 32-bit target,
@@ -517,6 +542,20 @@ in-process floor stop revokes it; an executable change ends it with the consent
the option off suspends every exception. **The block itself is never cleared** — the exception is a separate layer over
it, and the finding stays on the game's page (FR-2.2).
**The trial (D38).** Until two sessions under a grant have succeeded — hooked, stored, frames recorded, `normal`
(`ISessionRepository.CountSuccessfulUnderGrantAsync`: under that family, started at or after the grant) — the grant is in
its trial, and the App says so ("trial: 1 of 2"). During the trial **any** end of the list above ends the exception
**for good**, and so does a stored hooked session that recorded no frame or did not end normally
(`UserModeExceptionLapse.TrialFailed`, decided by `UserModeExceptionLapsePolicy` when the recorder stores the row): the
end is recorded with its own reason and `ac_exception_trial_failed_at` is set. While it is set the sweep writes the game
not eligible, the Agent refuses a grant (`Refused.reason = TrialFailed`, the signal is when) and the store refuses one in
SQL; withdrawing, a game update, *Change executable* and a twin merge all keep it. A session too short to be stored, or
one that was never hooked, is not judged by its frames or its exit — it neither counts toward the two nor fails the
trial that way — but an end of the list above still ends the exception for good during the trial: a crash while
hooked, however short, or a finding about the game at the start. After the trial, an end is what it was under
D33: the exception may be made again once the sweep finds the game eligible. Deleting sessions can only lengthen a trial
— the count is read, never stored as a grant's own fact.
**What it is not.** Not a bypass of a live refusal, not a global switch (a Settings option off by default enables the list,
and the user ticks each game), not reachable from the command line, and not evasion: the DLL stays `LoadLibraryW`-loaded,
named and visible (rule 3). `InjectViaLoadLibrary` still has internal linkage in `fl_guard.cpp`; `tools/chokepoint-check.ps1`
@@ -531,6 +570,13 @@ option and the list in Settings, the versioned disclosure (`Safety_Exception_*`,
game page's exception card and its usable switch under an exception in force, the marks, and the legal text
(Disclaimer §2A 2.7, EULA 1.3, the accuracy block, SECURITY.md) — `08_UI` §Games.*
*D38 in beta.11 (2026-10-03): `UserModeExceptionRules.TrialSessions` replaces `RequiredSessions`; eligibility is the
guard's answer and the trial mark; `ac_exception_sessions` is the trial's progress; schema 0017
(`ac_exception_trial_failed_at`); `Refused.reason` `TrialFailed` replaces `TooFewSessions`; the disclosure is
`ac-exception-dialog/2` (its `Why` names no count, a new `Trial` paragraph); the Settings list shows only games it can act
on; and a sweep that cannot read the executable answers "could not verify" instead of leaving the row "checking" for ever.
Legal text: Disclaimer §2A 2.9, EULA 1.4, the accuracy block, SECURITY.md, LIMITATIONS.md.*
### The floor data cannot remove
@@ -681,10 +727,12 @@ normative documentation. Write tokens here exactly as the data must hold them.
| Activision Ricochet | `files` | name | `randgrid.sys` | 2026-09-25 |
| FredaikisAntiCheat | `directories` | name | `FredaikisAntiCheat` | 2026-09-25 |
| **Valve VAC** | — | — | ~~**No data yet** — needs `blockedStoreIds`, whose half of check 3 **cannot be called**~~ **Per-title lists since 2026-09-25** (check 3): 13 Steam app ids and 8 executables, the store half wired. VAC runs inside Steam, so no module, driver or file of the game's own can name it — this row stays a dash on purpose. (**Measured 2026-08-04: a real VAC title returned `Allow`**, `spike-notes.md` §13 — the gap these lists close.) | 2026-09-25 |
| **CrackProof** | — | — | **Per-title list since 2026-10-03** (check 3, rules `2026.10.1`): 3 Steam app ids, no executables. Its kernel driver loads from `System32` under a numbered name, so no module, driver or file of the game's own can name it — this row stays a dash on purpose, like VAC's. | 2026-10-03 |
The "no data yet" rows are deliberately kept rather than deleted. An admitted
gap is reviewable; a deleted row is invisible. ~~Activision Ricochet's was one of them~~ — it has data since
2026-09-25 (below); VAC's stays until its per-title route exists.
2026-09-25 (~~below~~ above); ~~VAC's stays until its per-title route exists~~ VAC's became per-title lists the same day,
13 Steam ids and 8 executables *(corrected 2026-10-04)*.
> **Expanded 2026-09-25 (owner: "as many anti-cheats and as strict as possible").** Eleven families became
> twenty-two and 19 entries became 74: EA AntiCheat, Activision Ricochet, NetEase Anti-Cheat, NetEase Yidun, Nexon
@@ -731,7 +779,7 @@ gap is reviewable; a deleted row is invisible. ~~Activision Ricochet's was one o
> *every* title, which is how a user ends up hunting for the override that
> CLAUDE.md rule 2 says does not exist.
The list is data, versioned in `detection-rules.json`, expandable without a release. Unknown-but-suspicious modules (filename containing one of the `nameFragments` — today `anticheat`, `antitamper`, `guard`, `protect` — plus unsigned-by-known-vendor) produce a **warn-and-refuse** with a "report this to us" link rather than silently allowing.
The list is data, versioned in `detection-rules.json`, expandable without ~~a release~~ a code change, still delivered by a release (§S20 feed half — corrected 2026-10-04). Unknown-but-suspicious modules (filename containing one of the `nameFragments` — today `anticheat`, `antitamper`, `guard`, `protect` — plus unsigned-by-known-vendor) produce a **warn-and-refuse** with a "report this to us" link rather than silently allowing.
> **Three corrections to that sentence, all recorded in §S19; one is now closed.**
> It listed four fragments while the data carried five (`gameguard` was missing
@@ -856,7 +904,7 @@ injected or layered**.
> stop). Modules loaded **before** the Overlay attached are the pre-injection scan's, as always. The
> detour supplements the poll; it replaces nothing (§S6's own ruling).
> **This sentence used to say the hook "already exists and is currently unused", which was false.** Corrected 2026-08-04: the Overlay installs no hooks at all — `dllmain.cpp` exports one function and nothing in the tree calls `MH_CreateHook` outside a probe. §S6 is therefore downstream of the whole P1 hook layer, not "the cheapest available improvement to the most important behavior in the product". A reader planning work off this paragraph was being told a mechanism was sitting there ready.
> **This sentence used to say the hook "already exists and is currently unused", which was false.** Corrected 2026-08-04: the Overlay installs no hooks at all — `dllmain.cpp` exports one function and nothing in the tree calls `MH_CreateHook` outside a probe. *(Overtaken 2026-09-06: P1 installed the hooks and the `LoadLibraryExW` detour above; the Overlay exports four functions. Marked 2026-10-04.)* §S6 is therefore downstream of the whole P1 hook layer, not "the cheapest available improvement to the most important behavior in the product". A reader planning work off this paragraph was being told a mechanism was sitting there ready.
### Elevated / protected targets
@@ -945,7 +993,12 @@ Consent is stored per game (`games.hook_consent_at`), **stamped by the Agent, ne
> publishing `unhookRequested`, and keeps the Vulkan layer off by never setting `FRAMELEDGER_ENABLE_VK_LAYER`
> on a launch.
The default for every newly added game is **hooking off — Tier 2**. Nothing is ever injected because the user merely added a game — and since 2026-09-22 nothing is *opened* either: a hooking-off row's Tier-2 session is held by ~~the executable's name~~ the executable's image path in the watcher's own snapshot (2026-09-23), with no `OpenProcess`, no resolver and no gate (`04_CAPTURE` §Tier selection).
The default for every newly added game is **hooking off — Tier 2**. Nothing is ever injected because the user merely added a game — and since 2026-09-22 nothing is *opened* either: a hooking-off row's Tier-2 session is held by ~~the executable's name~~ the executable's image path in the watcher's own snapshot (2026-09-23), with no `OpenProcess`, no resolver and no gate (`04_CAPTURE` §Tier selection). *(Corrected 2026-10-03, beta.12, owner
decision D43: such a hold now reads the game process's own memory once a second — its video memory from performance
counters that open nothing, its system memory through a handle opened with `PROCESS_QUERY_LIMITED_INFORMATION` for the
read and closed after it, the same least right the watcher's snapshot already opens every process with, each second. No
handle is held, nothing is injected, the guard is not involved, and what is read is the kernel's accounting about the
process, never its memory — rule 4 is untouched. A process that refuses even that right reads N/A.)*
### A moved drive is the same executable — owner ask 2026-09-22
@@ -1011,20 +1064,22 @@ game's executable** (path, size or mtime). If it now matches:
§games), so this needs no schema change, and a non-null value already means
"toggle disabled in the UI".
3. `hook_consent_at` is **preserved**. The user did consent; the block is not a
withdrawal of consent and must not silently require them to consent again if
the title is later cleared.
withdrawal of consent and must not silently require them to consent again ~~if
the title is later cleared~~ *(corrected 2026-10-04: nothing clears a block since D22; the stamp is kept for the
record and for a D33 exception)*.
4. The UI shows a persistent notice, not a transient toast — the user needs to
understand why a game they enabled stopped being captured at Tier 1.
A rules update that *removes* a match does **not** re-enable hooking on its own.
A rules update that *removes* a match does **not** re-enable hooking ~~on its own.
Turning it back on is a user action, because re-enabling silently would mean the
rules feed can switch injection on for a game without anyone looking.
rules feed can switch injection on for a game without anyone looking.~~ — nothing does *(corrected 2026-10-04: the block
outlives a rules change, a game update and *Change executable*; §What a finding does to the game)*.
## Crash & stability safety
- Two crashes of the same game within 60 s of injection ⇒ hooking auto-disabled for that game, UI explains, Tier-2 takes over. Recorded in `games.hook_autodisabled_reason`. *"Crash" here is any abnormal end: since beta.8 a session whose exit code is not an exception's (End task's 1) is `normal` on its row, and this policy still counts it inside the window — a hang our hook caused, ended by the user, is the case it exists for. The row's reason says "ended abnormally twice within 60 s of injection" (`04_CAPTURE` §Crash & exit classification).*
- The Overlay DLL self-disables after 3 faults in hook bodies (`17_HOOK_ENGINE` §Fault policy) and reports it.
- Every hooked session writes a breadcrumb file before injection; if the game process dies before the first frame record arrives, the next run is recorded as suspect.
- Every hooked session writes a breadcrumb file before injection~~; if the game process dies before the first frame record arrives, the next run is recorded as suspect~~ *(corrected 2026-10-04: no "suspect" mark exists; the breadcrumb is the `.partial` file, and an early death counts toward the two-within-60-s auto-disable above)*.
> **"Cautious mode" is deferred to v1.1 (`20_OPEN_QUESTIONS` §S12).** It was
> described as "hooks installed, overlay drawing disabled" — but **v1 draws no
+37 -24
View File
@@ -45,7 +45,9 @@ Rules for this document:
> library sweep blocked a game FrameLedger had measured hooked (GIRLS' FRONTLINE 2: EXILIUM, NetEase Yidun `NEP2.dll`),
> and the owner chose an evidence-bound, per-game exception for anti-cheat that is user-mode throughout (`19_SAFETY`
> §The user-mode exception; CLAUDE.md rule 2's amendment). The two reasons D22 gave are answered: it is offered only
> where FrameLedger has already measured the game hooked, and its risk is stated in its own disclosure. **What stays
> where FrameLedger has already measured the game hooked, and its risk is stated in its own disclosure. *(2026-10-03,
> D38: the first of the two no longer holds as written — a game blocked at add time could never be measured, so the
> measurement moved under the grant as a two-session trial whose failure is for good.)* **What stays
> open, and is the owner's:** the `ja` text of `Safety_Exception_*`, which ships as English until a reviewer signs;
> whether a family the rules file makes kernel-level later should end existing exceptions at once (today it does, at
> the sweep's next pass and at every session start); and a real-hardware check that NEP2.dll's load time relative to
@@ -56,7 +58,7 @@ Rules for this document:
| — | **D3D9 is not a Tier-1 API in v1.** The Overlay is x64-only; an x64 DLL cannot load into a 32-bit process, and D3D9 titles are almost entirely 32-bit | **The consequence hardened on 2026-08-28 without a word of this row changing**, which is why it is called out: that catalogue used to be "Tier 2", meaning frame times without injection. Tier 2 now measures nothing, so those titles are **unmeasurable in v1**. The VN / JRPG / older-indie catalogue is Tier 2. Reversing this means a second 32-bit Overlay **and** injector, doubling the native build matrix and adding a second struct-mirror surface. Revisit only with evidence that users care more about those titles than about the maintenance cost |
| — | **`ci.yml` is repo-local**, not a caller stub | The ops repo's `reusable-desktop-csharp.yml` runs `dotnet` directly with no native pre-step input, and `12_BUILD` requires CI and local to run the same script |
| — | **No `v1 → v2` migration** | Nothing shipped, so no such database exists. `0001_init.sql` creates the current schema |
| — | ~~**Multi-process titles are refused as `TargetAmbiguous` in v1**~~ — **the Chromium case is RESOLVED the same day (2026-09-03), by the vendor's own label** | Chromium-based runtimes — NW.js, Electron, RPG Maker MV/MZ, a large share of the VN catalogue — run several processes from ONE image path (browser, renderer, GPU), and *Flower in Us* refused as `TargetAmbiguous`. The presenting process is Chromium's GPU process, which owns no window, so "the one with the window" and "the parent" were both wrong picks. **What resolves it:** Chromium marks that process with `--type=gpu-process` on its own command line. `TargetResolver` now reads each candidate's command line through `NtQueryInformationProcess(ProcessCommandLineInformation)` — **served by the kernel, no `ReadProcessMemory`, no PEB walk, `PROCESS_QUERY_LIMITED_INFORMATION` only**, which is the rule-4 line `HeldProcessHandle` already draws — and resolves only when **exactly one** readable candidate carries the flag as a whole argument. Two GPU processes (two instances), none, or any unreadable candidate still refuse. §S27 is untouched: consent is keyed on the path, every candidate is that path, the guard scans the pid chosen, and `--pid` stays forbidden. **Measured the same evening, and the first rule did not fire:** *Flower in Us* runs **six** processes — browser, `crashpad-handler`, three `utility`, `renderer` — and **no `--type=gpu-process` at all**. NW.js runs the GPU **in-process, in the browser**, which is the one process Chromium leaves untyped. Second rule added: exactly one untyped candidate, every other candidate typed, no GPU process ⇒ the browser is the target; two untyped candidates are two instances and refuse. The refusal line now prints the tree (`browser=1, renderer=1, utility=3, …`) so the next unknown shape is data rather than a bare `TargetAmbiguous`. **Still unmeasured:** whether the Overlay loads and sees presents inside that browser process |
| — | ~~**Multi-process titles are refused as `TargetAmbiguous` in v1**~~ — **the Chromium case is RESOLVED the same day (2026-09-03), by the vendor's own label** | Chromium-based runtimes — NW.js, Electron, RPG Maker MV/MZ, a large share of the VN catalogue — run several processes from ONE image path (browser, renderer, GPU), and *Flower in Us* refused as `TargetAmbiguous`. The presenting process is Chromium's GPU process, which owns no window, so "the one with the window" and "the parent" were both wrong picks. **What resolves it:** Chromium marks that process with `--type=gpu-process` on its own command line. `TargetResolver` now reads each candidate's command line through `NtQueryInformationProcess(ProcessCommandLineInformation)` — **served by the kernel, no `ReadProcessMemory`, no PEB walk, `PROCESS_QUERY_LIMITED_INFORMATION` only**, which is the rule-4 line `HeldProcessHandle` already draws — and resolves only when **exactly one** readable candidate carries the flag as a whole argument. Two GPU processes (two instances), none, or any unreadable candidate still refuse. §S27 is untouched: consent is keyed on the path, every candidate is that path, the guard scans the pid chosen, and `--pid` stays forbidden. **Measured the same evening, and the first rule did not fire:** *Flower in Us* runs **six** processes — browser, `crashpad-handler`, three `utility`, `renderer` — and **no `--type=gpu-process` at all**. NW.js runs the GPU **in-process, in the browser**, which is the one process Chromium leaves untyped. Second rule added: exactly one untyped candidate, every other candidate typed, no GPU process ⇒ the browser is the target; two untyped candidates are two instances and refuse. The refusal line now prints the tree (`browser=1, renderer=1, utility=3, …`) so the next unknown shape is data rather than a bare `TargetAmbiguous`. ~~**Still unmeasured:**~~ **Measured 2026-09-04** (`spike-notes` §9, run 3): the Overlay loads and sees presents inside that browser process — Flower in Us resolved, injected, captured, 3,587 records over three swap chains *(corrected 2026-10-04)* |
| — | **Intel XeSS / XeFG identity is closed at the census — no hook on any `libxess*.dll` export** (decided 2026-09-04, delegated by the owner) | The XeSS SDK failed `18_GPU_VENDOR_APIS` §Checklist (Intel Simplified Software License: binary-only grant, no reverse engineering, termination; headers forbid copying), so no declaration may be vendored or re-declared. The signature-free counter that seemed to survive that — an assembly thunk on a named export — still inline-patches Intel's code inside the game process, which the same licence forbids as *modification*; it would also be the only entry outside `FL_HOOK_GUARD` and a second build language, for identity alone. An Intel title therefore reports upscaler `NOT_REPORTED` and, with `libxess_fg.dll` in the census, Presented FPS under rule 6's *"MAY include generated frames"* qualifier — honest, and the same answer NGX-direct got. **Reversal condition:** Intel relicenses the headers so the checklist clears; then §H11's AMD route applies to Intel verbatim |
| — | **A title whose upscaler or frame generation is compiled into its executable is Presented FPS + the census's qualifier, in attach mode, and that is the ceiling for IDENTITY** (recorded 2026-09-04; **two such titles found the same night — Rune Factory, and Black Myth: Wukong for its upscaling, which ships and loads the 1.1.x monolith and never dispatches to it**) | No module for the census, no export for the inventory: nothing by name. What survives static linking is behaviour on interfaces we hook — the FSR3 frame-generation proxy swapchain at *creation* (launch mode only, §S1 deferred) and queue-side cadence with no vendor name on it. ~~**No installed title has this shape**~~ — **Rune Factory: Guardians of Azuma has it**: `amd_fidelityfx_dx12.dll` ships beside the executable and is never loaded (the census has no AMD module), FSR frame generation is on, and the report read `59.99 → 119.95 (×2 FG)`, *technology not identified* — because on a UE5 title **Streamline's frame token is requested whether or not NVIDIA's features are the ones running**, so the application-frame COUNT survives static linking even though the identity cannot. The ceiling is therefore lower than this row first said: the trio with an unidentified technology, not Presented FPS alone (§H11's run table). Identity for such a title stays out of reach by name |
| — | ~~**Tier 2 requires an elevated Agent**~~ | **CLOSED 2026-08-28 by the two-rung ladder.** The requirement came from Windows restricting ETW trace sessions; there is no ETW rung, so **no capture tier needs elevation**. Elevation is optional everywhere and buys exactly two things (CPU temperatures via PawnIO, attaching to elevated targets — ADR-9). An unelevated Agent whose Tier-1 attempt fails lands on Tier 2, which is what every unhooked session lands on regardless of privilege |
@@ -99,22 +101,22 @@ or it becomes the next stale status claim this file exists to record.
| S3, S5, S7, S8, S9, S10, S11, S15, S16, S17, S18, S21, S22 | ✅ **resolved** | Thirteen. Reasoning kept in place rather than deleted |
| **S25, S26** | ✅ **resolved 2026-08-05** | The two runtime stops unreachable in a non-presenting process; occlusion probes recorded as frames |
| **S28** | ✅ **resolved 2026-08-05** | The guard's entry points share process-wide statics; a concurrent call cleared the blocklist mid-match and every check fell through to `Allow`. Reproduced by CI, not argued |
| **S27** | ✅ **resolved, and restated 2026-08-06** | The chokepoint is the anti-cheat gate, not the consent gate. It was closed by *not building* a capture host; item 1 built one, and the ✅ survives on the clause that was always load-bearing — **no injecting entry point on any SHIPPED binary**. `FrameLedger.CaptureHost` is unpublished, and `tools/package-closure-check.ps1` makes that a gate rather than a fact about today's csproj. `HookRequest` is get-only behind one factory, so this entry's own rejected synthesis no longer compiles |
| **S27** | ✅ **resolved, and restated 2026-08-06** | The chokepoint is the anti-cheat gate, not the consent gate. It was closed by *not building* a capture host; item 1 built one, and ~~the ✅ survives on the clause that was always load-bearing — **no injecting entry point on any SHIPPED binary**. `FrameLedger.CaptureHost` is unpublished, and `tools/package-closure-check.ps1` makes that a gate rather than a fact about today's csproj.~~ *(Corrected 2026-10-04: ✅ restated 2026-09-10 in the entry below — the shipped Agent injects by design, and the four properties in the entry hold rule 1; `package-closure-check` keeps its meaning for the CaptureHost only.)* `HookRequest` is get-only behind one factory, so this entry's own rejected synthesis no longer compiles |
| S12 | 🅓 **deferred, rationale written** | Cautious mode → v1.1; it disabled nothing in v1. *(Marked ✅ until 2026-08-27 — same disposition, different glyph.)* |
| **S1** | ◐ **launch mode built as "inject late" 2026-09-06 (P1 item 2); the cost is now measured per title** | `FlGuardedInjectWhenReady` polls until a presentation runtime is mapped, then runs the full guard; `dxgiPresentsBeforeHook` and the reported wait are the input the 2026-08-05 deferral lacked. The ruling "inject late vs. no launch mode" is answered by construction — inject late exists — and whether it is *preferred* per title is what the numbers decide |
| **S13(c)** | ✅ **salvageable, and salvaged 2026-09-06** | The externally observable proxy the entry proposed is what was built; the missing input is produced by every launched session |
| **S19(b)** | 🅓 **deferred, rationale written — and MEASURED** | CI 2026-08-05: the fragment fires on `System.Security.Cryptography.ProtectedData.dll` loaded by a .NET **test host**, i.e. inside a real scan set in the launch-mode arrangement — refusing our own injection. The entry's "plausible and unmeasured" is superseded; the deferral rationale (a `CryptCATAdmin*` PR doing network I/O inside the hard gate, NFR-10) still stands. *(Marked 🔴 until 2026-08-27. The measurement belongs in this cell, not in the marker — a glyph that means "deferred" and a glyph that means "open defect" cannot be the same one in a table audited by counting.)* |
| **S14** | ✅ **both halves wired and seeded 2026-09-25** (exe half 2026-08-05) | ~~The store-id half's only in-policy route is P4's platform metadata extractors feeding a guard-side resolver~~ — built as a guard-side seam that reads Steam's `appmanifest_*.acf` and GOG's `goggame-<id>.info` itself; an install no store names is not refused, unreadable store metadata is. 30 Steam ids and 33 executables listed (rules 2026.09.4), floored. Epic has no reader |
| **S14** | ✅ **both halves wired and seeded 2026-09-25** (exe half 2026-08-05) | ~~The store-id half's only in-policy route is P4's platform metadata extractors feeding a guard-side resolver~~ — built as a guard-side seam that reads Steam's `appmanifest_*.acf` and GOG's `goggame-<id>.info` itself; an install no store names is not refused, unreadable store metadata is. 30 Steam ids and 33 executables listed (rules 2026.09.4), floored; 33 Steam ids since 2026-10-03 (rules 2026.10.1: three CrackProof titles, `19_SAFETY` check 3). Epic has no reader |
| **S23-1** | ✅ **resolved 2026-08-05** | `FlGuardBuildId` gives the Agent a build id of its own, and `ShmHandshakeValidator` performs the comparison `07_IPC` and `04_CAPTURE` both specify. Every refusal path is driven, including **both ids empty** — the shape the feature shipped in, where `"" == ""` reported `Ok` for every process on the machine |
| **S23-4** | ✅ **resolved 2026-08-05** | `19_SAFETY` §During a session said "the module scan and the driver scan"; `EvaluateImpl` runs four. Reworded to "every pre-injection check" so it cannot go stale when a check is added, with the two omissions named — `services` is the only tier measured firing on real anti-cheat, and the pre-scan is the only one touching the filesystem |
| **S2 part three** | ✅ **built 2026-09-06 (P1 item 3)** | In-layer supervision on the present path, landed with `vkQueuePresentKHR`; `unhookRequested` and the tick deadline both stop the layer (passthrough with the reason on the mapping), proven by a fake loader chain and a 1.5 s test-only flavour of the DLL |
| **S4 signing** | 🅓 **deferred to P4, rationale written 2026-09-06** | Signing is a property of the feed and there is no feed (§S20); every rules file today shipped inside a release whose checksum attests it. The P4 decision (compiled-in key, detached signature, fail-closed) is written in the entry |
| **S4 signing** | 🅓 **deferred ~~to P4~~, unscheduled — P4 closed without it (corrected 2026-10-04); rationale written 2026-09-06** | Signing is a property of the feed and there is no feed (§S20); every rules file today shipped inside a release whose checksum attests it. The P4 decision (compiled-in key, detached signature, fail-closed) is written in the entry |
| **S6** | ✅ **built 2026-09-06 (P1 item 1)** | The detour on `kernelbase!LoadLibraryExW` stops the Overlay from inside on an exact-floor MODULE match, within one present or one watchdog iteration, and wakes the lazy installers within milliseconds for an inventoried module; measured against the real Overlay in ctest `fl_guard` `[loader]`/`[S6]`. Exact names only — fragment and signer stay the host's 30 s scan, so the disclosure does not change |
| **S19(a)** | ✅ **resolved 2026-08-05** | `gameguard` could never fire — `guard` subsumed it. Removed; `rules-validate` now fails when any fragment contains another, so the class cannot return. Zero coverage lost: nProtect has its own named module family |
| **S19(c)** | ✅ **resolved 2026-09-06** | The fields are constants the schema pins and the guard never reads, because the policy is code by CLAUDE.md rule 2 and `19_SAFETY`; `rules-validate` now proves the schema rejects `action: "allow"` and `signerField: "CN"` (canary 3), so the data cannot say otherwise |
| **S19(d) residual** | ✅ **resolved 2026-08-05** | A second canary, **derived from the shipped document** rather than hand-written, carries `nameFragments: []` and must be rejected. The entry's stated consequence was overstated and is corrected in place: the generated floor would not have disappeared, `gen-ac-floor.ps1` hard-errors and the native build fails — what was unguarded is the *schema* half |
| **S20 feed half** | 🅓 **deferred to P4, rationale written 2026-09-06** | **FR-7.3 stays unmet and written as unmet**: the fetch needs a shipped Agent, §S4's signing and the privacy policy's rows, all P4; until then a rules edit ships with the next release, checksum-attested |
| **S23-3** | 🅓 **deferred to P3, rationale written 2026-09-06** | `08_UI`'s refusal notice is wrong in the commonest case; the requirement reaches `08_UI` and the `Safety_*` keys in the PR that creates the first refusal UI — a string with no view would read as done |
| **S20 feed half** | 🅓 **deferred ~~to P4~~, unscheduled — P4 closed without it (corrected 2026-10-04); rationale written 2026-09-06** | **FR-7.3 stays unmet and written as unmet**: the fetch needs a shipped Agent, §S4's signing and the privacy policy's rows, all P4; until then a rules edit ships with the next release, checksum-attested |
| **S23-3** | ~~🅓 **deferred to P3, rationale written 2026-09-06**~~ 🔴 **open: P3 shipped the refusal UI without it** *(corrected 2026-10-04: a machine-wide `BlockedService` / `BlockedDriver` notice still reads "… was detected in this game", `SafetyNotices.RefusalText`)* | `08_UI`'s refusal notice is wrong in the commonest case; the requirement reaches `08_UI` and the `Safety_*` keys in the PR that creates the first refusal UI — a string with no view would read as done |
| **S23-5** | ✅ **resolved 2026-08-05** | Closed the way §S23-4 closed the same class — by **removing** the restatement, not correcting it — and `rules-validate` now fails when any `$comment` enumerates checks again. The rule's own first version was scoped to the wrong object and could not fire; it now walks every `$comment` and fails if it finds none |
| **S23-6** | ✅ **closed 2026-09-06** | `license-check` binds `THIRD_PARTY_NOTICES` bidirectionally, and the accuracy blocks are now ONE text — `legal/ACCURACY.md`, embedded verbatim in `README.md` and `DISCLAIMER.md` §4, gated by `tools/accuracy-check.ps1` (self-tested both directions). Truth stays a human's job; drift between copies no longer is |
| **S23-2** | 🚫 **owner only — no PR can close it** | `Rules / validate` is **not** a required status check on `main`. **Re-verified against the live branch protection 2026-08-05**, not repeated from the entry: `required_status_checks.contexts` is exactly `["check", "analyze (csharp, none)", "analyze (cpp, manual)"]` (`strict: true`, `enforce_admins: true`, `required_linear_history: true`). The `validate` job is path-filtered and `pull_request`-only, so a red removal check does not block the merge button. **The gate that exists to make the anti-cheat blocklist un-removable is advisory.** This is a branch-protection setting |
@@ -1493,7 +1495,7 @@ there is no way to point the layer at a different rules file (§S3), so without
it the test silently skipped on any machine that had not run the product — and a
ctest that always skips is a gate that cannot fail.
### ◐ Part three: mid-session guard inside a layered process — decided, half built
### ~~◐~~ ✅ Part three: mid-session guard inside a layered process — decided, ~~half built~~ built 2026-09-06 (heading corrected 2026-10-04)
> #### ✅ Built 2026-09-06 (P1 item 3), in the PR that added the present hook — as the deferral below said it would be
>
@@ -1555,7 +1557,8 @@ the layer already has — every uncertainty resolves to inert.
> file and exits. What is built and tested is the *counting discipline*: the tick
> counts evaluations rather than seconds. What is not built is the supervision.
> A reader ticking this off as delivered would then find `07_IPC` §Supervision
> loss unimplementable, which is exactly what happened.
> loss unimplementable, which is exactly what happened. *(Overtaken in P2: `ShmRingReader` publishes the tick from
> `GuardSupervisor`, which `CaptureSession` runs on every Tier-1 session. Marked 2026-10-04.)*
**✅ The Agent half's counting discipline is built and proven.** `GuardSupervisor`
(`FrameLedger.Application`) computes what will become `guardTicks`, and the load-bearing property
@@ -2666,19 +2669,21 @@ disproved:
which used to claim a bump check that does not exist.
- **`trustedSigners` is the one allow-widening field a foreign file still
controls.** Deliberately not floored, because flooring an allowlist has the
wrong polarity. Inert today — `IsTrustedSigner` has no production call site
while §S19(b) is deferred — and **live the moment the signer half is wired**,
wrong polarity. ~~Inert today — `IsTrustedSigner` has no production call site
while §S19(b) is deferred — and~~ **live the moment the signer half is wired** *(corrected 2026-10-04: wired since
§S19(b), 2026-09-06, and bounded by `IsCompiledTrustedSigner`)*,
which makes gating it a prerequisite of §S19(b) rather than of this item.
- **This is what arms the Vulkan layer's self-scan for the first time.** `layer.cpp`
§S2's second half could only ever answer "inert" while the file never existed.
It is now reachable, on a machine where the file is present. The layer still
It is now reachable, on a machine where the file is present. ~~The layer still
intercepts nothing (`vkQueuePresentKHR` is P1), so nothing observable changes
yet — recorded here so it is not discovered as a surprise when the present hook
lands.
lands.~~ *(Corrected 2026-10-04: `vkQueuePresentKHR` is intercepted since 2026-09-06, §S2 part three.)*
- **A seed replacement is a rules update in FR-2.3's sense**, and the obligation
attached to that event — re-run the pre-scan, force-disable a game that has
started matching — is unimplemented. There is no `games` table yet, so there is
nothing to write; named here so whoever builds persistence has an anchor.
started matching — ~~is unimplemented. There is no `games` table yet, so there is
nothing to write; named here so whoever builds persistence has an anchor.~~ *(corrected 2026-10-04: built —
`UpdateRules` wakes `AntiCheatPreScanSweep`, beta.8, keyed per rules version by schema 0010.)*
### S21 ✅ · The hard gate's data source was caller-nameable, and its completeness floor never read the values — **closed**
@@ -3078,7 +3083,7 @@ required contexts are exactly `check`, `analyze (csharp, none)` and
the gate that exists to make the anti-cheat blocklist un-removable is advisory.
Fixing it is a branch-protection change, i.e. the owner's, not a code change.
**3. 🅓 Deferred to P3, rationale written 2026-09-06 — `08_UI` describes a refusal notice that is wrong in the commonest case.** *(The requirement below must reach `08_UI` and the `Safety_*` keys in the PR that creates the first refusal UI, and not before: there is no UI to be wrong in yet, and a `.resx` string with no view is the kind of fix that reads as done. The spike log carries the measurement; this line is the reminder.)* It
**3. ~~🅓 Deferred to P3, rationale written 2026-09-06~~ 🔴 Open — P3 built the refusal UI without it (corrected 2026-10-04: `SafetyNotices.RefusalText` formats every named refusal as "… was detected in this game", so the measured case below still reads wrong) — `08_UI` describes a refusal notice that is wrong in the commonest case.** *(The requirement below must reach `08_UI` and the `Safety_*` keys in the PR that creates the first refusal UI, and not before: there is no UI to be wrong in yet, and a `.resx` string with no view is the kind of fix that reads as done. The spike log carries the measurement; this line is the reminder.)* It
promises "the specific signal named in plain language". Measured (`spike-notes`
§13): while any Easy Anti-Cheat title is running, **every** target — including a
freshly spawned, unrelated process — refuses with `BlockedService` naming
@@ -3966,7 +3971,7 @@ make us miss the present.
Needs a real Streamline/DLSS-G title, ideally with RTSS and the Steam overlay
also active (`spike-notes.md` §Environment — that machine already has both).
### H6 · D3D12 command-list hooks count recorded, not executed, work
### H6 ✅ · D3D12 command-list hooks count recorded, not executed, work — **answered 2026-08-20 with the RT hooks** *(marked 2026-10-04: per-present atomics drained once per present; the unit is "recorded between two presents", `03_METRICS` §RT)*
`DispatchRays`, `BuildRaytracingAccelerationStructure` and pipeline creation are
recorded into command lists, possibly on many threads, possibly re-executed or
@@ -4275,6 +4280,11 @@ this item defers, and whether generated presents reach our vtable is what §H5 t
### H10 · Per-process VRAM thread inside the game process
🅓 **The usage half is answered from outside the game — 2026-10-03 (beta.12, owner decision D43); the budget half is
deferred with §M11.** The game's dedicated and shared GPU memory are read by the Agent from the `GPU Process Memory`
counters (`18_GPU_VENDOR_APIS` §The game process's memory), so no thread and no DXGI call is added inside the game for
them. What only an in-process call could give is the budget, and nothing reads it. *(The question as it stood:)*
`17_HOOK_ENGINE` §Memory calls `QueryVideoMemoryInfo` "once per second from our
own thread". Spawning a thread inside a host process we do not own is a heavier
footprint than the rest of the design's posture, and DXGI calls off the render
@@ -4298,10 +4308,11 @@ instead, which needs no thread at all.
| M2 ✅ | ~~Does the pinned console binary still exist, run unelevated, and emit the 2.x column set?~~ | **Answered, then closed 2026-08-27.** It exists (2.5.1, 956,768 bytes, SHA256 `9BEC…A191`, **no VERSIONINFO at all**); it does **not** run unelevated (exit 6 — the account is in neither Administrators nor Performance Log Users, and the running `PresentMonSharedService` does not help because the console starts its own session); and the 2.x column set **is measured** — 24 columns, `spike-notes` §11. The parser ate three real CSVs and resolved `FrameType` correctly against a first column literally named `Application`. Closed because the binary is dropped, and kept in full because every one of those facts cost a measurement |
| M5 ✅ | **Do LHM GPU sensors work unelevated, without PawnIO?** **YES — measured 2026-09-03, row R1 of the pre-committed table below**, NVIDIA RTX 5080 / 616.56 / LHM 0.9.6: eight fields unelevated (core and memory temperature, load, VRAM used, core and memory clock, package power, fan), the identical eight in the elevated control, PawnIO never opened. The three user-facing sentences stand. Numbers in `spike-notes` §10. *(The row as it stood while open follows, unchanged.)* This decides whether the default unelevated Agent has temperatures at all, and therefore how ADR-9 reads to users. **SEVERITY PROMOTED 2026-08-28, and the promotion is the point.** It used to decide how a design note read. It now decides whether a **user-facing claim is true**: the two-rung ladder says a Tier-2 session records duration and hardware telemetry, and that sentence is heading for `README`, the consent dialog and `legal/EULA.md`. If LHM needs elevation for GPU sensors, then the DEFAULT Agent's Tier-2 session is **duration only** and every one of those documents is wrong. Until it is measured, all three are worded *"whatever hardware telemetry this machine can provide"* — honest under either outcome, at the cost of vagueness. `18_GPU_VENDOR_APIS` §P0(b) already specifies the test and the dev box can run it |
| M6 ✅ | ~~Elevation-free Tier 2~~ | **Closed by decision 2026-08-27.** Half was answered on 2026-08-20 in the direction nobody expected: `PresentMonSharedService` is installed and `Running` as LocalSystem and the console **still** fails, because it starts its own trace session. The other half — whether `Performance Log Users` suffices without admin — stays unmeasured and now has no subject. **The elevation question does not disappear with the tool**: ETW trace sessions are restricted by Windows, not by PresentMon, so whatever §G chooses inherits it. Re-ask it there |
| M7 ✅ | ~~`18_GPU_VENDOR_APIS` §Runtime policy says telemetry is never read from the game process, but `17_HOOK_ENGINE` reads per-process VRAM and Reflex latency there. Reconcile the wording — the rule means "no vendor SDK polling loops in the game", not "no measurement in the game"~~ **Closed 2026-09-09 (PR-E1) by the code taking exactly that shape.** The rule is *no telemetry polling loop in the game*: the one 1 Hz loop is `TelemetryPoller` on the Agent's `fl-telemetry` thread, and it reads L1/L2/L3 only. Per-process VRAM stays an in-process read on the present path (`vram_proc`, `17_HOOK_ENGINE`), and PR-E1 measured why that must be so: `IDXGIAdapter3::QueryVideoMemoryInfo`'s `CurrentUsage` is the *calling process's* figure — 0 bytes from the Agent — so it is a measurement only where the game is. Adapter-wide usage is L1's PDH counter. §Runtime policy's sentence stands as written; this row is the reconciliation |
| M7 ✅ | ~~`18_GPU_VENDOR_APIS` §Runtime policy says telemetry is never read from the game process, but `17_HOOK_ENGINE` reads per-process VRAM and Reflex latency there. Reconcile the wording — the rule means "no vendor SDK polling loops in the game", not "no measurement in the game"~~ **Closed 2026-09-09 (PR-E1) by the code taking exactly that shape.** The rule is *no telemetry polling loop in the game*: the one 1 Hz loop is `TelemetryPoller` on the Agent's `fl-telemetry` thread, and it reads L1/L2/L3 only. Per-process VRAM stays an in-process read on the present path (`vram_proc`, `17_HOOK_ENGINE`), and PR-E1 measured why that must be so: `IDXGIAdapter3::QueryVideoMemoryInfo`'s `CurrentUsage` is the *calling process's* figure — 0 bytes from the Agent — so it is a measurement only where the game is. **Corrected 2026-10-03 (beta.12, D43): "only where the game is" holds for `QueryVideoMemoryInfo` and not in general** — the `GPU Process Memory` performance counters give any process's dedicated and shared GPU memory from outside it, with no handle, and the Agent reads them since that day (`18_GPU_VENDOR_APIS` §The game process's memory; `spike-notes` §16). The in-process read was never built. Adapter-wide usage is L1's PDH counter. §Runtime policy's sentence stands as written; this row is the reconciliation |
| M8 ✅ | ~~The `GpuSample` type has no latency field, yet L3 is credited with Reflex/PC latency. Latency is per-frame and arrives via the ring, not the 1 Hz sample. Fix the layering description~~ **Closed 2026-09-09 (PR-E1): the description now matches the type.** `GpuSample` has no latency field by design (its own remarks said so since 2026-09-03), `TelemetrySample` carries a 1 Hz reading stamped with QPC, and per-frame latency is `FlFrameRecord.reflexLatencyUs` in the ring. The §L3 table row "Reflex / PC latency" is an *in-process hook fact* the Overlay records (`SetSleepMode` / `SetLatencyMarker`, `17_HOOK_ENGINE`), never a poller field; `NvapiTelemetrySource` (PR-E2) will not call `NvAPI_D3D_GetLatency` |
| M9 ✅ | **Closed 2026-08-02 by a decision.** The old file/module detection does not exist in this repository and the owner confirmed there is no copy elsewhere, so **"build a minimal static-hint detector as the measurement baseline" is now P0 item 3** (`15_ROADMAP`). It needs no guard and no injection. Until it exists, ADR-7's headline claim stays out of the README rather than being asserted unmeasured |
| M10 ❓ | **§CPU — is the CPU temperature this build reads the right sensor, and does it read at all on the owner's machine?** `LhmCpuTemperatureReader` (2026-09-21) opens a CPU-only LibreHardwareMonitor `Computer` when the Agent is elevated AND `PawnIo.IsInstalled`, takes the package sensor (`CPU Package` / `Core (Tctl/Tdie)`) and falls back to the hottest core. It was written against LHM's sensor names and a fake `ILhmComputer`; **no elevated run with PawnIO has been taken.** | **The measurement is one session:** Agent elevated, PawnIO installed, a five-minute capture with HWiNFO or Ryzen Master open beside it. Pre-committed: `max_cpu_temp` within 3 °C of the reference's package peak → keep; a core sensor picked where a package sensor exists, or a reading tens of degrees off (a distance-to-TjMax sensor mistaken for a temperature) → fix `Pick` and re-run; nothing read at all → `cpu_temp` stays N/A and `legal/ACCURACY.md` says processor temperature is not measured. CPU **load** and memory are not in question: `TheRealCountersAnswerOnThisMachine` reads them on every gate run. |
| M11 🅓 | **The game's VRAM budget and `budget_exceeded_pct` (FR-4.5's second half), 2026-10-03.** D43 reads the game's usage from outside (the `GPU Process Memory` counters); the budget the OS grants the process is what DXGI's `QueryVideoMemoryInfo` returns to the *calling* process (§M7), so only an in-process call — the Overlay's background thread, which today only checks for a stop — or `D3DKMTQueryStatistics`' `PROCESS_SEGMENT_GROUP` query (documented "Reserved for system use") could read it. **Deferred by decision:** neither is built; `vram_budget_exceeded_pct` stays NULL and the budget N/A, and the in-process route would change what the Disclaimer says the Overlay's thread does. Reopening it needs that decision, not a measurement. | — |
| M10 ✅ | ~~PDH `\GPU Engine(*)\Utilization Percentage` summed across engines does not reproduce the Task Manager figure the doc invokes. Decide what we actually report and label it accordingly~~ **Decided 2026-09-09 (PR-E1): L1 does not read the engine counters at all.** `LoadPct` is L2's vendor-reported `GPU Core` load (measured ✓ on NVIDIA, §M5 row R1) and is labelled *GPU load (vendor)* wherever it is shown; on a machine without L2 the field is N/A, never a sum that is not the number the user expects. What L1 does read from PDH is one counter, `\GPU Adapter Memory(luid_…_phys_0)\Dedicated Usage`, bound by LUID — the figure Task Manager labels "Dedicated GPU memory", measured 1301 MB at an idle desktop on the RTX 5080. Reopening this needs a measurement of `max(engine)` against Task Manager's own number, not a decision |
#### §M5 — the decision table, pre-committed 2026-09-03 BEFORE the first run
@@ -4348,13 +4359,13 @@ Each of these is referenced by an existing doc but specified nowhere.
| Area | What is missing | Referenced by |
|---|---|---|
| **Agent lifecycle** | Scheduled-task definition, start-at-logon, how elevation is requested and persisted, what "Repair" repairs. **`--serve` exists since 2026-09-10 (P2 PR-F)** — a Generic Host around the watcher, stopped by Ctrl+C with a 15 s finalize grace — and `--install-task` / `--uninstall-task` answer "not implemented in P2"; the task definition and start-at-logon are what stays open. **One Agent per data folder since 2026-09-17** (`01_ARCHITECTURE` §Lifecycle: `AgentInstanceLock`, exit 10; beta.1 ran four after an elevated App was refused by the pipe). **Still open from that morning:** (1) the ring's single consumer is enforced across data folders only by `NoSecondRingReaderTests`' source sweep — a developer's `--console --data-dir` capture beside the installed Agent can still attach a second reader to one game's `Local\FrameLedger.Ring.<pid>`, and a runtime claim beside the mapping would close it; (2) ~~elevation is inherited, not chosen — an App started as administrator starts an elevated Agent, which injects and writes the ledger as administrator~~ **closed 2026-09-27 (beta.10, owner decision D34): chosen** — `capture.run_elevated`, a UAC prompt at every Agent start, the logon task's Agent asking through its own prompt, and with the option off an administrator's App starts the Agent with the shell's token (`01_ARCHITECTURE` ADR-9). "How elevation is requested and persisted" is that: requested by the prompt, persisted as one settings row and never as a task's run level | `08_UI` Settings, `11_UPDATER`, `12_BUILD` flags |
| **Session identity** | ~~`sessions` has no GUID column, yet `SessionStarted`/`StopSession`/`.partial` files are all keyed by `sessionGuid`.~~ **`sessions.session_guid` (UNIQUE) exists since 2026-09-09 (P2 PR-B), with `qpc_epoch` / `qpc_frequency` beside it.** ~~Still open: the `.partial` file format is undefined, and it is the crash-recovery artifact — PR-D's, pre-committed in HANDOFF §P2 (CRC-framed append-only chunks, the valid prefix wins)~~ **Built 2026-09-10 (P2 PR-D): `06_DATA_MODEL` §The `.partial` file, `PartialSessionFile` + `PartialRecovery`, killed at every byte in the merge gate.** What stays open here is the pipe's use of the guid (P3) | `07_IPC`, `04_CAPTURE`, `06_DATA_MODEL` |
| **Agent lifecycle** | Scheduled-task definition, start-at-logon, how elevation is requested and persisted, what "Repair" repairs. **`--serve` exists since 2026-09-10 (P2 PR-F)** — a Generic Host around the watcher, stopped by Ctrl+C with a 15 s finalize grace — and `--install-task` / `--uninstall-task` answer "not implemented in P2"; the task definition and start-at-logon are what stays open *(corrected 2026-10-04: built in P3 PR-8b — `LogonTask` behind both flags, and start-with-Windows as the HKCU Run value)*. **One Agent per data folder since 2026-09-17** (`01_ARCHITECTURE` §Lifecycle: `AgentInstanceLock`, exit 10; beta.1 ran four after an elevated App was refused by the pipe). **Still open from that morning:** (1) the ring's single consumer is enforced across data folders only by `NoSecondRingReaderTests`' source sweep — a developer's `--console --data-dir` capture beside the installed Agent can still attach a second reader to one game's `Local\FrameLedger.Ring.<pid>`, and a runtime claim beside the mapping would close it; (2) ~~elevation is inherited, not chosen — an App started as administrator starts an elevated Agent, which injects and writes the ledger as administrator~~ **closed 2026-09-27 (beta.10, owner decision D34): chosen** — `capture.run_elevated`, a UAC prompt at every Agent start, the logon task's Agent asking through its own prompt, and with the option off an administrator's App starts the Agent with the shell's token (`01_ARCHITECTURE` ADR-9). "How elevation is requested and persisted" is that: requested by the prompt, persisted as one settings row and never as a task's run level | `08_UI` Settings, `11_UPDATER`, `12_BUILD` flags |
| **Session identity** | ~~`sessions` has no GUID column, yet `SessionStarted`/`StopSession`/`.partial` files are all keyed by `sessionGuid`.~~ **`sessions.session_guid` (UNIQUE) exists since 2026-09-09 (P2 PR-B), with `qpc_epoch` / `qpc_frequency` beside it.** ~~Still open: the `.partial` file format is undefined, and it is the crash-recovery artifact — PR-D's, pre-committed in HANDOFF §P2 (CRC-framed append-only chunks, the valid prefix wins)~~ **Built 2026-09-10 (P2 PR-D): `06_DATA_MODEL` §The `.partial` file, `PartialSessionFile` + `PartialRecovery`, killed at every byte in the merge gate.** ~~What stays open here is the pipe's use of the guid (P3)~~ *(built in P3 PR-1/1b: the session events and `StopSession` carry `SessionGuid` — corrected 2026-10-04)* | `07_IPC`, `04_CAPTURE`, `06_DATA_MODEL` |
| ~~**Settings registry**~~ | ~~The `settings` table is key/value with no key list, defaults, types, or validation — and no message for the UI to push a changed setting to the Agent.~~ **Decided 2026-09-13 (HANDOFF §P3 decision D16)**: the key list with defaults and ranges, and *no* push message — the Agent re-reads its keys at each session start. **Built the same day (P3 PR-3):** `06_DATA_MODEL` §Settings registry (12 keys), `Application.Settings.SettingsRegistry` + `RegisteredSettings` (validating writes, tolerant reads), `SettingsRecorderPolicy` resolving `capture.min_session_s` / `telemetry.interval_ms` / `retention.raw_sessions_per_game` at each session start. **Row closed** | `06_DATA_MODEL`, FR-10 |
| **Error taxonomy** | `07_IPC` lists `CaptureError` codes; no canonical mapping to resx keys and user-facing text, though `09_I18N` requires safety strings to be reviewed as legal text | `07_IPC`, `09_I18N` |
| ~~**Threading model**~~ | ~~Which component owns which thread, UI-thread rules, and how the 1 Hz telemetry poller, 10 Hz drain and pipe reader interact~~ **Answered 2026-09-09 (P2 PR-C): `04_CAPTURE` §Threading model** — four threads, one owner per shared object, the pipe reader named as one more producer. This row was not struck when the section was written; struck 2026-09-13. What is still unspecified is the UI thread's own rules, which is `08_UI`'s in P3 | `04_CAPTURE`, `18_GPU_VENDOR_APIS` |
| **Pipe/shm security** | Stated as policy ("DACL granting the current user's SID") but not as implementable SDDL, nor who creates the objects with what rights. The shm half is built (`fl_shm_host.h`, the Overlay creates the section under the current user's SID); the pipe half is **built 2026-09-13 (P3 PR-1, HANDOFF §P3 decision D11)**: `D:P(A;;GA;;;<user>)(A;;GA;;;BA)` (with the owner `O:<user>` stated since 2026-09-17, `07_IPC` §C) handed to `CreateNamedPipe` with `PIPE_REJECT_REMOTE_CLIENTS`, and the client's token user compared by impersonation on its first frame (`Infrastructure.Ipc.PipeAccessControl`, pinned by `PipeServerClientTests` including the refused stranger). **Row closed** | `07_IPC` |
| ~~**Legal doc versioning**~~ | ~~FR-11 re-shows documents "when a document version increments". Nothing says where the current version lives, who writes `legal_acceptance.version`, or how the markdown is rendered in-app~~ **Answered 2026-09-14 (P3 PR-9):** the version is the document's own `**Version:**` line, read from the copy embedded in the App at build (`App.Services.LegalDocuments`); the App writes `legal_acceptance.version` on the one Accept and re-shows any document whose embedded version differs from its row; the markdown is shown as text with authoring comments stripped, not rendered (`08_UI` §First-run flow built note) | FR-11, `06_DATA_MODEL` |
| ~~**Legal doc versioning**~~ | ~~FR-11 re-shows documents "when a document version increments". Nothing says where the current version lives, who writes `legal_acceptance.version`, or how the markdown is rendered in-app~~ **Answered 2026-09-14 (P3 PR-9):** the version is the document's own `**Version:**` line, read from the copy embedded in the App at build (`App.Services.LegalDocuments`); the App writes `legal_acceptance.version` on the one Accept and re-shows any document whose embedded version differs from its row; ~~the markdown is shown as text with authoring comments stripped, not rendered~~ the markdown is shown with authoring comments stripped and, since beta.12, rendered (`08_UI` §Menu, *Documents are rendered*; §First-run flow built note) | FR-11, `06_DATA_MODEL` |
| **Accessibility / DPI** | NFR-9 states requirements; no design anywhere | NFR-9, `08_UI` |
| **Uninstall / data deletion** | One Velopack clause. No in-app "delete all my data", despite the privacy position | `12_BUILD`, `legal/PRIVACY_POLICY.md` |
| **Cover art** | Appears in the schema, the data directory and the UI; nothing says where it comes from or the licence position on downloaded store art | `06_DATA_MODEL`, `05_DETECTION` |
@@ -4369,7 +4380,9 @@ the guard is **item 0**, the Vulkan passthrough test is **item 1**, the two
licence checks were run first and came back clear (`spike-notes.md` §0), and
P0's exit criteria no longer import P2 work — the FPS-impact measurement moves
to the end of P1, while the harness-level per-present cost (no game, no Agent,
no drain) stays in P0. Items 5–9 below are still open.
no drain) stays in P0. ~~Items 5–9 below are still open.~~ *(Corrected 2026-10-04: 5 and 6 are deferred, 🅓 below; 7
is moot — `ci.yml` has gated every PR since bootstrap; 8 is history, P1 having closed; 9 stays open — no `ja` string has
been reviewed, an owner-only item.)*
5. **P0 item 5 asks for an AFMF decision on an RTX 5080.** AFMF is AMD driver
-side. Reword to "validate on NVIDIA; record AFMF as untested", per the
precedent `14_TESTING` already sets for absent hardware.
@@ -4421,9 +4434,9 @@ no drain) stays in P0. Items 5–9 below are still open.
| Named where | Artifact | State |
|---|---|---|
| `12_BUILD:139`, `13_CI_CD:11`, `09_I18N:28`, `CLAUDE.md:66` | `tools/resx-audit` | Absent. **Honestly handled** — `build.ps1:309` skips it loudly with a reason, and no `.resx` files exist yet |
| `12_BUILD:139`, `13_CI_CD:11`, `09_I18N:28`, `CLAUDE.md:66` | `tools/resx-audit` | ~~Absent. **Honestly handled** — `build.ps1:309` skips it loudly with a reason, and no `.resx` files exist yet~~ **✅ Built 2026-09-13 (P3 PR-2)**, a `build.ps1` step (marked 2026-10-04) |
| `12_BUILD:136`, `13_CI_CD:11` | the managed **struct-mirror** test | ~~Absent. Nothing under `tests/` references `FlFrameRecord`.~~ **✅ Built in #47** — `ShmLayout.cs` + `ShmLayoutMirrorTests`, driven by `fl-layout-dump`'s JSON rather than a transcribed table, asserting blittability as well as offsets, and walking the field list in both directions. `build.ps1`'s gate now reads the run's `.trx` and fails when the class did not execute, so **deleting the test is red too** — it used to `Test-Path` a source file |
| `13_CI_CD:21`, `12_BUILD:121`, `CHANGELOG:9` | `.github/workflows/release.yml` | Absent. `CHANGELOG`'s header instructs an author to write for a consumer that does not exist |
| `13_CI_CD:21`, `12_BUILD:121`, `CHANGELOG:9` | `.github/workflows/release.yml` | ~~Absent. `CHANGELOG`'s header instructs an author to write for a consumer that does not exist~~ **✅ Built 2026-09-14 (P4 PR-5)**; it published beta.1 through beta.11 (marked 2026-10-04) |
| `12_BUILD` §Local quality gate | gates omitted from the list | ~~**Three documents give three different counts, which is the finding.** `build.ps1` has **15** `Write-Step` calls as of 2026-08-05 (14 before this PR's `changelog-check`); `12_BUILD` lists 10; this row said 13.~~ **Corrected 2026-08-06: `build.ps1` has 17 `Write-Step` calls** (`package-closure` added two), and `12_BUILD`'s list is rewritten to 16 numbered entries — the difference is that `Invoke-Native`'s three steps run under one heading there. `13_CI_CD` no longer restates the list at all; it points at `12_BUILD`, because restating it in two places is what let one of them rot. **Nothing still derives the list from the script**, so the drift is slowed rather than stopped, and this row remains open for that reason. **And it drifted again, exactly as predicted — re-counted 2026-08-28.** `hookinventory-check` had reached `build.ps1` and never reached the list; `frametype-oracle` had reached both and then been deleted with PresentMon, so the two errors happened to cancel and the *totals* matched while the *membership* did not — the same coincidence §S24's own recount was caught by. The list is rebuilt to **17 entries against 17 `Write-Step` calls, in script order** (re-deriving the order caught a second defect: two adjacent entries had been transposed relative to the script). **The row still does not close.** Aligning by hand is what was done in 2026-08-06 and again here; it lasts until the next gate lands. The fix is a gate that reads the `Write-Step` names out of `build.ps1` and fails when the list disagrees — until it exists, re-count rather than trusting the number |
The struct-mirror row is the one that matters. `CLAUDE.md` §Struct mirroring
+68 -7
View File
@@ -1,6 +1,6 @@
# HANDOFF — read this first, then stop reading it
The one file a new session opens to pick up P0. It carries **sequencing, decisions
The one file a new session opens to pick up ~~P0~~ work (corrected 2026-10-04). It carries **sequencing, decisions
and traps**. It deliberately carries **no status**.
> ## The rule this file lives under
@@ -43,8 +43,9 @@ with §S2's in-layer supervision. **P1 item 1 — the `LoadLibrary` detour — l
`04_CAPTURE` §Launch mode); item 3, the Vulkan layer to `vkQueuePresentKHR` with §S2's in-layer
supervision, landed the same day (§S2 ✅; `17_HOOK_ENGINE` §Vulkan); item 4 — compare-and-restore per
inline patch, the native log, `wglSwapBuffers` — landed the same day too, and D3D9 is struck per §Scope.
P1's core is done; what stays ⏳ is the feature rows `15_ROADMAP` §P1 now lists, and P2 (the Agent, the
recorder, SQLite) is next.** The ~~three~~ ~~two~~ one P1-deferred S-item (~~S6~~, ~~S2 part three~~, and
P1's core is done; what stays ⏳ is the feature rows `15_ROADMAP` §P1 now lists, ~~and P2 (the Agent, the
recorder, SQLite) is next~~.** *(Corrected 2026-10-04: P2–P4 closed 2026-09-10/14/15; later work is the dated train
sections from §0.1.0-beta.3 on.)* The ~~three~~ ~~two~~ one P1-deferred S-item (~~S6~~, ~~S2 part three~~, and
the hand-run blast-radius script behind S29(d)) are the reminders. The text below is
P0's history and stays as it stood.
@@ -1215,7 +1216,7 @@ election are **F** and **G**; the ⏳ feature rows in `17_HOOK_ENGINE` §Hook in
their columns (`hdr_flag`, `pt_confidence`, `pso_stutter_pct`, `vram_proc*`, `latency_*`) are an
honest NULL in P2's schema, never a 0.
## P4 — **START HERE** (2026-09-14: P3 is code-complete; the stack awaits the owner's merges) — **code-complete 2026-09-15 with PR-9**: every item below is struck; what follows is `15_ROADMAP` §P5 and §Owner-only
## P4 — ~~**START HERE**~~ (2026-09-14: P3 is code-complete; ~~the stack awaits the owner's merges~~) — **code-complete 2026-09-15 with PR-9**: every item below is struck; what follows is `15_ROADMAP` §P5 and §Owner-only *(struck 2026-10-04: merged 2026-09-14/15; the live head is the newest dated train section below, and §Owner-only)*
P3's slices are all struck below. What is left of P3 is not code: the owner merges #154 → #155 → #156 → #158 →
#159 → #160 → #161 → #162 → #163 → PR-9 in order (squash; after each merge the next branch is rebased
@@ -1751,6 +1752,58 @@ release.*
**Owner-only, added to the list below:** item 7.
## 2026-10-03 — the beta.11 train: the exception's trial, the library, sessions across
*Status is `CHANGELOG.md` `[0.1.0-beta.11]`; this is what no other file carries. The approved plan was five PRs: PR-1 the
CrackProof titles (rules `2026.10.1`), PR-2 the exception's trial (schema 0017, Disclaimer 2.9, EULA 1.4), PR-3 the
library and the import, PR-4 delete sessions, the charts across sessions and the Settings clean-up, PR-5 the release.*
**Decisions (owner, 2026-10-03, asked before the plan — do not re-ask):**
- **D38 — the user-mode exception's evidence moved under the grant, as a trial.** The owner deleted their ledger and
found GIRLS' FRONTLINE 2 "Not eligible: 0 successful hooked session(s), two are needed" for good: since beta.8 a game is
blocked the moment it is added, a blocked game is never hooked without a grant, so D33's two sessions were unreachable
for every game blocked from the start and lost with a reset ledger. Chosen: a grant needs no session; the first two
hooked sessions under it are a trial; any end during the trial (every D33 end, or a stored hooked session with no frames
or an abnormal exit) ends it for good (`games.ac_exception_trial_failed_at`). Every other condition is unchanged.
Legal text: Disclaimer 2.9 (§2A) and EULA 1.4 — the EULA's "a game the Software has already measured successfully"
would have become false (D36's rule).
- **D39 — charts across a game's sessions: both** — *Sessions at a glance* on the Sessions tab, and *Also draw* on the
Trend (two units at most, the second on the right axis).
- **D40 — Delete all sessions: both places** — the game's page and Settings ▸ Data. The Agent deletes (the rows are its),
never while a session it would delete under is being recorded.
- **D41 — Refresh does all three**: reload the library, offer the games the stores installed since, mark the entries
whose executable is gone (*Not installed*; nothing is removed).
- **D42 — the library switches between a grid that fills the window and a list** (`ui.library_view`).
- **CrackProof (owner's list, "a few, by Steam id")**: three titles whose own store pages say *"Uses Kernel Level
Anti-Cheat"* and name CrackProof; ANOTHER EDEN, named only by a community list, is left out.
**Traps met on the way:**
- **A fresh git worktree cannot configure the native build**: CMake's MinHook FetchContent clone runs `git submodule`,
which fails there ("'submodule' appears to be a git command, but we were not able to execute it"). Run the gate in the
primary checkout, whose `build/native/x64-release/_deps` is cached; a worktree is for writing code and managed tests.
- **A `DataGrid` laid out outside a window draws its star columns at their minimum** (no Loaded pass): a visual check
renders a hosted, off-screen `Window` and pumps the dispatcher (`Dispatcher.PushFrame`), not Measure/Arrange on a page.
- **`Native FPS` includes a measured-none session**, whose native rate is the presented one: beside Presented it is a
second line on the same points, so the overview keeps Native and Displayed to sessions that generated frames.
- **Both processes may change the library while the Games page is open**, and WPF UI 4.3.0 does nothing on a navigation
to the page already on screen: the page reloads on `SessionCompleted` and on the App's own `LibraryChanges`.
- **A grant's trial is counted from the sessions, not kept as a counter**: the lapse policy counts at each finalize
(`CountSuccessfulUnderGrantAsync`: that family, started at or after the grant), and `ac_exception_sessions` is only
the sweep's copy for the card. Deleting sessions can only lengthen a trial; the mark that ends one for good
(`ac_exception_trial_failed_at`) is the only stored decision.
- **A session summary is a window of its own, outside every page**: deleting sessions must close the ones open on a
deleted session and let go of File ▸ Export's selection, asking the ledger whether the session is still there (both in
`SessionDeletion`, so Settings ▸ Data does it too) — ids are reused once the newest is gone. The plan said so; PR-4's
first version did neither, and a self-review caught it before the merge.
- **Analyzers met:** `MA0048` (one type per file), `CA1003`/`MA0046` (an `EventArgs` type for an event), `IDE1006` (a `_`
prefix on private consts), `CA1030` (no method named `Raise`), `MA0051` (60 lines), and `RevokeAntiCheatExceptionAsync`'s
new `bool` before the token turned every `(path, reason, ct)` call into a compile error — pass `ct: ct`.
- **The Bash tool's heredocs break on an odd number of apostrophes and halve backslashes**: patch scripts are files.
**Owner-only, added to the list below:** item 8.
## Owner-only — no PR can close these
1. **§S23-2 — branch protection.** `Rules / validate` is not a required status check on
@@ -1793,6 +1846,13 @@ release.*
Gate shows Privacy 2.5 and Disclaimer 2.8 once. (e) The `ja` text of `Safety_AdminMode_*`, English until reviewed.
(f) `docs/LIST_GAME_TESTED.md` — reviewed and approved by the owner before it was committed (D35, 2026-09-27);
keep it current as games are run.
8. **beta.11 on real hardware.** (a) GIRLS' FRONTLINE 2: the option on → *Eligible* → *Make exception…* (the disclosure
`ac-exception-dialog/2`, with its *Trial* paragraph) → hooking on → two sessions: the card says *trial: 0 of 2*, then
*1 of 2*, then *Exception in force since …* alone. (b) The library at your window's width, and the list; Refresh
after installing a game, and with the USB drive unplugged (*Not installed*, the drive named). (c) Delete all sessions
on a game's page and in Settings ▸ Data. (d) *Sessions at a glance* and the Trend with a second unit. (e) The Legal
Gate shows the Disclaimer 2.9 and the EULA 1.4 once. (f) The `ja` text of `Safety_Exception_Trial` (English until
reviewed) and the App strings marked `review`.
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
@@ -1813,7 +1873,7 @@ deferred with a written rationale.
way. Corrected in place.
- **`README:14`'s RayQuery claim is not a rule-7 contradiction**, which an audit
asserted. `03_METRICS:128` says AS-build hooking is what makes inline RayQuery
detectable *at all*. The real contradiction is between CLAUDE.md rule 7 and
detectable *at all* (line numbers as of 2026-08; both passages have since moved — noted 2026-10-04). The real contradiction is between CLAUDE.md rule 7 and
`03_METRICS` — recorded as §S29(f).
---
@@ -1845,8 +1905,9 @@ diagnosis*.
flag** — and that fix did not fire, because **NW.js has no GPU process**: the GPU runs
in-process in the browser, the one process Chromium leaves untyped. Second rule: one
untyped candidate among typed siblings is the browser and the target. **Read the tree before
guessing the rule** — the refusal line prints it now. Whether the Overlay can load inside
that browser process is the next thing the title measures.
guessing the rule** — the refusal line prints it now. ~~Whether the Overlay can load inside
that browser process is the next thing the title measures.~~ *(Measured 2026-09-04, `spike-notes` §9 run 3: it
loads and captures — marked 2026-10-04.)*
- **A TITLE ASKS STREAMLINE FOR A FRAME TOKEN SEVERAL TIMES PER FRAME AND GETS A DIFFERENT
OBJECT EACH TIME.** Cyberpunk 2077: 3 to 4.6 requests per application frame, distinct pointers,
same index. A count keyed on the pointer reads the request rate and the `off` leg comes out
+3
View File
@@ -4,6 +4,9 @@
measurement notes, and reviewed by the project's owner before it was published. It lists what happened on one machine;
it promises nothing about any other.*
*(Not re-read for 0.1.0-beta.11 or 0.1.0-beta.12 — noted 2026-10-04. Refreshing it needs a new copy of the database and
the owner's review; sessions since 2026-09-27, and the game-memory figures beta.12 adds, are not here.)*
**The machine.** Every row below was run on one PC: an NVIDIA GeForce RTX 5080 (the only graphics card), an Intel Core
i7-14700KF, 32 GB of DDR5, Windows 11 (Insider builds 26300 → 29648) and a 2560×1440, 240 Hz monitor. **No AMD or Intel
graphics card and no second machine has been tested**, and **no real Vulkan or OpenGL game has been measured** — every
+84
View File
@@ -0,0 +1,84 @@
# FrameLedger developer documentation
This folder is for people who build, change or review FrameLedger. **If you only want to use it, read the
[user guide](../guide/README.md) instead** — it is also in the app, under Help ▸ User guide.
## Where to start
| You want to… | Read |
|---|---|
| Pick up work where it stopped | [`HANDOFF.md`](HANDOFF.md) — sequencing, decisions (D1…D46) and the traps that each cost a cycle. It carries no status on purpose |
| Learn the system | [`../CLAUDE.md`](../CLAUDE.md) (the rules and the layout), then the reading order below |
| Build it | [`12_BUILD.md`](12_BUILD.md) — `./build.ps1 check` is the whole gate, the same one CI runs |
| Contribute or fork | [`../CONTRIBUTING.md`](../CONTRIBUTING.md), [`../FORKING.md`](../FORKING.md), [`../NOTICE`](../NOTICE) |
**Status lives in four places, and nowhere else** — check a status claim against the code before you plan on it:
| Question | File |
|---|---|
| What is unresolved, and what does it block? | [`20_OPEN_QUESTIONS.md`](20_OPEN_QUESTIONS.md) |
| What was measured, on what machine? | [`spike-notes.md`](spike-notes.md) |
| Which phase is where? | [`15_ROADMAP.md`](15_ROADMAP.md) |
| What landed, in which release? | [`../CHANGELOG.md`](../CHANGELOG.md) |
What the software promises users is the accuracy block in [`../legal/ACCURACY.md`](../legal/ACCURACY.md), copied
verbatim into the README and the Disclaimer and bound to its source by `tools/accuracy-check.ps1`.
## Reading order
1. [`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) — the guard, the refusal list, what will not be built. It
constrains everything else.
2. [`01_ARCHITECTURE.md`](01_ARCHITECTURE.md) — processes, the injection flow, lifecycles, the ADRs.
3. [`02_SPEC.md`](02_SPEC.md) — the FR / NFR ids used everywhere.
4. [`03_METRICS.md`](03_METRICS.md) — the metric math; the source of truth for every number shown.
5. [`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) — the C++ hook layer inside the game.
6. [`04_CAPTURE.md`](04_CAPTURE.md) — capture orchestration on the Agent's side.
7. [`05_DETECTION.md`](05_DETECTION.md) — engine, upscaler, frame-generation and ray-tracing facts.
8. [`18_GPU_VENDOR_APIS.md`](18_GPU_VENDOR_APIS.md) — layered telemetry, the game process's memory, vendor-SDK licence rules.
9. [`06_DATA_MODEL.md`](06_DATA_MODEL.md) · [`07_IPC.md`](07_IPC.md) · [`08_UI.md`](08_UI.md) ·
[`16_WPFUI_SYNTAX.md`](16_WPFUI_SYNTAX.md)
10. The rest: [`09_I18N.md`](09_I18N.md), [`10_LOGGING_AND_BUG_REPORTS.md`](10_LOGGING_AND_BUG_REPORTS.md),
[`11_UPDATER.md`](11_UPDATER.md), [`12_BUILD.md`](12_BUILD.md), [`13_CI_CD.md`](13_CI_CD.md),
[`14_TESTING.md`](14_TESTING.md), [`15_ROADMAP.md`](15_ROADMAP.md).
**Before you write native or capture code, read [`20_OPEN_QUESTIONS.md`](20_OPEN_QUESTIONS.md):** its S-series items
are safety items, and something listed there as unresolved should not be built the way an older document describes it.
## Every document, in one line
| Document | What it is for |
|---|---|
| [`01_ARCHITECTURE.md`](01_ARCHITECTURE.md) | The processes (App, Agent, Overlay, Vulkan layer), how injection flows, the architecture decisions |
| [`02_SPEC.md`](02_SPEC.md) | Functional and non-functional requirements, by id |
| [`03_METRICS.md`](03_METRICS.md) | How every number is computed: frame times, lows, stutter, frame generation, display mode, the game's memory, sensor statistics, the export schema |
| [`04_CAPTURE.md`](04_CAPTURE.md) | The Agent's capture loop, the tiers, finalizing and recovery, the threading model |
| [`05_DETECTION.md`](05_DETECTION.md) | Detecting engines, platforms and capabilities; the detection rules |
| [`06_DATA_MODEL.md`](06_DATA_MODEL.md) | The SQLite schema, every migration, who writes what, retention |
| [`07_IPC.md`](07_IPC.md) | The shared-memory ring between the game and the Agent, and the named pipe between the Agent and the App |
| [`08_UI.md`](08_UI.md) | Every screen of the App, as specified and as built |
| [`09_I18N.md`](09_I18N.md) | English / Vietnamese / Japanese strings, the glossary, the safety-string review rule |
| [`10_LOGGING_AND_BUG_REPORTS.md`](10_LOGGING_AND_BUG_REPORTS.md) | Logs in every process, the bug-report bundle, redaction |
| [`11_UPDATER.md`](11_UPDATER.md) | Velopack updates from GitHub Releases, and when an update may apply |
| [`12_BUILD.md`](12_BUILD.md) | The toolchain, the build, the quality gate step by step, publishing and packaging |
| [`13_CI_CD.md`](13_CI_CD.md) | The CI and release workflows |
| [`14_TESTING.md`](14_TESTING.md) | The test strategy, hook overhead, the hardware matrix |
| [`15_ROADMAP.md`](15_ROADMAP.md) | The phases and where each stands |
| [`16_WPFUI_SYNTAX.md`](16_WPFUI_SYNTAX.md) | WPF UI (lepoco) rules, theming, rendered documents, gotchas |
| [`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) | The hooks inside the game: inventory, fault policy, the ring writer, Vulkan |
| [`18_GPU_VENDOR_APIS.md`](18_GPU_VENDOR_APIS.md) | Telemetry layers (DXGI/PDH, LibreHardwareMonitor, NVAPI), the game process's memory, licences |
| [`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) | The anti-cheat guard, what a finding does, the user-mode exception, what will never be built |
| [`20_OPEN_QUESTIONS.md`](20_OPEN_QUESTIONS.md) | Every unresolved question, defect and measurement, with its status marker |
| [`HANDOFF.md`](HANDOFF.md) | Sequencing, the owner's decisions, traps |
| [`spike-notes.md`](spike-notes.md) | What was measured, how, on which machine, and what each result decided |
| [`LIST_GAME_TESTED.md`](LIST_GAME_TESTED.md) | The real games FrameLedger has been run with, and what each session measured (changes need the owner's review) |
| [`legal-drift-history.md`](legal-drift-history.md) | How the legal documents once drifted from the software, and the maintainers' notes moved out of them |
| [`vendor-exports.json`](vendor-exports.json) | The vendor DLL exports the hooks are allowed to bind, checked by `tools/vendor-exports` |
## Beside this folder
- [`../guide/`](../guide/README.md) — the user guide (players, English).
- [`../legal/`](../legal/) — the documents a user accepts, the accuracy statement, the third-party notices and licence
texts, the trademark note.
- [`../LIMITATIONS.md`](../LIMITATIONS.md) — what the whole software cannot do, in a player's words.
- [`../rules/detection-rules.json`](../rules/detection-rules.json) — engine, platform and capability signatures and the
anti-cheat blocklist, validated by `tools/rules-validate.ps1`.
+34
View File
@@ -34,3 +34,37 @@ statement is `legal/ACCURACY.md`, dated.
> **This block is maintained by hand and nothing verifies it.** Every other document here is bound to the code by something — `rules-validate` cross-checks the blocklist, `static_assert`s bind `fl_shm.h` to `07_IPC`, `versioninfo-check` and `chokepoint-check` bind claims to binaries. `legal/` is bound by nothing, and it has now gone stale **three times**: first within hours of being written, when the 65-second sentence was added directly beneath a header that said "Three"; then again when five PRs (#40–#44) changed the Overlay from a stub into a hooking, shared-memory-mapping, control-block-reading component and touched **no documentation at all**, leaving the second bullet above asserting four things about that binary that were each false. and a third time when #46–#52 landed — seven PRs, including one (#48) that changed what the Overlay does *inside a game* — with no edit here at all. None of the three drifts was visible from inside the PR that caused it. **Whoever edits any promise in this file must re-count — and whoever changes what `FrameLedger.Overlay` does must re-read this block, because nothing will remind them.**
>
> **That sentence has now failed twice, so it is being replaced by something that is not a sentence.** `ci.yml` fails a pull request that touches `src/` without touching `CHANGELOG.md`. That is a weaker gate than the ones binding every other document — it forces a *ledger* entry, not a re-read of *this* file — and it is written down as weaker rather than described as a fix. A gate over the claims in `legal/` would have to assert things about behaviour rather than about files, and nobody has designed one (`docs/20_OPEN_QUESTIONS.md` §S23-6).
---
## Moved out of the accepted documents on 2026-10-03 (beta.12: Disclaimer 2.10, Privacy Policy 2.6)
The three blocks below were notes for the documents' maintainers inside texts a user accepts. They moved here unchanged
when the user guide (`guide/`) and a rendered Legal Gate made those documents read as what they are — terms — and they
are kept because they record what each version changed and why (owner decision D45).
### The Disclaimer's preface (versions 2.3–2.9)
> **How this document is kept true.** The statement of what FrameLedger measures (§4) is `legal/ACCURACY.md`,
> embedded here and in `README.md` and bound to its source by `tools/accuracy-check.ps1`, which fails the build when a
> copy differs. Earlier versions of this document carried a hand-maintained audit of how its own promises drifted from
> the software — six re-counts between 2026-08-04 and 2026-09-15; that history is `docs/legal-drift-history.md`,
> moved out of the text you accept on 2026-09-16 and kept in full.
### The Privacy Policy's §2 history note (versions 2.2–2.5)
> **History.** Versions 2.0 and 2.1 of this document listed three further rows — a weekly safety-list update, a weekly detection-rules update, and an opt-in Steam store lookup — describing requests the software did not make; from 2026-08-04 they carried an audit note saying so. Version 2.2 (2026-09-16) removes them. A privacy policy that lists a transmission which never happens is as wrong as one that omits a transmission which does.
### The Privacy Policy's §4 history note (versions 2.3–2.5)
> **History.** Version 2.3 (2026-09-23) adds the per-entry recording switch. Before it, every program in your library was recorded whenever it ran, which recorded a utility that starts with Windows at every boot.
>
> Version 2.4 (2026-09-25, 0.1.0-beta.8) names what the software reads to check every game in your library for anti-cheat — until then it checked only a game you asked to hook — and to name the versions of its files, and the NVIDIA driver's settings for your games. The files of a library game's folder were already read to detect its engine and features; this version is the first to say so.
>
> Version 2.5 (2026-09-27, 0.1.0-beta.10) adds how a tracked game's window is shown — read from Windows — and the engine build name read from an Unreal Engine game's executable. It is also the first version to say two things the software already did: it reads the **content** of a library game's executable (markers in its first 8 MB and its import table, since the detection of engines and features; and, when a session starts, the graphics-library markers in the whole file), and it reads the processor load and the memory in use (since 0.1.0-beta.3). Nothing here leaves your device, as before.
### What version 2.6 of the Privacy Policy changed
It names the game's own memory use (since beta.12, read from outside the game in every session) where version 2.5
named "video-memory usage reported by the graphics runtime" — an in-game figure the software never read — and adds
§3A: what an export or a bug report can carry about you before you share it.
+46
View File
@@ -2584,3 +2584,49 @@ shipped `UnrealBuildReader` once it was. Nothing was copied or written; the numb
that scanned only a PE's `.rdata` read Black Myth as `5.0.0` from the file version alone; the 1 MiB `.rdata` floor
(`UnrealBuildReader.MinRdataBytes`) is what moved it to the stronger rung.
- No UE3 title is installed; the rule does not detect UE3 at all.
## 16 · A game process's own memory, read from outside it *(2026-10-03, beta.12, owner decision D43)*
**Why this was measured.** Per-process VRAM had storage since 0001 and no producer: `17_HOOK_ENGINE` §Memory planned
`IDXGIAdapter3::QueryVideoMemoryInfo` inside the game, `20_OPEN_QUESTIONS` §M7 (2026-09-09) recorded that its
`CurrentUsage` is the calling process's own (0 bytes from the Agent) and concluded the figure could only be read in the
game, and §H10 left open where in the game. The owner chose the other road (D43): the documented performance counters
`\GPU Process Memory(pid_<pid>_luid_…_phys_<n>)\Dedicated Usage` / `Shared Usage` — the numbers Task Manager's Details tab
shows — need no handle to the game at all, and `GetProcessMemoryInfo` needs only `PROCESS_QUERY_LIMITED_INFORMATION`.
§M7's conclusion holds for `QueryVideoMemoryInfo` and not in general.
**Already seen before this section was written**, stated so the table below is not read as having preceded them:
(1) the counter set exists on the dev box, 37 instances at an idle desktop (`Get-Counter`, 2026-10-03); (2) `Dedicated
Usage` is not `Local Usage` — dwm.exe 858 MB against 310 MB — so "dedicated" is defined as Task Manager's column and never
compared with a DXGI budget; (3) `ctest fl_process_stats` on the RTX 5080 while the reader was being written: a 256 MiB
DEFAULT buffer moved this process's dedicated figure 12.9 → 269.0 MiB (+256.1), and `PROCESS_MEMORY_COUNTERS_EX2` answered
(private working set 5.2 MiB) on Windows 11 29648.
**The decision table, written before the runs below** (instrument: `fl-probe-processstats`, `--hold-vram` in one
process and `--read` against it in another):
| # | Measurement | Outcome → what it means |
|---|---|---|
| M1 | Cost of one collect + read, 60 samples at 1 s | median ≤ 5 ms → 1 Hz with the sensors; 5–20 ms → still 1 Hz, noted in `18_GPU_VENDOR_APIS`; > 20 ms → every 5 s, and said so |
| M2 | Δ dedicated of a second process holding 512 MiB | within ±2 % → "Dedicated GPU memory, as Task Manager shows it" may be written; off by > 10 % → stop, the video half does not ship |
| M3 | dedicated against that process's own `QueryVideoMemoryInfo(LOCAL).CurrentUsage` | recorded in `03_METRICS`, whichever way it falls — the source does not change |
| M4 | `PrivateWorkingSetSize` (EX2) against `\Process V2(<name>:<pid>)\Working Set - Private` | equal → "the same as Task Manager's Memory column"; EX2 refused → the EX fallback, and Windows 10 stays unmeasured |
| M5 | How soon a new process's counter instance appears | recorded; the first seconds of a session reading N/A is then expected, not a fault |
| M6 | The probe's own private bytes after 600 collections | Δ < 1 MiB → keep one query per session; more → open and close per collection, then measure again |
**Results (2026-10-03, the same evening; RTX 5080, driver 617.14, Windows 11 29648.1000, `fl-probe-processstats`
from this PR's build):**
| # | Measured | Row taken |
|---|---|---|
| M1 | 60 samples at 1 s: collect + read **median 0.098 ms, max 0.217 ms**; 600 back to back: median 0.028 ms, max 0.190 ms | ≤ 5 ms → 1 Hz with the sensors |
| M2 | holder at 8 MiB: dedicated **21.0 MiB**; holder at 512 MiB: **525.0 MiB** → Δ **512.0 MiB** for 512 MiB allocated (0.0 %); the in-process ctest earlier: +256.1 MiB for 256 | within ±2 % → "Dedicated GPU memory, as Task Manager shows it" |
| M3 | the holder's own `CurrentUsage(LOCAL)`: 16.5 MiB (8 MiB holder) and 520.5 MiB (512 MiB holder) against dedicated 21.0 and 525.0 — **dedicated reads 4.5 MiB more, the same 4.5 MiB at both sizes** | recorded in `03_METRICS`: the counter includes a constant per-device amount the DXGI budget group does not; the difference does not grow with what the game allocates |
| M4 | private working set (EX2) **9.1 MiB** = `\Process V2(fl-probe-processstats:<pid>)\Working Set - Private` **9.1 MiB**, in all 60 samples | equal → "the same as Task Manager's Memory column" |
| M5 | the holder's instance was present at the reader's first poll, ~50 ms after the holder started (its device and buffer had already been created) | an instance exists from the process's first GPU allocation; a game that has made none reads N/A, as specified |
| M6 | 600 collections: the probe's private bytes moved by **0 bytes** (−44 KB over the 60 slow ones) | < 1 MiB → one query per session |
**What stays unmeasured:** Windows 10 22H2 (no machine; the reader falls back to `PROCESS_MEMORY_COUNTERS_EX` where EX2 is
refused, and the private working set then reads N/A), AMD and Intel GPUs, a laptop with two adapters (the reader sums
every adapter's instances for the pid), and a real game — the owner's beta.12 check (HANDOFF owner-only item 9) compares
a session's figures with Task Manager's Details tab at the same moment.
+45
View File
@@ -0,0 +1,45 @@
# Install and first start
## What you need
- **Windows 10 (22H2) or Windows 11, 64-bit.**
- Games FrameLedger can measure: **64-bit DirectX 11, DirectX 12 and OpenGL games.** Other games — 32-bit games,
DirectX 9 games, and Vulkan games you start yourself — are still recorded (how long you played, your PC's sensors,
the game's memory use), but not measured. [Limitations](../LIMITATIONS.md) has the full list.
## Download and install
1. Download `FrameLedger.App-win-Setup.exe` from the project's
[Releases page](https://github.com/poli0981/frameledger/releases) on GitHub.
2. **Check the file.** Each release publishes SHA-256 checksums in `SHA256SUMS.txt`. In PowerShell:
`Get-FileHash .\FrameLedger.App-win-Setup.exe` — the result must match the line for that file.
3. Run it. FrameLedger is free software and is **not code-signed**, so Windows SmartScreen may warn about an unknown
publisher. Once the checksum matches, choose **More info ▸ Run anyway**.
FrameLedger installs into `%LOCALAPPDATA%\FrameLedger.App` and needs no administrator rights. Your recordings are kept
separately, in `%LOCALAPPDATA%\FrameLedger`.
## The first start
The first window walks you through four short steps:
1. **Before you start** — the documents. You accept three: the End User License Agreement, the Disclaimer and the
Privacy Policy. The GNU GPL v3 is shown too: it is your licence to FrameLedger and needs no acceptance. A short
summary sits above them, and [The terms, in plain words](terms-in-plain-words.md) explains them, but the documents
are the terms. Declining closes FrameLedger.
2. **The capture agent** — the background program that notices when one of your games starts and records it. It runs
as you, without administrator rights.
3. **What hooking means** — the difference between a game that is recorded and a game that is measured. Read
[Anti-cheat and safety](04-anti-cheat-and-safety.md) before you switch hooking on for any game.
4. **Your game library** — where to import it from. Nothing is measured until you choose to.
## Updates
A few seconds after it starts, FrameLedger asks GitHub whether a newer version exists. A new version downloads in the
background and is installed only when you restart FrameLedger — never while a game is being measured. You can switch
the check off in **Settings ▸ Updates ▸ Check for updates at startup**, and check by hand with Help ▸ Check for
updates.
## Uninstall
Uninstall FrameLedger from Windows Settings ▸ Apps. It asks before it deletes your recordings folder.
+47
View File
@@ -0,0 +1,47 @@
# Record a game
## 1. Add the game
- **File ▸ Add game…** — pick the game's `.exe` file.
- **File ▸ Import library…** — FrameLedger lists the games installed through Steam, GOG, Epic and itch.io, and you
tick the ones to add.
Every game is added with **hooking off**.
## 2. Play
When a game in your library starts, the capture agent records a session by itself. While it runs, the **Dashboard**
shows it live. When the game closes, the session is saved and you get a notice. A session shorter than 30 seconds is
not kept.
## Recorded, or measured
A game in your library is always **recorded**: how long you played, your PC's sensors (GPU temperature, load and power;
CPU load; memory in use) and how much memory the game itself used — its video memory and its RAM, read from Windows
from outside the game.
To **measure** a game — frame rate and frame times, the real render resolution, the upscaler, frame generation, ray
tracing — FrameLedger has to load a small component into it. That is called **hooking**, and it is a choice you make
**one game at a time**: open the game's page (Games ▸ the game) and switch **Hooking** on. A warning explains the risk
first. **Read [Anti-cheat and safety](04-anti-cheat-and-safety.md) before you do.**
In the session list, **T1** marks a measured session and **T2** one that was only recorded; a recorded session says
why it was not measured.
## When FrameLedger will not measure a game
- **It found anti-cheat.** FrameLedger then turns hooking off for that game and says why on the game's page.
- **The game is 32-bit or uses DirectX 9.**
- **It is a Vulkan game** you started yourself.
- **The game runs as administrator.** Settings ▸ Capture agent ▸ *Run the agent as administrator* can help (off by
default; Windows asks every time the agent starts). Read its risk in [Limitations](../LIMITATIONS.md) first.
- **The game was already running when FrameLedger was updated** — restart the game once.
## Programs that are not games
Open the entry's page and switch **Recording** off: it is then ignored and nothing is recorded.
## Turning all hooking off
**Settings ▸ Capture ▸ Disable all hooking** stops every game from being hooked, whatever each game's own switch says. A
session that is running stops measuring within 30 seconds.
+50
View File
@@ -0,0 +1,50 @@
# Read your results
Open **Games ▸ a game ▸ Sessions**: one row per session. Double-click a row (or press **Open**) for the session's
summary. The Dashboard lists your most recent sessions too.
## N/A means "not measured"
A value FrameLedger could not measure reads **N/A** — never 0, and never an estimate. A session that was only recorded
(**T2**) has N/A for everything that needs hooking, and says why.
## Frame rate
- **When frame generation was measured**, the game's own frames and the frames you saw are shown together:
`62 → 118 FPS (×1.9 FG)`. If frame generation changed during the session (menus, loading screens, a settings change),
the figures are for the state that lasted longest, with the share of the session it covers: `(×1.9 FG · 75%)`.
- **When it could not be measured**, you see **Presented FPS** with a sentence saying whether generated frames could be
included in it. FrameLedger never shows a single number that may count generated frames as the game's own.
- **1% low** and **0.1% low** are the frame rate of the slowest 1% and 0.1% of frames: the further they fall below the
average, the less smooth the game felt. **Stutter** counts frames that took much longer than the frames around them,
and the share of time they took.
## Memory
- **VRAM (this game)** is the game's own video memory — what Task Manager's Details tab calls *Dedicated GPU memory* for
the game's process. **RAM (this game)** is its *Memory (private working set)*. Both are read from Windows once a
second, from outside the game, whether or not the game was hooked.
- The **median** is the typical level during the session; the **peak** is the highest it reached.
- *VRAM, whole graphics card* and *RAM in use, whole PC* count everything else running too, so they are usually much higher.
- **Statistics per series**, at the bottom of the summary, lists the mean, median, minimum and peak of every sensor.
## Ray tracing
**Ray tracing**, **path tracing** and **ray reconstruction** read *Yes*, *No* or *N/A*. Ray tracing is measured on
DirectX 12 games; path tracing is never stated as a fact, because nothing in a game's calls says so. Click a chip to
correct it by hand — your correction is labelled as yours.
## Charts
- **Frametime** — how long each frame took. Spikes are stutters.
- **Distribution** — how often each frame rate occurred.
- **Sensors** — temperatures, load and power; video memory; memory. The game's own line and the whole card's or the
whole PC's are drawn separately.
- **Trend** (on the game's page) — one point per session over time, for example before and after a driver update.
Changes to your hardware or driver are marked on it.
- **Compare** (in the navigation on the left) — pick sessions, even of different games, and see them side by side.
## Export
The summary's **Export CSV**, **Export JSON** and **Export PNG** buttons — or File ▸ Export — save a session to a file.
Read [Your data](05-your-data.md) before you share one.
+45
View File
@@ -0,0 +1,45 @@
# Anti-cheat and safety
## The risk
To measure a game, FrameLedger loads a small component into it ("hooking"). **Anti-cheat systems can detect that and
may warn you, block you, or permanently ban your account** — and a ban can arrive days after the session. The developer
cannot reverse a ban, recover progress, or speak to a game's publisher for you.
**Use hooking for offline and single-player games.** Switching it on for a game with online or competitive play is
your decision and your risk.
## What FrameLedger does to keep the risk small
- **Hooking is off for every game** until you switch it on for that game, after a warning.
- **It looks for anti-cheat** before it hooks a game and every 30 seconds while it is hooked. If it finds any, it
refuses — or stops measuring at the next check — and turns hooking off for that game. **There is no switch that
overrides this**, apart from the one narrow exception below.
- **It never hides.** It keeps its real name and does nothing to avoid being seen by security software.
- **It never reads or changes the game's memory**, its saves or your input. It only observes the graphics calls the
game makes.
## What it cannot promise
- Its list of anti-cheat systems is its own and **can be incomplete**, and a game can add anti-cheat in an update.
- Anti-cheat that starts in the middle of a session can be there for **up to 30 seconds** — in the worst case 65 —
before FrameLedger stops.
- Some anti-tamper software (Denuvo, for example) can make a game **crash** when it is hooked, even offline.
## The one exception you can make
**Settings ▸ Capture ▸ User-mode exceptions** (off by default). For a game whose only finding is one anti-cheat that runs
entirely inside the game — no driver, nothing else found — you may allow hooking for that game after a separate warning.
Its first two hooked sessions are a trial: one that does not go well ends the exception for good. FrameLedger still runs
every check under it, and **a ban is still possible.** Kernel anti-cheat is never allowed.
## Turning everything off
**Settings ▸ Capture ▸ Disable all hooking** stops all hooking at once, whatever each game's own switch says.
## If FrameLedger missed a game's anti-cheat
Please open an issue with the **Safety gap** form on the project's GitHub page. That is treated as a safety bug, with
the same priority as a security report. A fix reaches you with the next version you install.
The full statement of the risk is the [Disclaimer](../legal/DISCLAIMER.md), §2 and §2A.
+49
View File
@@ -0,0 +1,49 @@
# Your data
## Where it is
Everything FrameLedger records stays on your PC, in `%LOCALAPPDATA%\FrameLedger` (Tools ▸ Open data folder): the
database with your library and sessions, the logs, and crash reports of FrameLedger itself. There is no account and
nothing is uploaded. The only network requests are the update check and the update download, both to GitHub
([Install and first start](01-install.md#updates)).
## What is in it
Your game library; your sessions — frame times when a game was measured, the statistics, your PC's sensors, the game's
own memory use, how the game's window was shown; a short description of your hardware for each session; your tags and
notes; your settings. The [Privacy Policy](../legal/PRIVACY_POLICY.md) lists all of it.
## How much is kept
The per-frame data of the newest **20 sessions of each game** is kept; older sessions keep their statistics. Change it
in **Settings ▸ Recording ▸ Raw series kept per game** (0 keeps everything).
## Back it up
**Tools ▸ Database maintenance… ▸ Back up…** writes a consistent copy of the database to a file you choose, even while
a game is being recorded. Backing up is up to you — FrameLedger does not do it by itself.
## Delete it
- **A game's sessions:** Games ▸ the game ▸ Sessions ▸ **Delete all sessions…**
- **A game:** its page ▸ **Remove…**
- **Every session of every game:** Settings ▸ Data ▸ **Delete all sessions…**
- **Everything:** uninstall FrameLedger and let it delete the data folder, or delete the folder yourself.
## Share it — carefully
An exported **CSV** or **JSON** file, and a bug report, can contain:
- your games' names and **the paths to their files**, which include your **Windows user name** when a game is installed
in your user folder;
- your PC's processor, graphics card, driver and Windows version;
- your tags and notes.
Look at a file before you share it. **Help ▸ Report a bug…** builds the report on your PC, shows you every file in it,
and removes your user folder's path from the logs; you decide whether to attach it to an issue on GitHub. An export is
written as it is. Once you share a file, whoever receives it — and the site you post it to — can read it.
## Updating and going back
A new version upgrades the database in place. **An older version cannot open it afterwards** — there is no downgrade,
so keep a backup if you might want to go back.
+49
View File
@@ -0,0 +1,49 @@
# Questions and answers
## Why does my session say N/A everywhere?
The game was recorded, not measured (**T2**): hooking is off for it, FrameLedger found anti-cheat, or the game is one
FrameLedger cannot measure. The session's summary says which. See [Record a game](02-record-a-game.md).
## I switched hooking on, and the game is still not measured.
FrameLedger refuses a game where it finds anti-cheat, and cannot measure 32-bit games, DirectX 9 games, Vulkan games you
start yourself, or a game that runs as administrator (unless the agent does too). A game that was already running when
FrameLedger updated needs one restart. The game's page and the session's summary say what happened.
## Why "Presented FPS" and not the game's own frame rate?
Because frame generation could not be measured in that session. Presented FPS counts every frame the game handed to
Windows, and the sentence beside it says whether generated frames could be among them. FrameLedger never labels a
number that may include generated frames as the game's own.
## Why is the video memory different from my in-game overlay?
FrameLedger shows what Task Manager shows for the game's process: its *Dedicated GPU memory*. Overlays often show the
whole graphics card's use, which includes every other program, or the amount the game is allowed to use. FrameLedger
shows the whole card's figure too, separately.
## Why is the CPU temperature N/A?
Reading it needs *Run the agent as administrator* (Settings ▸ Capture agent) and the separately installed PawnIO
driver — and that reading has not been checked on real hardware yet. CPU load needs neither.
## Windows warned me when I installed FrameLedger.
FrameLedger is not code-signed, so SmartScreen does not know its publisher. Check the download against the published
SHA-256 checksum before you run it ([Install and first start](01-install.md)).
## Can I use FrameLedger with online games?
Recording works with any game. **Hooking** an online or competitive game risks your account — see
[Anti-cheat and safety](04-anti-cheat-and-safety.md).
## Something is wrong. How do I report it?
**Help ▸ Report a bug…** builds a report on your PC and opens the issue form on GitHub; you decide what to attach. If
FrameLedger missed a game's anti-cheat, use the **Safety gap** form instead.
## Where are the full documents?
**Help ▸ About ▸ Legal documents**, or Settings ▸ Legal ▸ Reopen the legal documents. What FrameLedger cannot do is in
[Limitations](../LIMITATIONS.md).
+24
View File
@@ -0,0 +1,24 @@
# FrameLedger user guide
FrameLedger records how your games run on this PC — frame rate, frame times, the settings a game is really rendering
with, temperatures, and how much memory the game uses — and keeps every session so you can compare them later.
Everything stays on your PC.
Each page below takes a minute or two to read.
1. [Install and first start](01-install.md)
2. [Record a game](02-record-a-game.md)
3. [Read your results](03-read-your-results.md)
4. [Anti-cheat and safety](04-anti-cheat-and-safety.md) — read this before you switch hooking on for any game
5. [Your data](05-your-data.md)
6. [Questions and answers](06-faq.md)
7. [The terms, in plain words](terms-in-plain-words.md)
What FrameLedger cannot do is listed on its own page: [Limitations](../LIMITATIONS.md) (in the app: Help ▸
Limitations).
**FrameLedger is beta software.** It certainly still has bugs. If something goes wrong, Help ▸ Report a bug… builds a
report on your PC that you can look at before you decide to share it.
This guide is part of FrameLedger and describes the version it came with. It is also in the project's repository on
GitHub, in the `guide` folder.
+43
View File
@@ -0,0 +1,43 @@
# The terms, in plain words
This page sums up the documents FrameLedger shows you. **It is a summary, not the terms:** the documents themselves
are the terms, and where this page and a document differ, the document is right. They are all under **Help ▸ About ▸
Legal documents**.
## End User License Agreement — you accept it
- FrameLedger is **free software** under the GNU GPL v3 (below), and nothing in the agreement takes any of that away.
- It records performance data **on your PC**.
- It hooks a game **only if you switch that on for that game**, after a warning. If anti-cheat bans your account for
it, **that risk is yours**, and the developer cannot undo a ban.
- It is **beta** software, provided **without warranty**, and the developer is not liable for damage it causes — as
far as the law allows. Rights the law gives you as a consumer, which no agreement can take away, stay yours.
- Read it: [EULA](../legal/EULA.md).
## Disclaimer — you accept it
How FrameLedger measures, why that can be detected by anti-cheat, what its safety checks can and cannot catch, how
accurate its measurements are, that your PC must meet each game's own requirements, and what *Run the agent as
administrator* changes. Read it: [Disclaimer](../legal/DISCLAIMER.md).
## Privacy Policy — you accept it
Everything stays on your PC: no account, no telemetry, no analytics. The only network requests are the update check
and the update download, to GitHub, and the check can be switched off. It lists what FrameLedger can observe, and says
that sharing an export or a bug report is your decision. Read it: [Privacy Policy](../legal/PRIVACY_POLICY.md).
## GNU General Public License v3 — your licence, shown for information
It gives you the right to **use, study, share and change** FrameLedger. You do not have to accept it to use the
program. If you **give copies to others** — changed or not — you must pass on the same freedoms and offer the source
code. Read it: [GPL v3](../LICENSE).
## NOTICE — the copyright line and three extra terms
The copyright line, and three terms of the kinds the GPL's section 7 allows: keep the copyright line and the
attribution; a changed version must say it is changed and must not be called just "FrameLedger"; and the terms give no
rights to the FrameLedger name or logo. Read it: [NOTICE](../NOTICE).
## When the documents change
A new version of a document you accepted is shown to you again before FrameLedger continues.
+11 -5
View File
@@ -11,8 +11,8 @@
that changes what FrameLedger.Overlay or the capture host does; date the change.
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-09-28.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.10`** (2026-09-28), an unsigned installer built from that tag with its
> ⚠ **What FrameLedger actually measures today — 2026-10-03.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.11`** (2026-10-03), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -65,8 +65,14 @@
> - **Engine version:** the exact Unreal Engine 4 or 5 version, read from the game's executable on disk and
> labelled with what it rests on; `N/A` where the executable names none. Other engines show what their own
> files state.
> - **The game's own memory (since beta.12):** its dedicated and shared GPU memory and its private
> working set — the numbers Task Manager's Details tab shows — with its working set and commit, read
> once a second from Windows' own counters, from outside the game, in every session: a game
> FrameLedger injects into through the handle it already holds, any other by opening it briefly with
> the least access Windows offers (and adding up every process running its executable). Shown with
> mean, median and peak. The game's other processes (launchers, helpers) are not counted.
> - **Video memory:** in use on the whole graphics card, recorded from Windows and GPU-driver telemetry
> and charted. **Not measured at all:** each game's own video-memory use and budget, which frame
> and charted. **Not measured at all:** the video-memory budget Windows gives a game, which frame
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
> measured from frame times.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
@@ -84,8 +90,8 @@
> game in the library, before injection, at a session's start or by the 30 s re-check; the game's page says so,
> and nothing turns it back on for that executable — except a user-mode exception you make yourself, per game,
> in Settings (off by default): only where the only finding is one anti-cheat that runs entirely in user mode, with
> no driver file in the game's folder, on a game already measured successfully at least twice. The guard still
> runs every check under it and ends it on anything new; a ban remains possible.
> no driver file in the game's folder. Its first two sessions are a trial, and one that does not go well ends it
> for good. The guard still runs every check under it and ends it on anything new; a ban remains possible.
>
> Where a value is not measured it reads `N/A`, with two exceptions: FPS then shows Presented FPS with a
> note on what it may include, and ray-tracing flags may show a value you set yourself, labelled as
+25 -20
View File
@@ -1,12 +1,6 @@
# FrameLedger — Disclaimer
**Version:** 2.8 · **Effective:** {{RELEASE_DATE}}
> **How this document is kept true.** The statement of what FrameLedger measures (§4) is `legal/ACCURACY.md`,
> embedded here and in `README.md` and bound to its source by `tools/accuracy-check.ps1`, which fails the build when a
> copy differs. Earlier versions of this document carried a hand-maintained audit of how its own promises drifted from
> the software — six re-counts between 2026-08-04 and 2026-09-15; that history is `docs/legal-drift-history.md`,
> moved out of the text you accept on 2026-09-16 and kept in full.
**Version:** 2.10 · **Effective:** {{RELEASE_DATE}}
## 0. This is pre-release (beta) software
@@ -42,7 +36,9 @@ Be precise about what that does and does not promise, because the shorter versio
Install it somewhere only you can write to, and verify the published SHA-256 checksums.
**What it observes:** arguments the game passes to graphics APIs we intercept (presentation, upscaling, ray tracing, pipeline creation) and video-memory usage reported by the graphics runtime.
**What it observes inside the game:** arguments the game passes to graphics APIs we intercept (presentation, upscaling, ray tracing, pipeline creation).
**What it reads about the game from outside it, in every session:** the game process's own memory use — its dedicated and shared video memory and its working sets, the figures Windows' Task Manager shows — from Windows' performance counters and process-memory information. For a game it does not inject into, FrameLedger opens the game's process for this with the least access Windows offers, once a second, and closes it again; it reads nothing inside the process.
> **What of that list is observed today is stated once, in §4 below** (the block `legal/ACCURACY.md` carries, dated). The list here describes what the software is designed to observe, and the boundary — API arguments and nothing else — holds for all of it.
@@ -69,8 +65,8 @@ FrameLedger is designed to reduce that risk substantially:
the game exits.
- FrameLedger contains **no evasion techniques of any kind** — it does not hide, rename, obfuscate, or disguise itself. It is intended to be plainly identifiable to any security software that looks.
For completeness about what it *does* run inside the game: besides the intercepted calls themselves, the component starts **one background thread** that sleeps for a second at a time and checks whether it has been told to stop. It reads only FrameLedger's own shared memory. It does not scan the game, enumerate what the system has loaded, or query Windows services — deliberately, because software that does those things from inside a game process looks like the thing this tool is trying not to be mistaken for.
- FrameLedger injects into a game only after you enable that game individually. For every other game — and for any game where the safety checks refuse — it records the session's start, end and duration together with whatever hardware sensor readings your machine provides, and reports every other measurement as not available. **There is no measurement mode that works without injecting**; an earlier version of this document described one, and it was never built. FrameLedger never estimates a value it could not measure, and it always shows which of the two modes produced a session. Neither mode requires administrator rights.
For completeness about what it *does* run inside the game: besides the intercepted calls themselves, the component starts **one background thread**. It wakes once a second, or when the game loads a library, and then: checks FrameLedger's own shared memory for a request to stop and for the heartbeat of the safety scan described above; asks Windows, by name, whether the graphics, upscaling and frame-generation libraries it knows about are loaded, and puts its interception into the ones that are (for ray tracing it creates one command list on the game's own Direct3D 12 device, to find the functions to intercept); writes its counters to FrameLedger's shared memory; and writes FrameLedger's own log file. It does not scan the game's memory, list the modules or processes on the system, or query Windows services — deliberately, because software that does those things from inside a game process looks like the thing this tool is trying not to be mistaken for.
- FrameLedger injects into a game only after you enable that game individually. For every other game — and for any game where the safety checks refuse — it records the session's start, end and duration together with whatever hardware sensor readings your machine provides and the game's own memory use as Windows reports it (§1), and reports every other measurement as not available. **There is no measurement mode that works without injecting**; an earlier version of this document described one, and it was never built. FrameLedger never estimates a value it could not measure, and it always shows which of the two modes produced a session. Neither mode requires administrator rights.
**However, these protections cannot be complete:**
@@ -92,11 +88,14 @@ notes.
**Since 0.1.0-beta.9 there is one exception, and it is not a way past the guard.** A Settings option, off unless you
turn it on, lets you make an exception — one game at a time, after a disclosure you must accept — for a game whose only
finding is a single anti-cheat that works entirely in user mode (no kernel driver, no service, and no driver file
anywhere in the game's folder), that is on no list of titles FrameLedger refuses, and that FrameLedger has already
measured successfully at least twice. Under it the guard still runs every check, before injecting and every 30
seconds, and still refuses anything else it finds; the exception ends by itself when something new is found, when a
session under it crashes or is stopped for safety, or when the game is updated, and turning the option off suspends
it. Sessions recorded under it are marked with the anti-cheat they ran beside.
anywhere in the game's folder) and that is on no list of titles FrameLedger refuses. Since 0.1.0-beta.11 the game does
not need to have been measured before: **the first two sessions under the exception are a trial**, and if one of them
does not go well — it crashes, records nothing, does not end normally, is stopped for safety, or something new is found
— the exception ends and can never be made again for that game. Under it the guard still runs every check, before
injecting and every 30 seconds, and still refuses anything else it finds; after the trial the exception ends by itself
when something new is found, when a session under it crashes or is stopped for safety, or when the game is updated, and
turning the option off suspends it. Sessions recorded under it are marked with the anti-cheat they ran beside. **Two
good sessions are not evidence that the anti-cheat did not notice** — a ban may still come later.
**It exists because users asked for it, and it carries exactly the risk this document describes.** That anti-cheat
may still detect FrameLedger in the game and warn, block or permanently ban your account — possibly days later — and
@@ -114,8 +113,8 @@ Software running inside another process can, in principle, destabilize it. Frame
Frame timing is derived from high-resolution timestamps taken at the moment the game presents each frame; upscaling, frame-generation and ray-tracing state are read from the parameters the game passes to those APIs. This is substantially more accurate than inferring settings from files on disk, but **no measurement is guaranteed to be exact**:
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-09-28.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.10`** (2026-09-28), an unsigned installer built from that tag with its
> ⚠ **What FrameLedger actually measures today — 2026-10-03.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.11`** (2026-10-03), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -168,8 +167,14 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> - **Engine version:** the exact Unreal Engine 4 or 5 version, read from the game's executable on disk and
> labelled with what it rests on; `N/A` where the executable names none. Other engines show what their own
> files state.
> - **The game's own memory (since beta.12):** its dedicated and shared GPU memory and its private
> working set — the numbers Task Manager's Details tab shows — with its working set and commit, read
> once a second from Windows' own counters, from outside the game, in every session: a game
> FrameLedger injects into through the handle it already holds, any other by opening it briefly with
> the least access Windows offers (and adding up every process running its executable). Shown with
> mean, median and peak. The game's other processes (launchers, helpers) are not counted.
> - **Video memory:** in use on the whole graphics card, recorded from Windows and GPU-driver telemetry
> and charted. **Not measured at all:** each game's own video-memory use and budget, which frame
> and charted. **Not measured at all:** the video-memory budget Windows gives a game, which frame
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
> measured from frame times.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
@@ -187,8 +192,8 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> game in the library, before injection, at a session's start or by the 30 s re-check; the game's page says so,
> and nothing turns it back on for that executable — except a user-mode exception you make yourself, per game,
> in Settings (off by default): only where the only finding is one anti-cheat that runs entirely in user mode, with
> no driver file in the game's folder, on a game already measured successfully at least twice. The guard still
> runs every check under it and ends it on anything new; a ban remains possible.
> no driver file in the game's folder. Its first two sessions are a trial, and one that does not go well ends it
> for good. The guard still runs every check under it and ends it on anything new; a ban remains possible.
>
> Where a value is not measured it reads `N/A`, with two exceptions: FPS then shows Presented FPS with a
> note on what it may include, and ray-tracing flags may show a value you set yourself, labelled as
+10 -6
View File
@@ -1,6 +1,6 @@
# FrameLedger — End User License Agreement (EULA)
**Version:** 1.3 · **Effective:** {{RELEASE_DATE}}
**Version:** 1.5 · **Effective:** {{RELEASE_DATE}}
This End User License Agreement ("Agreement") applies to **FrameLedger** ("the Software"), developed and published by **poli0981** ("the Developer"), contactable at <contact@poli0981.dev> — see <https://poli0981.dev/> for other contact channels.
@@ -10,11 +10,11 @@ The Software is free and open-source software licensed to you under the **GNU Ge
## 2. What the Software does
The Software records game performance data, hardware telemetry (temperatures, load, memory usage), and game metadata, and stores this data **locally on your device**. Details are described in the Privacy Policy and Disclaimer accompanying the Software.
The Software records game performance data, hardware telemetry (temperatures, load, memory usage), each game's own memory use as Windows reports it, and game metadata, and stores this data **locally on your device**. Details are described in the Privacy Policy and Disclaimer accompanying the Software.
## 2A. Code injection — your responsibility
To measure rendering settings accurately, the Software can load a component into a game process, **but only for games you have individually enabled**, after a consent prompt that explains the risk. The Software refuses to do so when it detects anti-cheat or anti-tamper software, turns hooking off for that game, and provides no means to override that refusal — except a narrow, per-game exception for anti-cheat that works entirely in user mode, which you may make yourself, after a separate disclosure, for a game the Software has already measured successfully, and under which the Software still runs every check (Disclaimer §2A). By making such an exception you accept, for that game, the risk described in (b) below.
To measure rendering settings accurately, the Software can load a component into a game process, **but only for games you have individually enabled**, after a consent prompt that explains the risk. The Software refuses to do so when it detects anti-cheat or anti-tamper software, turns hooking off for that game, and provides no means to override that refusal — except a narrow, per-game exception for anti-cheat that works entirely in user mode, which you may make yourself, after a separate disclosure, whose first two sessions are a trial that ends it for good if one of them does not go well, and under which the Software still runs every check (Disclaimer §2A). By making such an exception you accept, for that game, the risk described in (b) below.
By enabling this feature for a game, you confirm that:
@@ -28,7 +28,7 @@ By enabling this feature for a game, you confirm that:
(e) the Developer has no ability to reverse a ban, recover lost progress, or intervene with any game publisher on your behalf, and accepts no liability for such outcomes.
The Software records without injecting unless you enable injection for a specific game. In that mode it records only the session's duration and whatever hardware sensor data is available, indicates that mode on the session, and reports unavailable measurements as such rather than estimating them. Neither mode requires the Software's agent to run with administrator rights.
The Software records without injecting unless you enable injection for a specific game. In that mode it records only the session's duration, whatever hardware sensor data is available, and the game's own memory use as Windows reports it — read from outside the game, never from the game's memory — indicates that mode on the session, and reports unavailable measurements as such rather than estimating them. Neither mode requires the Software's agent to run with administrator rights.
## 2B. Pre-release software, and your PC
@@ -43,11 +43,11 @@ unstable, overheating, overclocked or faulty hardware, are your responsibility a
## 3. Acceptance
By clicking "Accept" in the first-run dialog or by using the Software, you confirm that you have read this Agreement, the Disclaimer, and the Privacy Policy.
By clicking "Accept" in the first-run dialog or by using the Software, you confirm that you have read this Agreement, the Disclaimer, and the Privacy Policy. The GPL-3.0 is shown in the same dialog for your information: it is your licence to the Software, and you need not accept it to run the Software (GPL-3.0 §9).
## 4. Third-party components
The Software includes and interoperates with third-party components listed in `legal/THIRD_PARTY_NOTICES.md`, each under its own license. The optional **PawnIO** kernel driver is a separate third-party product installed by you at your discretion and governed by its own license and terms.
The Software includes and interoperates with third-party components listed in `legal/THIRD_PARTY_NOTICES.md` — in an installed copy, `licenses\THIRD_PARTY_NOTICES.md` beside the Software, and Help ▸ About — each under its own license. The optional **PawnIO** kernel driver is a separate third-party product installed by you at your discretion and governed by its own license and terms.
## 5. No warranty
@@ -69,6 +69,10 @@ The Software can check for updates via GitHub. Installing updates is always your
Your rights under the GPL-3.0 continue as described in that license. You may stop using the Software at any time by uninstalling it; local data removal options are offered during uninstall.
## 10. Your rights as a consumer, and the rest of this Agreement
Nothing in this Agreement limits any right you have under consumer protection law that cannot be limited or waived by agreement; where such a law applies, the warranty and liability terms above apply only as far as that law allows. If a court finds any provision of this Agreement unenforceable, that provision is enforced to the extent permitted, and the rest of the Agreement remains in effect.
---
Contact: <contact@poli0981.dev> · Developer: <https://poli0981.dev/> · Project: <https://github.com/poli0981/frameledger>
+7 -11
View File
@@ -1,6 +1,6 @@
# FrameLedger — Privacy Policy
**Version:** 2.5 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.6 · **Effective:** {{RELEASE_DATE}}
**Short version: everything stays on your PC. FrameLedger has no accounts, no telemetry, no analytics, and never uploads your data anywhere.**
@@ -9,7 +9,7 @@
Stored in `%LOCALAPPDATA%\FrameLedger` on your device:
- Your game library entries (names, executable paths, metadata you or the app filled in, and whether each one is recorded).
- Performance sessions: frame timing series, computed statistics, hardware sensor series (temperatures, load, memory usage), session duration, crash flags, the graphics driver's settings the game ran under (NVIDIA only), how the game's window was shown (full-screen, borderless or windowed, for how long, its size and the monitor's), tags and notes you write.
- Performance sessions: frame timing series, computed statistics, hardware sensor series (temperatures, load, memory usage), the game's own memory use (its dedicated and shared video memory, private working set, working set and commit, once a second), session duration, crash flags, the graphics driver's settings the game ran under (NVIDIA only), how the game's window was shown (full-screen, borderless or windowed, for how long, its size and the monitor's), tags and notes you write.
- A hardware snapshot per session (CPU/GPU model, driver version, RAM size, OS build, display mode) used for the "what changed between sessions" feature.
- App settings, logs (rotated daily — the app keeps 7 days, the capture agent 14 — including the logs written by the component loaded into games), and, after a crash of the app itself, crash dump files.
- Which games you enabled code injection for, and when you consented.
@@ -27,26 +27,22 @@ FrameLedger makes **no network connections except the following two**, both from
There is no other request. In particular, the anti-cheat safety list and the detection rules ship **with the build** and are installed locally on first run; the software fetches no rules from anywhere, and it looks nothing up on any store. When a rules feed exists it will be a new version of this document, which the app shows you again before continuing (§6).
> **History.** Versions 2.0 and 2.1 of this document listed three further rows — a weekly safety-list update, a weekly detection-rules update, and an opt-in Steam store lookup — describing requests the software did not make; from 2026-08-04 they carried an audit note saying so. Version 2.2 (2026-09-16) removes them. A privacy policy that lists a transmission which never happens is as wrong as one that omits a transmission which does.
GitHub's own privacy practices apply to requests it receives: <https://docs.github.com/privacy>.
## 3. Bug reports — always manual
The "Report a bug" feature builds a zip file **on your device**, shows you exactly which files it contains, and lets you inspect them. Nothing is transmitted by the app; **you** decide whether to attach the file to a GitHub issue in your browser. Logs are redacted (user directory paths removed) before bundling. Optional items (crash dumps, last-session metadata) are included only when you tick their checkboxes.
## 3A. Sharing an export or a bug report
An exported session (CSV or JSON) and a bug report can contain your games' names and **the paths to their files** — which include your **Windows user name** when a game is installed under your user folder — your hardware model, graphics driver and Windows build, the times you played, and your tags and notes. A bug report removes user directory paths from its logs; an export is written as it is. Look at a file before you share it. Once you share it, it is outside FrameLedger: whoever receives it, and the site you post it to, can read it under their own terms.
## 4. What the app can technically observe
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); video-memory usage reported by the graphics runtime; loaded module names of a game being captured (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), and the store files that name it (Steam's and GOG's, on your disk) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; and how busy the processor is and how much memory is in use, from Windows' own counters.
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), and the store files that name it (Steam's and GOG's, on your disk) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; and how busy the processor is and how much memory is in use, from Windows' own counters.
It does **not** read game memory outside those API parameters, and does not read game saves, chat, input content, network traffic, or anything unrelated to performance measurement. It records only for programs you added to your library and did not switch recording off for — a program whose recording is off is not watched at all — and injects only into games you individually enabled.
> **History.** Version 2.3 (2026-09-23) adds the per-entry recording switch. Before it, every program in your library was recorded whenever it ran, which recorded a utility that starts with Windows at every boot.
>
> Version 2.4 (2026-09-25, 0.1.0-beta.8) names what the software reads to check every game in your library for anti-cheat — until then it checked only a game you asked to hook — and to name the versions of its files, and the NVIDIA driver's settings for your games. The files of a library game's folder were already read to detect its engine and features; this version is the first to say so.
>
> Version 2.5 (2026-09-27, 0.1.0-beta.10) adds how a tracked game's window is shown — read from Windows — and the engine build name read from an Unreal Engine game's executable. It is also the first version to say two things the software already did: it reads the **content** of a library game's executable (markers in its first 8 MB and its import table, since the detection of engines and features; and, when a session starts, the graphics-library markers in the whole file), and it reads the processor load and the memory in use (since 0.1.0-beta.3). Nothing here leaves your device, as before.
All of this stays on your device. None of it is transmitted anywhere.
## 5. Children
+4 -2
View File
@@ -29,7 +29,6 @@ FrameLedger is licensed under **GPL-3.0-only**. It includes or depends on the th
| Component | Use | License | Notes |
|---|---|---|---|
| **MinHook** | Inline function hooking in `FrameLedger.Overlay` | BSD-2-Clause | Vendored and built from source, pinned by commit. Copyright notice must ship in `legal/licenses/` |
*(The **Intel PresentMon** row was removed on 2026-08-27. It is not bundled, not fetched, not redistributed and no longer used at all — §S31 retired it as a measurement oracle and the owner then dropped it outright — so a notice for it would be over-disclosure, which this document treats as a defect in the same way an omission is. `tools/license-check.ps1`'s matching claim was removed in the same commit, because a bidirectional check whose subject no longer exists cannot go green honestly: it would be asserting agreement about nothing.)*
| Vulkan headers / loader interfaces | `FrameLedger.VkLayer` implicit layer | Apache-2.0 | Khronos headers; layer implemented against the documented loader–layer interface |
| LibreHardwareMonitorLib | GPU sensors (all vendors) + CPU/motherboard sensors (optional, elevated) | MPL-2.0 | See §GPU telemetry below. Consumed unmodified |
| WPF UI (`Wpf.Ui`, lepoco) | Fluent UI theme/controls/navigation | MIT | © lepo.co, Leszek Pomianowski and contributors. License copy must ship with the app (MIT requirement) — `legal/licenses/nuget/WPF-UI.txt`, the package's own LICENSE.md |
@@ -43,6 +42,7 @@ FrameLedger is licensed under **GPL-3.0-only**. It includes or depends on the th
| CsWin32 (build-time) | Win32 interop source generator | MIT | Build-time only |
| NVIDIA NVAPI SDK | NVIDIA GPU telemetry + Reflex latency | MIT | **Vendored 2026-08-05** — nine headers + `amd64/nvapi64.lib`, at `src/native/third_party/nvapi/`. See §GPU telemetry below |
| H.NotifyIcon.Wpf | Tray icon | MIT | |
| Markdig | Markdown rendering in the App (since beta.12): the Legal Gate, Help, About, the update notes | BSD-2-Clause | © Alexandre Mutel. The package ships no licence file; its text is the project's own `license.txt` at the packaged commit, a reviewed override (`tools/license-overrides/Markdig.txt`) → `legal/licenses/nuget/Markdig.txt`. Consumed unmodified; HTML in a document is shown as text, never interpreted, and no image is fetched |
| **Transitive, under LibreHardwareMonitorLib** — BlackSharp.Core, DiskInfoToolkit, RAMSPDToolkit-NDD | Hardware access helpers LHM 0.9.6 depends on | MPL-2.0 | Not named by this table until 2026-09-15. **Exhibit B clear:** authenticated code search of each upstream repository (Blacktempel/BlackSharp, /DiskInfoToolkit, /RAMSPDToolkit) finds the sentence once, in `LICENSE` — the template — and no source file carries an MPL notice at all, so the repository licence governs and §3.3 Secondary Licenses applies. Default branch as searched; the nuspecs pin commits `c70b735c`, `25319eae`, `3b47b960`. Source Code Form links are in each package's text |
| **Transitive, under LibreHardwareMonitorLib** — HidSharp; Mono.Posix.NETStandard; System.IO.Ports, System.Management, System.CodeDom, System.IO.FileSystem.AccessControl | USB HID, POSIX helpers, serial ports, WMI | Apache-2.0 (HidSharp's LICENSE.txt); MIT (Mono's LICENSE, reviewed override); MIT (Microsoft) | Mono.Posix.NETStandard declares only a URL; its text is the Mono LICENSE file that URL resolves to, fetched 2026-09-15 and committed as `tools/license-overrides/Mono.Posix.NETStandard.txt` |
| **Transitive, under ScottPlot.WPF** — SkiaSharp, HarfBuzzSharp and their Win32 native assets; OpenTK 4.x; OpenTK.GLWpfControl; OpenTK.redist.glfw | 2-D rendering, text shaping, OpenGL host | MIT; GLFW is zlib (its COPYING.md) | The native Skia and HarfBuzz builds carry their own third-party notices, shipped once each in `legal/licenses/nuget/notices-*.txt`. OpenTK.GLWpfControl declares only a URL (reviewed override, like Mono.Posix) |
@@ -50,6 +50,8 @@ FrameLedger is licensed under **GPL-3.0-only**. It includes or depends on the th
| Roslynator, Meziantou.Analyzer, VS Threading Analyzers (build-time) | Static analysis | Apache-2.0 / MIT | Build-time only |
| **Test-time only, never shipped** — xUnit.net v3 4.x (`xunit.v3.mtp-off`, `xunit.runner.visualstudio`), Microsoft.NET.Test.Sdk, coverlet.collector, FluentAssertions 7.x, NSubstitute; Catch2 (native) | Unit and integration tests, coverage | Apache-2.0 (xUnit.net, <https://github.com/xunit/xunit>; FluentAssertions **7.x only**) · MIT (Test.Sdk, coverlet) · BSD-3-Clause (NSubstitute) · BSL-1.0 (Catch2) | Not named by this table until 2026-09-21. None of them is in a published package: `12_BUILD` publishes App and Agent only, `tools/package-closure-check.ps1` keeps the test projects out of that closure, and `legal/licenses/nuget/` therefore lists none of them. xUnit.net moved 3.2.2 → 4.0.1 on 2026-09-21, same licence. **FluentAssertions is pinned to `[7.2.2]` on purpose**: 8.x is Xceed's Community Licence, not an OSI licence (`Directory.Packages.props`, `20_OPEN_QUESTIONS` §G). Catch2's text is `legal/licenses/catch2-BSL-1.0.txt` |
*(The **Intel PresentMon** row was removed on 2026-08-27. It is not bundled, not fetched, not redistributed and no longer used at all — §S31 retired it as a measurement oracle and the owner then dropped it outright — so a notice for it would be over-disclosure, which this document treats as a defect in the same way an omission is. `tools/license-check.ps1`'s matching claim was removed in the same commit, because a bidirectional check whose subject no longer exists cannot go green honestly: it would be asserting agreement about nothing.)* *(Moved out of the table on 2026-10-03: a line without cells inside a table ended it for Markdig, so the App drew the whole table as text; GitHub draws it either way.)*
## GPU telemetry — what is bundled and what is not
Telemetry is layered so no proprietary vendor licence is ever required (`docs/18_GPU_VENDOR_APIS.md`).
@@ -99,7 +101,7 @@ All product names, logos, and brands are property of their respective owners and
## Attribution requirements checklist (release gate)
- [x] `legal/licenses/` contains full texts: MIT (per-project copies, **including `nvapi-MIT.txt`**), BSD-2-Clause (MinHook), MPL-2.0, Apache-2.0 — **2026-09-15 (P4 PR-6):** the vendored natives' copies as before, plus one generated text per shipped NuGet package in `legal/licenses/nuget/` (77), gated by `license-check` §3; the .NET runtime's licence and notices are added to the package by `release.yml`. The copies ship: the App's publish carries `legal/licenses/` as `licenses/`
- [ ] About → Third-party tab lists this table with versions filled from `Directory.Packages.props` — **not built as of 2026-09-16 and not a gate for the first pre-release**: the texts ship as files (`licenses/` beside the App, `licenses/nuget/INDEX.md` lists every package with its version), and Help ▸ Documentation opens this file; the tab is an open UI item
- [x] About → Third-party tab lists this table with versions ~~filled from `Directory.Packages.props`~~ — **built beta.12 (2026-10-03)**: Help ▸ About ▸ *Third-party licences* renders this file and `licenses/nuget/INDEX.md` — every shipped package with its version and licence, generated from what the build restores rather than from `Directory.Packages.props` — with a button that opens the published `licenses\` folder. ~~not built as of 2026-09-16 and not a gate for the first pre-release: the texts ship as files (`licenses/` beside the App, `licenses/nuget/INDEX.md` lists every package with its version), and Help ▸ Documentation opens this file; the tab is an open UI item~~
- ~~PresentMon license + copyright shipped beside the bundled binary~~ — **removed 2026-08-27 with the dependency.** Nothing Intel-authored is distributed by this project
- [x] MPL-2.0 source-availability note points to upstream LibreHardwareMonitor repository — every MPL-2.0 package text in `legal/licenses/nuget/` names its Source Code Form (MPL-2.0 §3.2), LHM's `https://github.com/LibreHardwareMonitor/LibreHardwareMonitor` included (2026-09-15)
- [x] LHM checked for MPL-2.0 Exhibit B on any depended-upon file — clear as of 0.9.6 / commit `3d331e33`, 2026-08-02
+47
View File
@@ -0,0 +1,47 @@
# Names and trademarks
FrameLedger measures games on hardware, drivers and platforms made by other companies, so its software and its
documents name their products constantly. This page says how those names are used, and how the name *FrameLedger*
itself may be used. It is information for readers of the repository and of the documentation; it is not one of the
documents the app asks you to accept.
## Other companies' names
Microsoft, Windows, DirectX, Direct3D and DXGI are trademarks of Microsoft Corporation. NVIDIA, GeForce, RTX, DLSS,
Reflex, NVAPI and Streamline are trademarks of NVIDIA Corporation. AMD, Radeon, FSR and FidelityFX are trademarks of
Advanced Micro Devices, Inc. Intel, Arc and XeSS are trademarks of Intel Corporation. Vulkan is a registered trademark
of the Khronos Group Inc.; OpenGL is a registered trademark of Hewlett Packard Enterprise, used under licence by the
Khronos Group. Steam and Valve are trademarks of Valve Corporation; Epic Games, the Epic Games Store and Unreal Engine of
Epic Games, Inc.; Unity of Unity Technologies. GOG, GOG Galaxy and itch.io are trademarks of their respective owners. The
names of anti-cheat and anti-tamper products, and the names and store identifiers of games, belong to their respective
owners. All other product names are trademarks of their respective owners.
They are used **only to say what FrameLedger works with or measures** — for example, which upscaler a game used, or
which anti-cheat product made FrameLedger refuse to load into a game. Such a mention is a statement of fact about
compatibility or detection; it is not a claim about the quality of anyone's product.
**FrameLedger is an independent project.** It is not affiliated with, endorsed by or sponsored by any of these
companies, by any game's developer or publisher, or by any anti-cheat vendor, and none of them supports it.
- The anti-cheat products named in `rules/detection-rules.json` are listed so that FrameLedger can **refuse** to load
into a game protected by them; the list says nothing else about them.
- The games named in `docs/LIST_GAME_TESTED.md` are games the developer ran FrameLedger with, on one machine; the list is
not a benchmark claim and not a recommendation.
## The name FrameLedger
*FrameLedger* is the name of this project. The licence (`LICENSE`, `NOTICE`) gives you broad rights in the software
but, by its additional term (e), **no rights in the name**, the project's logo or its icon, beyond describing truthfully
where a work comes from:
- **fine:** "based on FrameLedger", "a fork of FrameLedger", "compatible with FrameLedger's export format", a link to
the project, an article or video about FrameLedger;
- **not fine:** naming a modified version "FrameLedger", using the icon or name for a build the project did not make,
or suggesting the developer made or endorses something they did not (NOTICE (c)).
`FORKING.md` says what a fork that ships builds should rename.
## Questions
If you represent one of the companies above and believe a mention here is wrong, or you want to ask about using the
FrameLedger name, write to contact@poli0981.dev.
+1
View File
@@ -18,6 +18,7 @@ from the runtime packs the publish used.
| HarfBuzzSharp.NativeAssets.Win32 | 8.3.1.1 | MIT | App | [HarfBuzzSharp.NativeAssets.Win32.txt](HarfBuzzSharp.NativeAssets.Win32.txt) |
| HidSharp | 2.6.4 | the file LICENSE.txt in the package | Agent, App | [HidSharp.txt](HidSharp.txt) |
| LibreHardwareMonitorLib | 0.9.6 | MPL-2.0 | Agent, App | [LibreHardwareMonitorLib.txt](LibreHardwareMonitorLib.txt) |
| Markdig | 1.4.0 | BSD-2-Clause | App | [Markdig.txt](Markdig.txt) |
| Microsoft.Data.Sqlite.Core | 10.0.12 | MIT | Agent, App | [Microsoft.Data.Sqlite.Core.txt](Microsoft.Data.Sqlite.Core.txt) |
| Microsoft.Extensions.Configuration | 10.0.12 | MIT | Agent, App | [Microsoft.Extensions.Configuration.txt](Microsoft.Extensions.Configuration.txt) |
| Microsoft.Extensions.Configuration.Abstractions | 10.0.12 | MIT | Agent, App | [Microsoft.Extensions.Configuration.Abstractions.txt](Microsoft.Extensions.Configuration.Abstractions.txt) |
+47
View File
@@ -0,0 +1,47 @@
Markdig 1.4.0
Licence declared: BSD-2-Clause
Text below: tools/license-overrides/Markdig.txt, a reviewed copy of the project's own licence file; the package ships none
Copyright: Alexandre Mutel
Authors: Alexandre Mutel
Project: https://xoofx.github.io/markdig
Ships in: App
-------------------------------------------------------------------------------
Reviewed override for Markdig 1.4.0 (tools/license-gather.ps1).
The package declares <license type="expression">BSD-2-Clause</license> and ships no licence file. The text
below is the project's own license.txt at the commit the package names (<repository commit=
"56e9c238584a44a169f174c881855c049768634c">), fetched on 2026-10-03 from
https://raw.githubusercontent.com/xoofx/markdig/56e9c238584a44a169f174c881855c049768634c/license.txt,
verbatim. The package's <copyright> field is "Alexandre Mutel"; the file names the same holder.
Used by the App since beta.12 to render the documents it shows (the Legal Gate, Help, About, the user guide);
consumed unmodified.
-------------------------------------------------------------------------------
Copyright (c) 2016-2026, Alexandre Mutel
All rights reserved.
Redistribution and use in source and binary forms, with or without modification
, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+16 -11
View File
@@ -1,13 +1,14 @@
{
"$comment": [
"Rules are DATA, not code (docs/05_DETECTION.md). This file ships with the",
"app and is updatable from the repository independently of releases.",
"app. It is NOT fetched: there is no rules feed (docs/20_OPEN_QUESTIONS.md",
"§S20 feed half), so a change here reaches users with a release, seeded by",
"the Agent from the copy beside it. (This comment said otherwise until",
"2026-10-04.)",
"",
"The `anticheat` block is what feeds the hard gate in",
"docs/19_SAFETY_AND_ANTICHEAT.md. Updates to it are treated as security",
"updates: applied on the next check regardless of the user's auto-update",
"preference for other rules. Removing an entry is a safety change and needs",
"the same review as a security fix (docs/13_CI_CD.md §rules-publish).",
"docs/19_SAFETY_AND_ANTICHEAT.md. Removing an entry is a safety change and",
"needs the same review as a security fix (docs/13_CI_CD.md §rules-publish).",
"",
"Shape is fixed by rules/detection-rules.schema.json (JSON Schema 2020-12),",
"which closes docs/20_OPEN_QUESTIONS.md §S5. Constraints a schema cannot",
@@ -15,10 +16,11 @@
"compilability, case-insensitive duplicate values — stay imperative in",
"tools/rules-validate.ps1.",
"",
"STILL INCOMPLETE AS DATA: docs/19_SAFETY §Blocklist seed names one family",
"with no representation here at all — Valve VAC (needs blockedStoreIds",
"entries). Activision Ricochet was the other until 2026-09-25, when its",
"driver and services arrived from Activision's own support pages.",
"Every family docs/19_SAFETY §Blocklist seed names is represented since",
"2026-09-25: Valve VAC through blockedStoreIds and blockedExecutables (VAC",
"runs inside Steam, so no file of the game's own names it), and Activision",
"Ricochet through its driver and services from Activision's own support",
"pages.",
"",
"PRE-INJECTION CHECK 3 MATCHED NOTHING until 2026-09-25, because",
"`blockedExecutables` and `blockedStoreIds` were both empty. The owner seeded",
@@ -40,7 +42,7 @@
"level, which made it a check that could not fire."
],
"schemaVersion": 2,
"rulesVersion": "2026.09.6",
"rulesVersion": "2026.10.1",
"engines": [
{
@@ -419,7 +421,10 @@
{ "store": "steam", "id": "1517290", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." },
{ "store": "steam", "id": "2807960", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." },
{ "store": "steam", "id": "2669320", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." },
{ "store": "steam", "id": "3405690", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." }
{ "store": "steam", "id": "3405690", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." },
{ "store": "steam", "id": "3224770", "family": "CrackProof", "reason": "Protected by CrackProof (HyperTech), a kernel anti-cheat; its driver is not in the game's folder." },
{ "store": "steam", "id": "1973710", "family": "CrackProof", "reason": "Protected by CrackProof (HyperTech), a kernel anti-cheat; its driver is not in the game's folder." },
{ "store": "steam", "id": "2987800", "family": "CrackProof", "reason": "Protected by CrackProof (HyperTech), a kernel anti-cheat; its driver is not in the game's folder." }
]
}
}
+3
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.Agent;
/// <summary>
+3
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Infrastructure.Persistence;
namespace FrameLedger.Agent;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.Security.Principal;
using FrameLedger.Infrastructure.Startup;
+3
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.Agent.Cli;
/// <summary>What the Agent can be asked to do (P2 PR-F). The surface is pinned by <c>AgentCommandLineSurfaceTests</c>.</summary>
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Agent.Composition;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Consent;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Vulkan;
using FrameLedger.Infrastructure.Persistence;
using FrameLedger.Infrastructure.Startup;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.Agent.Composition;
/// <summary>
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Reflection;
using FrameLedger.Application.Ipc;
using FrameLedger.Infrastructure.AntiCheat;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Capture;
using FrameLedger.Application.Recording;
using FrameLedger.Application.Watch;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.AntiCheat;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Consent;
@@ -134,6 +137,7 @@ internal sealed class AgentRecording
NvapiTelemetrySource? l3 = null;
CompositeTelemetrySource? composite = null;
SystemTelemetrySource? system = null;
GameMemoryReader? game = null;
try
{
pdh = new PdhAdapterMemoryCounter();
@@ -151,9 +155,13 @@ internal sealed class AgentRecording
// The machine beside the GPU (2026-09-21): CPU busy time and memory unprivileged, the CPU temperature only
// where this process is elevated and PawnIO is installed. The poller owns it with the layers.
system = SystemTelemetrySource.Create();
var poller = new TelemetryPoller(composite, new TelemetryPollerOptions { Interval = interval }, TimeProvider.System, ownsSource: true, system);
// The game process's own memory (beta.12, D43): read from outside it through FrameLedger.ProcessStats.dll, for
// whichever process the capture loop tells the poller to follow. Absent DLL = N/A, never a fault.
game = new GameMemoryReader(new NativeProcessStats());
var poller = new TelemetryPoller(composite, new TelemetryPollerOptions { Interval = interval }, TimeProvider.System, ownsSource: true, system, game);
composite = null;
system = null;
game = null;
return poller;
}
finally
@@ -164,6 +172,7 @@ internal sealed class AgentRecording
l3?.Dispose();
composite?.Dispose();
system?.Dispose();
game?.Dispose();
}
}
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Agent.Hosting;
using FrameLedger.Application.AntiCheat;
using FrameLedger.Application.Capture;
@@ -121,7 +124,7 @@ internal static class AgentServices
{
services.AddSingleton<IUserModeExceptionSwitch, SettingsUserModeExceptionSwitch>();
services.AddSingleton<IOverlayToleranceChannel>(static _ => new OverlayToleranceChannel(static line => Serilog.Log.Information("{Line}", line)));
services.AddSingleton(static sp => new UserModeExceptionLapsePolicy(sp.GetRequiredService<IGameConsentStore>()));
services.AddSingleton(static sp => new UserModeExceptionLapsePolicy(sp.GetRequiredService<IGameConsentStore>(), sp.GetRequiredService<ISessionRepository>()));
}
/// <summary>
@@ -269,11 +272,12 @@ internal static class AgentServices
sp.GetRequiredService<ExecutableRelocator>(),
// beta.8: an executable that cannot run as x64 is refused before anything is scanned or stamped.
new PeArchitectureSource(),
// D33: the user-mode exception's option, evidence and disclosure version.
// D33: the user-mode exception's option and disclosure version (D38: no session count any more).
new AntiCheatExceptionCommands(
sp.GetRequiredService<IUserModeExceptionSwitch>(),
sp.GetRequiredService<ISessionRepository>(),
AntiCheatExceptionDisclosure.Version));
AntiCheatExceptionDisclosure.Version),
// beta.11 (D40): Delete all sessions, of one game or of every game — the Agent's rows, deleted by the Agent.
sp.GetRequiredService<ISessionRepository>());
/// <summary>
/// <c>HelloAck.telemetrySource</c>: the layers this machine composes, read once on the first <c>Hello</c> by
@@ -41,6 +41,7 @@
-->
<Import Project="$(MSBuildThisFileDirectory)..\..\FrameLedger.Guard.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\FrameLedger.NvapiBridge.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\FrameLedger.ProcessStats.targets" />
<!-- The seed the Agent installs to the product location on first run (§S20). -->
<Import Project="$(MSBuildThisFileDirectory)..\..\FrameLedger.Rules.targets" />
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Data.Common;
using FrameLedger.Application.AntiCheat;
using Microsoft.Extensions.Hosting;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Data.Common;
using FrameLedger.Application.Detection;
using FrameLedger.Application.Vulkan;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Ipc;
using Microsoft.Extensions.Hosting;
using Serilog;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Ipc;
using Serilog;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Infrastructure.Ipc;
using Microsoft.Extensions.Hosting;
using Serilog;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Recording;
using FrameLedger.Application.Watch;
using Microsoft.Extensions.Hosting;
+3
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
// FrameLedger.Agent — the capture orchestrator (P2 PR-F).
//
// The shipped host of the guard loop, by design (01_ARCHITECTURE §Component model; §S18 blocker 3):
+3
View File
@@ -1,3 +1,6 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<Application x:Class="FrameLedger.App.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+13 -1
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.IO;
using System.Windows;
@@ -280,6 +283,8 @@ public partial class App : System.Windows.Application
// The admin mode's disclosure (beta.10, D34), shown before capture.run_elevated is turned on.
builder.Services.AddSingleton<IAgentAdminPrompt, AgentAdminPrompt>();
builder.Services.AddSingleton<AntiCheatExceptions>();
// beta.11 (D40): Delete all sessions, of one game (its page) or of every game (Settings ▸ Data), through the Agent.
builder.Services.AddSingleton<SessionDeletion>();
AddLibrary(builder.Services);
@@ -350,7 +355,9 @@ public partial class App : System.Windows.Application
services.AddTransient<SystemInfoViewModel>();
services.AddSingleton<Charts.SessionSeriesLoader>();
services.AddSingleton<IFileSaver, FileSaver>();
services.AddSingleton<ISessionSummaryOpener, SessionSummaryOpener>();
services.AddSingleton<SessionSummaryOpener>();
services.AddSingleton<ISessionSummaryOpener>(static sp => sp.GetRequiredService<SessionSummaryOpener>());
services.AddSingleton<ISessionWindows>(static sp => sp.GetRequiredService<SessionSummaryOpener>()); // beta.11: Delete all sessions closes them
services.AddSingleton<IMixedTierPrompt, MixedTierPrompt>();
// Settings, the safety notices and the Logs page (P3 PR-8a): the Run entry, the notices over the pipe's
@@ -385,6 +392,9 @@ public partial class App : System.Windows.Application
services.AddSingleton<ILegalAcceptanceStore, SqliteLegalAcceptanceStore>();
services.AddSingleton(static sp => new LegalGate(sp.GetRequiredService<ILegalAcceptanceStore>(), LegalDocuments.Load()));
services.AddSingleton<IFirstRunFlow, FirstRunFlow>();
// beta.12: Help ▸ Limitations and Help ▸ About, rendered from what this build embeds.
services.AddSingleton<IDocumentWindows, DocumentWindows>();
}
/// <summary>
@@ -417,6 +427,8 @@ public partial class App : System.Windows.Application
sp.GetRequiredService<IExecutableLocator>(),
static line => Serilog.Log.Information("{Line}", line)));
services.AddSingleton<IImportReview, ImportReviewPrompt>();
// beta.11: the Games page on screen reloads when an import adds games (navigating to itself does nothing).
services.AddSingleton<LibraryChanges>();
services.AddSingleton<ImportLibraryFlow>();
}
+3
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
[assembly: ThemeInfo(
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using ScottPlot;
using Wpf.Ui.Appearance;
+3
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using ScottPlot;
using ScottPlot.WPF;
using Wpf.Ui.Appearance;
@@ -1,3 +1,6 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.CompareChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows.Controls;
using ScottPlot;
using ScottPlot.Plottables;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>One session's percentile curve on the Compare overlay: its legend label and the 101 points.</summary>
+3
View File
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>
@@ -1,3 +1,6 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.DistributionChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Domain.Metrics;
namespace FrameLedger.App.Charts;
@@ -1,3 +1,6 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.FrametimeChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>FR-6.3: a hardware-snapshot difference between two consecutive sessions, as a marker on the trend line ("GPU driver 572.16 → 576.02").</summary>
@@ -1,3 +1,6 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.LatencyChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows.Controls;
using ScottPlot;
using ScottPlot.Plottables;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Domain.Metrics;
namespace FrameLedger.App.Charts;
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>One <c>session_segments</c> row on the time axis: where it starts and ends in seconds, and what it was.</summary>
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>One decoded sensor series (<c>sensor_blobs</c>): its name, seconds from the session start, values with −1 (not read) removed.</summary>
+7 -1
View File
@@ -1,14 +1,20 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.SensorsChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:res="clr-namespace:FrameLedger.App"
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF">
<!-- 08_UI §Games › Sensors: temperatures / load / power, and VRAM with per-process and adapter-wide as SEPARATE, differently-labelled series. -->
<!-- 08_UI §Games › Sensors: temperatures / load / power; then video memory and memory, each with THIS GAME's own figure
and the whole graphics card's / whole PC's as SEPARATE, differently-labelled series (beta.12, D43). -->
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Temps_Header}" />
<sp:WpfPlot x:Name="Temps" Height="240" Margin="0,6,0,0" />
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Vram_Header}" />
<sp:WpfPlot x:Name="Vram" Height="220" Margin="0,6,0,0" />
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Ram_Header}" />
<sp:WpfPlot x:Name="Ram" Height="220" Margin="0,6,0,0" />
</StackPanel>
</UserControl>
+60 -49
View File
@@ -1,15 +1,26 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows.Controls;
using FrameLedger.App.Services;
using FrameLedger.Application.Recording;
using ScottPlot;
using ScottPlot.Plottables;
using ScottPlot.WPF;
namespace FrameLedger.App.Charts;
/// <summary>
/// The Sensors tab: GPU core / hotspot temperature, load, CPU temperature and load on one plot (°C and % left) with the GPU's
/// power on a watt axis at the right, and memory on another — the game's own VRAM (the per-present <c>vram_proc</c> blob, a
/// held 1 Hz sample), the adapter-wide VRAM (the <c>vram_adapter</c> sensor) and the system's RAM as differently-labelled
/// series. Since beta.8 it draws a session that was not hooked too: its sensors are all it has.
/// power on a watt axis at the right; then video memory and memory, each with THIS GAME's own figure beside the whole
/// graphics card's or the whole PC's as differently-labelled series, in GB (beta.12, D43: the game's figures are read from
/// outside the game once a second, in either tier). Since beta.8 it draws a session that was not hooked too: its sensors are
/// all it has.
/// </summary>
/// <remarks>
/// Corrected 2026-10-03: the memory plot drew "the game's own VRAM" from the per-present <c>vram_proc</c> blob, which the
/// Overlay never produced — that line was never drawn on any session (<c>20_OPEN_QUESTIONS</c> §H10).
/// </remarks>
public partial class SensorsChart : UserControl
{
/// <summary>The temperatures-and-load plot's series, each with the palette key it is drawn in and whether it is on the watt axis.</summary>
@@ -23,19 +34,32 @@ public partial class SensorsChart : UserControl
("cpu_load", "Chart_Displayed", false),
];
/// <summary>The memory plot's series and their palette keys; <c>vram_proc</c> is the per-present blob, the others sensors.</summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey)> MemoryPlot =
/// <summary>The video-memory plot's series and their palette keys: this game is in the same colour on both memory plots.</summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey)> VideoMemoryPlot =
[
("vram_proc", "Chart_Displayed"),
("vram_adapter", "Chart_SensorSecondary"),
("ram_mb", "Chart_Percentile"),
(SensorSeriesCatalog.GameVramDedicated, "Chart_Displayed"),
(SensorSeriesCatalog.GameVramShared, "Chart_Native"),
(SensorSeriesCatalog.VramAdapter, "Chart_SensorSecondary"),
];
/// <summary>
/// The memory plot's series: the game's private working set — or, where this Windows does not report it, its working set,
/// labelled as such (<see cref="SystemMemorySeries"/>) — and the whole PC's memory in use.
/// </summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey)> SystemMemoryPlot =
[
(SensorSeriesCatalog.GameRamPrivate, "Chart_Displayed"),
(SensorSeriesCatalog.RamSystem, "Chart_Percentile"),
];
private const double _mibPerGb = 1024.0;
public SensorsChart()
{
InitializeComponent();
ChartTheme.Attach(Temps);
ChartTheme.Attach(Vram);
ChartTheme.Attach(Ram);
}
public int DrawnSeries { get; private set; }
@@ -47,7 +71,8 @@ public partial class SensorsChart : UserControl
{
DrawnSeries = 0;
DrawTemps(series);
DrawMemory(series);
DrawMemory(Vram, series, VideoMemoryPlot);
DrawMemory(Ram, series, SystemMemoryPlot);
}
/// <summary>The time axis says where its zero is: the first frame when the sensors sit on the frames' axis, the session's start otherwise.</summary>
@@ -79,64 +104,49 @@ public partial class SensorsChart : UserControl
Temps.Refresh();
}
private void DrawMemory(SessionSeries? series)
/// <summary>One memory plot in GB (MiB stored, 1 GB = 1024 MiB as Task Manager counts it), every line labelled with whose memory it is.</summary>
private void DrawMemory(WpfPlot view, SessionSeries? series, IReadOnlyList<(string Series, string PaletteKey)> lines)
{
ScottPlot.Plot plot = Vram.Plot;
ScottPlot.Plot plot = view.Plot;
plot.Clear();
ChartTheme.Apply(plot);
plot.XLabel(TimeAxisLabel(series));
plot.YLabel(Strings.Sensors_Axis_Mb);
plot.YLabel(Strings.Sensors_Axis_Gb);
if (series is not null)
{
ChartPalette p = ChartTheme.Current;
DrawProcessVram(plot, series, p.ByKey(MemoryPlot[0].PaletteKey));
Line(plot, series, "vram_adapter", Strings.Sensors_Series_VramAdapter, p.ByKey(MemoryPlot[1].PaletteKey), null);
Line(plot, series, "ram_mb", Strings.Sensors_Series_Ram, p.ByKey(MemoryPlot[2].PaletteKey), null);
foreach ((string name, string key) in lines)
{
string shown = SystemMemorySeries(series, name);
Line(plot, series, shown, Label(shown), p.ByKey(key), null, 1.0 / _mibPerGb);
}
plot.Axes.AutoScale();
plot.ShowLegend(Alignment.UpperRight);
}
Vram.Refresh();
view.Refresh();
}
/// <summary>
/// The game's own VRAM, per present on the frames' axis — a 0 is a present the sample did not reach (the record's zero,
/// SessionFinalizer.Series), never a reading, and is left out (beta.8).
/// The game's private working set where it was read, else its working set — labelled as the working set, never as the
/// private one (a Windows before the September 2023 update does not report it). Every other series is itself.
/// </summary>
private void DrawProcessVram(ScottPlot.Plot plot, SessionSeries series, Color color)
internal static string SystemMemorySeries(SessionSeries series, string name)
{
if (series.VramProcMb is not { Length: > 0 } proc)
{
return;
}
int n = Math.Min(proc.Length, series.TimesS.Length);
int[] read = [.. Enumerable.Range(0, n).Where(i => proc[i] > 0)];
if (read.Length == 0)
{
return;
}
(double[] xs, double[] ys) = Decimator.MinMax([.. read.Select(i => series.TimesS[i])], [.. read.Select(i => (double)proc[i])], 1000);
Scatter line = plot.Add.ScatterLine(xs, ys, color);
line.LineWidth = 1;
line.LegendText = Strings.Sensors_Series_VramProcess;
DrawnSeries++;
ArgumentNullException.ThrowIfNull(series);
return string.Equals(name, SensorSeriesCatalog.GameRamPrivate, StringComparison.Ordinal) && !Has(series, name) && Has(series, SensorSeriesCatalog.GameRamWorkingSet)
? SensorSeriesCatalog.GameRamWorkingSet
: name;
}
private static string Label(string series) => series switch
{
"gpu_temp" => Strings.Sensors_Series_GpuTemp,
"gpu_hotspot" => Strings.Sensors_Series_GpuHotspot,
"gpu_load" => Strings.Sensors_Series_GpuLoad,
"gpu_power" => Strings.Sensors_Series_GpuPower,
"cpu_temp" => Strings.Sensors_Series_CpuTemp,
"cpu_load" => Strings.Sensors_Series_CpuLoad,
_ => series,
};
private static bool Has(SessionSeries series, string name) =>
series.Sensors.Any(s => string.Equals(s.Name, name, StringComparison.Ordinal) && s.TimesS.Length > 0);
/// <summary>Draws one sensor series if the session has it; whether it did.</summary>
private bool Line(ScottPlot.Plot plot, SessionSeries series, string name, string label, Color color, IYAxis? axis)
private static string Label(string series) => SensorStatsTable.Label(series);
/// <summary>Draws one sensor series if the session has it, its values times <paramref name="scale"/>; whether it did.</summary>
private bool Line(ScottPlot.Plot plot, SessionSeries series, string name, string label, Color color, IYAxis? axis, double scale = 1.0)
{
SensorSeries? sensor = series.Sensors.FirstOrDefault(s => string.Equals(s.Name, name, StringComparison.Ordinal));
if (sensor is null || sensor.TimesS.Length == 0)
@@ -144,7 +154,8 @@ public partial class SensorsChart : UserControl
return false;
}
(double[] xs, double[] ys) = Decimator.MinMax(sensor.TimesS, sensor.Values, 1000);
double[] values = scale == 1.0 ? sensor.Values : [.. sensor.Values.Select(v => v * scale)];
(double[] xs, double[] ys) = Decimator.MinMax(sensor.TimesS, values, 1000);
Scatter line = plot.Add.ScatterLine(xs, ys, color);
line.LineWidth = 1;
line.LegendText = label;
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>A click on a trend landed on a session's points (beta.11, D39): which session.</summary>
public sealed class SessionClickedEventArgs(long sessionId) : EventArgs
{
public long SessionId { get; } = sessionId;
}
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Metrics;
Loaded 100 of 1171 files, more files were not shown because too many files have changed in this diff. Show more