Compare commits

..
Author SHA1 Message Date
poli0981andClaude Opus 5.5 ddba1a4b87 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>
2026-10-03 11:54:54 +07:00
poli0981andClaude Opus 5.5 42fe25da6a 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>
2026-10-03 11:44:08 +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
poli0981andClaude Opus 5.5 ebea4a7eda release: 0.1.0-beta.10 - the CHANGELOG section, the accuracy block's release line, README's release lines (#246)
The tenth pre-release, the owner's four beta.10 items: the exact Unreal Engine version on a game's page (#241, schema
0015); the display mode - exclusive full-screen, borderless, windowed or minimised, as a share of each session, with the
window's and the monitor's size - on the summary, the game page, the Trend and Compare, both tiers (#242 shared-memory
layout 4, #243 schema 0016); running the capture agent as administrator, off by default, with a UAC prompt at every
agent start and games kept standard-user (#244, D34); and the documents - LIMITATIONS.md (Help > Limitations), the
owner-approved list of games tested, Privacy 2.5 and Disclaimer 2.8 (#245, D35, D36). Same unsigned installer; the
Legal Gate opens once for Privacy 2.5 and Disclaimer 2.8; the EULA is unchanged (1.3). A game running while the update
is installed must be restarted before it can be measured (layout 4).

HANDOFF's beta.10 section already names `[0.1.0-beta.10]` as its status.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 17:32:19 +00:00
poli0981andClaude Opus 5.5 372389c521 docs: what FrameLedger cannot do, the games it has been run with, and the legal text for beta.10 - LIMITATIONS.md in the App, the tested-games list, Privacy 2.5, Disclaimer 2.8 (D35, D36) (#245)
Item 4 of the owner's beta.10 request (update the docs at the end, add a list of real games tested) and owner decisions
D35 (the list from a COPY of the owner's ledger plus the repository's evidence, reviewed by the owner before commit)
and D36 (legal text where it would become false, and a user-facing LIMITATIONS.md for the whole software).

- LIMITATIONS.md (repository root): the limits of the whole software in the user's words - the games it will not
  measure, an unmeasured session, frame generation, upscaling and ray tracing, the display mode, the engine version,
  sensors, the admin mode, platform and tested hardware, data, installation - each linked to its details. Embedded in
  the App (LimitationsDocument) and shown under Help > Limitations with Open on GitHub; NOT one of FR-11's accepted
  documents. LimitationsDocumentTests: embedded as written, not in LegalDocuments.Keys, every repository link exists.
- docs/LIST_GAME_TESTED.md: 22 games measured hooked, the unmeasured sessions and why, six refused by the guard, and
  the Unreal versions read without running - from a copy of the ledger (read in the scratchpad with Python sqlite3,
  never a FrameLedger binary on the data folder) and spike-notes, CHANGELOG, HANDOFF and the run reports. Approved by
  the owner 2026-09-27, with Alan Wake 2's two 2026-09-04 captures added and UMIGARI kept on its run reports.
- Legal: Privacy Policy 2.5 (a game window's display facts, the Unreal build name, and - first said here - the
  executable's content and the processor/memory counters); Disclaimer 2.8 (section 5A, the admin mode and its risk; the
  limitations page and the list in section 0); the accuracy block dated 2026-09-27 with the display mode, the engine
  version and the admin mode (README and DISCLAIMER copies, accuracy-check green); SECURITY.md's admin-mode reports.
  EULA unchanged (1.3).
- Stale text corrected in place: 19_SAFETY's ETW Tier-2 offer, README's Agent row and elevation paragraph, 04_CAPTURE's
  port list, HANDOFF D11's pipe owner check, 17_HOOK_ENGINE's fault policy (compare-and-restore, not MH_ALL_HOOKS),
  HANDOFF's "Alan Wake 2 did not run on 2026-09-04", and the 18-vs-9 session count recorded rather than guessed.
- HANDOFF: the beta.10 train (D34-D37, what was measured, the traps), owner-only item 7 (beta.10 on real hardware) and
  item 6 done by the ledger's evidence (three GF2 sessions under the exception); CLAUDE.md's reading order names both
  new documents; 08_UI's Help menu; CHANGELOG.

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

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

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

No hook-path change: the Overlay is untouched.

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

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

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

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

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

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 23:49:16 +07:00
113 changed files with 4161 additions and 472 deletions

No files matched your search

+131
View File
@@ -27,6 +27,124 @@ under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, the
## [Unreleased]
## [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
Engine version.** The same unsigned installer: verify its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
What changed for a user:
- **The display mode** — exclusive full-screen, borderless, windowed or minimised, as a share of each session, with the
window's size and the monitor's — on the session summary, the game page, the Trend (three new metrics) and Compare,
for measured and unmeasured sessions alike. Only a measured Direct3D game can say *exclusive*; others read
*full-screen or borderless* when the window covers the screen.
- **Run the agent as administrator** — a Settings option, off by default. Windows asks every time the agent starts;
games you start from FrameLedger still run with your standard rights; it changes nothing in the anti-cheat guard.
- **The exact Unreal Engine version** on a game's page, read from its executable, with what it rests on.
- **What FrameLedger cannot do** is one page — Help ▸ Limitations, and `LIMITATIONS.md` — and the games it has been run
with are listed in `docs/LIST_GAME_TESTED.md`.
- **The Privacy Policy (2.5) and the Disclaimer (2.8) say so**, so the Legal Gate opens once after the update. The EULA
is unchanged.
**Updating from `0.1.0-beta.9`:**
- Quit the App (tray icon → Exit) and end `FrameLedger.Agent.exe` before running the installer.
- Schemas 0015 and 0016 add columns; the database opens in place. Sessions recorded before show the display mode as N/A.
- The shared-memory layout between the agent and a measured game changed (version 4): **a game that was running while
you updated must be restarted before it can be measured** — the app says so when it meets the old layout.
- Every game is re-detected once (rules `2026.09.6`), which fills in the Unreal Engine versions.
### Added
- **The exact Unreal Engine version on a game's page** (owner request, beta.10). The Agent reads it from the game's
@@ -62,8 +180,21 @@ under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, the
administrator no longer makes the agent an administrator's too. Updating now also waits for an administrator agent's
process to let go of its files.
- **What FrameLedger cannot do, in one place** (beta.10). `LIMITATIONS.md` lists the limits of the whole software in
plain words — the games it will not measure, what an unmeasured session holds, frame generation, upscaling and ray
tracing, the display mode, the engine version, sensors, the admin mode, the platform and your data — each linked to its
details; the app shows it under **Help ▸ Limitations**. `docs/LIST_GAME_TESTED.md` lists the real games FrameLedger has
been run with and what was measured on each.
### Changed
- **The legal documents say what beta.10 does** — you will be shown two of them again once. **Privacy Policy 2.5** adds
how a tracked game's window is shown (read from Windows) and the engine version read from an Unreal Engine game's
executable, and says for the first time two things the software already did: it reads the content of a library game's
executable (engine and library markers, its import table) and the processor load and memory in use. **Disclaimer 2.8**
adds §5A — running the capture agent as administrator, what it does and does not do, and its risk — and points at the
new limitations page and the tested-games list. The End-User License Agreement is unchanged (1.3).
- **Groundwork for the display mode (beta.10): the injected component reports how the game presents** — whether its swap
chain is in exclusive fullscreen, which window it presents to, its back buffer and swap effect — at most twice a second,
from two getters on the swap chain the game passed (measured at 13–15 ns each on the test fixture: nothing a frame rate
+5
View File
@@ -17,6 +17,7 @@ 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).
@@ -176,6 +177,10 @@ The version handshake is wired end to end as of 2026-08-05: `FlGuardBuildId` giv
8. `docs/18_GPU_VENDOR_APIS.md` — layered GPU telemetry (DXGI/PDH · LHM · NVAPI) + vendor-SDK licence rules
9. `docs/06_DATA_MODEL.md` · `docs/07_IPC.md` · `docs/08_UI.md` · `docs/16_WPFUI_SYNTAX.md`
10. Remaining (`09`–`15`).
11. **`LIMITATIONS.md`** (repository root; shown in the App under Help ▸ Limitations) — what the WHOLE software cannot
do, in the user's words, each item linked to its details. When a change moves a limit, the page changes in the same
PR (D36, 2026-09-27). **`docs/LIST_GAME_TESTED.md`** — the real games FrameLedger has been run with and what each
session measured, from a copy of the owner's ledger and the repository's own evidence (D35).
**Before writing native or capture code, read `docs/20_OPEN_QUESTIONS.md`.** It
lists the defects and gaps that survived the doc audit — things the other
+130
View File
@@ -0,0 +1,130 @@
# What FrameLedger cannot do
FrameLedger measures a game by loading a small component into it — only for a game you added and switched
hooking on for — and reading the graphics calls the game makes. That is why it can tell the real render
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.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; 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
that you take by switching hooking on.
- **32-bit games and Direct3D 9 games.** Only 64-bit Direct3D 11, Direct3D 12 and OpenGL games are measured
from their own calls; a 32-bit or Direct3D 9 game is recorded without measurement.
- **Vulkan games, unless FrameLedger starts them.** A Vulkan game is measured only when FrameLedger launches it
with its Vulkan layer switched on; one started another way is not observed by the layer.
- **Games that run as administrator,** unless you turn on *Run the agent as administrator* in Settings
(off by default; Windows asks every time the agent starts). **A process Windows protects** stays closed
either way.
- **Vulkan games that run as administrator.** Windows' Vulkan loader does not load FrameLedger's Vulkan
layer into an elevated game, so admin mode does not help there.
- **A game that was already running when FrameLedger was updated** — restart the game once.
- **Games you did not switch hooking on for.** Adding a game only records its sessions; measuring it is a
separate, per-game choice with its own warning.
## 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
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))
## Frame rate and frame generation
- **One inflated number is never shown.** When frame generation is measured, the page shows the game's own
frames and the displayed frames together (`62 → 118 FPS (×1.9 FG)`). When it cannot be measured, the page
shows **Presented FPS** with a sentence saying whether generated frames could be included.
- **Frame generation done by the driver outside the game** (AMD Fluid Motion Frames, NVIDIA Smooth Motion)
is not visible to FrameLedger; the rates shown are what the game presented.
- Frame generation is counted on **Direct3D games** only. DLSS Frame Generation and FSR frame generation are
named from the calls the game makes; any other generator is shown only as *active*, never named, and where
the generated frames cannot be counted the page shows Presented FPS with a note instead of a factor.
- **A session whose frame generation changed** (menus, loading, a settings change) shows the factor of the
state it spent most of its time in, with the share of the session it covers — never an average of the two.
([Metrics](docs/03_METRICS.md))
## Upscaling and ray tracing
- The upscaler is read from the game's calls: DLSS and NIS through NVIDIA Streamline, and FSR through AMD's
FidelityFX libraries. **Intel XeSS is not read** (its licence forbids it), FSR 2 and upscalers built into the
game are not identified, and Vulkan and OpenGL games read N/A. Where no hook saw DLSS but the NVIDIA driver
reports it, the page says it is the driver's report.
- **The quality preset** (Quality, Balanced, …) has not been reported on any game yet, and the render
resolution is N/A where the game's own calls do not carry it (DLSS without Streamline, for one).
- **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))
## Display mode (full-screen, borderless, windowed)
- **Exclusive full-screen is known only for a measured Direct3D (DXGI) game** — the game's own swap chain
says so. For OpenGL, Vulkan and unmeasured games, a window covering the screen reads *Fullscreen or
borderless*, never either one.
- **What Windows does behind the game is not visible:** a game in exclusive full-screen may still be shown
through Windows' compositor ("fullscreen optimizations"), and a game's menu may call a borderless window
"Fullscreen". FrameLedger reports what the game asked for.
- The mode is sampled ten times a second in a measured session and once a second in an unmeasured one; very
short switches can be missed. A session recovered after a crash, and every session recorded before
beta.10, read N/A. ([Display mode](docs/03_METRICS.md#display-mode--both-tiers-beta10))
## Engine version
- The exact version is read for **Unreal Engine 4 and 5** games, from the game's executable file on disk.
A studio can remove or rename what it is read from; then the page says the version was not found.
**Unreal Engine 3 and older are not recognised.** Other engines show a version only where their files
state one. ([Detection](docs/05_DETECTION.md))
## Sensors
- GPU temperature, load, power and memory are best supported on **NVIDIA** GPUs. **AMD and Intel GPUs have
not been tested** on real hardware yet.
- **CPU temperature** needs *Run the agent as administrator* and the separately installed PawnIO driver, and
has not been verified on real hardware yet. CPU load is the time the processor was busy — not Task
Manager's "utility" figure, which can exceed 100%. ([Telemetry](docs/18_GPU_VENDOR_APIS.md))
## Running the agent as administrator
Off by default. When on, **Windows asks every time the agent starts** and names an unknown publisher, because
FrameLedger is not signed. It lets FrameLedger open games that run as administrator and read the CPU
temperature; it does not bypass anti-cheat, does not open protected processes, and does not make games you
start from FrameLedger run as administrator. **The risk:** FrameLedger is installed in your user folder, so a
program running under your account could replace its files and would then run as administrator the next time
you accept the prompt. Turn it on only if you trust everything that runs under your account.
([Architecture, ADR-9](docs/01_ARCHITECTURE.md))
## Platform and what has been tested
- **Windows 10 22H2 or Windows 11, 64-bit only.**
- The games FrameLedger has actually been run with, and what was measured on each, are listed in
[LIST_GAME_TESTED.md](docs/LIST_GAME_TESTED.md). Everything was measured on one machine (an NVIDIA
GeForce RTX 5080 with an Intel Core i7-14700KF on Windows 11); other hardware is untested.
- **No real Vulkan or OpenGL game has been measured yet** — only FrameLedger's own test program.
- There is **no in-game overlay**; everything is shown in the FrameLedger window.
## Your data
- Everything stays on your computer (`%LOCALAPPDATA%\FrameLedger`). FrameLedger sends no telemetry; its only
network requests are the update check and the update download, both to GitHub, and the check can be switched
off. The anti-cheat list and the detection rules ship with each version — **a newer list reaches you only with
the next update.** ([Privacy policy](legal/PRIVACY_POLICY.md))
- Per-frame data is kept for the **last 20 sessions of each game** (configurable); older sessions keep their
summaries.
- A newer version upgrades the database in place, and an **older version cannot open it again** — there is
no downgrade.
## Installation
FrameLedger's programs are **not code-signed**: Windows SmartScreen may warn when you install it, and the
administrator prompt names an unknown publisher. Each release publishes SHA-256 checksums you can compare.
+18 -10
View File
@@ -5,8 +5,8 @@
> No telemetry. No accounts. All data stays on your machine.
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-09-26.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.9`** (2026-09-26), 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
@@ -51,6 +51,14 @@
> were counted, the lows, median and stutter are taken over application frames only.
> - **Ray tracing:** Yes/No measured on Direct3D 12 from ray-dispatch and acceleration-structure-build
> calls; the technique and path tracing are `N/A`, and so is ray tracing on other APIs.
> - **Display mode:** how each game's window was shown — exclusive full-screen, borderless, windowed or
> minimised — as a share of the session, with the window's size and the monitor's, in every session.
> Exclusive full-screen is known only for Direct3D titles FrameLedger injects into, from the game's own
> swap chain; for every other session the window alone is read, and a window covering its monitor reads
> *full-screen or borderless*. What Windows does behind the game (fullscreen optimizations) is not visible.
> - **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.
> - **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
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
@@ -58,8 +66,8 @@
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
> administrator with PawnIO installed, and that reading has not yet been checked on real hardware;
> everywhere else it is `N/A`.
> administrator — an option, off by default, for which Windows asks at every start of the Agent — with
> PawnIO installed, and that reading has not yet been checked on real hardware; everywhere else it is `N/A`.
> - **Safety:** every pre-injection check runs before injection, including the signed-by-a-known-vendor
> half of the suspicious-module rule. During every capture the Agent re-runs the checks every 30 s and
> stops capturing on a refusal: a Direct3D or OpenGL game's hooks are removed, and the Vulkan layer
@@ -70,8 +78,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
@@ -130,11 +138,11 @@ The tier is recorded on every session and shown in the UI. Metrics unavailable a
| 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 (elevation optional) | Injection control, safety guard, data collection, GPU telemetry, storage |
| `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 — 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.
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
@@ -144,7 +152,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest pre-release is `v0.1.0-beta.9` (2026-09-26); before it `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**.
@@ -172,4 +180,4 @@ If you find a game with anti-cheat that FrameLedger fails to detect, please open
---
**Status:** pre-release (beta). Nine 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.
+16 -2
View File
@@ -37,8 +37,22 @@ 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
Since 0.1.0-beta.10 the capture agent can run as administrator — an option, off by default (owner decision D34,
`docs/01_ARCHITECTURE.md` ADR-9) — and Windows asks at every start of the agent. The residual risk is stated to the user
rather than solved: FrameLedger installs per user and unsigned, so a program running under the same account could replace
its files and be run as administrator when the user next accepts the prompt. What IS a security report: any way the
agent becomes administrator WITHOUT that prompt (a task, a service, an inherited token the option did not choose); a game
or any other program that an elevated agent starts with its own token instead of the desktop shell's; any privilege the
agent enables (none is — `tools/chokepoint-check.ps1` forbids the enablers under `src/`); an elevated agent that runs for
another account than the one that asked; and a named object an elevated agent creates that the same user's unelevated
processes can no longer open, or that another user can.
## A safety gap — a game with anti-cheat that FrameLedger fails to detect
+4 -2
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.
@@ -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.
@@ -79,7 +81,7 @@ 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. **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.
+3 -1
View File
@@ -38,7 +38,9 @@ public interface IFrameSource : IAsyncDisposable
> with `FlGuardBuildId`), `ITargetLivenessSource` (`HeldProcessLivenessSource`, §S29(e)),
> `ITargetResolver` (`TargetResolver`, path only — never a pid), `IProcessLauncher`
> (`ProcessLauncher`, launch mode), `IRuntimeModuleSnapshot`, `INgxDriverProbe`,
> `IExecutableMarkerScan`. `ShmRingReader` itself gains no interface and no second consumer
> ~~`IExecutableMarkerScan`~~ — **corrected 2026-09-27:** the marker scan is the recorder's, not the loop's; the loop's
> later ports are `IKillSwitch` (FR-2.4), `ICapturePauseSource`, `IUserModeExceptionSwitch` and
> `IOverlayToleranceChannel` (D33) and `IDisplayProbe` (beta.10). `ShmRingReader` itself gains no interface and no second consumer
> (`NoSecondRingReaderTests`). A **pure move**: the loop's ordering rules, its tests and the
> capture host's report are byte-for-byte what they were; the host is now a thin shell that
> composes the same objects. What the table below used to call `HookedFrameSource` is this.
+18 -3
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. **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).
## 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
@@ -389,6 +391,7 @@ 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 |
| `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 |
| `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 |
@@ -577,6 +580,18 @@ 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`.
> **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
+2 -1
View File
@@ -391,11 +391,12 @@ Unchanged in spirit from v1, bumped to `v2` for the new message set.
| `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) |
+61 -1
View File
@@ -24,7 +24,11 @@ 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 · About FrameLedger (App / Developer / Third-party licenses tabs)
- **Help:** Check for updates · Report a bug… · Documentation · Limitations · About FrameLedger (App / Developer / Third-party licenses tabs)
> **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:
> nothing is accepted or recorded, and the Disclaimer points at it.
The Menu sits in its own row **below** the TitleBar (never inside the drag region — 16 §Gotchas).
@@ -171,6 +175,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):
@@ -224,6 +247,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
@@ -260,6 +293,19 @@ All screens are `Page`s registered with the navigation page provider and navigat
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,
@@ -431,6 +477,13 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
> `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.
@@ -497,6 +550,13 @@ 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 -1
View File
@@ -624,7 +624,7 @@ Every hook body is wrapped:
```
- Any SEH exception inside our code ⇒ increment `faultCount`, record which hook, **return control to the original function** so the game continues.
- 3 faults total ⇒ set `status = self_disabled`, uninstall all hooks (`MH_DisableHook(MH_ALL_HOOKS)`), stop writing, stay dormant. The Agent sees the flag and finalizes the session as `degraded`.
- 3 faults total ⇒ set `status = self_disabled`, ~~uninstall all hooks (`MH_DisableHook(MH_ALL_HOOKS)`)~~ restore each patch's prologue only while its bytes are still our jump (compare-and-restore per patch through `StopObserving`, §Unhooking, §H7 — `MH_ALL_HOOKS` would have removed an overlay chained after us; corrected 2026-09-27), stop writing, stay dormant. The Agent sees the flag and finalizes the session as `degraded`.
- Never `__try` around the call to the original function — only around *our* code, so we never mask a game bug as ours or vice versa.
- The trampoline call to the original is always executed exactly once, on every path, including error paths.
+50 -9
View File
@@ -235,12 +235,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`,
@@ -357,7 +365,7 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> That needs a real game library, and it is a false-refusal path, so it is
> recorded rather than assumed benign.
Any check failing ⇒ **injection is refused**. The UI shows which check fired and offers Tier-2 (ETW) capture instead, which requires no injection — but does require an elevated Agent, so the offer must state that plainly and fall through to Tier 3 rather than appearing to succeed and recording nothing (`04_CAPTURE` §Frame source abstraction).
Any check failing ⇒ **injection is refused**. The UI shows which check fired and ~~offers Tier-2 (ETW) capture instead, which requires no injection — but does require an elevated Agent, so the offer must state that plainly and fall through to Tier 3 rather than appearing to succeed and recording nothing (`04_CAPTURE` §Frame source abstraction)~~ **records the session unmeasured — Tier 2: its duration, the machine's sensors and the reason — which needs no injection and no elevation; there is no ETW rung and no Tier 3 since 2026-08-28** (corrected 2026-09-27: this sentence outlived the ladder it described by a month).
### The payload is checked too, and for a long time it was not
@@ -475,10 +483,19 @@ 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:**
@@ -491,8 +508,10 @@ cannot know.
- 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 +536,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 +564,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,6 +721,7 @@ 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
+4 -2
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
@@ -104,7 +106,7 @@ or it becomes the next stale status claim this file exists to record.
| **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 |
+141 -6
View File
@@ -746,8 +746,11 @@ Cyberpunk 2077 never chains `sl::DLSSOptions`, so 0xFF there is the title's trut
call, and if built, the byte stays 0xFF and the report says *derived*.
- **Do not** reach for `slDLSSSetOptions` via `slGetFeatureFunction`: §2b refused it on five
grounds that have not changed, and NGX-direct `NVSDK_NGX_Parameter_GetUI` is licence-blocked.
- **Alan Wake 2 did not run on 2026-09-04** (the owner tried every workaround; the title is
broken on this machine), so the measurement moved to **Dying Light: The Beast at DLSS**, the
- ~~**Alan Wake 2 did not run on 2026-09-04** (the owner tried every workaround; the title is
broken on this machine)~~ **Corrected 2026-09-27 (owner):** it did run late that evening — the run reports
`alanwake2-224851` and `alanwake2-230707` hold two captures (DLSS + RR, ray tracing *Yes*, 92.52 FPS; then ray
tracing off, Presented 114.52), neither with the quality preset, which is what this item needed. The earlier
attempts that day failed, so the measurement moved to **Dying Light: The Beast at DLSS**, the
first Streamline title measured whose batches carry `kFeatureDLSS` — identity `Dlss` on 4,575
of 4,575 batches. It read `UpscalerParams = 0` on three captures, because DL:TB ships
**Streamline 2.8.0, which deprecates `slSetTag` for `slSetTagForFrame`**, and only the
@@ -1310,9 +1313,13 @@ charts (6) after Games (5) because the summary opens from the Sessions tab; Sett
(`PipeTransmissionMode.Message`, `PipeOptions.Asynchronous | CurrentUserOnly`, remote clients rejected,
two instances), the ACL a `PipeSecurity` of the current user's SID plus Administrators~~ **`CreateNamedPipe`
itself (CsWin32), so the flags and the DACL are stated in code rather than left to a library default:**
message mode, overlapped, `PIPE_REJECT_REMOTE_CLIENTS`, two instances, the SDDL `D:P(A;;GA;;;<user>)(A;;GA;;;BA)`
on every instance, and the client's token user compared to the server's by impersonation on the client's
first frame (the kernel refuses it earlier). The CLIENT uses `PipeOptions.CurrentUserOnly`. *(As built
message mode, overlapped, `PIPE_REJECT_REMOTE_CLIENTS`, two instances, the SDDL ~~`D:P(A;;GA;;;<user>)(A;;GA;;;BA)`~~
`O:<user>D:P(A;;GA;;;<user>)(A;;GA;;;BA)` (the owner stated since 2026-09-17) on every instance, and the client's
token user compared to the server's by impersonation on the client's first frame (the kernel refuses it earlier).
The CLIENT ~~uses `PipeOptions.CurrentUserOnly`~~ checks the pipe's owner against its own token USER
(`PipeAccessControl.RequireOwnedByCurrentUser`, 2026-09-17) — `CurrentUserOnly` compares the token's default owner,
which an elevated token sets to Administrators, and refused the same user's Agent across elevation (corrected
2026-09-27). *(As built
2026-09-13; the wording above was the plan's, kept struck because it named a library path the build did not
take.)* Framing is
`07_IPC` §C as written: 4-byte LE length + UTF-8 JSON ≤ 1 MB, `Shared.Ipc.IpcEnvelope { type, id?, payload }`,
@@ -1687,6 +1694,115 @@ invisible to every check.
- **CA1711 rejects a type whose name ends in `Exception`**: the rules class is `UserModeExceptionRules`, the reasons
`UserModeExceptionLapse`.
## 2026-09-27 — the beta.10 train: the display mode, the admin mode, the Unreal Engine version
*Status is `CHANGELOG.md` `[0.1.0-beta.10]`; this is what no other file carries. The approved plan was six PRs:
PR-1 the Unreal version (schema 0015), PR-2 the Overlay's display region (shared-memory layout 4), PR-3 the display mode
in the Agent and the App (schema 0016), PR-4 the admin mode, PR-5 docs, legal text and the tested-games list, PR-6 the
release.*
**Decisions (owner, 2026-09-27, asked before the plan — do not re-ask):**
- **D34 — the admin mode asks Windows at EVERY Agent start.** The UAC prompt appears whenever the Agent starts with
`capture.run_elevated` on — owned by the App's window when the App starts it, flashing on the taskbar when the logon
task does. No "highest privileges" task, no service, no silent path. Games an elevated Agent starts get the desktop
shell's token. The elevated Agent is started for one user (`--for-user <SID>`) and exits 11 as any other account.
- **D35 — the tested-games list comes from a COPY of the owner's ledger** (scratchpad, Python `sqlite3`; never a
FrameLedger binary against the data folder) plus the repository's own evidence, and **the owner reviews it before it
is committed** — the repository is public.
- **D36 — legal text changes where it would become false** (Privacy 2.5, Disclaimer 2.8; EULA stays 1.3), **and
`LIMITATIONS.md` exists**: a user-facing list of what the WHOLE software cannot do, at the repository root and in the
App under Help ▸ Limitations — not one of FR-11's accepted documents (the Legal Gate records an acceptance per
document, and this is information, not terms).
- **D37 — each PR merges when its CI is green**, then the release PR and the GPG-signed tag.
**What was measured before it was written:**
- **Unreal versions, ten installed titles, read-only** (`spike-notes` §15): eight read (4.26.1 … 5.5.4), two honestly
none (Cronos demo, Rune Factory). Black Myth: Wukong's executable is protected (`.rdata` empty) and its build name sits
in `.code` — the whole-file fallback read it in 7.5 s from the owner's USB drive.
- **The display region's cost** (hook-harness `--probe-frames`, WARP): `GetFullscreenState` 12.6–13.1 ns, `GetDesc`
13.6–14.5 ns per call, at most twice a second per swap chain.
**Traps met on the way:**
- **A test run reseeds the rules file in the REAL data folder** (`RulesSeeder` in the integration tests writes
`%LOCALAPPDATA%\FrameLedger\rules`). PR-1's rules `2026.09.6` carry an extractor type (`unreal_build`) the installed
beta.9 cannot parse: its detection sweep says "rules unusable" until that Agent restarts — its seeder sees a file it
wrote itself (the marker's hash) and puts its own back — or beta.10 is installed. The guard reads the same file and is
unaffected (it ignores version extractors). Worth a scratch rules folder for the tests one day.
- **`DXGI_SWAP_EFFECT_DISCARD` is 0** — region 4 stores the effect plus one, the vendor-zero trap.
- **A minimised game presents only what the hook drops** (occlusion probes): a region-4 sample older than 2 s says
nothing about exclusivity now; the Agent keeps its window and drops its exclusive bits.
- **The Agent is DPI-unaware**: Windows scales another process's window coordinates for it. The window reader switches
its thread to per-monitor-aware (V2) for the calls and back.
- **A Tier-2 session never reaches the aggregator** — display columns live on the recorder's skeleton, or a Tier-2 row
would carry none.
- **`SessionRowColumns` is generated by a script that is not in the repository** — edit it by hand, by name.
- **`CreateProcessWithTokenW` needs `SeImpersonatePrivilege`**, which an unelevated (filtered) token does not hold: the
shell-token start is testable only on the elevated CI runner, and a runner with UAC off has an elevated shell — so the
test compares the child's elevation with the SHELL's, never with "unelevated".
- **An elevated token's default DACL omits the user** (again): the ledger's migration lock is now a `SharedMutex` with a
stated descriptor; the instance lock and the elevation marker are only probed, and a refused probe reads as held.
- **`CA2025` flags a disposable handed to an un-awaited task** even when ownership moves to it; the launcher says so in
a suppression with its reason, or splits the method so the analyzer can see it.
- **Heredocs mangle backslashes and `\a`** (`D:\another` became `D:<BEL>nother` in a test). Patch scripts are written
with the Write tool and run by path; a scan for control characters before the gate catches the rest.
**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
@@ -1712,11 +1828,30 @@ invisible to every check.
5. **Re-ratify §S18 blocker 3 and §S27's basis** once P2's PR-C/PR-F make the Agent the shipped
injecting entry point (§P2, decision D4). The PRs restate both entries; whether the
restatement stands is the owner's.
6. **D33's first real use (beta.9).** Turn the option on; GIRLS' FRONTLINE 2 should be listed eligible (NetEase
6. ~~**D33's first real use (beta.9).**~~ **Done by 2026-09-27, read from a copy of the owner's ledger:** three normal
hooked sessions of GIRLS' FRONTLINE 2 under the exception (NetEase Yidun) on 2026-09-26 and 09-27, the longest
3 h 9 min; the `ja` review below is still owed. *(The item as written:)* Turn the option on; GIRLS' FRONTLINE 2 should be listed eligible (NetEase
Yidun, `NEP2.dll`, three sessions); make the exception, turn hooking on and play one session: hooked, marked
*Hooked · exception*, not stopped by the 30 s re-scan or by the Overlay when `NEP2.dll` loads. Aniimo should read
*not eligible* with its `NEPKernel.sys`; the option off makes the next session Tier 2 with the exception kept. And
the `ja` text of `Safety_Exception_*`, which ships as English until a reviewer signs.
7. **beta.10 on real hardware.** (a) **The display mode:** one DXGI game taken through exclusive full-screen →
borderless → windowed in one session — the summary's shares, the Sessions column, the Trend's three share metrics —
with a note of what the game's own menu called each mode. (b) **The admin mode:** turn it on → the disclosure → the
UAC prompt → Settings says *Running elevated*; decline it → *the administrator prompt was declined*; sign out and in
with the logon task → the prompt waits on the taskbar and one Agent results; start a game from FrameLedger while
elevated → Task Manager's *Elevated* column says *No*; a game that runs as administrator → hooked; the CPU temperature
with PawnIO (closes §M10 if it reads). (c) **The Unreal Engine version** on each Unreal game's page. (d) The Legal
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
+71
View File
@@ -0,0 +1,71 @@
# Games FrameLedger has been run with
*As of 2026-09-27 (0.1.0-beta.10). Built from a copy of the developer's own FrameLedger database and the repository's
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.*
**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
measurement below is Direct3D 11 or 12. What the tiers mean and what FrameLedger cannot do: [LIMITATIONS.md](../LIMITATIONS.md).
**Two periods.** From 2026-08-03 to 2026-09-06 the games were measured with the developer's capture tool, one run at a
time against the game's own settings menu (reports in [spike-notes.md](spike-notes.md)). From 2026-09-16 the shipped
app and agent recorded them as a user would; the database holds the sessions from 2026-09-22 on — earlier ones went
with the 2026-09-16 recovery and with library entries removed since.
## Measured — hooked (Tier 1)
| Game | Engine | API | What was measured | When | Evidence |
|---|---|---|---|---|---|
| Cyberpunk 2077 | — | D3D12 | DLSS Balanced 1485×835 → 2560×1440, exact against its settings file; DLSS Frame Generation off ×1.00, ×3 (61.4 → 183.5 FPS), ×4 (58.7 → 234.1); FSR 3 + FSR frame generation ×2 (74.3 → 148.6); ray tracing *Yes* with path tracing on and *No* with it off, as set | 2026-08-15 → 09-05, about 25 runs | [spike-notes §8, §9, §11](spike-notes.md) |
| Dying Light: The Beast | — | D3D12 | DLSS Frame Generation ×4: Native 70.5 → Displayed 282.1 FPS, counted through DXGI; FSR + FSR frame generation ×2 (70.5 → 140.9); ray tracing *Yes* | 2026-09-04 → 09-06 | [spike-notes §9](spike-notes.md), [03_METRICS §Frame Generation](03_METRICS.md) |
| Hell Is Us | Unreal Engine 5.5.4 | D3D12 | DLSS Frame Generation ×4 (76.5 → 306.2); DLSS shown as *driver-reported* (it bypasses Streamline); FSR + FSR frame generation ×2 (85.7 → 171.4); XeSS frame generation shown as Presented FPS only; ray tracing *No* | 2026-09-03 → 09-16 | [spike-notes §8, §9](spike-notes.md) |
| Black Myth: Wukong | Unreal Engine 5.0.0 | D3D12 | DLSS Frame Generation ×4 (55.4 → 221.5); ray tracing *Yes* (16.2 % of frames in the app's session); a session that changed state showed its steady state (×4.1) instead of an average | 2026-08-20 → 09-16 | [spike-notes §9, §14](spike-notes.md) |
| Clair Obscur: Expedition 33 | Unreal Engine 5.4.4 | D3D12 | DLSS + Frame Generation ×4 (54.9 → 218.4) and ×2 (76.0 → 149.8); frame generation off read *none*, with DXGI agreeing; ray tracing *No* | 2026-09-04 → 09-06 | [spike-notes §9](spike-notes.md) |
| Rune Factory: Guardians of Azuma | Unreal Engine (version not in the executable) | D3D12 | DLSS Frame Generation ×4 (128.9 → 513.0); FSR frame generation compiled into the game counted ×2 but not named; ray tracing *No* (the game has none) | 2026-08-20 → 09-06 | [spike-notes §9](spike-notes.md) |
| Kingdom Come: Deliverance II | — | D3D12 | FSR (3.1 or 4) at 1505×847 → 2560×1440; frame generation *none* (the game ships none); ray tracing *No* | 2026-09-04 | [spike-notes §9](spike-notes.md) |
| Lies of P | Unreal Engine 4.27.2 | D3D12 | FSR 3 at 1506×848 → 2560×1440 with FSR frame generation ×2.04 (57.1 → 116.4) in the app; frame generation off read *none*; DLSS shown as *driver-reported*; ray tracing *No* | 2026-08-03 → 09-16 | [spike-notes §7, §9, §14](spike-notes.md) |
| Onimusha: Way of the Sword (demo) | RE Engine | D3D12 | DLSS + DLSS Frame Generation: ×3.67 and ×3.93 with the capture tool, ×4.00 in the app's steady state (60 → 240 FPS), ×3.0 (60 → 180) in the app on 2026-09-22; ray tracing *Yes* | 2026-09-05 → 09-22 | [spike-notes §9, §14](spike-notes.md), database |
| Cronos: The New Dawn (demo) | Unreal Engine (version not in the executable) | D3D12 | DLSS with frame generation off (105 FPS, *none*); on ×2 (86.8 → 172.7), DLSS Frame Generation named; ray tracing *Yes* | 2026-09-06 → 09-16 | [spike-notes §9, §14](spike-notes.md) |
| Alan Wake 2 | — | D3D12 | Path tracing Ultra with DLSS and Ray Reconstruction: ray tracing *Yes* (96.8 % of frames), frame generation read ×1.00 (the game did not apply the setting that run). On 2026-09-04: DLSS with ray tracing *Yes* (99 % of frames), 92.5 FPS, frame generation *none* by count; then ray tracing off (*No*), DLSS, Presented 114.5 FPS. The quality preset was never read | 2026-08-04 → 09-04 | [spike-notes §8](spike-notes.md), run reports |
| SILENT HILL 2 | Unreal Engine 5.1 | D3D12 | DLSS Frame Generation identified, frames not counted (Presented 78 FPS); DLSS *driver-reported*; ray tracing *Yes* | 2026-09-25 | database |
| DARK SOULS III | FromSoftware | D3D11 | Presented 59.8 FPS; no upscaler, frame generation or ray tracing loaded | 2026-09-03 | [spike-notes §9](spike-notes.md) |
| Sekiro: Shadows Die Twice | FromSoftware | D3D11 | Presented 60 FPS (the game's cap), two sessions of 15 min and 2 h 18 min | 2026-09-26 | database |
| Yu-Gi-Oh! Master Duel | Unity 6000.0 | D3D11 | Presented 239 FPS across six sessions (up to 5 h 25 min) | 2026-09-22 → 09-25 | database |
| GIRLS' FRONTLINE 2: EXILIUM | Unity 2019.4 | D3D11 | Presented 53–101 FPS; the last three sessions under the user-mode anti-cheat exception (NetEase Yidun), one of them 3 h 9 min, all ended normally | 2026-09-21 → 09-27 | database, [HANDOFF](HANDOFF.md) |
| Aniimo | Unity 2022.3 | D3D12 | DLSS at 1707×960 → 2560×1440, frame generation *none* (×1.00, 205 FPS), ray tracing *No* — then blocked (below) | 2026-09-22 | database |
| AbyssMemory | Unreal Engine 4.26.1 | D3D11 | Presented 55 FPS, one short session | 2026-09-22 | database |
| Umamusume: Pretty Derby | Unity 2022.3 | D3D11 | Presented 37 FPS, one session | 2026-09-27 | database |
| 恋しかるべき (KOISHIKARUBEKI) | Unity 6000.3 | D3D11 | Presented 59.6 FPS | 2026-09-03 | [spike-notes §9](spike-notes.md) |
| Flower in Us | RPG Maker MV/MZ (NW.js) | D3D11 | Presented 59.8 FPS over three swap chains, after two refusals that found the game's browser process ambiguous (fixed) | 2026-09-03 → 09-04 | [spike-notes §9](spike-notes.md) |
| UMIGARI | Unreal Engine 5.5.4 | D3D12 | Presented 95–97 FPS, frame generation *none*, ray tracing *No* | 2026-09-05 → 09-06 | run reports only |
## Recorded without measurement (Tier 2)
| Game | Why nothing was measured | When | Evidence |
|---|---|---|---|
| HELLO, HELLO WORLD! | A 32-bit game (RPG Maker MV): refused by the guard once, and two sessions with hooking switched off — each recorded with its duration and sensors | 2026-09-23 | database |
| Umamusume: Pretty Derby | Three sessions played with hooking switched off for the game | 2026-09-27 | database |
| Sekiro: Shadows Die Twice | One session played with hooking switched off | 2026-09-25 | database |
| GIRLS' FRONTLINE 2: EXILIUM | One session whose process Windows would not let FrameLedger open, and two recovered after the agent itself stopped mid-session (*interrupted*) | 2026-09-22 → 09-23 | database |
## Refused by the anti-cheat guard
| Game | What was found | When | Evidence |
|---|---|---|---|
| ELDEN RING | Easy Anti-Cheat: its folder, and a process Windows would not let FrameLedger open. Nothing was ever injected; eight sessions recorded without measurement | 2026-09-21 → 09-27 | [CHANGELOG](../CHANGELOG.md), database |
| GIRLS' FRONTLINE 2: EXILIUM | NetEase Yidun (`NEP2.dll`, user mode) — turned hooking off after it had been measured; measured again since 2026-09-26 under the user-mode exception its owner made | 2026-09-25 | [19_SAFETY](19_SAFETY_AND_ANTICHEAT.md) |
| Aniimo | NetEase Yidun with a kernel driver (`NEPKernel.sys`) in the game's folder — never eligible for an exception | 2026-09-25 | [19_SAFETY](19_SAFETY_AND_ANTICHEAT.md) |
| Goose Goose Duck | Easy Anti-Cheat's service running, and its folder | 2026-08-04 | [spike-notes §13](spike-notes.md) |
| Neverness To Everness | Anti-Cheat Expert's kernel driver in the game's folder | 2026-08-04 | [spike-notes §13](spike-notes.md) |
| Counter-Strike 2 | Valve Anti-Cheat — refused by FrameLedger's title list since beta.8. On 2026-08-04 the checks alone allowed it (VAC is invisible to them); nothing was injected | 2026-08-04, beta.8 | [spike-notes §13](spike-notes.md), [19_SAFETY](19_SAFETY_AND_ANTICHEAT.md) |
Also refused before any injection: **Deadly Heart Gambit** — a 32-bit game (2026-08-03).
## Engine version read from the executable only
The Unreal Engine version (beta.10) was checked against ten installed Unreal games without running them: Hell Is Us
5.5.4, Black Myth: Wukong 5.0.0, Clair Obscur: Expedition 33 5.4.4, Lies of P 4.27.2, SILENT HILL 2 5.1, UMIGARI 5.5.4,
AbyssMemory 4.26.1, **Martha Is Dead 4.27.0**; Cronos (demo) and Rune Factory name no version in their executables and
read *not found*. ([spike-notes §15](spike-notes.md), [05_DETECTION §Engine version](05_DETECTION.md))
+3 -1
View File
@@ -2489,7 +2489,9 @@ FrameLedger.Agent --console sessions --last 1
```
**The row half is read — 2026-09-16, the shipped Agent, not the console.** The owner ran the App with its `--serve`
Agent for an afternoon (18 hooked sessions, attach mode, `late_attach = 1`, every one watcher-driven from a Steam
Agent for an afternoon (18 hooked sessions — **count note, 2026-09-27:** `CHANGELOG` 2026-09-17 says *all nine hooked
sessions of 2026-09-16*; neither count was re-made when the other was written, and the ledger as it stands today holds no
session from that day, so the discrepancy is recorded rather than resolved — attach mode, `late_attach = 1`, every one watcher-driven from a Steam
launch rather than the `launch` verb above — a Steam title started from its Shipping executable relaunches through
Steam, so the console recipe is the wrong vehicle for a Steam library and the product's own path is the right one).
`sessions.id = 10`, **Lies of P**, 16:11, 147 s, `d3d12`, 16,221 frames, `guard_ticks_published = 5`, Overlay
+14 -6
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-26.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.9`** (2026-09-26), 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
@@ -57,6 +57,14 @@
> were counted, the lows, median and stutter are taken over application frames only.
> - **Ray tracing:** Yes/No measured on Direct3D 12 from ray-dispatch and acceleration-structure-build
> calls; the technique and path tracing are `N/A`, and so is ray tracing on other APIs.
> - **Display mode:** how each game's window was shown — exclusive full-screen, borderless, windowed or
> minimised — as a share of the session, with the window's size and the monitor's, in every session.
> Exclusive full-screen is known only for Direct3D titles FrameLedger injects into, from the game's own
> swap chain; for every other session the window alone is read, and a window covering its monitor reads
> *full-screen or borderless*. What Windows does behind the game (fullscreen optimizations) is not visible.
> - **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.
> - **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
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
@@ -64,8 +72,8 @@
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
> administrator with PawnIO installed, and that reading has not yet been checked on real hardware;
> everywhere else it is `N/A`.
> administrator — an option, off by default, for which Windows asks at every start of the Agent — with
> PawnIO installed, and that reading has not yet been checked on real hardware; everywhere else it is `N/A`.
> - **Safety:** every pre-injection check runs before injection, including the signed-by-a-known-vendor
> half of the suspicious-module rule. During every capture the Agent re-runs the checks every 30 s and
> stops capturing on a refusal: a Direct3D or OpenGL game's hooks are removed, and the Vulkan layer
@@ -76,8 +84,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
+41 -13
View File
@@ -1,6 +1,6 @@
# FrameLedger — Disclaimer
**Version:** 2.7 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.9 · **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
@@ -11,7 +11,9 @@
## 0. This is pre-release (beta) software
**FrameLedger is a beta.** Every build published so far is a pre-release. It has been tested on a small number of
machines and games, and **it certainly still contains bugs — some of them not yet known to anyone.** Features can
machines and games — the games are listed in `docs/LIST_GAME_TESTED.md` in the project's repository, and what the software
cannot do is listed in `LIMITATIONS.md` there and in the app under Help ▸ Limitations — and **it certainly still contains
bugs — some of them not yet known to anyone.** Features can
change or disappear between builds, recorded data can turn out to be wrong, and an update can require your data to be
migrated.
@@ -90,11 +92,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
@@ -112,8 +117,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-26.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.9`** (2026-09-26), 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
@@ -158,6 +163,14 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> were counted, the lows, median and stutter are taken over application frames only.
> - **Ray tracing:** Yes/No measured on Direct3D 12 from ray-dispatch and acceleration-structure-build
> calls; the technique and path tracing are `N/A`, and so is ray tracing on other APIs.
> - **Display mode:** how each game's window was shown — exclusive full-screen, borderless, windowed or
> minimised — as a share of the session, with the window's size and the monitor's, in every session.
> Exclusive full-screen is known only for Direct3D titles FrameLedger injects into, from the game's own
> swap chain; for every other session the window alone is read, and a window covering its monitor reads
> *full-screen or borderless*. What Windows does behind the game (fullscreen optimizations) is not visible.
> - **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.
> - **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
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
@@ -165,8 +178,8 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
> administrator with PawnIO installed, and that reading has not yet been checked on real hardware;
> everywhere else it is `N/A`.
> administrator — an option, off by default, for which Windows asks at every start of the Agent — with
> PawnIO installed, and that reading has not yet been checked on real hardware; everywhere else it is `N/A`.
> - **Safety:** every pre-injection check runs before injection, including the signed-by-a-known-vendor
> half of the suspicious-module rule. During every capture the Agent re-runs the checks every 30 s and
> stops capturing on a refusal: a Direct3D or OpenGL game's hooks are removed, and the Vulkan layer
@@ -177,8 +190,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
@@ -210,6 +223,21 @@ be the difference between a game that runs and one that does not. Turn hooking o
FrameLedger reads GPU telemetry through vendor libraries that ship with your graphics driver. It **only reads** — it never changes clocks, fan curves, power limits, or any other hardware setting. Optional CPU-temperature support relies on the separate third-party **PawnIO** driver, which you install at your own discretion under its own license; some anti-cheat systems object to third-party kernel drivers regardless of what they are used for.
## 5A. Running the capture agent as administrator — optional, and your decision
Since 0.1.0-beta.10 a Settings option, off unless you turn it on, starts FrameLedger's capture agent as administrator.
**Windows asks you every time the agent starts** — also when you sign in — and the prompt names an unknown publisher,
because FrameLedger is not code-signed. It lets FrameLedger open and measure a game that itself runs as administrator,
and read the CPU temperature where PawnIO is installed. It changes nothing in the anti-cheat guard (§2, §2A), opens no
process that Windows or an anti-cheat driver protects, and never starts a game as administrator: games you start from
FrameLedger run with your standard rights.
**The risk is yours.** FrameLedger is installed in your user folder, which any program running under your Windows
account can change (§1). If such a program replaced FrameLedger's files, it would run with administrator rights the next
time you accept the prompt. Accept it only for a copy you installed from the project's GitHub Releases, and turn the
option on only if you trust everything that runs under your account. The developer is not responsible for what runs
under an administrator prompt you accept.
## 6. Third-party names
Windows and DirectX are trademarks of Microsoft Corporation. NVIDIA, DLSS, Reflex, NVAPI, AMD, FSR, Intel, XeSS, Vulkan, Steam, GOG, Epic Games, itch.io, Unity, Unreal Engine, and all other product names are trademarks of their respective owners. FrameLedger is an independent project and is **not affiliated with, endorsed by, or sponsored by** any of them, including any game publisher or anti-cheat vendor.
+2 -2
View File
@@ -1,6 +1,6 @@
# FrameLedger — End User License Agreement (EULA)
**Version:** 1.3 · **Effective:** {{RELEASE_DATE}}
**Version:** 1.4 · **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.
@@ -14,7 +14,7 @@ The Software records game performance data, hardware telemetry (temperatures, lo
## 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:
+5 -3
View File
@@ -1,6 +1,6 @@
# FrameLedger — Privacy Policy
**Version:** 2.4 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.5 · **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), tags and notes you write.
- 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.
- 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.
@@ -37,13 +37,15 @@ The "Report a bug" feature builds a zip file **on your device**, shows you exact
## 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, and the store files that name it (Steam's and GOG's, on your disk) — to detect its engine and features and to check it for anti-cheat before any injection is possible; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); and hardware sensor values from your graphics driver's own libraries.
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.
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 -2
View File
@@ -40,7 +40,7 @@
"level, which made it a check that could not fire."
],
"schemaVersion": 2,
"rulesVersion": "2026.09.6",
"rulesVersion": "2026.10.1",
"engines": [
{
@@ -419,7 +419,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." }
]
}
}
@@ -121,7 +121,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 +269,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
+7 -1
View File
@@ -280,6 +280,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 +352,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
@@ -417,6 +421,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>();
}
@@ -0,0 +1,7 @@
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;
}
+118 -24
View File
@@ -1,18 +1,33 @@
using System.Windows.Controls;
using System.Windows.Input;
using ScottPlot;
using ScottPlot.Plottables;
namespace FrameLedger.App.Charts;
/// <summary>The trend line (one point per session, oldest first) with FR-6.3's hardware-change markers as labelled vertical lines.</summary>
/// <summary>
/// The trend: one point per session, oldest first, with FR-6.3's hardware-change markers as labelled vertical lines. Since
/// beta.11 (owner decision D39) it draws several metrics at once — every line in the first unit against the left axis, a
/// second unit against the right — and a click near a session's points raises <see cref="SessionClicked"/>, which the
/// Sessions tab's overview uses to select that session.
/// </summary>
public partial class TrendChart : UserControl
{
/// <summary>How near a click must land to a session's points, in device-independent pixels.</summary>
private const double _clickReach = 14;
private TrendPoint[] _all = [];
public TrendChart()
{
InitializeComponent();
ChartTheme.Attach(Plot);
Plot.MouseLeftButtonUp += OnPlotClicked;
}
/// <summary>The session whose points a click landed on (<see cref="TrendPoint.SessionId"/>).</summary>
public event EventHandler<SessionClickedEventArgs>? SessionClicked;
public ScottPlot.Plot ScottPlot => Plot.Plot;
public int DrawnPoints { get; private set; }
@@ -20,9 +35,20 @@ public partial class TrendChart : UserControl
/// <summary>How many of <see cref="DrawnPoints"/> were drawn hollow (a part of their session).</summary>
public int HollowPoints { get; private set; }
public void Show(IReadOnlyList<TrendPoint> points, IReadOnlyList<HardwareChange> changes, string metricLabel)
/// <summary>How many lines were drawn against the right axis (a second unit).</summary>
public int RightAxisLines { get; private set; }
/// <summary>One metric — what the Trend drew before beta.11.</summary>
public void Show(IReadOnlyList<TrendPoint> points, IReadOnlyList<HardwareChange> changes, string metricLabel) =>
Show([new TrendLine(metricLabel, metricLabel, points)], changes);
/// <summary>
/// Every line in <paramref name="lines"/>: the first line's unit on the left axis, the first other unit on the right,
/// and a line in any further unit is not drawn (the selector allows two).
/// </summary>
public void Show(IReadOnlyList<TrendLine> lines, IReadOnlyList<HardwareChange> changes)
{
ArgumentNullException.ThrowIfNull(points);
ArgumentNullException.ThrowIfNull(lines);
ArgumentNullException.ThrowIfNull(changes);
ScottPlot.Plot plot = Plot.Plot;
plot.Clear();
@@ -31,31 +57,36 @@ public partial class TrendChart : UserControl
plot.Axes.DateTimeTicksBottom();
ChartTheme.Apply(plot);
plot.XLabel(Strings.Trend_Axis_Date);
plot.YLabel(metricLabel);
DrawnPoints = points.Count;
HollowPoints = points.Count(static t => t.SettingsChangedMidSession);
if (points.Count > 0)
{
ChartPalette p = ChartTheme.Current;
double[] xs = [.. points.Select(static t => t.At.LocalDateTime.ToOADate())];
double[] ys = [.. points.Select(static t => t.Value)];
Scatter line = plot.Add.Scatter(xs, ys, p.Native);
line.LineWidth = 2;
line.MarkerSize = 7;
line.LegendText = metricLabel;
string? left = lines.Count > 0 ? lines[0].Unit : null;
string? right = lines.Select(static l => l.Unit).FirstOrDefault(u => !string.Equals(u, left, StringComparison.Ordinal));
plot.YLabel(left ?? string.Empty);
plot.Axes.Right.Label.Text = right ?? string.Empty;
// A point that describes part of its session (settings changed, or a steady state) is drawn hollow over its
// filled one: the line still passes through it, and it cannot be read as the session's own number.
TrendPoint[] partial = [.. points.Where(static t => t.SettingsChangedMidSession)];
if (partial.Length > 0)
ChartPalette p = ChartTheme.Current;
Color[] palette = [p.Native, p.Displayed, p.Percentile, p.Sensor, p.SensorSecondary, p.Stutter, p.Histogram, p.Segment];
var drawn = new List<TrendPoint>();
int hollow = 0;
int onRight = 0;
for (int i = 0; i < lines.Count; i++)
{
TrendLine line = lines[i];
bool isRight = right is not null && string.Equals(line.Unit, right, StringComparison.Ordinal);
if (line.Points.Count == 0 || (!isRight && !string.Equals(line.Unit, left, StringComparison.Ordinal)))
{
double[] hx = [.. partial.Select(static t => t.At.LocalDateTime.ToOADate())];
double[] hy = [.. partial.Select(static t => t.Value)];
Scatter hollow = plot.Add.ScatterPoints(hx, hy, p.Data);
hollow.MarkerSize = 6;
hollow.MarkerShape = MarkerShape.FilledCircle;
continue;
}
hollow += AddLine(plot, line, palette[i % palette.Length], p.Data, isRight);
onRight += isRight ? 1 : 0;
drawn.AddRange(line.Points);
}
_all = [.. drawn];
DrawnPoints = drawn.Count;
HollowPoints = hollow;
RightAxisLines = onRight;
if (drawn.Count > 0)
{
foreach (HardwareChange change in TrendSeriesBuilder.MergedByDay(changes))
{
VerticalLine marker = plot.Add.VerticalLine(change.At.LocalDateTime.ToOADate(), 1, p.StutterPso, LinePattern.Dashed);
@@ -70,4 +101,67 @@ public partial class TrendChart : UserControl
Plot.Refresh();
}
/// <summary>One line, its hollow points, against the left or the right axis; how many were hollow.</summary>
private static int AddLine(ScottPlot.Plot plot, TrendLine line, Color color, Color hollowColor, bool isRight)
{
double[] xs = [.. line.Points.Select(static t => t.At.LocalDateTime.ToOADate())];
double[] ys = [.. line.Points.Select(static t => t.Value)];
Scatter scatter = plot.Add.Scatter(xs, ys, color);
scatter.LineWidth = 2;
scatter.MarkerSize = 7;
scatter.LegendText = isRight ? line.Label + " ▸" : line.Label;
if (isRight)
{
scatter.Axes.YAxis = plot.Axes.Right;
}
// A point that describes part of its session (settings changed, or a steady state) is drawn hollow over its filled
// one: the line still passes through it, and it cannot be read as the session's own number.
TrendPoint[] partial = [.. line.Points.Where(static t => t.SettingsChangedMidSession)];
if (partial.Length > 0)
{
double[] hx = [.. partial.Select(static t => t.At.LocalDateTime.ToOADate())];
double[] hy = [.. partial.Select(static t => t.Value)];
Scatter dots = plot.Add.ScatterPoints(hx, hy, hollowColor);
dots.MarkerSize = 6;
dots.MarkerShape = MarkerShape.FilledCircle;
if (isRight)
{
dots.Axes.YAxis = plot.Axes.Right;
}
}
return partial.Length;
}
/// <summary>The session whose points are nearest the click along the date axis, if any is within <see cref="_clickReach"/>.</summary>
private void OnPlotClicked(object sender, MouseButtonEventArgs e)
{
if (_all.Length == 0 || SessionClicked is null)
{
return;
}
System.Windows.Point at = e.GetPosition(Plot);
float scale = Plot.DisplayScale;
double clickX = at.X * scale;
ScottPlot.Plot plot = Plot.Plot;
TrendPoint? nearest = null;
double best = double.MaxValue;
foreach (TrendPoint point in _all)
{
double distance = Math.Abs(plot.GetPixel(new Coordinates(point.At.LocalDateTime.ToOADate(), 0)).X - clickX);
if (distance < best)
{
best = distance;
nearest = point;
}
}
if (nearest is { } hit && best <= _clickReach * scale)
{
SessionClicked.Invoke(this, new SessionClickedEventArgs(hit.SessionId));
}
}
}
+10
View File
@@ -0,0 +1,10 @@
namespace FrameLedger.App.Charts;
/// <summary>
/// One metric's line on a trend (beta.11, owner decision D39: several metrics at once): its label, the unit that decides
/// which axis it is drawn against, and its points (one per session, oldest first).
/// </summary>
/// <param name="Label">The metric, as the legend names it.</param>
/// <param name="Unit">The axis label every line in the same unit shares.</param>
/// <param name="Points">The sessions that have the metric.</param>
public sealed record TrendLine(string Label, string Unit, IReadOnlyList<TrendPoint> Points);
@@ -42,6 +42,44 @@ public static class TrendSeriesBuilder
return points;
}
/// <summary>
/// The axis a metric is drawn against (beta.11, D39): frame rates share one, temperatures, loads and shares, power,
/// memory and the factor each have their own — two of them at most on one chart.
/// </summary>
public static string UnitOf(TrendMetric metric) => metric switch
{
TrendMetric.PresentedFps or TrendMetric.NativeFps or TrendMetric.Displayed or TrendMetric.P1Low or TrendMetric.P01Low => Strings.Trend_Unit_Fps,
TrendMetric.MaxGpuTemp or TrendMetric.MaxCpuTemp => Strings.Trend_Unit_Celsius,
TrendMetric.AvgGpuPower => Strings.Trend_Unit_Watts,
TrendMetric.MaxVramProcess or TrendMetric.AvgRam => Strings.Trend_Unit_Megabytes,
TrendMetric.FgFactor => Strings.Trend_Unit_Factor,
_ => Strings.Trend_Unit_Percent,
};
/// <summary>
/// The Sessions tab's overview (beta.11, D39): every hooked session's rate and lows on one chart — Presented FPS where
/// no generated frame was counted, Native and Displayed where frame generation was measured (rule 6: never one inflated
/// number), and the 1% and 0.1% lows — partial sessions included and drawn hollow.
/// </summary>
public static IReadOnlyList<TrendLine> Overview(IReadOnlyList<SessionRow> rows)
{
ArgumentNullException.ThrowIfNull(rows);
(TrendMetric Metric, string Label)[] metrics =
[
(TrendMetric.PresentedFps, Strings.Trend_Metric_PresentedFps),
(TrendMetric.NativeFps, Strings.Trend_Metric_NativeFps),
(TrendMetric.Displayed, Strings.Trend_Metric_Displayed),
(TrendMetric.P1Low, Strings.Trend_Metric_P1Low),
(TrendMetric.P01Low, Strings.Trend_Metric_P01Low),
];
// Native and Displayed only where frames were generated: on a session that counted none, Native is the Presented rate
// already drawn, and a second line on the same points reads as a second measurement.
HashSet<long> generated = [.. rows.Where(static r => FpsPresentation.FromRow(r).Kind == FpsReadoutKind.Generated).Select(static r => r.Id)];
return [.. metrics.Select(m => new TrendLine(m.Label, Strings.Trend_Unit_Fps,
[.. Points(rows, m.Metric, includeMidSessionChanges: true).Where(p => m.Metric is not (TrendMetric.NativeFps or TrendMetric.Displayed) || generated.Contains(p.SessionId))]))
.Where(static l => l.Points.Count > 0)];
}
/// <summary>How many sessions FR-6.4 leaves out at the default setting.</summary>
public static int ExcludedCount(IReadOnlyList<SessionRow> rows) => ExcludedCount(rows, TrendMetric.PresentedFps);
@@ -0,0 +1,105 @@
using System.Windows;
using System.Windows.Controls;
namespace FrameLedger.App.Controls;
/// <summary>
/// The library grid's panel (beta.11, owner request 2026-10-03: "the empty band on the right"): as many columns as
/// <see cref="MinItemWidth"/> allows across the width it is given, every item stretched to an equal share of it, so a row
/// is always full — a plain <see cref="WrapPanel"/> of 300 px cards left up to a card's width unused at the right. Each row
/// is as tall as its tallest item. Not virtualizing: a library is hundreds of rows at most.
/// </summary>
public sealed class UniformWrapPanel : Panel
{
public static readonly DependencyProperty MinItemWidthProperty = DependencyProperty.Register(
nameof(MinItemWidth), typeof(double), typeof(UniformWrapPanel), new FrameworkPropertyMetadata(300.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
public static readonly DependencyProperty SpacingProperty = DependencyProperty.Register(
nameof(Spacing), typeof(double), typeof(UniformWrapPanel), new FrameworkPropertyMetadata(12.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
/// <summary>The narrowest an item may be; the column count is the most that fit at this width or wider.</summary>
public double MinItemWidth
{
get => (double)GetValue(MinItemWidthProperty);
set => SetValue(MinItemWidthProperty, value);
}
/// <summary>The gap between columns and between rows.</summary>
public double Spacing
{
get => (double)GetValue(SpacingProperty);
set => SetValue(SpacingProperty, value);
}
/// <summary>How many columns of at least <paramref name="minItemWidth"/> fit in <paramref name="width"/>, never fewer than one.</summary>
public static int ColumnsFor(double width, double minItemWidth, double spacing)
{
if (double.IsNaN(width) || double.IsInfinity(width) || minItemWidth <= 0)
{
return 1;
}
return Math.Max(1, (int)Math.Floor((width + spacing) / (minItemWidth + spacing)));
}
/// <summary>Each item's width when <paramref name="columns"/> share <paramref name="width"/> with gaps between them.</summary>
public static double ItemWidthFor(double width, int columns, double spacing) =>
columns <= 0 ? 0 : Math.Max(0, (width - ((columns - 1) * spacing)) / columns);
protected override Size MeasureOverride(Size availableSize)
{
double width = double.IsInfinity(availableSize.Width) ? MinItemWidth : availableSize.Width;
int columns = ColumnsFor(width, MinItemWidth, Spacing);
double itemWidth = ItemWidthFor(width, columns, Spacing);
double height = 0;
double rowHeight = 0;
int column = 0;
int rows = 0;
foreach (UIElement child in InternalChildren)
{
child.Measure(new Size(itemWidth, double.PositiveInfinity));
rowHeight = Math.Max(rowHeight, child.DesiredSize.Height);
if (++column == columns)
{
height += rowHeight;
rows++;
rowHeight = 0;
column = 0;
}
}
if (column > 0)
{
height += rowHeight;
rows++;
}
return new Size(width, height + (Math.Max(0, rows - 1) * Spacing));
}
protected override Size ArrangeOverride(Size finalSize)
{
int columns = ColumnsFor(finalSize.Width, MinItemWidth, Spacing);
double itemWidth = ItemWidthFor(finalSize.Width, columns, Spacing);
UIElement[] children = [.. InternalChildren.Cast<UIElement>()];
double y = 0;
for (int start = 0; start < children.Length; start += columns)
{
int end = Math.Min(start + columns, children.Length);
double rowHeight = 0;
for (int i = start; i < end; i++)
{
rowHeight = Math.Max(rowHeight, children[i].DesiredSize.Height);
}
for (int i = start; i < end; i++)
{
children[i].Arrange(new Rect((i - start) * (itemWidth + Spacing), y, itemWidth, rowHeight));
}
y += rowHeight + Spacing;
}
return finalSize;
}
}
@@ -17,6 +17,7 @@
<StackPanel>
<ui:TextBlock Text="{Binding Intro}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,14,0,0" Text="{Binding Why}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,8,0,0" FontWeight="SemiBold" Text="{x:Static vm:AntiCheatExceptionDialogViewModel.Trial}" TextWrapping="Wrap" />
<Border Margin="0,14,0,0" Padding="12" CornerRadius="6" Background="{DynamicResource CardBackgroundFillColorDefaultBrush}">
<ui:TextBlock FontWeight="SemiBold" Text="{Binding Risk}" TextWrapping="Wrap" />
@@ -10,14 +10,35 @@
MinWidth="640">
<!--
FR-1.2's review checklist: nothing is added until the user says which; a row that is already in the library
or has no executable cannot be ticked. Import never enables hooking (the intro says so).
or has no executable cannot be ticked (its box is disabled since beta.11 - before, a tick was taken and ignored).
Rows already in the library are hidden unless "Show the N games already in the library" is ticked, and then
dimmed. Import never enables hooking (the intro says so).
-->
<StackPanel>
<ui:TextBlock TextWrapping="Wrap" Text="{x:Static vm:ImportReviewViewModel.Intro}" />
<CheckBox Margin="0,8,0,0" Content="{Binding ShowExistingText}" IsChecked="{Binding ShowExisting, Mode=TwoWay}"
Visibility="{Binding HasExisting, Converter={StaticResource BoolToVis}}" />
<DataGrid Margin="0,10,0,8" MaxHeight="360" AutoGenerateColumns="False" CanUserAddRows="False" HeadersVisibility="Column"
ItemsSource="{Binding Rows}" SelectionMode="Single" IsReadOnly="False">
ItemsSource="{Binding Shown}" SelectionMode="Single" IsReadOnly="False">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsExisting}" Value="True">
<Setter Property="Opacity" Value="0.55" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridCheckBoxColumn Binding="{Binding IsSelected, UpdateSourceTrigger=PropertyChanged}" Width="40" />
<DataGridTemplateColumn Width="40">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox HorizontalAlignment="Center" IsEnabled="{Binding CanImport}"
AutomationProperties.Name="{Binding Name}"
IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnPlatform}" Binding="{Binding PlatformText}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnName}" Binding="{Binding Name}" IsReadOnly="True" Width="2*" />
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnExe}" Binding="{Binding ExeText}" IsReadOnly="True" Width="3*" />
@@ -45,6 +45,8 @@
<EmbeddedResource Include="..\..\legal\DISCLAIMER.md" LogicalName="legal/DISCLAIMER.md" />
<EmbeddedResource Include="..\..\legal\PRIVACY_POLICY.md" LogicalName="legal/PRIVACY_POLICY.md" />
<EmbeddedResource Include="..\..\LICENSE" LogicalName="LICENSE" />
<!-- beta.10 (D36): what the whole software cannot do, shown under Help > Limitations; information, not one of FR-11's accepted documents. -->
<EmbeddedResource Include="..\..\LIMITATIONS.md" LogicalName="LIMITATIONS.md" />
</ItemGroup>
<ItemGroup>
+1
View File
@@ -71,6 +71,7 @@
<MenuItem Header="{x:Static res:Strings.Menu_Help_CheckUpdates}" Command="{Binding ViewModel.CheckForUpdatesCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_ReportBug}" Command="{Binding ViewModel.ReportBugCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_Documentation}" Command="{Binding ViewModel.DocumentationCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_Limitations}" Command="{Binding ViewModel.LimitationsCommand}" />
<Separator />
<MenuItem Header="{x:Static res:Strings.Menu_Help_About}" Command="{Binding ViewModel.AboutCommand}" />
</MenuItem>
@@ -215,6 +215,18 @@
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap"
Text="{x:Static vm:GameDetailViewModel.SessionsEmptyText}"
Visibility="{Binding ViewModel.SessionsEmpty, Converter={StaticResource BoolToVis}}" />
<!-- beta.11 (D39): every hooked session's rate and lows at a glance; a click selects the session below. -->
<StackPanel Visibility="{Binding ViewModel.OverviewVisible, Converter={StaticResource BoolToVis}}">
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.OverviewHeader}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.OverviewNote}" />
<charts:TrendChart x:Name="Overview" Height="220" MinHeight="200" Margin="0,4,0,8" />
</StackPanel>
<!-- beta.11 (D40): the game, its settings and its consent stay; the confirmation says how many go. -->
<StackPanel Margin="0,0,0,8" Orientation="Horizontal" HorizontalAlignment="Right"
Visibility="{Binding ViewModel.SessionsEmpty, Converter={StaticResource InverseBoolToVis}}">
<ui:Button Appearance="Secondary" Command="{Binding ViewModel.DeleteAllSessionsCommand}"
Content="{x:Static vm:GameDetailViewModel.DeleteAllSessionsText}" Icon="{ui:SymbolIcon Delete24}" />
</StackPanel>
<DataGrid x:Name="SessionsGrid" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True" HeadersVisibility="Column"
ItemsSource="{Binding ViewModel.Sessions}" SelectionMode="Extended" MouseDoubleClick="OnSessionDoubleClick"
SelectedItem="{Binding ViewModel.SelectedSession, Mode=TwoWay}">
@@ -323,6 +335,21 @@
<CheckBox Margin="16,0,0,0" VerticalAlignment="Center" Content="{x:Static vm:GameDetailViewModel.IncludeMidSessionText}"
IsChecked="{Binding ViewModel.IncludeMidSession}" />
</StackPanel>
<!-- beta.11 (D39): more metrics on the same chart; a second unit is drawn against the right axis, a third cannot be ticked. -->
<ui:TextBlock Margin="0,10,0,0" Appearance="Secondary" Text="{x:Static vm:GameDetailViewModel.TrendExtrasLabel}" />
<ItemsControl ItemsSource="{Binding ViewModel.TrendExtras}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:TrendMetricOptionViewModel}">
<CheckBox Margin="0,4,14,0" Content="{Binding Label}" IsChecked="{Binding IsSelected, Mode=TwoWay}" IsEnabled="{Binding IsEnabled}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ui:TextBlock Margin="0,4,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendExtrasNote}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Tertiary" Text="{Binding ViewModel.TrendExcludedText}"
Visibility="{Binding ViewModel.TrendExcludedText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendAverageNote}" />
@@ -14,6 +14,7 @@ public partial class GameDetailPage : INavigableView<GameDetailViewModel>
InitializeComponent();
ViewModel.SelectionPresented += OnSelectionPresented;
ViewModel.TrendPresented += OnTrendPresented;
Overview.SessionClicked += OnOverviewClicked;
// The view model starts loading before this page exists, and a load that finished first raised its events to
// nobody: the Trend tab was blank on every first open (beta.8). Draw what it holds now; a later load redraws.
OnTrendPresented(this, EventArgs.Empty);
@@ -23,6 +24,7 @@ public partial class GameDetailPage : INavigableView<GameDetailViewModel>
{
ViewModel.SelectionPresented -= OnSelectionPresented;
ViewModel.TrendPresented -= OnTrendPresented;
Overview.SessionClicked -= OnOverviewClicked;
ViewModel.Detach();
};
}
@@ -37,7 +39,22 @@ public partial class GameDetailPage : INavigableView<GameDetailViewModel>
Latency.Show(ViewModel.SelectedSeries, ViewModel.SelectedSession?.Row.LatencyAvgUs, ViewModel.SelectedSession?.Row.LatencyP95Us);
}
private void OnTrendPresented(object? sender, EventArgs e) => Trend.Show(ViewModel.TrendPoints, ViewModel.HardwareChanges, ViewModel.TrendMetricText);
/// <summary>The Trend tab's lines (beta.11: several metrics at once) and the Sessions tab's overview, from one rebuild.</summary>
private void OnTrendPresented(object? sender, EventArgs e)
{
Trend.Show(ViewModel.TrendLines, ViewModel.HardwareChanges);
Overview.Show(ViewModel.OverviewLines, ViewModel.HardwareChanges);
}
/// <summary>beta.11 (D39): a session picked on the overview is selected in the grid below it, and scrolled to.</summary>
private void OnOverviewClicked(object? sender, Charts.SessionClickedEventArgs e)
{
ViewModel.SelectSession(e.SessionId);
if (ViewModel.SelectedSession is { } session)
{
SessionsGrid.ScrollIntoView(session);
}
}
private void OnSessionDoubleClick(object sender, MouseButtonEventArgs e)
{
+65 -12
View File
@@ -4,10 +4,16 @@
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:res="clr-namespace:FrameLedger.App"
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
Title="{x:Static res:Strings.Games_Header}"
AllowDrop="True"
Drop="OnDrop">
<!-- 08_UI §Games: cards (ui:CardAction), search, sort; FR-1.1 add by pick or by dropping an .exe here. -->
<!--
08_UI §Games: search, sort, FR-1.1 add by pick or by dropping an .exe here. Since beta.11 (owner requests 2026-10-03):
the count in the title; a grid of cards that fills the width (UniformWrapPanel - a WrapPanel of 300 px cards left a
card's width unused at the right) or a list (ui.library_view); Refresh reads the library again, offers the games the
stores installed since, and marks the entries whose executable is gone.
-->
<ScrollViewer>
<StackPanel Style="{StaticResource PageRoot}">
<Grid>
@@ -16,8 +22,10 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" FontTypography="Title" Text="{x:Static vm:GamesViewModel.Header}" />
<ui:TextBlock Grid.Column="0" FontTypography="Title" Text="{Binding ViewModel.HeaderText}" />
<ui:TextBox Grid.Column="1" MinWidth="220" Margin="0,0,12,0" VerticalAlignment="Center"
AutomationProperties.Name="{x:Static vm:GamesViewModel.SearchPlaceholder}"
Icon="{ui:SymbolIcon Search24}"
@@ -29,7 +37,21 @@
ItemsSource="{x:Static vm:GamesViewModel.Sorts}"
SelectedValue="{Binding ViewModel.Sort, Mode=TwoWay}"
SelectedValuePath="Value" />
<ui:Button Grid.Column="3" Appearance="Primary" VerticalAlignment="Center"
<!-- The view switch: the one button shown is the other view. -->
<StackPanel Grid.Column="3" Margin="0,0,8,0" VerticalAlignment="Center" Orientation="Horizontal">
<ui:Button Appearance="Secondary" Command="{Binding ViewModel.ShowListCommand}" Icon="{ui:SymbolIcon AppsList24}"
ToolTip="{x:Static vm:GamesViewModel.ListText}" AutomationProperties.Name="{x:Static vm:GamesViewModel.ListText}"
Visibility="{Binding ViewModel.ListView, Converter={StaticResource InverseBoolToVis}}" />
<ui:Button Appearance="Secondary" Command="{Binding ViewModel.ShowGridCommand}" Icon="{ui:SymbolIcon Grid24}"
ToolTip="{x:Static vm:GamesViewModel.GridText}" AutomationProperties.Name="{x:Static vm:GamesViewModel.GridText}"
Visibility="{Binding ViewModel.ListView, Converter={StaticResource BoolToVis}}" />
</StackPanel>
<ui:Button Grid.Column="4" Margin="0,0,12,0" Appearance="Secondary" VerticalAlignment="Center"
Command="{Binding ViewModel.RefreshCommand}"
Content="{x:Static vm:GamesViewModel.RefreshText}"
ToolTip="{x:Static vm:GamesViewModel.RefreshToolTip}"
Icon="{ui:SymbolIcon ArrowClockwise24}" />
<ui:Button Grid.Column="5" Appearance="Primary" VerticalAlignment="Center"
Command="{Binding ViewModel.AddGameCommand}"
Content="{x:Static vm:GamesViewModel.AddText}"
Icon="{ui:SymbolIcon Add24}" />
@@ -42,34 +64,42 @@
Text="{x:Static vm:GamesViewModel.NoMatchText}"
Visibility="{Binding ViewModel.NoMatch, Converter={StaticResource BoolToVis}}" />
<ItemsControl Margin="0,16,0,0" ItemsSource="{Binding ViewModel.Games}">
<!-- The grid: as many columns as fit at 300 px or wider, each card an equal share of the width. -->
<ItemsControl x:Name="CardGrid" Margin="0,16,0,0" ItemsSource="{Binding ViewModel.Games}"
Visibility="{Binding ViewModel.ListView, Converter={StaticResource InverseBoolToVis}}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
<controls:UniformWrapPanel MinItemWidth="300" Spacing="12" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:GameCardViewModel}">
<ui:CardAction Width="300" Margin="0,0,12,12" IsChevronVisible="False"
<ui:CardAction IsChevronVisible="False" VerticalAlignment="Stretch" VerticalContentAlignment="Top"
Command="{Binding DataContext.ViewModel.OpenCommand, RelativeSource={RelativeSource AncestorType=Page}}"
CommandParameter="{Binding}"
Icon="{ui:SymbolIcon Games24}">
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding Name}" TextTrimming="CharacterEllipsis" />
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
<Border Style="{StaticResource TagPill}" Margin="0,0,6,0"
<!-- Pills wrap to a second line rather than being cut (the third one was, at 300 px). -->
<WrapPanel Margin="0,4,0,0">
<Border Style="{StaticResource TagPill}" Margin="0,0,6,4"
Visibility="{Binding HasPlatform, Converter={StaticResource BoolToVis}}">
<TextBlock Style="{StaticResource TagPillText}" Text="{Binding PlatformText}" />
</Border>
<Border Style="{StaticResource TagPill}" Margin="0,0,6,0"
<Border Style="{StaticResource TagPill}" Margin="0,0,6,4"
Visibility="{Binding HasEngine, Converter={StaticResource BoolToVis}}">
<TextBlock Style="{StaticResource TagPillText}" Text="{Binding EngineText}" />
</Border>
<Border Style="{StaticResource HookStatePill}">
<Border Style="{StaticResource HookStatePill}" Margin="0,0,6,4">
<TextBlock Style="{StaticResource HookStatePillText}" Text="{Binding HookText}" />
</Border>
</StackPanel>
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" Text="{Binding SessionsText}" />
<Border x:Name="NotInstalledPill" Style="{StaticResource TagPill}" Margin="0,0,6,4"
ToolTip="{Binding NotInstalledToolTip}"
Visibility="{Binding NotInstalled, Converter={StaticResource BoolToVis}}">
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static res:Strings.Games_Card_NotInstalled}" />
</Border>
</WrapPanel>
<ui:TextBlock Margin="0,2,0,0" Appearance="Secondary" Text="{Binding SessionsText}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding PlaytimeText}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding LastPlayedText}" />
</StackPanel>
@@ -77,6 +107,29 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- The list: one row per game across the width; double-click or Enter opens it. -->
<DataGrid x:Name="GameList" Margin="0,16,0,0" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False"
CanUserSortColumns="False" HeadersVisibility="Column" IsReadOnly="True" SelectionMode="Single"
ItemsSource="{Binding ViewModel.Games}"
MouseDoubleClick="OnListDoubleClick" KeyDown="OnListKeyDown"
Visibility="{Binding ViewModel.ListView, Converter={StaticResource BoolToVis}}">
<DataGrid.Columns>
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Name}" Binding="{Binding Name}" Width="3*" />
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Store}" Binding="{Binding PlatformText}" Width="Auto" />
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Engine}" Binding="{Binding EngineText}" Width="*" />
<DataGridTemplateColumn Header="{x:Static res:Strings.Games_List_Status}" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="4,0" VerticalAlignment="Center" Text="{Binding StatusText}" ToolTip="{Binding NotInstalledToolTip}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Sessions}" Binding="{Binding SessionCount}" Width="Auto" />
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Played}" Binding="{Binding PlaytimeValue}" Width="Auto" />
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_LastPlayed}" Binding="{Binding LastPlayedValue}" Width="Auto" />
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</ScrollViewer>
</Page>
@@ -1,4 +1,5 @@
using System.Windows;
using System.Windows.Input;
using FrameLedger.App.ViewModels;
using Wpf.Ui.Abstractions.Controls;
@@ -11,6 +12,9 @@ public partial class GamesPage : INavigableView<GamesViewModel>
ViewModel = viewModel ?? throw new ArgumentNullException(nameof(viewModel));
DataContext = this;
InitializeComponent();
// beta.11: the page reloads itself while it is on screen (a session ends, an import adds games), and lets go after.
Loaded += (_, _) => ViewModel.Attach();
Unloaded += (_, _) => ViewModel.Detach();
}
public GamesViewModel ViewModel { get; }
@@ -23,4 +27,25 @@ public partial class GamesPage : INavigableView<GamesViewModel>
_ = ViewModel.DropAsync(paths);
}
}
/// <summary>The list view opens a game on a double-click, as the cards do on a click.</summary>
private void OnListDoubleClick(object sender, MouseButtonEventArgs e) => OpenSelected();
/// <summary>…and on Enter, so the list is usable from the keyboard.</summary>
private void OnListKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
OpenSelected();
e.Handled = true;
}
}
private void OpenSelected()
{
if (GameList.SelectedItem is GameCardViewModel card)
{
ViewModel.OpenCommand.Execute(card);
}
}
}
+21 -17
View File
@@ -28,11 +28,10 @@
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_KillSwitch_Body}" TextWrapping="Wrap" />
</ui:CardExpander>
<ui:CardExpander Margin="0,8,0,0" IsExpanded="True" Icon="{ui:SymbolIcon Games24}" Header="{x:Static res:Strings.Settings_HookedGames_Label}">
<!-- beta.11 (owner request 2026-10-03: no row without a control): shown only while a game has hooking on, each with its Turn off. -->
<ui:CardExpander Margin="0,8,0,0" IsExpanded="True" Icon="{ui:SymbolIcon Games24}" Header="{x:Static res:Strings.Settings_HookedGames_Label}"
Visibility="{Binding ViewModel.HasHookedGames, Converter={StaticResource BoolToVis}}">
<StackPanel>
<ui:TextBlock Appearance="Secondary"
Text="{x:Static res:Strings.Settings_HookedGames_Empty}"
Visibility="{Binding ViewModel.HookedGames.Count, Converter={StaticResource ZeroToVisible}}" />
<ItemsControl ItemsSource="{Binding ViewModel.HookedGames}">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -102,7 +101,6 @@
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding Name}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding FindingText}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding SessionsText}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding StateText}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding LapseText}"
Visibility="{Binding LapseText, Converter={StaticResource NullToCollapsed}}" />
@@ -121,10 +119,12 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- Only while the Agent is still answering: the sweep publishes nothing, so this is how its answer arrives. -->
<ui:Button Margin="0,8,0,0"
Appearance="Secondary"
Command="{Binding ViewModel.RefreshExceptionsCommand}"
Content="{x:Static res:Strings.Settings_Exceptions_Refresh}" />
Content="{x:Static res:Strings.Settings_Exceptions_Refresh}"
Visibility="{Binding ViewModel.ExceptionsChecking, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</ui:CardExpander>
@@ -213,23 +213,28 @@
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_Background_Label}" IsChecked="{Binding ViewModel.BackgroundCapture, Mode=TwoWay}" />
</ui:CardControl>
<!-- Agent: elevation is optional and no tier needs it; the logon task arrives with the tray build. -->
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Agent_Header}" />
<ui:CardExpander Margin="0,4,0,0" Icon="{ui:SymbolIcon Person24}">
<ui:CardExpander.Header>
<!-- beta.11 (owner request 2026-10-03: no row without a control): Data - Delete all sessions (D40). -->
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Data_Header}" />
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Delete24}">
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Agent_Elevation_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.ElevationText}" />
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_DeleteSessions_Label}" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Settings_DeleteSessions_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardExpander.Header>
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_Agent_Elevation_Body}" TextWrapping="Wrap" />
</ui:CardExpander>
</ui:CardControl.Header>
<ui:Button Appearance="Secondary" Command="{Binding ViewModel.DeleteAllSessionsCommand}" Content="{x:Static res:Strings.Settings_DeleteSessions_Button}" />
</ui:CardControl>
<!-- Agent: elevation is optional and no tier needs it. beta.11: the elevation line is the admin mode's own status, not a row of its own. -->
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Agent_Header}" />
<!-- beta.10, the admin mode (D34): off by default; on shows the disclosure, and Windows asks at every Agent start. -->
<ui:CardControl Margin="0,8,0,0" Icon="{ui:SymbolIcon Shield24}">
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Shield24}">
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Agent_RunElevated_Label}" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Settings_Agent_RunElevated_Body}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,4,0,0" FontTypography="BodyStrong" Text="{Binding ViewModel.ElevationText}" TextWrapping="Wrap"
ToolTip="{x:Static res:Strings.Settings_Agent_Elevation_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_Agent_RunElevated_Label}" IsChecked="{Binding ViewModel.RunElevated, Mode=TwoWay}" />
@@ -277,7 +282,6 @@
SelectedValue="{Binding ViewModel.SelectedLanguage, Mode=TwoWay}"
SelectedValuePath="Value" />
</ui:CardControl>
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" Text="{x:Static vm:SettingsViewModel.LanguageNote}" TextWrapping="Wrap" />
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Window_Header}" />
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Power24}">
@@ -1,4 +1,7 @@
namespace FrameLedger.App.Services;
/// <summary>D33: what the exception's disclosure names — the game, the anti-cheat family and its signal, and the evidence.</summary>
public sealed record AntiCheatExceptionFacts(string GameName, string Family, string Signal, int Sessions);
/// <summary>
/// D33: what the exception's disclosure names — the game, the anti-cheat family and its signal. (D38 took the session count
/// out: a grant needs no session, and its first two are a trial the disclosure describes.)
/// </summary>
public sealed record AntiCheatExceptionFacts(string GameName, string Family, string Signal);
@@ -26,7 +26,7 @@ public sealed record AntiCheatExceptionResult(AntiCheatExceptionOutcome Outcome,
_ => null,
};
/// <summary>Why no exception was made, in the user's language: the session count, the finding, or the block's kind.</summary>
/// <summary>Why no exception was made, in the user's language: a failed trial (D38), the finding, or the block's kind.</summary>
public string? RefusalText()
{
if (Refusal is null)
@@ -36,11 +36,17 @@ public sealed record AntiCheatExceptionResult(AntiCheatExceptionOutcome Outcome,
return Refusal.Reason switch
{
"TooFewSessions" => string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_TooFew_Format, Refusal.Signal ?? "0"),
"TrialFailed" => string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_TrialFailed_Format, TrialFailedDate(Refusal.Signal)),
"BlockNotExceptionable" => Strings.Exception_State_NotAsked,
"PreScanFailed" or "RulesUnreadable" or "RulesMalformed" or "RulesIncomplete" => Strings.Exception_State_CouldNotVerify,
_ => string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_Refused_Format,
Refusal.Family ?? Formats.GuardReasonText(Refusal.Reason), Refusal.Signal ?? Strings.Common_NotAvailable),
};
}
/// <summary>D38: the Agent sends when the trial failed as unix milliseconds; anything else reads as not available.</summary>
private static string TrialFailedDate(string? unixMs) =>
long.TryParse(unixMs, NumberStyles.Integer, CultureInfo.InvariantCulture, out long ms)
? Formats.Date(DateTimeOffset.FromUnixTimeMilliseconds(ms))
: Strings.Common_NotAvailable;
}
@@ -27,4 +27,21 @@ public sealed class Confirmations : IConfirmations
_ => RemoveGameChoice.Cancel,
};
}
/// <summary>beta.11 (D40): the one destructive button, in the danger colour; closing the box or Cancel deletes nothing.</summary>
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public async Task<bool> DeleteSessionsAsync(string? gameName, long sessions, CancellationToken ct = default)
{
var box = new MessageBox
{
Title = gameName is null
? Strings.DeleteSessions_AllTitle
: string.Format(CultureInfo.CurrentCulture, Strings.DeleteSessions_GameTitle_Format, gameName),
Content = string.Format(CultureInfo.CurrentCulture, gameName is null ? Strings.DeleteSessions_AllBody_Format : Strings.DeleteSessions_GameBody_Format, sessions),
PrimaryButtonText = Strings.DeleteSessions_Delete,
PrimaryButtonAppearance = ControlAppearance.Danger,
CloseButtonText = Strings.Common_Cancel,
};
return await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true) == MessageBoxResult.Primary;
}
}
+34 -16
View File
@@ -6,9 +6,10 @@ using FrameLedger.Domain.AntiCheat;
namespace FrameLedger.App.Services;
/// <summary>
/// D33 (owner decision 2026-09-26): a blocked game's user-mode exception as the App shows it — in force, eligible, being
/// checked, or why not — read from the Agent's columns (<see cref="GameRow.AcException"/>). The App decides nothing here:
/// every state is a reading of what the Agent wrote, and the grant itself is the Agent's to make.
/// D33 (owner decision 2026-09-26): a blocked game's user-mode exception as the App shows it — in force (and, since D38, how
/// far its trial has come), eligible, being checked, or why not — read from the Agent's columns
/// (<see cref="GameRow.AcException"/>). The App decides nothing here: every state is a reading of what the Agent wrote, and
/// the grant itself is the Agent's to make.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed record ExceptionView(ExceptionViewKind Kind, string Text, string? Family, string? Signal, int Sessions, string? LapseText)
@@ -21,7 +22,8 @@ public sealed record ExceptionView(ExceptionViewKind Kind, string Text, string?
/// <summary>
/// The row's exception, or null for a row it says nothing about (not blocked). Granted first — a grant stays until the
/// Agent or the user ends it — then the block's kind, then the sweep's answer about THIS block.
/// Agent or the user ends it — then the block's kind, then a failed trial (D38: for good, whatever a check says), then
/// the sweep's answer about THIS block.
/// </summary>
public static ExceptionView? Of(GameRow row)
{
@@ -38,8 +40,7 @@ public sealed record ExceptionView(ExceptionViewKind Kind, string Text, string?
: null;
if (x.IsGranted)
{
return new(ExceptionViewKind.Granted, string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_Granted_Format, Formats.Date(x.GrantedAt!.Value)),
x.Family, block?.Signal, x.Sessions, lapse);
return new(ExceptionViewKind.Granted, GrantedText(x), x.Family, block?.Signal, x.Sessions, lapse);
}
if (block is not { IsExceptionable: true } b)
@@ -47,14 +48,27 @@ public sealed record ExceptionView(ExceptionViewKind Kind, string Text, string?
return new(ExceptionViewKind.NotEligible, Strings.Exception_State_NotAsked, block?.Family, block?.Signal, x.Sessions, lapse);
}
if (x.TrialFailedAt is { } failed)
{
return new(ExceptionViewKind.NotEligible, string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_TrialFailed_Format, Formats.Date(failed)),
b.Family, b.Signal, x.Sessions, lapse);
}
if (!string.Equals(x.CheckedBlock, row.HookBlockedReason, StringComparison.Ordinal))
{
return new(ExceptionViewKind.Checking, Strings.Exception_State_Checking, b.Family, b.Signal, x.Sessions, lapse);
}
return x.Eligible
? new(ExceptionViewKind.Eligible, Strings.Exception_State_Eligible, b.Family, b.Signal, x.Sessions, lapse)
: new(NotEligibleKind(x), WhyNot(b, x), b.Family, b.Signal, x.Sessions, lapse);
if (x.Eligible)
{
return new(ExceptionViewKind.Eligible, Strings.Exception_State_Eligible, b.Family, b.Signal, x.Sessions, lapse);
}
// A guard that let the family through over a row that does not say eligible is an answer from before D38 (it
// counted sessions); the Agent's next pass rewrites it, so until then it is being checked.
return StoredBlock.Parse(x.Verdict) is { Reason: AntiCheatRefusalReason.AllowedUnderUserModeException }
? new(ExceptionViewKind.Checking, Strings.Exception_State_Checking, b.Family, b.Signal, x.Sessions, lapse)
: new(ExceptionViewKind.NotEligible, WhyNot(b, x), b.Family, b.Signal, x.Sessions, lapse);
}
/// <summary>Why the last grant ended, in words.</summary>
@@ -67,14 +81,16 @@ public sealed record ExceptionView(ExceptionViewKind Kind, string Text, string?
UserModeExceptionLapse.SafetyUnhook => Strings.Exception_Lapse_SafetyUnhook,
UserModeExceptionLapse.OverlayStopped => Strings.Exception_Lapse_OverlayStopped,
UserModeExceptionLapse.SessionCrashed => Strings.Exception_Lapse_SessionCrashed,
UserModeExceptionLapse.TrialFailed => Strings.Exception_Lapse_TrialFailed,
_ => reason,
};
/// <summary>The guard let the family through and only the evidence is short — the one "not yet" the Settings list shows.</summary>
private static ExceptionViewKind NotEligibleKind(AntiCheatExceptionState x) =>
StoredBlock.Parse(x.Verdict) is { Reason: AntiCheatRefusalReason.AllowedUnderUserModeException }
? ExceptionViewKind.TooFewSessions
: ExceptionViewKind.NotEligible;
/// <summary>D38: a grant in its trial says how far it has come; one past it says only since when.</summary>
private static string GrantedText(AntiCheatExceptionState x) =>
UserModeExceptionRules.InTrial(x.Sessions)
? string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_GrantedTrial_Format, Formats.Date(x.GrantedAt!.Value), x.Sessions,
UserModeExceptionRules.TrialSessions)
: string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_Granted_Format, Formats.Date(x.GrantedAt!.Value));
private static string WhyNot(StoredBlock block, AntiCheatExceptionState x)
{
@@ -84,9 +100,11 @@ public sealed record ExceptionView(ExceptionViewKind Kind, string Text, string?
return Strings.Exception_State_NotAsked;
}
if (verdict.Value.Reason == AntiCheatRefusalReason.AllowedUnderUserModeException)
// A plain pass: the tolerant scan found nothing of the family, so it confirmed nothing — the check DID finish
// (it used to be said as "could not finish").
if (verdict.Value.Reason == AntiCheatRefusalReason.Allow)
{
return string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_TooFew_Format, x.Sessions);
return string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_NotFound_Format, block.Family);
}
if (!verdict.Value.IsExceptionable && verdict.Value.Family.Length == 0)
@@ -1,17 +1,18 @@
namespace FrameLedger.App.Services;
/// <summary>D33: the states a blocked game's user-mode exception is shown in (<see cref="ExceptionView"/>).</summary>
/// <remarks>
/// D38 (2026-10-03) removed <c>TooFewSessions</c>: a grant needs no session any more, so "not yet" is no longer a state —
/// a game is eligible, being checked, or not eligible for a reason that says whether it can change.
/// </remarks>
public enum ExceptionViewKind
{
/// <summary>An exception is on the row.</summary>
/// <summary>An exception is on the row (in its trial or past it).</summary>
Granted,
/// <summary>The Agent found the game eligible; no exception has been made.</summary>
Eligible,
/// <summary>The guard would let the family through, and the game has fewer than two successful hooked sessions.</summary>
TooFewSessions,
/// <summary>The Agent has not answered about this block yet (the option was just turned on, or the block changed).</summary>
Checking,
@@ -4,4 +4,10 @@ namespace FrameLedger.App.Services;
public interface IConfirmations
{
Task<RemoveGameChoice> RemoveGameAsync(string gameName, CancellationToken ct = default);
/// <summary>
/// beta.11 (D40): delete every session of <paramref name="gameName"/>'s game — or of every game when it is null —
/// <paramref name="sessions"/> of them; true only on the explicit delete button.
/// </summary>
Task<bool> DeleteSessionsAsync(string? gameName, long sessions, CancellationToken ct = default);
}
@@ -0,0 +1,12 @@
namespace FrameLedger.App.Services;
/// <summary>
/// The session summary windows that are open (beta.11, owner decision D40). After Delete all sessions a window left open
/// would show a session that is gone, and a note written from it would go to whichever session reuses its id (the table has
/// no AUTOINCREMENT).
/// </summary>
public interface ISessionWindows
{
/// <summary>Closes every open summary window whose session is no longer in the ledger.</summary>
Task CloseDeletedAsync(CancellationToken ct = default);
}
@@ -8,7 +8,8 @@ namespace FrameLedger.App.Services;
/// <summary>
/// File ▸ Import library… (FR-1.2, P4 PR-4): discover every installed store's titles, show the review checklist,
/// add what the user ticked — hooking off for every one, as File ▸ Add game… would — and land on the Games page.
/// Nothing is launched, nothing is fetched, nothing is added without a tick.
/// Nothing is launched, nothing is fetched, nothing is added without a tick. Since beta.11 the Games page's Refresh runs
/// it for new games only: when every title found is already in the library it says so and shows no checklist.
/// </summary>
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime; a cached CompositeFormat would pin the first culture")]
public sealed class ImportLibraryFlow
@@ -17,17 +18,22 @@ public sealed class ImportLibraryFlow
private readonly IImportReview _review;
private readonly IMessageStrip _strip;
private readonly IPageNavigator _navigator;
private readonly LibraryChanges? _changes;
public ImportLibraryFlow(LibraryImporter importer, IImportReview review, IMessageStrip strip, IPageNavigator navigator)
public ImportLibraryFlow(LibraryImporter importer, IImportReview review, IMessageStrip strip, IPageNavigator navigator, LibraryChanges? changes = null)
{
_importer = importer ?? throw new ArgumentNullException(nameof(importer));
_review = review ?? throw new ArgumentNullException(nameof(review));
_strip = strip ?? throw new ArgumentNullException(nameof(strip));
_navigator = navigator ?? throw new ArgumentNullException(nameof(navigator));
_changes = changes;
}
/// <summary>The report, or null when nothing was found or the user cancelled.</summary>
public async Task<ImportReport?> RunAsync(CancellationToken ct = default)
/// <summary>
/// The report, or null when nothing was found or the user cancelled. <paramref name="onlyNew"/> (the Games page's
/// Refresh): when no title found can be imported, say "no new games" and show nothing.
/// </summary>
public async Task<ImportReport?> RunAsync(bool onlyNew = false, CancellationToken ct = default)
{
IReadOnlyList<ImportCandidate> candidates = await _importer.DiscoverAsync(ct).ConfigureAwait(true);
if (candidates.Count == 0)
@@ -36,6 +42,12 @@ public sealed class ImportLibraryFlow
return null;
}
if (onlyNew && !candidates.Any(static c => c.CanImport))
{
_strip.Info(Strings.Import_Title, Strings.Import_NothingNew);
return null;
}
IReadOnlyList<ImportCandidate>? selected = await _review.ReviewAsync(candidates, ct).ConfigureAwait(true);
if (selected is null || selected.Count == 0)
{
@@ -46,6 +58,8 @@ public sealed class ImportLibraryFlow
_strip.Success(Strings.Import_Title, string.Format(CultureInfo.CurrentCulture, Strings.Import_Done_Format, report.Added, report.Skipped));
if (report.Added > 0)
{
// The Games page, if it is the one on screen, does not reload on a navigation to itself: say so to it.
_changes?.Announce();
_navigator.Navigate<GamesPage>();
}
@@ -0,0 +1,16 @@
namespace FrameLedger.App.Services;
/// <summary>
/// The App's own "the library's rows changed" signal (beta.11, owner request 2026-10-03): an import adds entries, and a
/// page already on screen reloads. Navigating to the page that is on screen does nothing in WPF UI 4.3.0, so the Games
/// page never saw an import made from File ▸ Import library… while it was open. The Agent's own changes (a merge, a
/// finding, a new session) reach the page through its session events and the Refresh button.
/// </summary>
public sealed class LibraryChanges
{
/// <summary>Raised on the thread that changed the library — the UI thread for every caller today.</summary>
public event EventHandler? Changed;
/// <summary>Say that entries were added, removed or replaced.</summary>
public void Announce() => Changed?.Invoke(this, EventArgs.Empty);
}
@@ -0,0 +1,31 @@
using System.IO;
namespace FrameLedger.App.Services;
/// <summary>
/// <c>LIMITATIONS.md</c> (beta.10, owner decision D36): what the whole software cannot do, in the user's terms — embedded at
/// build time from the repository root and shown under Help ▸ Limitations, so the App shows exactly the text this build
/// was reviewed with.
/// </summary>
/// <remarks>
/// <b>Information, not terms.</b> It is NOT one of FR-11's documents (<see cref="LegalDocuments.Keys"/>): the Legal Gate
/// records an acceptance per document it shows, and nothing here is accepted. The Disclaimer points at it instead.
/// </remarks>
public static class LimitationsDocument
{
/// <summary>The embedded resource's name (<c>FrameLedger.App.csproj</c>).</summary>
public const string ResourceName = "LIMITATIONS.md";
/// <summary>The same text in the repository, for the dialog's button.</summary>
public static readonly Uri OnGitHub = new(IssueLink.Repository + "/blob/main/LIMITATIONS.md");
/// <summary>The document's text, authoring comments removed.</summary>
/// <exception cref="InvalidOperationException">The build did not embed it.</exception>
public static string Load()
{
using Stream stream = typeof(LimitationsDocument).Assembly.GetManifestResourceStream(ResourceName)
?? throw new InvalidOperationException($"the build did not embed {ResourceName}");
using var reader = new StreamReader(stream);
return LegalDocuments.StripComments(reader.ReadToEnd());
}
}
@@ -0,0 +1,83 @@
using FrameLedger.Application.Persistence;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Shared.Ipc;
using Serilog;
namespace FrameLedger.App.Services;
/// <summary>
/// Delete all sessions (beta.11, owner decision D40), of one game from its page or of every game from Settings ▸ Data. The
/// sessions are the Agent's rows (<c>06_DATA_MODEL</c> §Writer ownership), so the App asks it over the pipe, as Tools ▸
/// Database maintenance asks for the retention sweep; the Agent refuses while a session it would delete under is being
/// recorded. The confirmation is the caller's to ask first. After a delete it forgets what is gone, for both callers: File ▸
/// Export's selection when it named a deleted session, and the summary windows open on one — session ids are reused once
/// the newest is gone (no AUTOINCREMENT), so either would otherwise act on whichever session takes the id next.
/// </summary>
public sealed class SessionDeletion
{
private readonly IAgentRequests _agent;
private readonly ISessionRepository? _sessions;
private readonly SessionSelection? _selection;
private readonly ISessionWindows? _windows;
public SessionDeletion(IAgentRequests agent, ISessionRepository? sessions = null, SessionSelection? selection = null, ISessionWindows? windows = null)
{
_agent = agent ?? throw new ArgumentNullException(nameof(agent));
_sessions = sessions;
_selection = selection;
_windows = windows;
}
/// <summary>Every session of <paramref name="gameId"/>, or of every game when it is null.</summary>
public async Task<SessionDeletionResult> DeleteAsync(long? gameId, CancellationToken ct = default)
{
if (!_agent.IsConnected)
{
return new(SessionDeletionOutcome.AgentUnavailable);
}
try
{
IpcEnvelope envelope = await _agent.RequestAsync(IpcMessageType.DeleteSessions, new DeleteSessionsRequest(gameId), ct).ConfigureAwait(true);
DeleteSessionsAck ack = IpcCodec.Payload<DeleteSessionsAck>(envelope) ?? throw new InvalidOperationException("DeleteSessions answered without a payload");
Log.Information("sessions: deleted {Sessions} session(s) of {Games} game(s) ({Scope})", ack.Sessions, ack.Games, gameId is null ? "every game" : "game " + gameId);
await ForgetDeletedAsync(ct).ConfigureAwait(true);
return new(SessionDeletionOutcome.Deleted, ack.Games, ack.Sessions);
}
catch (IpcRequestException ex) when (string.Equals(ex.Code, IpcErrorCode.SessionRunning, StringComparison.Ordinal))
{
return new(SessionDeletionOutcome.SessionRunning);
}
catch (IpcRequestException ex) when (string.Equals(ex.Code, IpcErrorCode.UnknownType, StringComparison.Ordinal))
{
Log.Warning("sessions: the Agent does not know DeleteSessions ({Message})", ex.Message);
return new(SessionDeletionOutcome.AgentTooOld);
}
catch (Exception ex) when (ex is IpcRequestException or InvalidOperationException or TimeoutException)
{
Log.Warning("sessions: DeleteSessions failed ({Message})", ex.Message);
return new(SessionDeletionOutcome.Failed, Detail: ex.Message);
}
}
/// <summary>The delete happened: what still names a deleted session lets go of it. A failure here is logged, not the delete's.</summary>
private async Task ForgetDeletedAsync(CancellationToken ct)
{
try
{
if (_sessions is not null && _selection?.SessionId is long selected && await _sessions.FindByIdAsync(selected, ct).ConfigureAwait(true) is null)
{
_selection.Set(null);
}
if (_windows is not null)
{
await _windows.CloseDeletedAsync(ct).ConfigureAwait(true);
}
}
catch (Exception ex) when (ex is not OutOfMemoryException and not OperationCanceledException)
{
Log.Warning(ex, "sessions: the deleted sessions' selection and windows were not all let go of");
}
}
}
@@ -0,0 +1,20 @@
namespace FrameLedger.App.Services;
/// <summary>How a <c>DeleteSessions</c> ask ended (beta.11, D40).</summary>
public enum SessionDeletionOutcome
{
/// <summary>The Agent deleted them; the counts say how many.</summary>
Deleted,
/// <summary>A session it would delete under is being recorded: nothing was deleted.</summary>
SessionRunning,
/// <summary>The capture agent is not connected: nothing was asked.</summary>
AgentUnavailable,
/// <summary>The Agent does not know the request (an older build): nothing was deleted.</summary>
AgentTooOld,
/// <summary>Anything else; the detail says what.</summary>
Failed,
}
@@ -0,0 +1,19 @@
using System.Globalization;
namespace FrameLedger.App.Services;
/// <summary>What a <c>DeleteSessions</c> ask did (beta.11, D40), and the sentence to tell the user.</summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed record SessionDeletionResult(SessionDeletionOutcome Outcome, int Games = 0, int Sessions = 0, string? Detail = null)
{
public bool Succeeded => Outcome == SessionDeletionOutcome.Deleted;
public string Message => Outcome switch
{
SessionDeletionOutcome.Deleted => string.Format(CultureInfo.CurrentCulture, Strings.DeleteSessions_Done_Format, Sessions, Games),
SessionDeletionOutcome.SessionRunning => Strings.DeleteSessions_Running,
SessionDeletionOutcome.AgentUnavailable => Strings.DeleteSessions_NoAgent,
SessionDeletionOutcome.AgentTooOld => Strings.DeleteSessions_AgentTooOld,
_ => Detail ?? Strings.Common_NotAvailable,
};
}
@@ -10,15 +10,18 @@ namespace FrameLedger.App.Services;
/// <summary>
/// Builds a summary window per open: the view model's override prompt is bound to THAT window's dialog host,
/// which is why the window is composed here rather than resolved whole from DI. The load runs after
/// <c>Show()</c> so the window appears at once and fills in.
/// <c>Show()</c> so the window appears at once and fills in. It keeps the windows it opened, so that Delete all sessions
/// can close the ones whose session is gone (<see cref="ISessionWindows"/>, beta.11).
/// </summary>
public sealed class SessionSummaryOpener : ISessionSummaryOpener
public sealed class SessionSummaryOpener : ISessionSummaryOpener, ISessionWindows
{
private readonly IServiceProvider _services;
private readonly ShellHost _shell;
private readonly SessionSelection _selection;
private readonly List<(long SessionId, SessionSummaryWindow Window)> _open = [];
public SessionSummaryOpener(IServiceProvider services, ShellHost shell, SessionSelection selection)
{
_services = services ?? throw new ArgumentNullException(nameof(services));
@@ -43,10 +46,26 @@ public sealed class SessionSummaryOpener : ISessionSummaryOpener
{
Owner = _shell.Current,
};
(long, SessionSummaryWindow) open = (sessionId, window);
_open.Add(open);
window.Closed += (_, _) => _open.Remove(open);
window.Show();
_ = LoadAsync(viewModel, sessionId);
}
public async Task CloseDeletedAsync(CancellationToken ct = default)
{
ISessionRepository sessions = _services.GetRequiredService<ISessionRepository>();
foreach ((long SessionId, SessionSummaryWindow Window) open in _open.ToArray())
{
// Still open after the read: the user may have closed it meanwhile, and a closed window is not closed twice.
if (await sessions.FindByIdAsync(open.SessionId, ct).ConfigureAwait(true) is null && _open.Contains(open))
{
open.Window.Close();
}
}
}
private static async Task LoadAsync(SessionSummaryViewModel viewModel, long sessionId)
{
try
+140 -11
View File
@@ -183,6 +183,15 @@ public static class Strings
nameof(Dashboard_Totals_Games),
nameof(Dashboard_Totals_Playtime),
nameof(Dashboard_Totals_ThisWeek),
nameof(DeleteSessions_AgentTooOld),
nameof(DeleteSessions_AllBody_Format),
nameof(DeleteSessions_AllTitle),
nameof(DeleteSessions_Delete),
nameof(DeleteSessions_Done_Format),
nameof(DeleteSessions_GameBody_Format),
nameof(DeleteSessions_GameTitle_Format),
nameof(DeleteSessions_NoAgent),
nameof(DeleteSessions_Running),
nameof(Diag_Written_Format),
nameof(Display_Buffer_Format),
nameof(Display_BufferEffect_Format),
@@ -244,20 +253,22 @@ public static class Strings
nameof(Exception_Lapse_OverlayStopped),
nameof(Exception_Lapse_SafetyUnhook),
nameof(Exception_Lapse_SessionCrashed),
nameof(Exception_Lapse_TrialFailed),
nameof(Exception_Lapse_Withdrawn),
nameof(Exception_Lapsed_Format),
nameof(Exception_Result_Granted_Format),
nameof(Exception_Result_Refused_Format),
nameof(Exception_Result_Withdrawn_Format),
nameof(Exception_Sessions_Format),
nameof(Exception_State_Checking),
nameof(Exception_State_CouldNotVerify),
nameof(Exception_State_Eligible),
nameof(Exception_State_Granted_Format),
nameof(Exception_State_GrantedTrial_Format),
nameof(Exception_State_NotAsked),
nameof(Exception_State_NotFound_Format),
nameof(Exception_State_NotUserMode_Format),
nameof(Exception_State_Refused_Format),
nameof(Exception_State_TooFew_Format),
nameof(Exception_State_TrialFailed_Format),
nameof(Exe_DriveMissing_Format),
nameof(Exe_FileMissing_Format),
nameof(Exit_Code_Format),
@@ -358,10 +369,12 @@ public static class Strings
nameof(Fps_Native_Tooltip),
nameof(Fps_None_Tooltip),
nameof(Fps_Presented_Format),
nameof(GameDetail_AntiCheat_Exceptionable_Format),
nameof(GameDetail_AntiCheat_Format),
nameof(GameDetail_AntiCheat_Header),
nameof(GameDetail_Back),
nameof(GameDetail_ChangeExe),
nameof(GameDetail_DeleteSessions),
nameof(GameDetail_Details_Architecture),
nameof(GameDetail_Details_Engine),
nameof(GameDetail_Details_EngineVersion),
@@ -400,6 +413,8 @@ public static class Strings
nameof(GameDetail_Measured_Header),
nameof(GameDetail_Measured_NotHooked),
nameof(GameDetail_NotFound),
nameof(GameDetail_Overview_Header),
nameof(GameDetail_Overview_Note),
nameof(GameDetail_Recording_Body),
nameof(GameDetail_Recording_Header),
nameof(GameDetail_Recording_Off),
@@ -423,17 +438,30 @@ public static class Strings
nameof(Games_Card_HookOn),
nameof(Games_Card_LastPlayed_Format),
nameof(Games_Card_NeverPlayed),
nameof(Games_Card_NotInstalled),
nameof(Games_Card_NotRecorded),
nameof(Games_Card_Playtime_Format),
nameof(Games_Card_Sessions_Format),
nameof(Games_Empty),
nameof(Games_Header),
nameof(Games_Header_Count_Format),
nameof(Games_List_Engine),
nameof(Games_List_LastPlayed),
nameof(Games_List_Name),
nameof(Games_List_Played),
nameof(Games_List_Sessions),
nameof(Games_List_Status),
nameof(Games_List_Store),
nameof(Games_NoMatch),
nameof(Games_Refresh),
nameof(Games_Refresh_ToolTip),
nameof(Games_Search_Placeholder),
nameof(Games_Sort_Label),
nameof(Games_Sort_LastPlayed),
nameof(Games_Sort_Name),
nameof(Games_Sort_Playtime),
nameof(Games_View_Grid),
nameof(Games_View_List),
nameof(Guard_ConsentMissing),
nameof(Guard_DriverScanFailed),
nameof(Guard_HookNotEnabled),
@@ -468,9 +496,11 @@ public static class Strings
nameof(Import_Note_Moved),
nameof(Import_Note_NoExe),
nameof(Import_NothingFound),
nameof(Import_NothingNew),
nameof(Import_SelectAll),
nameof(Import_Selected_Format),
nameof(Import_SelectNone),
nameof(Import_ShowExisting_Format),
nameof(Import_Title),
nameof(Latency_Avg),
nameof(Latency_Axis),
@@ -487,6 +517,8 @@ public static class Strings
nameof(Launch_Error_740),
nameof(Launch_Error_Format),
nameof(Launch_Failed_Format),
nameof(Limitations_OnGitHub),
nameof(Limitations_Title),
nameof(Logs_Bundle_Exported_Format),
nameof(Logs_Bundle_Failed_Format),
nameof(Logs_Empty),
@@ -545,6 +577,7 @@ public static class Strings
nameof(Menu_Help_About),
nameof(Menu_Help_CheckUpdates),
nameof(Menu_Help_Documentation),
nameof(Menu_Help_Limitations),
nameof(Menu_Help_ReportBug),
nameof(Menu_Tools),
nameof(Menu_Tools_AgentStatus),
@@ -667,6 +700,10 @@ public static class Strings
nameof(Settings_Capture_Header),
nameof(Settings_Channel_Beta),
nameof(Settings_Channel_Stable),
nameof(Settings_Data_Header),
nameof(Settings_DeleteSessions_Body),
nameof(Settings_DeleteSessions_Button),
nameof(Settings_DeleteSessions_Label),
nameof(Settings_Exceptions_Body),
nameof(Settings_Exceptions_Checking),
nameof(Settings_Exceptions_Empty),
@@ -681,7 +718,6 @@ public static class Strings
nameof(Settings_Header),
nameof(Settings_HideAntiCheatHooking_Body),
nameof(Settings_HideAntiCheatHooking_Label),
nameof(Settings_HookedGames_Empty),
nameof(Settings_HookedGames_Label),
nameof(Settings_HookedGames_Revoke),
nameof(Settings_Interval_Body),
@@ -692,7 +728,6 @@ public static class Strings
nameof(Settings_KillSwitch_Off),
nameof(Settings_KillSwitch_On),
nameof(Settings_Language_Label),
nameof(Settings_Language_Note),
nameof(Settings_Legal_Header),
nameof(Settings_Legal_Reopen),
nameof(Settings_LogDebug_Body),
@@ -826,6 +861,8 @@ public static class Strings
nameof(Trend_Empty),
nameof(Trend_Empty_Format),
nameof(Trend_Excluded_Format),
nameof(Trend_Extras_Label),
nameof(Trend_Extras_Note),
nameof(Trend_IncludeMidSession),
nameof(Trend_Metric_Average),
nameof(Trend_Metric_AvgCpuLoad),
@@ -846,6 +883,12 @@ public static class Strings
nameof(Trend_Metric_P1Low),
nameof(Trend_Metric_PresentedFps),
nameof(Trend_Partial_Note),
nameof(Trend_Unit_Celsius),
nameof(Trend_Unit_Factor),
nameof(Trend_Unit_Fps),
nameof(Trend_Unit_Megabytes),
nameof(Trend_Unit_Percent),
nameof(Trend_Unit_Watts),
nameof(Uninstall_DataFolder_Body),
nameof(Uninstall_DataFolder_Title),
nameof(Update_AgentStillRunning),
@@ -1193,6 +1236,24 @@ public static class Strings
public static string Dashboard_Totals_ThisWeek => ResourceManager.GetString(nameof(Dashboard_Totals_ThisWeek), Culture) ?? nameof(Dashboard_Totals_ThisWeek);
public static string DeleteSessions_AgentTooOld => ResourceManager.GetString(nameof(DeleteSessions_AgentTooOld), Culture) ?? nameof(DeleteSessions_AgentTooOld);
public static string DeleteSessions_AllBody_Format => ResourceManager.GetString(nameof(DeleteSessions_AllBody_Format), Culture) ?? nameof(DeleteSessions_AllBody_Format);
public static string DeleteSessions_AllTitle => ResourceManager.GetString(nameof(DeleteSessions_AllTitle), Culture) ?? nameof(DeleteSessions_AllTitle);
public static string DeleteSessions_Delete => ResourceManager.GetString(nameof(DeleteSessions_Delete), Culture) ?? nameof(DeleteSessions_Delete);
public static string DeleteSessions_Done_Format => ResourceManager.GetString(nameof(DeleteSessions_Done_Format), Culture) ?? nameof(DeleteSessions_Done_Format);
public static string DeleteSessions_GameBody_Format => ResourceManager.GetString(nameof(DeleteSessions_GameBody_Format), Culture) ?? nameof(DeleteSessions_GameBody_Format);
public static string DeleteSessions_GameTitle_Format => ResourceManager.GetString(nameof(DeleteSessions_GameTitle_Format), Culture) ?? nameof(DeleteSessions_GameTitle_Format);
public static string DeleteSessions_NoAgent => ResourceManager.GetString(nameof(DeleteSessions_NoAgent), Culture) ?? nameof(DeleteSessions_NoAgent);
public static string DeleteSessions_Running => ResourceManager.GetString(nameof(DeleteSessions_Running), Culture) ?? nameof(DeleteSessions_Running);
public static string Diag_Written_Format => ResourceManager.GetString(nameof(Diag_Written_Format), Culture) ?? nameof(Diag_Written_Format);
public static string Display_Buffer_Format => ResourceManager.GetString(nameof(Display_Buffer_Format), Culture) ?? nameof(Display_Buffer_Format);
@@ -1315,6 +1376,8 @@ public static class Strings
public static string Exception_Lapse_SessionCrashed => ResourceManager.GetString(nameof(Exception_Lapse_SessionCrashed), Culture) ?? nameof(Exception_Lapse_SessionCrashed);
public static string Exception_Lapse_TrialFailed => ResourceManager.GetString(nameof(Exception_Lapse_TrialFailed), Culture) ?? nameof(Exception_Lapse_TrialFailed);
public static string Exception_Lapse_Withdrawn => ResourceManager.GetString(nameof(Exception_Lapse_Withdrawn), Culture) ?? nameof(Exception_Lapse_Withdrawn);
public static string Exception_Lapsed_Format => ResourceManager.GetString(nameof(Exception_Lapsed_Format), Culture) ?? nameof(Exception_Lapsed_Format);
@@ -1325,8 +1388,6 @@ public static class Strings
public static string Exception_Result_Withdrawn_Format => ResourceManager.GetString(nameof(Exception_Result_Withdrawn_Format), Culture) ?? nameof(Exception_Result_Withdrawn_Format);
public static string Exception_Sessions_Format => ResourceManager.GetString(nameof(Exception_Sessions_Format), Culture) ?? nameof(Exception_Sessions_Format);
public static string Exception_State_Checking => ResourceManager.GetString(nameof(Exception_State_Checking), Culture) ?? nameof(Exception_State_Checking);
public static string Exception_State_CouldNotVerify => ResourceManager.GetString(nameof(Exception_State_CouldNotVerify), Culture) ?? nameof(Exception_State_CouldNotVerify);
@@ -1335,13 +1396,17 @@ public static class Strings
public static string Exception_State_Granted_Format => ResourceManager.GetString(nameof(Exception_State_Granted_Format), Culture) ?? nameof(Exception_State_Granted_Format);
public static string Exception_State_GrantedTrial_Format => ResourceManager.GetString(nameof(Exception_State_GrantedTrial_Format), Culture) ?? nameof(Exception_State_GrantedTrial_Format);
public static string Exception_State_NotAsked => ResourceManager.GetString(nameof(Exception_State_NotAsked), Culture) ?? nameof(Exception_State_NotAsked);
public static string Exception_State_NotFound_Format => ResourceManager.GetString(nameof(Exception_State_NotFound_Format), Culture) ?? nameof(Exception_State_NotFound_Format);
public static string Exception_State_NotUserMode_Format => ResourceManager.GetString(nameof(Exception_State_NotUserMode_Format), Culture) ?? nameof(Exception_State_NotUserMode_Format);
public static string Exception_State_Refused_Format => ResourceManager.GetString(nameof(Exception_State_Refused_Format), Culture) ?? nameof(Exception_State_Refused_Format);
public static string Exception_State_TooFew_Format => ResourceManager.GetString(nameof(Exception_State_TooFew_Format), Culture) ?? nameof(Exception_State_TooFew_Format);
public static string Exception_State_TrialFailed_Format => ResourceManager.GetString(nameof(Exception_State_TrialFailed_Format), Culture) ?? nameof(Exception_State_TrialFailed_Format);
public static string Exe_DriveMissing_Format => ResourceManager.GetString(nameof(Exe_DriveMissing_Format), Culture) ?? nameof(Exe_DriveMissing_Format);
@@ -1543,6 +1608,8 @@ public static class Strings
public static string Fps_Presented_Format => ResourceManager.GetString(nameof(Fps_Presented_Format), Culture) ?? nameof(Fps_Presented_Format);
public static string GameDetail_AntiCheat_Exceptionable_Format => ResourceManager.GetString(nameof(GameDetail_AntiCheat_Exceptionable_Format), Culture) ?? nameof(GameDetail_AntiCheat_Exceptionable_Format);
public static string GameDetail_AntiCheat_Format => ResourceManager.GetString(nameof(GameDetail_AntiCheat_Format), Culture) ?? nameof(GameDetail_AntiCheat_Format);
public static string GameDetail_AntiCheat_Header => ResourceManager.GetString(nameof(GameDetail_AntiCheat_Header), Culture) ?? nameof(GameDetail_AntiCheat_Header);
@@ -1551,6 +1618,8 @@ public static class Strings
public static string GameDetail_ChangeExe => ResourceManager.GetString(nameof(GameDetail_ChangeExe), Culture) ?? nameof(GameDetail_ChangeExe);
public static string GameDetail_DeleteSessions => ResourceManager.GetString(nameof(GameDetail_DeleteSessions), Culture) ?? nameof(GameDetail_DeleteSessions);
public static string GameDetail_Details_Architecture => ResourceManager.GetString(nameof(GameDetail_Details_Architecture), Culture) ?? nameof(GameDetail_Details_Architecture);
public static string GameDetail_Details_Engine => ResourceManager.GetString(nameof(GameDetail_Details_Engine), Culture) ?? nameof(GameDetail_Details_Engine);
@@ -1627,6 +1696,10 @@ public static class Strings
public static string GameDetail_NotFound => ResourceManager.GetString(nameof(GameDetail_NotFound), Culture) ?? nameof(GameDetail_NotFound);
public static string GameDetail_Overview_Header => ResourceManager.GetString(nameof(GameDetail_Overview_Header), Culture) ?? nameof(GameDetail_Overview_Header);
public static string GameDetail_Overview_Note => ResourceManager.GetString(nameof(GameDetail_Overview_Note), Culture) ?? nameof(GameDetail_Overview_Note);
public static string GameDetail_Recording_Body => ResourceManager.GetString(nameof(GameDetail_Recording_Body), Culture) ?? nameof(GameDetail_Recording_Body);
public static string GameDetail_Recording_Header => ResourceManager.GetString(nameof(GameDetail_Recording_Header), Culture) ?? nameof(GameDetail_Recording_Header);
@@ -1673,6 +1746,8 @@ public static class Strings
public static string Games_Card_NeverPlayed => ResourceManager.GetString(nameof(Games_Card_NeverPlayed), Culture) ?? nameof(Games_Card_NeverPlayed);
public static string Games_Card_NotInstalled => ResourceManager.GetString(nameof(Games_Card_NotInstalled), Culture) ?? nameof(Games_Card_NotInstalled);
public static string Games_Card_NotRecorded => ResourceManager.GetString(nameof(Games_Card_NotRecorded), Culture) ?? nameof(Games_Card_NotRecorded);
public static string Games_Card_Playtime_Format => ResourceManager.GetString(nameof(Games_Card_Playtime_Format), Culture) ?? nameof(Games_Card_Playtime_Format);
@@ -1683,8 +1758,28 @@ public static class Strings
public static string Games_Header => ResourceManager.GetString(nameof(Games_Header), Culture) ?? nameof(Games_Header);
public static string Games_Header_Count_Format => ResourceManager.GetString(nameof(Games_Header_Count_Format), Culture) ?? nameof(Games_Header_Count_Format);
public static string Games_List_Engine => ResourceManager.GetString(nameof(Games_List_Engine), Culture) ?? nameof(Games_List_Engine);
public static string Games_List_LastPlayed => ResourceManager.GetString(nameof(Games_List_LastPlayed), Culture) ?? nameof(Games_List_LastPlayed);
public static string Games_List_Name => ResourceManager.GetString(nameof(Games_List_Name), Culture) ?? nameof(Games_List_Name);
public static string Games_List_Played => ResourceManager.GetString(nameof(Games_List_Played), Culture) ?? nameof(Games_List_Played);
public static string Games_List_Sessions => ResourceManager.GetString(nameof(Games_List_Sessions), Culture) ?? nameof(Games_List_Sessions);
public static string Games_List_Status => ResourceManager.GetString(nameof(Games_List_Status), Culture) ?? nameof(Games_List_Status);
public static string Games_List_Store => ResourceManager.GetString(nameof(Games_List_Store), Culture) ?? nameof(Games_List_Store);
public static string Games_NoMatch => ResourceManager.GetString(nameof(Games_NoMatch), Culture) ?? nameof(Games_NoMatch);
public static string Games_Refresh => ResourceManager.GetString(nameof(Games_Refresh), Culture) ?? nameof(Games_Refresh);
public static string Games_Refresh_ToolTip => ResourceManager.GetString(nameof(Games_Refresh_ToolTip), Culture) ?? nameof(Games_Refresh_ToolTip);
public static string Games_Search_Placeholder => ResourceManager.GetString(nameof(Games_Search_Placeholder), Culture) ?? nameof(Games_Search_Placeholder);
public static string Games_Sort_Label => ResourceManager.GetString(nameof(Games_Sort_Label), Culture) ?? nameof(Games_Sort_Label);
@@ -1695,6 +1790,10 @@ public static class Strings
public static string Games_Sort_Playtime => ResourceManager.GetString(nameof(Games_Sort_Playtime), Culture) ?? nameof(Games_Sort_Playtime);
public static string Games_View_Grid => ResourceManager.GetString(nameof(Games_View_Grid), Culture) ?? nameof(Games_View_Grid);
public static string Games_View_List => ResourceManager.GetString(nameof(Games_View_List), Culture) ?? nameof(Games_View_List);
public static string Guard_ConsentMissing => ResourceManager.GetString(nameof(Guard_ConsentMissing), Culture) ?? nameof(Guard_ConsentMissing);
public static string Guard_DriverScanFailed => ResourceManager.GetString(nameof(Guard_DriverScanFailed), Culture) ?? nameof(Guard_DriverScanFailed);
@@ -1763,12 +1862,16 @@ public static class Strings
public static string Import_NothingFound => ResourceManager.GetString(nameof(Import_NothingFound), Culture) ?? nameof(Import_NothingFound);
public static string Import_NothingNew => ResourceManager.GetString(nameof(Import_NothingNew), Culture) ?? nameof(Import_NothingNew);
public static string Import_SelectAll => ResourceManager.GetString(nameof(Import_SelectAll), Culture) ?? nameof(Import_SelectAll);
public static string Import_Selected_Format => ResourceManager.GetString(nameof(Import_Selected_Format), Culture) ?? nameof(Import_Selected_Format);
public static string Import_SelectNone => ResourceManager.GetString(nameof(Import_SelectNone), Culture) ?? nameof(Import_SelectNone);
public static string Import_ShowExisting_Format => ResourceManager.GetString(nameof(Import_ShowExisting_Format), Culture) ?? nameof(Import_ShowExisting_Format);
public static string Import_Title => ResourceManager.GetString(nameof(Import_Title), Culture) ?? nameof(Import_Title);
public static string Latency_Avg => ResourceManager.GetString(nameof(Latency_Avg), Culture) ?? nameof(Latency_Avg);
@@ -1801,6 +1904,10 @@ public static class Strings
public static string Launch_Failed_Format => ResourceManager.GetString(nameof(Launch_Failed_Format), Culture) ?? nameof(Launch_Failed_Format);
public static string Limitations_OnGitHub => ResourceManager.GetString(nameof(Limitations_OnGitHub), Culture) ?? nameof(Limitations_OnGitHub);
public static string Limitations_Title => ResourceManager.GetString(nameof(Limitations_Title), Culture) ?? nameof(Limitations_Title);
public static string Logs_Bundle_Exported_Format => ResourceManager.GetString(nameof(Logs_Bundle_Exported_Format), Culture) ?? nameof(Logs_Bundle_Exported_Format);
public static string Logs_Bundle_Failed_Format => ResourceManager.GetString(nameof(Logs_Bundle_Failed_Format), Culture) ?? nameof(Logs_Bundle_Failed_Format);
@@ -1917,6 +2024,8 @@ public static class Strings
public static string Menu_Help_Documentation => ResourceManager.GetString(nameof(Menu_Help_Documentation), Culture) ?? nameof(Menu_Help_Documentation);
public static string Menu_Help_Limitations => ResourceManager.GetString(nameof(Menu_Help_Limitations), Culture) ?? nameof(Menu_Help_Limitations);
public static string Menu_Help_ReportBug => ResourceManager.GetString(nameof(Menu_Help_ReportBug), Culture) ?? nameof(Menu_Help_ReportBug);
public static string Menu_Tools => ResourceManager.GetString(nameof(Menu_Tools), Culture) ?? nameof(Menu_Tools);
@@ -2161,6 +2270,14 @@ public static class Strings
public static string Settings_Channel_Stable => ResourceManager.GetString(nameof(Settings_Channel_Stable), Culture) ?? nameof(Settings_Channel_Stable);
public static string Settings_Data_Header => ResourceManager.GetString(nameof(Settings_Data_Header), Culture) ?? nameof(Settings_Data_Header);
public static string Settings_DeleteSessions_Body => ResourceManager.GetString(nameof(Settings_DeleteSessions_Body), Culture) ?? nameof(Settings_DeleteSessions_Body);
public static string Settings_DeleteSessions_Button => ResourceManager.GetString(nameof(Settings_DeleteSessions_Button), Culture) ?? nameof(Settings_DeleteSessions_Button);
public static string Settings_DeleteSessions_Label => ResourceManager.GetString(nameof(Settings_DeleteSessions_Label), Culture) ?? nameof(Settings_DeleteSessions_Label);
public static string Settings_Exceptions_Body => ResourceManager.GetString(nameof(Settings_Exceptions_Body), Culture) ?? nameof(Settings_Exceptions_Body);
public static string Settings_Exceptions_Checking => ResourceManager.GetString(nameof(Settings_Exceptions_Checking), Culture) ?? nameof(Settings_Exceptions_Checking);
@@ -2189,8 +2306,6 @@ public static class Strings
public static string Settings_HideAntiCheatHooking_Label => ResourceManager.GetString(nameof(Settings_HideAntiCheatHooking_Label), Culture) ?? nameof(Settings_HideAntiCheatHooking_Label);
public static string Settings_HookedGames_Empty => ResourceManager.GetString(nameof(Settings_HookedGames_Empty), Culture) ?? nameof(Settings_HookedGames_Empty);
public static string Settings_HookedGames_Label => ResourceManager.GetString(nameof(Settings_HookedGames_Label), Culture) ?? nameof(Settings_HookedGames_Label);
public static string Settings_HookedGames_Revoke => ResourceManager.GetString(nameof(Settings_HookedGames_Revoke), Culture) ?? nameof(Settings_HookedGames_Revoke);
@@ -2211,8 +2326,6 @@ public static class Strings
public static string Settings_Language_Label => ResourceManager.GetString(nameof(Settings_Language_Label), Culture) ?? nameof(Settings_Language_Label);
public static string Settings_Language_Note => ResourceManager.GetString(nameof(Settings_Language_Note), Culture) ?? nameof(Settings_Language_Note);
public static string Settings_Legal_Header => ResourceManager.GetString(nameof(Settings_Legal_Header), Culture) ?? nameof(Settings_Legal_Header);
public static string Settings_Legal_Reopen => ResourceManager.GetString(nameof(Settings_Legal_Reopen), Culture) ?? nameof(Settings_Legal_Reopen);
@@ -2479,6 +2592,10 @@ public static class Strings
public static string Trend_Excluded_Format => ResourceManager.GetString(nameof(Trend_Excluded_Format), Culture) ?? nameof(Trend_Excluded_Format);
public static string Trend_Extras_Label => ResourceManager.GetString(nameof(Trend_Extras_Label), Culture) ?? nameof(Trend_Extras_Label);
public static string Trend_Extras_Note => ResourceManager.GetString(nameof(Trend_Extras_Note), Culture) ?? nameof(Trend_Extras_Note);
public static string Trend_IncludeMidSession => ResourceManager.GetString(nameof(Trend_IncludeMidSession), Culture) ?? nameof(Trend_IncludeMidSession);
public static string Trend_Metric_Average => ResourceManager.GetString(nameof(Trend_Metric_Average), Culture) ?? nameof(Trend_Metric_Average);
@@ -2519,6 +2636,18 @@ public static class Strings
public static string Trend_Partial_Note => ResourceManager.GetString(nameof(Trend_Partial_Note), Culture) ?? nameof(Trend_Partial_Note);
public static string Trend_Unit_Celsius => ResourceManager.GetString(nameof(Trend_Unit_Celsius), Culture) ?? nameof(Trend_Unit_Celsius);
public static string Trend_Unit_Factor => ResourceManager.GetString(nameof(Trend_Unit_Factor), Culture) ?? nameof(Trend_Unit_Factor);
public static string Trend_Unit_Fps => ResourceManager.GetString(nameof(Trend_Unit_Fps), Culture) ?? nameof(Trend_Unit_Fps);
public static string Trend_Unit_Megabytes => ResourceManager.GetString(nameof(Trend_Unit_Megabytes), Culture) ?? nameof(Trend_Unit_Megabytes);
public static string Trend_Unit_Percent => ResourceManager.GetString(nameof(Trend_Unit_Percent), Culture) ?? nameof(Trend_Unit_Percent);
public static string Trend_Unit_Watts => ResourceManager.GetString(nameof(Trend_Unit_Watts), Culture) ?? nameof(Trend_Unit_Watts);
public static string Uninstall_DataFolder_Body => ResourceManager.GetString(nameof(Uninstall_DataFolder_Body), Culture) ?? nameof(Uninstall_DataFolder_Body);
public static string Uninstall_DataFolder_Title => ResourceManager.GetString(nameof(Uninstall_DataFolder_Title), Culture) ?? nameof(Uninstall_DataFolder_Title);
+191 -19
View File
@@ -145,6 +145,10 @@
<value>ゲーム</value>
<comment>review</comment>
</data>
<data name="Games_Header_Count_Format" xml:space="preserve">
<value>ゲーム · {0}</value>
<comment>review</comment>
</data>
<data name="Logs_Empty" xml:space="preserve">
<value>このソースのログファイルはまだありません。</value>
<comment>review</comment>
@@ -289,6 +293,14 @@
<value>このマシンの Steam、GOG Galaxy、Epic、itch.io にインストール済みのゲームは見つかりませんでした。</value>
<comment>review</comment>
</data>
<data name="Import_NothingNew" xml:space="preserve">
<value>新しいゲームはありません。ストアにインストールされているゲームはすべてライブラリーにあります。</value>
<comment>review</comment>
</data>
<data name="Import_ShowExisting_Format" xml:space="preserve">
<value>ライブラリーにある {0} 件のゲームを表示する</value>
<comment>review</comment>
</data>
<data name="Import_Done_Format" xml:space="preserve">
<value>{0} 件のゲームをフック無効で追加しました。{1} 件はそのままです。</value>
<comment>review</comment>
@@ -309,6 +321,18 @@
<value>ドキュメント</value>
<comment>review</comment>
</data>
<data name="Menu_Help_Limitations" xml:space="preserve">
<value>制限事項</value>
<comment>review</comment>
</data>
<data name="Limitations_Title" xml:space="preserve">
<value>FrameLedger にできないこと</value>
<comment>review</comment>
</data>
<data name="Limitations_OnGitHub" xml:space="preserve">
<value>GitHub で開く</value>
<comment>review</comment>
</data>
<data name="Menu_Help_ReportBug" xml:space="preserve">
<value>不具合を報告…</value>
<comment>review</comment>
@@ -385,10 +409,6 @@
<value>言語</value>
<comment>review</comment>
</data>
<data name="Settings_Language_Note" xml:space="preserve">
<value>すぐに適用されます。ウィンドウは新しい言語で再構築されます。</value>
<comment>review</comment>
</data>
<data name="Settings_Theme_Dark" xml:space="preserve">
<value>ダーク</value>
<comment>review</comment>
@@ -957,6 +977,54 @@
<value>セッション</value>
<comment>review</comment>
</data>
<data name="GameDetail_DeleteSessions" xml:space="preserve">
<value>すべてのセッションを削除…</value>
<comment>review</comment>
</data>
<data name="GameDetail_Overview_Header" xml:space="preserve">
<value>セッションの概要</value>
<comment>review</comment>
</data>
<data name="GameDetail_Overview_Note" xml:space="preserve">
<value>フックした各セッションのフレームレートと Low 値(古い順)。フレーム生成が計測されたセッションでは Native と Displayed を描画します。白抜きの点はセッションの一部を表します。点をクリックすると下の一覧でそのセッションを選択します。</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_GameTitle_Format" xml:space="preserve">
<value>{0} のすべてのセッションを削除しますか?</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_AllTitle" xml:space="preserve">
<value>すべてのゲームのすべてのセッションを削除しますか?</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_GameBody_Format" xml:space="preserve">
<value>{0} 件のセッションを、フレームとセンサーのデータやメモとともに削除します。ゲーム、その設定、フックへの同意は残ります。元に戻すことはできません。</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_AllBody_Format" xml:space="preserve">
<value>すべてのゲームの {0} 件のセッションを、フレームとセンサーのデータやメモとともに削除します。ライブラリー、設定、フックへの同意はすべて残ります。元に戻すことはできません。</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_Delete" xml:space="preserve">
<value>セッションを削除</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_Done_Format" xml:space="preserve">
<value>{1} 件のゲームの {0} 件のセッションを削除しました。</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_Running" xml:space="preserve">
<value>セッションを記録中のため、何も削除していません。停止するか終了するのを待ってから、もう一度お試しください。</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_NoAgent" xml:space="preserve">
<value>キャプチャエージェントが接続されていないため、何も削除していません。</value>
<comment>review</comment>
</data>
<data name="DeleteSessions_AgentTooOld" xml:space="preserve">
<value>キャプチャエージェントがこの要求にまだ対応していません。再起動してからもう一度お試しください。何も削除していません。</value>
<comment>review</comment>
</data>
<data name="GameDetail_Tab_Trend" xml:space="preserve">
<value>傾向</value>
<comment>review</comment>
@@ -965,10 +1033,58 @@
<value>ゲームを追加…</value>
<comment>review</comment>
</data>
<data name="Games_Refresh" xml:space="preserve">
<value>更新</value>
<comment>review</comment>
</data>
<data name="Games_Refresh_ToolTip" xml:space="preserve">
<value>ライブラリーを読み直し、その後にインストールされたゲームをストアから探し、実行ファイルがなくなったゲームに印を付けます</value>
<comment>review</comment>
</data>
<data name="Games_View_Grid" xml:space="preserve">
<value>グリッドで表示</value>
<comment>review</comment>
</data>
<data name="Games_View_List" xml:space="preserve">
<value>リストで表示</value>
<comment>review</comment>
</data>
<data name="Games_List_Name" xml:space="preserve">
<value>名前</value>
<comment>review</comment>
</data>
<data name="Games_List_Store" xml:space="preserve">
<value>ストア</value>
<comment>review</comment>
</data>
<data name="Games_List_Engine" xml:space="preserve">
<value>エンジン</value>
<comment>review</comment>
</data>
<data name="Games_List_Status" xml:space="preserve">
<value>状態</value>
<comment>review</comment>
</data>
<data name="Games_List_Sessions" xml:space="preserve">
<value>セッション</value>
<comment>review</comment>
</data>
<data name="Games_List_Played" xml:space="preserve">
<value>プレイ時間</value>
<comment>review</comment>
</data>
<data name="Games_List_LastPlayed" xml:space="preserve">
<value>最終プレイ</value>
<comment>review</comment>
</data>
<data name="Games_Card_NotRecorded" xml:space="preserve">
<value>記録しない</value>
<comment>review</comment>
</data>
<data name="Games_Card_NotInstalled" xml:space="preserve">
<value>未インストール</value>
<comment>review</comment>
</data>
<data name="Games_Card_HookOff" xml:space="preserve">
<value>フック無効</value>
<comment>review</comment>
@@ -1637,6 +1753,38 @@
<value>指標</value>
<comment>review</comment>
</data>
<data name="Trend_Extras_Label" xml:space="preserve">
<value>あわせて表示</value>
<comment>review</comment>
</data>
<data name="Trend_Extras_Note" xml:space="preserve">
<value>単位は同時に2つまでです。2つ目の単位は右側の軸に描画されます(凡例に ▸ で表示)。</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Fps" xml:space="preserve">
<value>FPS</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Celsius" xml:space="preserve">
<value>°C</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Percent" xml:space="preserve">
<value>%</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Watts" xml:space="preserve">
<value>W</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Megabytes" xml:space="preserve">
<value>MB</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Factor" xml:space="preserve">
<value>×(フレーム生成)</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_MaxGpuTemp" xml:space="preserve">
<value>GPU 最高 °C</value>
<comment>review</comment>
@@ -1809,10 +1957,6 @@
<value>安定版</value>
<comment>review</comment>
</data>
<data name="Settings_HookedGames_Empty" xml:space="preserve">
<value>フックが有効なゲームはありません。</value>
<comment>review</comment>
</data>
<data name="Settings_HookedGames_Label" xml:space="preserve">
<value>フック有効なゲーム</value>
<comment>review</comment>
@@ -1893,6 +2037,22 @@
<value>記録</value>
<comment>review</comment>
</data>
<data name="Settings_Data_Header" xml:space="preserve">
<value>データ</value>
<comment>review</comment>
</data>
<data name="Settings_DeleteSessions_Label" xml:space="preserve">
<value>すべてのセッションを削除</value>
<comment>review</comment>
</data>
<data name="Settings_DeleteSessions_Body" xml:space="preserve">
<value>すべてのゲームのすべてのセッションを、フレームとセンサーのデータやメモとともに削除します。ライブラリー、設定、各ゲームのフックへの同意は残ります。元に戻すことはできません。</value>
<comment>review</comment>
</data>
<data name="Settings_DeleteSessions_Button" xml:space="preserve">
<value>すべてのセッションを削除…</value>
<comment>review</comment>
</data>
<data name="Settings_Privacy_Header" xml:space="preserve">
<value>プライバシー</value>
<comment>review</comment>
@@ -2338,7 +2498,7 @@
<comment>review</comment>
</data>
<data name="Maintenance_Sweep_Unlimited" xml:space="preserve">
<value>保持は無制限に設定されています (設定 ▸ キャプチャ)。整理するものはありません。</value>
<value>保持は無制限に設定されています (設定 ▸ 記録)。整理するものはありません。</value>
<comment>review</comment>
</data>
<data name="Maintenance_Sweep_NoAgent" xml:space="preserve">
@@ -2669,6 +2829,10 @@
<value>検出: {0}。このゲームのフックはオフで、オンにすることはできません。セッションにはプレイ時間とセンサーの値だけが記録されます。</value>
<comment>review</comment>
</data>
<data name="GameDetail_AntiCheat_Exceptionable_Format" xml:space="preserve">
<value>検出: {0}。ユーザーモードの例外を作成しない限り(下記)、このゲームのフックはオフです。例外がなければ、セッションにはプレイ時間とセンサーの値だけが記録されます。</value>
<comment>review</comment>
</data>
<data name="Games_Card_AntiCheat" xml:space="preserve">
<value>アンチチート</value>
<comment>review</comment>
@@ -3286,11 +3450,11 @@
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Label" xml:space="preserve">
<value>以前に計測できたユーザーモードのアンチチート搭載ゲームでフックを許可する</value>
<value>アンチチートがユーザーモードのみで動作するゲームでフックを許可する</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Body" xml:space="preserve">
<value>既定ではオフです。オンにすると、アンチチートがユーザーモードのみで動作し(カーネルドライバーがなく、ほかに何も検出されない)、フックで2回以上計測できたゲームに、開示を確認したうえでゲームごとに例外を与えられます。ガードはすべてのチェックを続け、アカウント停止の可能性は残ります。</value>
<value>既定ではオフです。オンにすると、アンチチートがユーザーモードのみで動作する(カーネルドライバーがなく、ほかに何も検出されない)ゲームに、開示を確認したうえでゲームごとに例外を与えられます。最初の2回のフックセッションは試用期間で、うまくいかなかったセッションが1回でもあると例外は永久に終了します。ガードはすべてのチェックを続け、アカウント停止の可能性は残ります。</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Header" xml:space="preserve">
@@ -3317,14 +3481,14 @@
<value>{0} — {1}</value>
<comment>review</comment>
</data>
<data name="Exception_Sessions_Format" xml:space="preserve">
<value>フック計測の成功 {0} 回</value>
<comment>review</comment>
</data>
<data name="Exception_State_Granted_Format" xml:space="preserve">
<value>{0} から例外が有効</value>
<comment>review</comment>
</data>
<data name="Exception_State_GrantedTrial_Format" xml:space="preserve">
<value>{0} から例外が有効 — 試用中: 良好なセッション {1}/{2} 回</value>
<comment>review</comment>
</data>
<data name="Exception_State_Eligible" xml:space="preserve">
<value>対象 — 例外は未作成</value>
<comment>review</comment>
@@ -3333,10 +3497,6 @@
<value>確認中…</value>
<comment>review</comment>
</data>
<data name="Exception_State_TooFew_Format" xml:space="preserve">
<value>対象外: フック計測の成功は {0} 回で、2 回必要です</value>
<comment>review</comment>
</data>
<data name="Exception_State_Refused_Format" xml:space="preserve">
<value>対象外: ガードは {0}({1})も検出しました</value>
<comment>review</comment>
@@ -3353,6 +3513,14 @@
<value>現在は対象外: 確認を完了できませんでした。自動で再実行されます</value>
<comment>review</comment>
</data>
<data name="Exception_State_TrialFailed_Format" xml:space="preserve">
<value>対象外: このゲームの例外は {0} に試用期間中に終了したため、再び作成することはできません</value>
<comment>review</comment>
</data>
<data name="Exception_State_NotFound_Format" xml:space="preserve">
<value>現在は対象外: 確認時にゲームのフォルダーで {0} が見つかりませんでした。ブロックは維持されます</value>
<comment>review</comment>
</data>
<data name="Exception_Lapsed_Format" xml:space="preserve">
<value>直近の例外は {0} に終了しました: {1}</value>
<comment>review</comment>
@@ -3385,6 +3553,10 @@
<value>例外下のセッションがクラッシュしました</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_TrialFailed" xml:space="preserve">
<value>試用期間中のセッションがうまくいきませんでした(フレームが記録されなかったか、正常に終了しませんでした)</value>
<comment>review</comment>
</data>
<data name="Exception_Result_Granted_Format" xml:space="preserve">
<value>{0} の例外を作成しました。計測するときは、ゲームのページでフックをオンにしてください。</value>
<comment>review</comment>
+144 -15
View File
@@ -114,6 +114,9 @@
<data name="Games_Header" xml:space="preserve">
<value>Games</value>
</data>
<data name="Games_Header_Count_Format" xml:space="preserve">
<value>Games · {0}</value>
</data>
<data name="Logs_Empty" xml:space="preserve">
<value>No log file yet for this source.</value>
</data>
@@ -222,6 +225,12 @@
<data name="Import_NothingFound" xml:space="preserve">
<value>No installed games were found in Steam, GOG Galaxy, Epic or itch.io on this machine.</value>
</data>
<data name="Import_NothingNew" xml:space="preserve">
<value>No new games: every game your stores have installed is already in the library.</value>
</data>
<data name="Import_ShowExisting_Format" xml:space="preserve">
<value>Show the {0} games already in the library</value>
</data>
<data name="Import_Done_Format" xml:space="preserve">
<value>{0} game(s) added with hooking off; {1} left as they were.</value>
</data>
@@ -237,6 +246,15 @@
<data name="Menu_Help_Documentation" xml:space="preserve">
<value>Documentation</value>
</data>
<data name="Menu_Help_Limitations" xml:space="preserve">
<value>Limitations</value>
</data>
<data name="Limitations_Title" xml:space="preserve">
<value>What FrameLedger cannot do</value>
</data>
<data name="Limitations_OnGitHub" xml:space="preserve">
<value>Open on GitHub</value>
</data>
<data name="Menu_Help_ReportBug" xml:space="preserve">
<value>Report a bug…</value>
</data>
@@ -294,9 +312,6 @@
<data name="Settings_Language_Label" xml:space="preserve">
<value>Language</value>
</data>
<data name="Settings_Language_Note" xml:space="preserve">
<value>Applies at once; the window is rebuilt in the new language.</value>
</data>
<data name="Settings_Theme_Dark" xml:space="preserve">
<value>Dark</value>
</data>
@@ -723,15 +738,87 @@
<data name="GameDetail_Tab_Sessions" xml:space="preserve">
<value>Sessions</value>
</data>
<data name="GameDetail_DeleteSessions" xml:space="preserve">
<value>Delete all sessions…</value>
</data>
<data name="GameDetail_Overview_Header" xml:space="preserve">
<value>Sessions at a glance</value>
</data>
<data name="GameDetail_Overview_Note" xml:space="preserve">
<value>Each hooked session's frame rate and lows, oldest first. Native and Displayed are drawn where frame generation was measured; a hollow point describes part of its session. Click a point to select its session below.</value>
</data>
<data name="DeleteSessions_GameTitle_Format" xml:space="preserve">
<value>Delete every session of {0}?</value>
</data>
<data name="DeleteSessions_AllTitle" xml:space="preserve">
<value>Delete every session of every game?</value>
</data>
<data name="DeleteSessions_GameBody_Format" xml:space="preserve">
<value>{0} session(s), with their frame and sensor data and their notes, are deleted. The game, its settings and its hooking consent stay. This cannot be undone.</value>
</data>
<data name="DeleteSessions_AllBody_Format" xml:space="preserve">
<value>{0} session(s) of every game, with their frame and sensor data and their notes, are deleted. The library, your settings and every hooking consent stay. This cannot be undone.</value>
</data>
<data name="DeleteSessions_Delete" xml:space="preserve">
<value>Delete sessions</value>
</data>
<data name="DeleteSessions_Done_Format" xml:space="preserve">
<value>Deleted {0} session(s) of {1} game(s).</value>
</data>
<data name="DeleteSessions_Running" xml:space="preserve">
<value>A session is being recorded, so nothing was deleted. Stop it or let it end, then try again.</value>
</data>
<data name="DeleteSessions_NoAgent" xml:space="preserve">
<value>The capture agent is not connected, so nothing was deleted.</value>
</data>
<data name="DeleteSessions_AgentTooOld" xml:space="preserve">
<value>The capture agent does not know this request yet; restart it and try again. Nothing was deleted.</value>
</data>
<data name="GameDetail_Tab_Trend" xml:space="preserve">
<value>Trend</value>
</data>
<data name="Games_Add" xml:space="preserve">
<value>Add game…</value>
</data>
<data name="Games_Refresh" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="Games_Refresh_ToolTip" xml:space="preserve">
<value>Read the library again, look in your stores for games installed since, and mark games whose executable is gone</value>
</data>
<data name="Games_View_Grid" xml:space="preserve">
<value>Show as a grid</value>
</data>
<data name="Games_View_List" xml:space="preserve">
<value>Show as a list</value>
</data>
<data name="Games_List_Name" xml:space="preserve">
<value>Name</value>
</data>
<data name="Games_List_Store" xml:space="preserve">
<value>Store</value>
</data>
<data name="Games_List_Engine" xml:space="preserve">
<value>Engine</value>
</data>
<data name="Games_List_Status" xml:space="preserve">
<value>Status</value>
</data>
<data name="Games_List_Sessions" xml:space="preserve">
<value>Sessions</value>
</data>
<data name="Games_List_Played" xml:space="preserve">
<value>Played</value>
</data>
<data name="Games_List_LastPlayed" xml:space="preserve">
<value>Last played</value>
</data>
<data name="Games_Card_NotRecorded" xml:space="preserve">
<value>Not recorded</value>
</data>
<data name="Games_Card_NotInstalled" xml:space="preserve">
<value>Not installed</value>
</data>
<data name="Games_Card_HookOff" xml:space="preserve">
<value>Hooking off</value>
</data>
@@ -1233,6 +1320,30 @@
<data name="Trend_Metric_Label" xml:space="preserve">
<value>Metric</value>
</data>
<data name="Trend_Extras_Label" xml:space="preserve">
<value>Also draw</value>
</data>
<data name="Trend_Extras_Note" xml:space="preserve">
<value>Up to two units at once: a second unit is drawn against the right axis (marked ▸ in the legend).</value>
</data>
<data name="Trend_Unit_Fps" xml:space="preserve">
<value>FPS</value>
</data>
<data name="Trend_Unit_Celsius" xml:space="preserve">
<value>°C</value>
</data>
<data name="Trend_Unit_Percent" xml:space="preserve">
<value>%</value>
</data>
<data name="Trend_Unit_Watts" xml:space="preserve">
<value>W</value>
</data>
<data name="Trend_Unit_Megabytes" xml:space="preserve">
<value>MB</value>
</data>
<data name="Trend_Unit_Factor" xml:space="preserve">
<value>× (frame generation)</value>
</data>
<data name="Trend_Metric_MaxGpuTemp" xml:space="preserve">
<value>Max GPU °C</value>
</data>
@@ -1362,9 +1473,6 @@
<data name="Settings_Channel_Stable" xml:space="preserve">
<value>Stable</value>
</data>
<data name="Settings_HookedGames_Empty" xml:space="preserve">
<value>No game has hooking on.</value>
</data>
<data name="Settings_HookedGames_Label" xml:space="preserve">
<value>Games with hooking on</value>
</data>
@@ -1425,6 +1533,18 @@
<data name="Settings_Policy_Header" xml:space="preserve">
<value>Recording</value>
</data>
<data name="Settings_Data_Header" xml:space="preserve">
<value>Data</value>
</data>
<data name="Settings_DeleteSessions_Label" xml:space="preserve">
<value>Delete all sessions</value>
</data>
<data name="Settings_DeleteSessions_Body" xml:space="preserve">
<value>Every session of every game, with its frame and sensor data and its notes. The library, your settings and each game's hooking consent stay. It cannot be undone.</value>
</data>
<data name="Settings_DeleteSessions_Button" xml:space="preserve">
<value>Delete all sessions…</value>
</data>
<data name="Settings_Privacy_Header" xml:space="preserve">
<value>Privacy</value>
</data>
@@ -1759,7 +1879,7 @@
<value>Sweep…</value>
</data>
<data name="Maintenance_Sweep_Unlimited" xml:space="preserve">
<value>Retention is unlimited (Settings ▸ Capture), so there is nothing to sweep.</value>
<value>Retention is unlimited (Settings ▸ Recording), so there is nothing to sweep.</value>
</data>
<data name="Maintenance_Sweep_NoAgent" xml:space="preserve">
<value>The Agent is not connected. The raw data is the Agent's to remove; start it and try again.</value>
@@ -2012,6 +2132,9 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="GameDetail_AntiCheat_Format" xml:space="preserve">
<value>Found: {0}. Hooking is off for this game and cannot be turned on; its sessions record play time and sensors only.</value>
</data>
<data name="GameDetail_AntiCheat_Exceptionable_Format" xml:space="preserve">
<value>Found: {0}. Hooking is off for this game unless you make a user-mode exception for it (below); without one, its sessions record play time and sensors only.</value>
</data>
<data name="Games_Card_AntiCheat" xml:space="preserve">
<value>Anti-cheat</value>
</data>
@@ -2475,10 +2598,10 @@ The documents below are the full terms; this summary does not replace them.</val
<value>W</value>
</data>
<data name="Settings_Exceptions_Label" xml:space="preserve">
<value>Allow hooking in games with user-mode anti-cheat that were measured before</value>
<value>Allow hooking in games whose only anti-cheat runs in user mode</value>
</data>
<data name="Settings_Exceptions_Body" xml:space="preserve">
<value>Off by default. On, a game whose only anti-cheat runs in user mode — no kernel driver, nothing else found — and that was measured hooked at least twice can be given an exception below, one game at a time, after a disclosure. The guard still runs every check, and a ban remains possible.</value>
<value>Off by default. On, a game whose only anti-cheat runs in user mode — no kernel driver, nothing else found — can be given an exception below, one game at a time, after a disclosure. Its first two hooked sessions are a trial: one that does not go well ends the exception for good. The guard still runs every check, and a ban remains possible.</value>
</data>
<data name="Settings_Exceptions_Header" xml:space="preserve">
<value>User-mode exceptions</value>
@@ -2498,21 +2621,18 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Exception_Finding_Format" xml:space="preserve">
<value>{0} — {1}</value>
</data>
<data name="Exception_Sessions_Format" xml:space="preserve">
<value>{0} successful hooked sessions</value>
</data>
<data name="Exception_State_Granted_Format" xml:space="preserve">
<value>Exception in force since {0}</value>
</data>
<data name="Exception_State_GrantedTrial_Format" xml:space="preserve">
<value>Exception in force since {0} — trial: {1} of {2} good sessions so far</value>
</data>
<data name="Exception_State_Eligible" xml:space="preserve">
<value>Eligible — no exception made</value>
</data>
<data name="Exception_State_Checking" xml:space="preserve">
<value>Checking…</value>
</data>
<data name="Exception_State_TooFew_Format" xml:space="preserve">
<value>Not eligible: {0} successful hooked session(s), two are needed</value>
</data>
<data name="Exception_State_Refused_Format" xml:space="preserve">
<value>Not eligible: the guard also found {0} ({1})</value>
</data>
@@ -2525,6 +2645,12 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Exception_State_CouldNotVerify" xml:space="preserve">
<value>Not eligible now: the check could not finish; it runs again by itself</value>
</data>
<data name="Exception_State_TrialFailed_Format" xml:space="preserve">
<value>Not eligible: an exception of this game ended during its trial on {0}, so none can be made again</value>
</data>
<data name="Exception_State_NotFound_Format" xml:space="preserve">
<value>Not eligible now: {0} was not found in the game's folder when it was checked; the block stays</value>
</data>
<data name="Exception_Lapsed_Format" xml:space="preserve">
<value>The last exception ended on {0}: {1}</value>
</data>
@@ -2549,6 +2675,9 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Exception_Lapse_SessionCrashed" xml:space="preserve">
<value>a session under it crashed</value>
</data>
<data name="Exception_Lapse_TrialFailed" xml:space="preserve">
<value>a session during its trial did not go well (no frames recorded, or it did not end normally)</value>
</data>
<data name="Exception_Result_Granted_Format" xml:space="preserve">
<value>Exception made for {0}. Turn hooking on for the game on its page when you want to measure it.</value>
</data>
+144 -15
View File
@@ -109,6 +109,9 @@
<data name="Games_Header" xml:space="preserve">
<value>Game</value>
</data>
<data name="Games_Header_Count_Format" xml:space="preserve">
<value>Game · {0}</value>
</data>
<data name="Logs_Empty" xml:space="preserve">
<value>Chưa có tệp nhật ký cho nguồn này.</value>
</data>
@@ -217,6 +220,12 @@
<data name="Import_NothingFound" xml:space="preserve">
<value>Không tìm thấy game nào đã cài trong Steam, GOG Galaxy, Epic hay itch.io trên máy này.</value>
</data>
<data name="Import_NothingNew" xml:space="preserve">
<value>Không có game mới: mọi game các store đã cài đều đã có trong thư viện.</value>
</data>
<data name="Import_ShowExisting_Format" xml:space="preserve">
<value>Hiện {0} game đã có trong thư viện</value>
</data>
<data name="Import_Done_Format" xml:space="preserve">
<value>Đã thêm {0} game với hooking tắt; {1} giữ nguyên.</value>
</data>
@@ -232,6 +241,15 @@
<data name="Menu_Help_Documentation" xml:space="preserve">
<value>Tài liệu</value>
</data>
<data name="Menu_Help_Limitations" xml:space="preserve">
<value>Giới hạn</value>
</data>
<data name="Limitations_Title" xml:space="preserve">
<value>Những điều FrameLedger không làm được</value>
</data>
<data name="Limitations_OnGitHub" xml:space="preserve">
<value>Mở trên GitHub</value>
</data>
<data name="Menu_Help_ReportBug" xml:space="preserve">
<value>Báo lỗi…</value>
</data>
@@ -289,9 +307,6 @@
<data name="Settings_Language_Label" xml:space="preserve">
<value>Ngôn ngữ</value>
</data>
<data name="Settings_Language_Note" xml:space="preserve">
<value>Áp dụng ngay; cửa sổ được dựng lại bằng ngôn ngữ mới.</value>
</data>
<data name="Settings_Theme_Dark" xml:space="preserve">
<value>Tối</value>
</data>
@@ -718,15 +733,87 @@
<data name="GameDetail_Tab_Sessions" xml:space="preserve">
<value>Phiên chơi</value>
</data>
<data name="GameDetail_DeleteSessions" xml:space="preserve">
<value>Xoá mọi phiên…</value>
</data>
<data name="GameDetail_Overview_Header" xml:space="preserve">
<value>Tổng quan các phiên</value>
</data>
<data name="GameDetail_Overview_Note" xml:space="preserve">
<value>Tốc độ khung hình và các mức thấp của mỗi phiên có hook, cũ nhất trước. Native và Displayed được vẽ ở phiên đo được frame generation; điểm rỗng mô tả một phần phiên. Bấm vào một điểm để chọn phiên đó bên dưới.</value>
</data>
<data name="DeleteSessions_GameTitle_Format" xml:space="preserve">
<value>Xoá mọi phiên của {0}?</value>
</data>
<data name="DeleteSessions_AllTitle" xml:space="preserve">
<value>Xoá mọi phiên của mọi game?</value>
</data>
<data name="DeleteSessions_GameBody_Format" xml:space="preserve">
<value>{0} phiên, kèm dữ liệu frame, cảm biến và ghi chú, sẽ bị xoá. Game, cài đặt và consent hooking của nó vẫn giữ nguyên. Không thể hoàn tác.</value>
</data>
<data name="DeleteSessions_AllBody_Format" xml:space="preserve">
<value>{0} phiên của mọi game, kèm dữ liệu frame, cảm biến và ghi chú, sẽ bị xoá. Thư viện, cài đặt và mọi consent hooking vẫn giữ nguyên. Không thể hoàn tác.</value>
</data>
<data name="DeleteSessions_Delete" xml:space="preserve">
<value>Xoá phiên</value>
</data>
<data name="DeleteSessions_Done_Format" xml:space="preserve">
<value>Đã xoá {0} phiên của {1} game.</value>
</data>
<data name="DeleteSessions_Running" xml:space="preserve">
<value>Đang ghi một phiên nên chưa xoá gì. Hãy dừng hoặc chờ phiên kết thúc rồi thử lại.</value>
</data>
<data name="DeleteSessions_NoAgent" xml:space="preserve">
<value>Agent ghi chưa kết nối nên chưa xoá gì.</value>
</data>
<data name="DeleteSessions_AgentTooOld" xml:space="preserve">
<value>Agent ghi chưa hỗ trợ yêu cầu này; hãy khởi động lại rồi thử lại. Chưa xoá gì.</value>
</data>
<data name="GameDetail_Tab_Trend" xml:space="preserve">
<value>Xu hướng</value>
</data>
<data name="Games_Add" xml:space="preserve">
<value>Thêm game…</value>
</data>
<data name="Games_Refresh" xml:space="preserve">
<value>Làm mới</value>
</data>
<data name="Games_Refresh_ToolTip" xml:space="preserve">
<value>Đọc lại thư viện, tìm trong các store những game mới cài, và đánh dấu game không còn file chạy</value>
</data>
<data name="Games_View_Grid" xml:space="preserve">
<value>Hiển thị dạng lưới</value>
</data>
<data name="Games_View_List" xml:space="preserve">
<value>Hiển thị dạng danh sách</value>
</data>
<data name="Games_List_Name" xml:space="preserve">
<value>Tên</value>
</data>
<data name="Games_List_Store" xml:space="preserve">
<value>Store</value>
</data>
<data name="Games_List_Engine" xml:space="preserve">
<value>Engine</value>
</data>
<data name="Games_List_Status" xml:space="preserve">
<value>Trạng thái</value>
</data>
<data name="Games_List_Sessions" xml:space="preserve">
<value>Phiên</value>
</data>
<data name="Games_List_Played" xml:space="preserve">
<value>Đã chơi</value>
</data>
<data name="Games_List_LastPlayed" xml:space="preserve">
<value>Chơi lần cuối</value>
</data>
<data name="Games_Card_NotRecorded" xml:space="preserve">
<value>Không ghi</value>
</data>
<data name="Games_Card_NotInstalled" xml:space="preserve">
<value>Chưa cài</value>
</data>
<data name="Games_Card_HookOff" xml:space="preserve">
<value>Hooking tắt</value>
</data>
@@ -1228,6 +1315,30 @@
<data name="Trend_Metric_Label" xml:space="preserve">
<value>Chỉ số</value>
</data>
<data name="Trend_Extras_Label" xml:space="preserve">
<value>Vẽ thêm</value>
</data>
<data name="Trend_Extras_Note" xml:space="preserve">
<value>Tối đa hai đơn vị cùng lúc: đơn vị thứ hai được vẽ theo trục bên phải (đánh dấu ▸ trong chú thích).</value>
</data>
<data name="Trend_Unit_Fps" xml:space="preserve">
<value>FPS</value>
</data>
<data name="Trend_Unit_Celsius" xml:space="preserve">
<value>°C</value>
</data>
<data name="Trend_Unit_Percent" xml:space="preserve">
<value>%</value>
</data>
<data name="Trend_Unit_Watts" xml:space="preserve">
<value>W</value>
</data>
<data name="Trend_Unit_Megabytes" xml:space="preserve">
<value>MB</value>
</data>
<data name="Trend_Unit_Factor" xml:space="preserve">
<value>× (frame generation)</value>
</data>
<data name="Trend_Metric_MaxGpuTemp" xml:space="preserve">
<value>GPU tối đa °C</value>
</data>
@@ -1357,9 +1468,6 @@
<data name="Settings_Channel_Stable" xml:space="preserve">
<value>Ổn định</value>
</data>
<data name="Settings_HookedGames_Empty" xml:space="preserve">
<value>Chưa có game nào bật hooking.</value>
</data>
<data name="Settings_HookedGames_Label" xml:space="preserve">
<value>Game đang bật hooking</value>
</data>
@@ -1420,6 +1528,18 @@
<data name="Settings_Policy_Header" xml:space="preserve">
<value>Ghi phiên</value>
</data>
<data name="Settings_Data_Header" xml:space="preserve">
<value>Dữ liệu</value>
</data>
<data name="Settings_DeleteSessions_Label" xml:space="preserve">
<value>Xoá mọi phiên</value>
</data>
<data name="Settings_DeleteSessions_Body" xml:space="preserve">
<value>Mọi phiên của mọi game, kèm dữ liệu frame, cảm biến và ghi chú. Thư viện, cài đặt và consent hooking của từng game vẫn giữ nguyên. Không thể hoàn tác.</value>
</data>
<data name="Settings_DeleteSessions_Button" xml:space="preserve">
<value>Xoá mọi phiên…</value>
</data>
<data name="Settings_Privacy_Header" xml:space="preserve">
<value>Quyền riêng tư</value>
</data>
@@ -1754,7 +1874,7 @@
<value>Dọn dẹp…</value>
</data>
<data name="Maintenance_Sweep_Unlimited" xml:space="preserve">
<value>Lưu giữ đang là không giới hạn (Cài đặt ▸ Ghi), nên không có gì để dọn.</value>
<value>Lưu giữ đang là không giới hạn (Cài đặt ▸ Ghi phiên), nên không có gì để dọn.</value>
</data>
<data name="Maintenance_Sweep_NoAgent" xml:space="preserve">
<value>Agent chưa kết nối. Dữ liệu thô do Agent xoá; hãy khởi động Agent rồi thử lại.</value>
@@ -2007,6 +2127,9 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<data name="GameDetail_AntiCheat_Format" xml:space="preserve">
<value>Đã phát hiện: {0}. Hooking đã tắt cho game này và không thể bật; các phiên của nó chỉ ghi thời gian chơi và cảm biến.</value>
</data>
<data name="GameDetail_AntiCheat_Exceptionable_Format" xml:space="preserve">
<value>Đã phát hiện: {0}. Hooking đã tắt cho game này trừ khi bạn tạo ngoại lệ user-mode cho nó (bên dưới); nếu không, các phiên của nó chỉ ghi thời gian chơi và cảm biến.</value>
</data>
<data name="Games_Card_AntiCheat" xml:space="preserve">
<value>Anti-cheat</value>
</data>
@@ -2470,10 +2593,10 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<value>W</value>
</data>
<data name="Settings_Exceptions_Label" xml:space="preserve">
<value>Cho phép hooking ở game có anti-cheat user-mode đã từng đo thành công</value>
<value>Cho phép hooking ở game chỉ có anti-cheat chạy ở user mode</value>
</data>
<data name="Settings_Exceptions_Body" xml:space="preserve">
<value>Mặc định tắt. Khi bật, game có anti-cheat duy nhất chạy ở user mode — không có kernel driver, không phát hiện gì khác — và đã được đo ở chế độ hook ít nhất hai lần có thể được cấp ngoại lệ bên dưới, từng game một, sau một bản công bố rủi ro. Bộ bảo vệ vẫn chạy mọi bước kiểm tra, và vẫn có thể bị khoá tài khoản.</value>
<value>Mặc định tắt. Khi bật, game có anti-cheat duy nhất chạy ở user mode — không có kernel driver, không phát hiện gì khác — có thể được cấp ngoại lệ bên dưới, từng game một, sau một bản công bố rủi ro. Hai phiên hook đầu tiên là phiên thử: một phiên không ổn sẽ kết thúc ngoại lệ vĩnh viễn. Bộ bảo vệ vẫn chạy mọi bước kiểm tra, và vẫn có thể bị khoá tài khoản.</value>
</data>
<data name="Settings_Exceptions_Header" xml:space="preserve">
<value>Ngoại lệ user-mode</value>
@@ -2493,21 +2616,18 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<data name="Exception_Finding_Format" xml:space="preserve">
<value>{0} — {1}</value>
</data>
<data name="Exception_Sessions_Format" xml:space="preserve">
<value>{0} phiên hook thành công</value>
</data>
<data name="Exception_State_Granted_Format" xml:space="preserve">
<value>Ngoại lệ có hiệu lực từ {0}</value>
</data>
<data name="Exception_State_GrantedTrial_Format" xml:space="preserve">
<value>Ngoại lệ có hiệu lực từ {0} — đang thử: đã có {1}/{2} phiên tốt</value>
</data>
<data name="Exception_State_Eligible" xml:space="preserve">
<value>Đủ điều kiện — chưa tạo ngoại lệ</value>
</data>
<data name="Exception_State_Checking" xml:space="preserve">
<value>Đang kiểm tra…</value>
</data>
<data name="Exception_State_TooFew_Format" xml:space="preserve">
<value>Chưa đủ điều kiện: {0} phiên hook thành công, cần hai</value>
</data>
<data name="Exception_State_Refused_Format" xml:space="preserve">
<value>Không đủ điều kiện: bộ bảo vệ còn phát hiện {0} ({1})</value>
</data>
@@ -2520,6 +2640,12 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<data name="Exception_State_CouldNotVerify" xml:space="preserve">
<value>Hiện chưa đủ điều kiện: lần kiểm tra không hoàn tất; nó sẽ tự chạy lại</value>
</data>
<data name="Exception_State_TrialFailed_Format" xml:space="preserve">
<value>Không đủ điều kiện: một ngoại lệ của game này đã kết thúc trong thời gian thử vào {0}, nên không thể tạo lại</value>
</data>
<data name="Exception_State_NotFound_Format" xml:space="preserve">
<value>Hiện không đủ điều kiện: lúc kiểm tra không thấy {0} trong thư mục game; lệnh chặn vẫn giữ nguyên</value>
</data>
<data name="Exception_Lapsed_Format" xml:space="preserve">
<value>Ngoại lệ gần nhất đã kết thúc ngày {0}: {1}</value>
</data>
@@ -2544,6 +2670,9 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<data name="Exception_Lapse_SessionCrashed" xml:space="preserve">
<value>một phiên dưới ngoại lệ bị crash</value>
</data>
<data name="Exception_Lapse_TrialFailed" xml:space="preserve">
<value>một phiên trong thời gian thử không ổn (không ghi được frame nào, hoặc không kết thúc bình thường)</value>
</data>
<data name="Exception_Result_Granted_Format" xml:space="preserve">
<value>Đã tạo ngoại lệ cho {0}. Khi muốn đo, hãy bật hooking cho game trên trang của nó.</value>
</data>
@@ -6,8 +6,8 @@ using SafetyStrings = FrameLedger.Shared.Strings;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// D33's disclosure content (<c>19_SAFETY</c> §The user-mode exception): why the exception is offered, the risk at the same
/// grain as FR-2.1's dialog, what is still refused, how it ends, and that it turns nothing on. <see cref="Accepted"/> — the
/// D33's disclosure content (<c>19_SAFETY</c> §The user-mode exception): why the exception is offered, its trial (D38), the
/// risk at the same grain as FR-2.1's dialog, what is still refused, how it ends, and that it turns nothing on. <see cref="Accepted"/> — the
/// user ticking "I accept the risk of a ban for this game" — is the one thing that enables the dialog's primary button.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime; a cached CompositeFormat would pin the first culture")]
@@ -22,7 +22,7 @@ public sealed partial class AntiCheatExceptionDialogViewModel : ObservableObject
Facts = facts;
Title = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Title_Format, facts.GameName);
Intro = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Intro_Format, facts.Family, facts.Signal);
Why = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Why_Format, facts.Family, facts.Sessions);
Why = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Why_Format, facts.Family);
Risk = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Risk_Format, facts.Family);
Still = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Still_Format, facts.Family);
}
@@ -39,6 +39,9 @@ public sealed partial class AntiCheatExceptionDialogViewModel : ObservableObject
public string Still { get; }
/// <summary>D38: the grant's first two sessions are a trial, and one that does not go well ends it for good.</summary>
public static string Trial => SafetyStrings.Safety_Exception_Trial;
public static string Ends => SafetyStrings.Safety_Exception_Ends;
public static string Next => SafetyStrings.Safety_Exception_Next;
@@ -5,8 +5,9 @@ using FrameLedger.App.Services;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One row of Settings ▸ Capture's user-mode exception list (D33): the game, what was found, the evidence, the state — and
/// the one action the state allows, making the exception (through its disclosure) or withdrawing it.
/// One row of Settings ▸ Capture's user-mode exception list (D33): the game, what was found, the state — which carries a
/// grant's trial since D38, so no separate count line repeats it — and the one action the state allows, making the
/// exception (through its disclosure) or withdrawing it.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed partial class ExceptionGameViewModel
@@ -23,7 +24,6 @@ public sealed partial class ExceptionGameViewModel
_grant = grant ?? throw new ArgumentNullException(nameof(grant));
_withdraw = withdraw ?? throw new ArgumentNullException(nameof(withdraw));
FindingText = string.Format(CultureInfo.CurrentCulture, Strings.Exception_Finding_Format, view.Family ?? Strings.Common_NotAvailable, view.Signal ?? Strings.Common_NotAvailable);
SessionsText = string.Format(CultureInfo.CurrentCulture, Strings.Exception_Sessions_Format, view.Sessions);
}
public long GameId { get; }
@@ -34,8 +34,6 @@ public sealed partial class ExceptionGameViewModel
public string FindingText { get; }
public string SessionsText { get; }
public string StateText => View.Text;
public string? LapseText => View.LapseText;
@@ -5,17 +5,21 @@ using FrameLedger.App.Services;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One library card (<c>08_UI</c> §Games): name, platform and engine badges, playtime, last played, hooking state — or, since
/// 2026-09-23, "Not recorded" in its place for an entry whose recording is off, and since 2026-09-25 "Anti-cheat" for one
/// the guard found anti-cheat in. The sparkline is PR-6's.
/// One library entry (<c>08_UI</c> §Games), as a card in the grid or a row in the list: name, platform and engine badges,
/// playtime, last played, hooking state — or, since 2026-09-23, "Not recorded" in its place for an entry whose recording is
/// off, and since 2026-09-25 "Anti-cheat" for one the guard found anti-cheat in; since beta.11 "Not installed" beside it
/// when its executable is not on disk (<see cref="GameLibrary.ExecutableExists"/>, read when the library is listed, never
/// stored), with the game page's own words for why (<see cref="Formats.ExecutableMissingText"/>).
/// </summary>
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed class GameCardViewModel
{
public GameCardViewModel(GameCard card)
public GameCardViewModel(GameCard card, bool installed = true)
{
ArgumentNullException.ThrowIfNull(card);
Card = card;
NotInstalled = !installed;
NotInstalledToolTip = installed ? null : Formats.ExecutableMissingText(card.Row.Fingerprint.ExePath);
Id = card.Row.Id;
Name = card.Row.Name;
PlatformText = Formats.Platform(card.Row.Platform);
@@ -36,7 +40,9 @@ public sealed class GameCardViewModel
TotalSeconds = card.Summary?.TotalSeconds ?? 0;
LastPlayedAt = card.Summary?.LastPlayedAt;
SessionsText = string.Format(CultureInfo.CurrentCulture, Strings.Games_Card_Sessions_Format, SessionCount);
PlaytimeText = string.Format(CultureInfo.CurrentCulture, Strings.Games_Card_Playtime_Format, Formats.Playtime(TotalSeconds));
PlaytimeValue = Formats.Playtime(TotalSeconds);
PlaytimeText = string.Format(CultureInfo.CurrentCulture, Strings.Games_Card_Playtime_Format, PlaytimeValue);
LastPlayedValue = LastPlayedAt is DateTimeOffset when ? Formats.Date(when) : Strings.Games_Card_NeverPlayed;
LastPlayedText = LastPlayedAt is DateTimeOffset at
? string.Format(CultureInfo.CurrentCulture, Strings.Games_Card_LastPlayed_Format, Formats.Date(at))
: Strings.Games_Card_NeverPlayed;
@@ -83,4 +89,19 @@ public sealed class GameCardViewModel
public string PlaytimeText { get; }
public string LastPlayedText { get; }
/// <summary>The list view's playtime cell: the duration alone.</summary>
public string PlaytimeValue { get; }
/// <summary>The list view's last-played cell: the date alone, or "not played yet".</summary>
public string LastPlayedValue { get; }
/// <summary>beta.11: the "Not installed" pill shows — the file, or the drive it was on, is not there now.</summary>
public bool NotInstalled { get; }
/// <summary>What the pill means here — the drive that is not connected, or the path the file is gone from; null when installed.</summary>
public string? NotInstalledToolTip { get; }
/// <summary>The list view's status cell: what the hook pill says, and "Not installed" after it when that is so.</summary>
public string StatusText => NotInstalled ? HookText + " · " + Strings.Games_Card_NotInstalled : HookText;
}
@@ -43,6 +43,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
private readonly SessionSelection _selection;
private readonly RegisteredSettings? _settings;
private readonly AntiCheatExceptions? _exceptions;
private readonly SessionDeletion? _deletion;
private readonly long? _gameId;
// ui.hide_anticheat_hooking (2026-09-25), read at each load; on until the settings say otherwise, as its default is.
@@ -196,14 +197,19 @@ public sealed partial class GameDetailViewModel : ObservableObject
[ObservableProperty]
private bool _trendEmpty = true;
/// <summary>beta.11 (D39): whether the Sessions tab's overview has anything to draw.</summary>
[ObservableProperty]
private bool _overviewVisible;
[ObservableProperty]
private string _trendExcludedText = string.Empty;
public GameDetailViewModel(GameLibrary library, GameSelection selection, HookingConsent consent, IPageNavigator navigator,
IConfirmations confirmations, IEditGamePrompt edit, IMessageStrip strip, ISessionSummaryOpener summaries,
SessionSeriesLoader loader, IHardwareSnapshotRepository hardware, SessionSelection sessionSelection, IGamePicker picker,
RegisteredSettings? settings = null, IAgentLink? agent = null, AntiCheatExceptions? exceptions = null)
RegisteredSettings? settings = null, IAgentLink? agent = null, AntiCheatExceptions? exceptions = null, SessionDeletion? deletion = null)
{
_deletion = deletion;
_exceptions = exceptions;
_settings = settings;
_agent = agent;
@@ -345,6 +351,28 @@ public sealed partial class GameDetailViewModel : ObservableObject
public IReadOnlyList<TrendPoint> TrendPoints { get; private set; } = [];
/// <summary>
/// beta.11 (D39): what the Trend draws — the selected metric, then every metric ticked beside it. One line alone keeps
/// its own name on the axis, as before; several are labelled by unit, a second unit on the right.
/// </summary>
public IReadOnlyList<TrendLine> TrendLines { get; private set; } = [];
/// <summary>beta.11 (D39): the metrics that can be drawn beside the selected one, ticked by the user.</summary>
public ObservableCollection<TrendMetricOptionViewModel> TrendExtras { get; } = [];
/// <summary>beta.11 (D39): the Sessions tab's overview — every hooked session's rate and lows (<see cref="TrendSeriesBuilder.Overview"/>).</summary>
public IReadOnlyList<TrendLine> OverviewLines { get; private set; } = [];
public static string TrendExtrasLabel => Strings.Trend_Extras_Label;
public static string TrendExtrasNote => Strings.Trend_Extras_Note;
public static string OverviewHeader => Strings.GameDetail_Overview_Header;
public static string OverviewNote => Strings.GameDetail_Overview_Note;
public static string DeleteAllSessionsText => Strings.GameDetail_DeleteSessions;
public IReadOnlyList<HardwareChange> HardwareChanges { get; private set; } = [];
public string TrendMetricText => TrendMetrics.First(c => c.Value == TrendMetric).Label;
@@ -526,12 +554,92 @@ public sealed partial class GameDetailViewModel : ObservableObject
TrendPoints = TrendSeriesBuilder.Points(_detail.Sessions, TrendMetric, IncludeMidSession);
int excluded = IncludeMidSession ? 0 : TrendSeriesBuilder.ExcludedCount(_detail.Sessions, TrendMetric);
TrendExcludedText = excluded > 0 ? string.Format(CultureInfo.CurrentCulture, Strings.Trend_Excluded_Format, excluded) : string.Empty;
TrendEmpty = TrendPoints.Count == 0;
TrendLines = BuildTrendLines();
TrendEmpty = TrendLines.All(static l => l.Points.Count == 0);
TrendEmptyMessage = string.Format(CultureInfo.CurrentCulture, Strings.Trend_Empty_Format, TrendMetricText);
OverviewLines = TrendSeriesBuilder.Overview(_detail.Sessions);
OverviewVisible = OverviewLines.Count > 0;
OnPropertyChanged(nameof(TrendMetricText));
TrendPresented?.Invoke(this, EventArgs.Empty);
}
/// <summary>
/// beta.11 (D39): the selected metric's line, then each ticked metric's — and the options' state: the selected metric
/// is not offered beside itself, and once two units are on the chart a metric in a third cannot be ticked. A metric
/// ticked in a third unit — the selected one changed to a unit neither ticked unit shares — is unticked: the chart
/// draws two units, and a box left ticked would name a line that is not there.
/// </summary>
private List<TrendLine> BuildTrendLines()
{
if (TrendExtras.Count == 0)
{
foreach (Choice<TrendMetric> choice in TrendMetrics)
{
var option = new TrendMetricOptionViewModel(choice.Value, choice.Label, TrendSeriesBuilder.UnitOf(choice.Value));
option.PropertyChanged += OnTrendExtraChanged;
TrendExtras.Add(option);
}
}
_rebuildingExtras = true;
try
{
string primaryUnit = TrendSeriesBuilder.UnitOf(TrendMetric);
string? secondUnit = null;
foreach (TrendMetricOptionViewModel option in TrendExtras.Where(o => o.IsSelected))
{
if (option.Metric == TrendMetric)
{
option.IsSelected = false;
}
else if (!string.Equals(option.Unit, primaryUnit, StringComparison.Ordinal))
{
secondUnit ??= option.Unit;
option.IsSelected = string.Equals(option.Unit, secondUnit, StringComparison.Ordinal);
}
}
TrendMetricOptionViewModel[] ticked = [.. TrendExtras.Where(static o => o.IsSelected)];
HashSet<string> units = [primaryUnit, .. ticked.Select(static o => o.Unit)];
foreach (TrendMetricOptionViewModel option in TrendExtras)
{
option.IsEnabled = option.Metric != TrendMetric && (option.IsSelected || units.Count < 2 || units.Contains(option.Unit));
}
if (ticked.Length == 0)
{
return [new TrendLine(TrendMetricText, TrendMetricText, TrendPoints)];
}
List<TrendLine> lines = [new TrendLine(TrendMetricText, primaryUnit, TrendPoints)];
lines.AddRange(ticked.Select(o => new TrendLine(o.Label, o.Unit, TrendSeriesBuilder.Points(_detail!.Sessions, o.Metric, IncludeMidSession))));
return lines;
}
finally
{
_rebuildingExtras = false;
}
}
private bool _rebuildingExtras;
private void OnTrendExtraChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (!_rebuildingExtras && string.Equals(e.PropertyName, nameof(TrendMetricOptionViewModel.IsSelected), StringComparison.Ordinal))
{
RebuildTrendPoints();
}
}
/// <summary>beta.11 (D39): a click on the Sessions tab's overview selects that session in the grid.</summary>
public void SelectSession(long sessionId)
{
if (Sessions.FirstOrDefault(s => s.Row.Id == sessionId) is { } session)
{
SelectedSession = session;
}
}
[RelayCommand]
private void Back() => _navigator.Navigate<GamesPage>();
@@ -567,6 +675,10 @@ public sealed partial class GameDetailViewModel : ObservableObject
[RelayCommand]
private Task RemoveAsync() => RunAsync(RemoveCoreAsync);
/// <summary>beta.11 (D40): every session of this game, after the confirmation; the game, its settings and its consent stay.</summary>
[RelayCommand]
private Task DeleteAllSessionsAsync() => RunAsync(DeleteAllSessionsCoreAsync);
[RelayCommand]
private Task ChangeExecutableAsync() => RunAsync(ChangeExecutableCoreAsync);
@@ -694,6 +806,27 @@ public sealed partial class GameDetailViewModel : ObservableObject
await LoadAsync().ConfigureAwait(true);
}
private async Task DeleteAllSessionsCoreAsync()
{
if (Game is null || Sessions.Count == 0 || !await _confirmations.DeleteSessionsAsync(Game.Name, Sessions.Count).ConfigureAwait(true))
{
return;
}
SessionDeletionResult result = _deletion is null
? new(SessionDeletionOutcome.AgentUnavailable)
: await _deletion.DeleteAsync(Game.Id).ConfigureAwait(true);
if (!result.Succeeded)
{
_strip.Warn(Game.Name, result.Message);
return;
}
// SessionDeletion has let go of File ▸ Export's selection and the summary windows of what is gone (ids are reused).
_strip.Success(Game.Name, result.Message);
await LoadAsync().ConfigureAwait(true);
}
private async Task RemoveCoreAsync()
{
if (Game is null)
@@ -731,8 +864,8 @@ public sealed partial class GameDetailViewModel : ObservableObject
{
AntiCheatExceptionResult result = _exceptions is null
? AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable)
: await _exceptions.GrantAsync(Game.Id, new AntiCheatExceptionFacts(Game.Name, view.Family ?? string.Empty, view.Signal ?? string.Empty,
view.Sessions)).ConfigureAwait(true);
: await _exceptions.GrantAsync(Game.Id, new AntiCheatExceptionFacts(Game.Name, view.Family ?? string.Empty, view.Signal ?? string.Empty))
.ConfigureAwait(true);
Notice(result, Game.Name);
}
finally
@@ -957,8 +1090,12 @@ public sealed partial class GameDetailViewModel : ObservableObject
// by default it gives way to the finding alone. The setting off keeps the card, with the finding under it.
HookingSectionVisible = !(blocked && _hideAntiCheatHooking) || exceptionInForce;
PresentException(exception, exceptionInForce);
// 2026-10-03: "cannot be turned on" beside a usable "Make exception…" contradicted itself; an eligible game's card
// says what would turn it on.
AntiCheatText = found is not null && !HookingSectionVisible
? string.Format(CultureInfo.CurrentCulture, Strings.GameDetail_AntiCheat_Format, found)
? string.Format(CultureInfo.CurrentCulture,
_exceptionsOn && exception is { Kind: ExceptionViewKind.Eligible } ? Strings.GameDetail_AntiCheat_Exceptionable_Format : Strings.GameDetail_AntiCheat_Format,
found)
: null;
// Its "Turn hooking back on" could only be refused once anti-cheat was found, or for an executable that cannot run
// as x64, so neither row offers it.
@@ -1,19 +1,39 @@
using System.Collections.ObjectModel;
using System.Globalization;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using FrameLedger.App.Pages;
using FrameLedger.App.Services;
using FrameLedger.Application.Settings;
using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.ViewModels;
/// <summary>The Games grid (<c>08_UI</c> §Games): every game in the library as a card, searched and sorted in memory; add by pick or drop; open by click.</summary>
/// <summary>
/// The Games library (<c>08_UI</c> §Games): every game in the library, searched and sorted in memory; add by pick or drop;
/// open by click. Since beta.11 (owner requests 2026-10-03): shown as a grid of cards that fills the width or as a list
/// (<c>ui.library_view</c>), with the count in the header; <b>Refresh</b> reloads the library, looks in the stores for games
/// installed since and offers only those, and marks entries whose executable is gone ("Not installed"); and the page
/// reloads by itself when a session ends or an import adds games while it is on screen.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed partial class GamesViewModel : ObservableObject
{
private const string _listValue = "list";
private const string _gridValue = "grid";
private readonly GameLibrary _library;
private readonly GameSelection _selection;
private readonly IPageNavigator _navigator;
private readonly AddGameFlow _addGame;
private readonly ImportLibraryFlow? _import;
private readonly RegisteredSettings? _settings;
private readonly IAgentLink? _agent;
private readonly LibraryChanges? _changes;
private readonly UiThread _ui = new();
private IReadOnlyList<GameCardViewModel> _all = [];
private bool _viewRead;
private bool _attached;
[ObservableProperty]
private string _search = string.Empty;
@@ -27,17 +47,27 @@ public sealed partial class GamesViewModel : ObservableObject
[ObservableProperty]
private bool _noMatch;
public GamesViewModel(GameLibrary library, GameSelection selection, IPageNavigator navigator, AddGameFlow addGame)
[ObservableProperty]
private string _headerText = Strings.Games_Header;
/// <summary>The list instead of the grid (<c>ui.library_view</c>); remembered when the user changes it.</summary>
[ObservableProperty]
private bool _listView;
public GamesViewModel(GameLibrary library, GameSelection selection, IPageNavigator navigator, AddGameFlow addGame, ImportLibraryFlow? import = null,
RegisteredSettings? settings = null, IAgentLink? agent = null, LibraryChanges? changes = null)
{
_library = library ?? throw new ArgumentNullException(nameof(library));
_selection = selection ?? throw new ArgumentNullException(nameof(selection));
_navigator = navigator ?? throw new ArgumentNullException(nameof(navigator));
_addGame = addGame ?? throw new ArgumentNullException(nameof(addGame));
_import = import;
_settings = settings;
_agent = agent;
_changes = changes;
Pending = LoadAsync();
}
public static string Header => Strings.Games_Header;
public static string EmptyText => Strings.Games_Empty;
public static string NoMatchText => Strings.Games_NoMatch;
@@ -48,6 +78,14 @@ public sealed partial class GamesViewModel : ObservableObject
public static string SortLabel => Strings.Games_Sort_Label;
public static string RefreshText => Strings.Games_Refresh;
public static string RefreshToolTip => Strings.Games_Refresh_ToolTip;
public static string GridText => Strings.Games_View_Grid;
public static string ListText => Strings.Games_View_List;
public static IReadOnlyList<Choice<GamesSort>> Sorts { get; } =
[
new(GamesSort.Name, Strings.Games_Sort_Name),
@@ -62,11 +100,85 @@ public sealed partial class GamesViewModel : ObservableObject
public async Task LoadAsync(CancellationToken ct = default)
{
await ReadViewAsync(ct).ConfigureAwait(true);
IReadOnlyList<GameCard> cards = await _library.ListCardsAsync(ct).ConfigureAwait(true);
_all = [.. cards.Select(static c => new GameCardViewModel(c))];
// Whether each executable is on disk is a file-system question per entry — a drive that is gone can take a moment
// to say so — so it is asked off the UI thread, the game page's own way (GameLibrary.ExecutableExists).
bool[] installed = await Task.Run(() => cards.Select(static c => GameLibrary.ExecutableExists(c.Row.Fingerprint.ExePath)).ToArray(), ct)
.ConfigureAwait(true);
_all = [.. cards.Select((c, i) => new GameCardViewModel(c, installed[i]))];
HeaderText = string.Format(CultureInfo.CurrentCulture, Strings.Games_Header_Count_Format, _all.Count);
Apply();
}
/// <summary>
/// Listens while the page is on screen: a session that ends changes a card's count, playtime and last played, and an
/// import made from the menu adds cards. The page calls it on Loaded and <see cref="Detach"/> on Unloaded; the link and
/// the notifier are singletons and must not hold the page.
/// </summary>
public void Attach()
{
if (_attached)
{
return;
}
if (_agent is not null)
{
_agent.EventReceived += OnAgentEvent;
}
if (_changes is not null)
{
_changes.Changed += OnLibraryChanged;
}
_attached = true;
}
public void Detach()
{
if (!_attached)
{
return;
}
if (_agent is not null)
{
_agent.EventReceived -= OnAgentEvent;
}
if (_changes is not null)
{
_changes.Changed -= OnLibraryChanged;
}
_attached = false;
}
/// <summary>
/// beta.11: the library read again, then the stores asked for games installed since — offered in the import checklist,
/// the games already in the library hidden — and read again when any was added. A game whose executable is gone is
/// marked on its card by the read; nothing is removed.
/// </summary>
[RelayCommand]
private async Task RefreshAsync()
{
Pending = LoadAsync();
await Pending.ConfigureAwait(true);
if (_import is not null && await _import.RunAsync(onlyNew: true).ConfigureAwait(true) is { Added: > 0 })
{
Pending = LoadAsync();
await Pending.ConfigureAwait(true);
}
}
[RelayCommand]
private void ShowGrid() => ListView = false;
[RelayCommand]
private void ShowList() => ListView = true;
[RelayCommand]
private async Task AddGameAsync() => _ = await _addGame.RunAsync().ConfigureAwait(true);
@@ -96,6 +208,43 @@ public sealed partial class GamesViewModel : ObservableObject
partial void OnSortChanged(GamesSort value) => Apply();
partial void OnListViewChanged(bool value)
{
if (_viewRead && _settings is not null)
{
_ = SaveViewAsync(value);
}
}
private async Task SaveViewAsync(bool list) =>
await _settings!.SetAsync(SettingsRegistry.UiLibraryView, list ? _listValue : _gridValue).ConfigureAwait(true);
/// <summary>The remembered view, read once per page before the first list — so reading it is not taken for a change.</summary>
private async Task ReadViewAsync(CancellationToken ct)
{
if (_viewRead)
{
return;
}
if (_settings is not null)
{
ListView = string.Equals(await _settings.GetAsync(SettingsRegistry.UiLibraryView, ct).ConfigureAwait(true), _listValue, StringComparison.Ordinal);
}
_viewRead = true;
}
private void OnAgentEvent(object? sender, AgentEventArgs e) => _ui.Post(() =>
{
if (string.Equals(e.Envelope.Type, IpcMessageType.SessionCompleted, StringComparison.Ordinal))
{
Pending = LoadAsync();
}
});
private void OnLibraryChanged(object? sender, EventArgs e) => _ui.Post(() => Pending = LoadAsync());
private void Apply()
{
IEnumerable<GameCardViewModel> shown = _all;
@@ -25,6 +25,12 @@ public sealed partial class ImportCandidateViewModel : ObservableObject
public bool CanImport => Candidate.CanImport;
/// <summary>
/// Already in the library — at this path, or (since 2026-09-23) the same file under another drive letter. Since beta.11
/// such a row is hidden unless the user asks to see it, and then shown dimmed with a box that cannot be ticked.
/// </summary>
public bool IsExisting => Candidate.AlreadyInLibrary || Candidate.MovedFrom is not null;
public string PlatformText => Formats.Platform(Candidate.Game.Platform);
public string Name => Candidate.Game.Name;
@@ -8,7 +8,12 @@ using FrameLedger.Application.Import;
namespace FrameLedger.App.ViewModels;
/// <summary>FR-1.2's review checklist: every candidate the stores found, ticked by default where it can be imported; the count follows the ticks.</summary>
/// <summary>
/// FR-1.2's review checklist: every candidate the stores found, ticked by default where it can be imported; the count
/// follows the ticks. Since beta.11 (owner request 2026-10-03) the games already in the library are hidden by default —
/// on a re-import they were most of the list and pushed the new ones out of sight — and <see cref="ShowExisting"/> brings
/// them back, dimmed, their boxes disabled.
/// </summary>
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime; a cached CompositeFormat would pin the first culture")]
public sealed partial class ImportReviewViewModel : ObservableObject
{
@@ -17,6 +22,9 @@ public sealed partial class ImportReviewViewModel : ObservableObject
[NotifyPropertyChangedFor(nameof(SelectedText))]
private int _selectedCount;
[ObservableProperty]
private bool _showExisting;
public ImportReviewViewModel(IReadOnlyList<ImportCandidate> candidates)
{
ArgumentNullException.ThrowIfNull(candidates);
@@ -27,11 +35,25 @@ public sealed partial class ImportReviewViewModel : ObservableObject
Rows.Add(row);
}
ExistingCount = Rows.Count(static r => r.IsExisting);
ShowExistingText = string.Format(CultureInfo.CurrentCulture, Strings.Import_ShowExisting_Format, ExistingCount);
Refilter();
Recount();
}
/// <summary>Every candidate, shown or not.</summary>
public ObservableCollection<ImportCandidateViewModel> Rows { get; } = [];
/// <summary>What the checklist shows: every row, less those already in the library unless <see cref="ShowExisting"/>.</summary>
public ObservableCollection<ImportCandidateViewModel> Shown { get; } = [];
/// <summary>Rows already in the library (at this path or another drive letter).</summary>
public int ExistingCount { get; }
public bool HasExisting => ExistingCount > 0;
public string ShowExistingText { get; }
public static string Title => Strings.Import_Title;
public static string Intro => Strings.Import_Intro;
@@ -77,4 +99,15 @@ public sealed partial class ImportReviewViewModel : ObservableObject
}
private void Recount() => SelectedCount = Rows.Count(static r => r.IsSelected && r.CanImport);
partial void OnShowExistingChanged(bool value) => Refilter();
private void Refilter()
{
Shown.Clear();
foreach (ImportCandidateViewModel r in Rows.Where(r => ShowExisting || !r.IsExisting))
{
Shown.Add(r);
}
}
}
@@ -224,6 +224,36 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable
}
}
/// <summary>
/// Help ▸ Limitations (beta.10, D36): <c>LIMITATIONS.md</c> as this build embeds it, read-only and scrollable, with the
/// repository's copy one button away. Information, not terms — nothing is recorded.
/// </summary>
[RelayCommand]
private async Task LimitationsAsync()
{
var text = new System.Windows.Controls.TextBox
{
Text = LimitationsDocument.Load(),
IsReadOnly = true,
TextWrapping = System.Windows.TextWrapping.Wrap,
VerticalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Auto,
MaxHeight = 520,
Width = 680,
};
System.Windows.Automation.AutomationProperties.SetName(text, Strings.Limitations_Title);
var box = new MessageBox
{
Title = Strings.Limitations_Title,
Content = text,
PrimaryButtonText = Strings.Limitations_OnGitHub,
CloseButtonText = Strings.Common_Close,
};
if (await box.ShowDialogAsync().ConfigureAwait(true) == MessageBoxResult.Primary && !_urls.Open(LimitationsDocument.OnGitHub))
{
_snackbar.Show(Strings.Limitations_Title, Strings.BugReport_BrowserRefused, ControlAppearance.Caution, new SymbolIcon(SymbolRegular.Warning24), TimeSpan.FromSeconds(4));
}
}
/// <summary>Help ▸ Report a bug… (P4 PR-3): <c>10_LOGGING</c> §Bug report flow steps 2–4, the same flow the Logs page's button runs.</summary>
[RelayCommand]
private async Task ReportBugAsync() => _ = await _bugReports.RunAsync().ConfigureAwait(true);
@@ -37,6 +37,9 @@ public sealed partial class SettingsViewModel : ObservableObject
private readonly IAgentLink _agent;
private readonly IRunAtLogon _runAtLogon;
private readonly IMessageStrip _strip;
private readonly IConfirmations? _confirmations;
private readonly SessionDeletion? _deletion;
private long _sessionTotal;
private readonly IMaintenanceState _maintenance;
private readonly IAgentTool _tool;
private readonly WindowClosePolicy _closePolicy;
@@ -147,8 +150,14 @@ public sealed partial class SettingsViewModel : ObservableObject
IFirstRunFlow firstRun,
AntiCheatExceptions? exceptions = null,
IAgentAdminPrompt? adminPrompt = null,
Func<bool>? agentHeld = null)
Func<bool>? agentHeld = null,
IConfirmations? confirmations = null,
SessionDeletion? deletion = null)
{
// beta.11 (D40): Settings ▸ Data's Delete all sessions — its confirmation and its request; a composition without them
// (a test) deletes nothing.
_confirmations = confirmations;
_deletion = deletion;
// The admin mode's disclosure (a composition without it — a test — cannot turn the mode on), and the probe of the
// data folder's instance lock the restart waits on (a test's own).
_adminPrompt = adminPrompt;
@@ -181,7 +190,6 @@ public sealed partial class SettingsViewModel : ObservableObject
public static string LanguageLabel => Strings.Settings_Language_Label;
public static string LanguageNote => Strings.Settings_Language_Note;
public static IReadOnlyList<Choice<AppTheme>> Themes { get; } =
[
@@ -215,6 +223,9 @@ public sealed partial class SettingsViewModel : ObservableObject
public ObservableCollection<HookedGameViewModel> HookedGames { get; } = [];
/// <summary>beta.11: the "Games with hooking on" card is shown only while it lists a game (a row with no control is not shown).</summary>
public bool HasHookedGames => HookedGames.Count > 0;
/// <summary>
/// D33: the games the user-mode exception concerns — in force, eligible, or held back only by the session count. The rest
/// of the blocked games say why not on their own pages.
@@ -513,6 +524,8 @@ public sealed partial class SettingsViewModel : ObservableObject
}
PresentExceptions(cards);
OnPropertyChanged(nameof(HasHookedGames));
_sessionTotal = cards.Sum(static c => c.Summary?.SessionCount ?? 0);
Shared.Ipc.HelloAck? hello = _agent.Hello;
ElevationText = ElevationTextOf(_agent.State, hello);
@@ -570,9 +583,11 @@ public sealed partial class SettingsViewModel : ObservableObject
}
checking |= view.Kind == ExceptionViewKind.Checking;
// With the option off only a kept grant is listed (suspended): nothing may be made while it is off.
// With the option off only a kept grant is listed (suspended): nothing may be made while it is off. On, a row is
// listed only when it has an action — make or withdraw (2026-10-03: a game that can never qualify was listed with
// none, and its page says why).
bool listed = UserModeExceptions
? view.Kind is ExceptionViewKind.Granted or ExceptionViewKind.Eligible or ExceptionViewKind.TooFewSessions
? view.Kind is ExceptionViewKind.Granted or ExceptionViewKind.Eligible
: view.Kind == ExceptionViewKind.Granted;
if (listed)
{
@@ -590,7 +605,7 @@ public sealed partial class SettingsViewModel : ObservableObject
AntiCheatExceptionResult result = _exceptions is null
? AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable)
: await _exceptions.GrantAsync(game.GameId, new AntiCheatExceptionFacts(game.Name, game.View.Family ?? string.Empty,
game.View.Signal ?? string.Empty, game.View.Sessions)).ConfigureAwait(true);
game.View.Signal ?? string.Empty)).ConfigureAwait(true);
await ReportExceptionAsync(game.Name, result).ConfigureAwait(true);
}
@@ -622,6 +637,33 @@ public sealed partial class SettingsViewModel : ObservableObject
[RelayCommand]
private Task RefreshExceptionsAsync() => RefreshAsync();
/// <summary>
/// beta.11 (D40): every session of every game, after the confirmation, through the Agent; the library, the settings and
/// every consent stay.
/// </summary>
[RelayCommand]
private async Task DeleteAllSessionsAsync()
{
if (_confirmations is null || !await _confirmations.DeleteSessionsAsync(null, _sessionTotal).ConfigureAwait(true))
{
return;
}
SessionDeletionResult result = _deletion is null
? new(SessionDeletionOutcome.AgentUnavailable)
: await _deletion.DeleteAsync(null).ConfigureAwait(true);
if (result.Succeeded)
{
_strip.Success(Strings.Settings_DeleteSessions_Label, result.Message);
}
else
{
_strip.Warn(Strings.Settings_DeleteSessions_Label, result.Message);
}
await RefreshCoreAsync().ConfigureAwait(true);
}
private async Task RevokeAsync(HookedGameViewModel game)
{
HookingConsentResult result = await _consent.DisableAsync(game.GameId).ConfigureAwait(true);
@@ -0,0 +1,31 @@
using CommunityToolkit.Mvvm.ComponentModel;
using FrameLedger.App.Charts;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One metric the Trend can draw beside the selected one (beta.11, owner decision D39: several metrics at once). Disabled
/// when it is the selected metric itself, or when two units are already on the chart and it is in neither.
/// </summary>
public sealed partial class TrendMetricOptionViewModel : ObservableObject
{
[ObservableProperty]
private bool _isSelected;
[ObservableProperty]
private bool _isEnabled = true;
public TrendMetricOptionViewModel(TrendMetric metric, string label, string unit)
{
Metric = metric;
Label = label ?? throw new ArgumentNullException(nameof(label));
Unit = unit ?? throw new ArgumentNullException(nameof(unit));
}
public TrendMetric Metric { get; }
public string Label { get; }
/// <summary>The axis it is drawn against (<see cref="TrendSeriesBuilder.UnitOf"/>).</summary>
public string Unit { get; }
}
@@ -169,18 +169,23 @@ public sealed class AntiCheatPreScanSweep : IDisposable
/// <summary>
/// D33: the exception question about one BLOCKED entry. A grant made on bytes that are no longer on disk ends whether
/// or not the option is on; the rest runs only while it is — a tolerant pre-scan naming the block's family when the
/// rules, the executable or the block changed since the last one, and the session count every pass — and ends a grant
/// the facts no longer support. A scan that could not answer ends nothing: the session start runs the full check anyway.
/// rules, the executable or the block changed since the last one, and (D38) the trial's progress under the grant in
/// force every pass — and ends a grant the facts no longer support. A scan that could not answer ends nothing: the
/// session start runs the full check anyway.
/// </summary>
private async ValueTask<AntiCheatPreScanReport> ExceptionPassAsync(GameRow game, string rulesVersion, AntiCheatPreScanReport report,
CancellationToken ct)
{
if (_sessions is null || game.HookBlockedReason is not { Length: > 0 } block || _isRecording(game.Id)
|| _identity.Read(game.Fingerprint.ExePath) is not { } onDisk)
if (_sessions is null || game.HookBlockedReason is not { Length: > 0 } block || _isRecording(game.Id))
{
return report;
}
if (_identity.Read(game.Fingerprint.ExePath) is not { } onDisk)
{
return await UnreadableAsync(game, block, rulesVersion, report, ct).ConfigureAwait(false);
}
AntiCheatExceptionState state = game.AcException;
bool granted = state.IsGranted;
if (granted && !state.GrantCovers(onDisk))
@@ -195,7 +200,10 @@ public sealed class AntiCheatPreScanSweep : IDisposable
}
StoredBlock? parsed = StoredBlock.Parse(block);
int sessions = await _sessions.CountSuccessfulHookedAsync(game.Id, ct).ConfigureAwait(false);
// D38: the trial's progress under the grant in force — what the App shows; eligibility no longer counts sessions.
int sessions = granted && state.Family is { Length: > 0 } family && state.GrantedAt is { } grantedAt
? await _sessions.CountSuccessfulUnderGrantAsync(game.Id, family, grantedAt, ct).ConfigureAwait(false)
: 0;
bool fresh = state.IsCheckedFor(onDisk, rulesVersion, block);
AntiCheatVerdict? verdict = parsed is not { IsExceptionable: true } b
? null
@@ -203,7 +211,7 @@ public sealed class AntiCheatPreScanSweep : IDisposable
? stored
: await _guard.PreScanGameAsync(onDisk.ExePath, b.Family, ct).ConfigureAwait(false);
bool eligible = verdict is { } v && UserModeExceptionRules.IsEligible(parsed, v, sessions);
bool eligible = verdict is { } v && UserModeExceptionRules.IsEligible(parsed, v, state.TrialFailed);
if (!fresh || eligible != state.Eligible || sessions != state.Sessions)
{
if (await _consent.RecordExceptionEligibilityAsync(onDisk, block, verdict, sessions, rulesVersion, ct).ConfigureAwait(false)
@@ -211,7 +219,9 @@ public sealed class AntiCheatPreScanSweep : IDisposable
{
report = report with { ExceptionsChecked = report.ExceptionsChecked + 1 };
_log($"prescan: {game.Name} — user-mode exception {(eligible ? "eligible" : "not eligible")} "
+ $"({(verdict is { } said ? Said(said) : "not a module, file or folder finding")}; {sessions} successful hooked sessions)");
+ $"({(verdict is { } said ? Said(said) : "not a module, file or folder finding")}"
+ (state.TrialFailed ? "; an earlier exception failed its trial" : string.Empty)
+ (granted ? $"; trial {sessions} of {UserModeExceptionRules.TrialSessions}" : string.Empty) + ")");
}
}
@@ -221,9 +231,40 @@ public sealed class AntiCheatPreScanSweep : IDisposable
: report;
}
/// <summary>
/// 2026-10-03: a blocked entry whose executable cannot be read is ANSWERED while the option is on — "the check could not
/// run" (<c>PreScanFailed</c>, no family), keyed on no bytes so the first readable pass scans again — rather than left
/// "checking" for ever, which is what returning early did. A grant is left alone: the session start runs the full check.
/// </summary>
private async ValueTask<AntiCheatPreScanReport> UnreadableAsync(GameRow game, string block, string rulesVersion, AntiCheatPreScanReport report,
CancellationToken ct)
{
AntiCheatExceptionState state = game.AcException;
if (_exceptions is null || state.IsGranted || !await _exceptions.IsOnAsync(ct).ConfigureAwait(false))
{
return report;
}
if (string.Equals(state.CheckedBlock, block, StringComparison.Ordinal)
&& StoredBlock.Parse(state.Verdict) is { Reason: AntiCheatRefusalReason.PreScanFailed, Family.Length: 0 })
{
return report; // already said, and nothing has changed that a pass could see
}
var nothingRead = new ExecutableFingerprint { ExePath = game.Fingerprint.ExePath, SizeBytes = 0, MtimeUnixMs = 0 };
AntiCheatVerdict couldNotRun = AntiCheatVerdict.Refused(AntiCheatRefusalReason.PreScanFailed, string.Empty, Path.GetFileName(game.Fingerprint.ExePath));
if (await _consent.RecordExceptionEligibilityAsync(nothingRead, block, couldNotRun, 0, rulesVersion, ct).ConfigureAwait(false) == ConsentWriteOutcome.Written)
{
_log($"prescan: {game.Name} — user-mode exception not checked: the executable could not be read");
report = report with { ExceptionsChecked = report.ExceptionsChecked + 1 };
}
return report;
}
private async ValueTask<AntiCheatPreScanReport> EndAsync(GameRow game, string lapse, string why, AntiCheatPreScanReport report, CancellationToken ct)
{
if (await _consent.RevokeAntiCheatExceptionAsync(game.Fingerprint.ExePath, lapse, ct).ConfigureAwait(false) != ConsentWriteOutcome.Written)
if (await _consent.RevokeAntiCheatExceptionAsync(game.Fingerprint.ExePath, lapse, ct: ct).ConfigureAwait(false) != ConsentWriteOutcome.Written)
{
return report;
}
@@ -12,7 +12,7 @@ public static class UserModeExceptionLapse
/// <summary>The executable is not the one the grant was made on: a game update, or <i>Change executable</i>.</summary>
public const string ExecutableChanged = "ExecutableChanged";
/// <summary>The guard no longer lets the game through under it: a new finding, a <c>.sys</c>, the family turned kernel-level, too few sessions.</summary>
/// <summary>The guard no longer lets the game through under it: a new finding, a <c>.sys</c>, the family turned kernel-level.</summary>
public const string NoLongerEligible = "NoLongerEligible";
/// <summary>A finding about the game at a session's start, at the 30 s re-scan or when hooking was turned on.</summary>
@@ -26,4 +26,11 @@ public static class UserModeExceptionLapse
/// <summary>A session under it ended in a crash.</summary>
public const string SessionCrashed = "SessionCrashed";
/// <summary>
/// D38: a session in its trial did not succeed — hooked and stored, but it recorded no frame or did not end normally —
/// and nothing more specific said why. Any end during the trial, this one or another, also marks the game so that no
/// exception can be made for it again (<c>games.ac_exception_trial_failed_at</c>).
/// </summary>
public const string TrialFailed = "TrialFailed";
}
@@ -4,10 +4,10 @@ using FrameLedger.Domain.Consent;
namespace FrameLedger.Application.AntiCheat;
/// <summary>
/// D33 (owner decision 2026-09-26): the managed rules of the user-mode exception — what a grant needs before the guard is
/// even asked to tolerate a family, and the words its end is recorded in. The guard's own rules (which family is user-mode,
/// what is never excepted, scanning past what it lets through) are native and are not repeated here
/// (<c>19_SAFETY</c> §The user-mode exception).
/// D33 (owner decision 2026-09-26) as amended by D38 (2026-10-03): the managed rules of the user-mode exception — what a
/// grant needs before the guard is even asked to tolerate a family, and how long its trial lasts. The guard's own rules
/// (which family is user-mode, what is never excepted, scanning past what it lets through) are native and are not repeated
/// here (<c>19_SAFETY</c> §The user-mode exception).
/// </summary>
/// <remarks>
/// <para>
@@ -16,16 +16,27 @@ namespace FrameLedger.Application.AntiCheat;
/// user-mode, and it refuses on anything else it finds. There is no path from this class to an injection that the
/// guard did not pass.
/// </para>
/// <para>
/// <b>D38: the evidence comes after the grant, not before it.</b> D33 asked for two successful Tier-1 sessions before a
/// grant; since beta.8's library sweep blocks a game the moment it is added, a blocked game could never be hooked to earn
/// them, and a reset ledger lost them — the exception was unreachable for every game blocked from the start. A grant now
/// needs no session; its first <see cref="TrialSessions"/> hooked sessions are a trial, and one of them ending badly ends
/// the exception for good (<c>games.ac_exception_trial_failed_at</c>, which nothing clears).
/// </para>
/// </remarks>
public static class UserModeExceptionRules
{
/// <summary>The owner's threshold: successful Tier-1 sessions of the game before its exception may be granted.</summary>
/// <summary>
/// The owner's trial (D38): the hooked sessions under a grant that must each succeed before the exception is past its
/// trial. Until then any session under it that does not succeed ends it and marks the game so that no exception can
/// be made for it again.
/// </summary>
/// <remarks>
/// "Successful" is <c>ISessionRepository.CountSuccessfulHookedAsync</c>'s: hooked, frames recorded, <c>exit_status =
/// "Succeed" is <c>ISessionRepository.CountSuccessfulUnderGrantAsync</c>'s: hooked, frames recorded, <c>exit_status =
/// normal</c> — which since beta.8 includes End task's exit code 1 and a user's stop, and never a crash, a safety
/// unhook, a degraded or an interrupted session.
/// </remarks>
public const int RequiredSessions = 2;
public const int TrialSessions = 2;
/// <summary>
/// The family the game's exception covers for a session against <paramref name="observed"/>, or null: the option is
@@ -50,12 +61,18 @@ public static class UserModeExceptionRules
/// <summary>
/// Whether <paramref name="verdict"/> — a tolerant pre-scan asked about <paramref name="block"/>'s family — makes the
/// game eligible, given <paramref name="sessions"/> successful Tier-1 sessions: the guard passed and named that same
/// family as what it let through, and the evidence reaches <see cref="RequiredSessions"/>.
/// game eligible: the guard passed and named that same family as what it let through, and no earlier exception of the
/// game failed its trial (<paramref name="trialFailed"/>, D38).
/// </summary>
public static bool IsEligible(StoredBlock? block, AntiCheatVerdict verdict, int sessions) =>
block is { IsExceptionable: true } b
public static bool IsEligible(StoredBlock? block, AntiCheatVerdict verdict, bool trialFailed) =>
!trialFailed
&& block is { IsExceptionable: true } b
&& verdict.RanUnderException
&& string.Equals(verdict.Family, b.Family, StringComparison.Ordinal)
&& sessions >= RequiredSessions;
&& string.Equals(verdict.Family, b.Family, StringComparison.Ordinal);
/// <summary>
/// Whether a grant with <paramref name="successfulBefore"/> successful sessions under it — not counting the session
/// being judged — is still in its trial (D38).
/// </summary>
public static bool InTrial(int successfulBefore) => successfulBefore < TrialSessions;
}
@@ -18,9 +18,6 @@ public sealed record AntiCheatExceptionGrantRequest
/// <summary>The guard's tolerant pre-scan, asked about the block's family just now.</summary>
public required AntiCheatVerdict Verdict { get; init; }
/// <summary>Successful Tier-1 sessions of the game, counted just now.</summary>
public required int Sessions { get; init; }
/// <summary>The disclosure the user accepted — the Agent's own version, checked before this request exists.</summary>
public required string DisclosureVersion { get; init; }
@@ -138,8 +138,10 @@ public interface IGameConsentStore
/// <summary>
/// D33 (owner decision 2026-09-26): the sweep's answer about one BLOCKED game — whether its user-mode exception may be
/// granted — from the facts it gathered: <paramref name="verdict"/>, a tolerant pre-scan asked about the block's family
/// (null when the block is not of a kind worth asking about), and <paramref name="sessions"/> successful Tier-1 sessions.
/// The rule is <c>UserModeExceptionRules.IsEligible</c>, applied here so the row cannot say "eligible" over facts that are not.
/// (null when the block is not of a kind worth asking about). The rule is <c>UserModeExceptionRules.IsEligible</c>,
/// applied here so the row cannot say "eligible" over facts that are not — and since D38 (2026-10-03) a row whose
/// exception once failed its trial is never written eligible, in SQL. <paramref name="sessions"/> is the trial's progress
/// under the grant in force (0 with none), stored for the App to show.
/// </summary>
/// <remarks>
/// Written with the key it was reached under — <paramref name="rulesVersion"/>, the executable's size and mtime in
@@ -151,12 +153,13 @@ public interface IGameConsentStore
ExecutableFingerprint scanned, string block, AntiCheatVerdict? verdict, int sessions, string rulesVersion, CancellationToken ct = default);
/// <summary>
/// D33: grant a game's user-mode exception, on facts gathered just now — the tolerant pre-scan and the session count in
/// <paramref name="grant"/> — after the user accepted its disclosure.
/// D33: grant a game's user-mode exception, on facts gathered just now — the tolerant pre-scan in
/// <paramref name="grant"/> — after the user accepted its disclosure. D38: the grant starts its trial at zero sessions.
/// </summary>
/// <remarks>
/// <see cref="ConsentWriteOutcome.NotEligible"/> and nothing written unless <c>UserModeExceptionRules.IsEligible</c> holds for
/// those facts; <see cref="ConsentWriteOutcome.NotFound"/> when the row no longer carries the block the facts are about.
/// those facts and no exception of the game failed its trial (read from the row in the same transaction);
/// <see cref="ConsentWriteOutcome.NotFound"/> when the row no longer carries the block the facts are about.
/// It never clears the block, never enables hooking and never stamps consent: turning hooking on is FR-2.1's own
/// dialog, afterwards.
/// </remarks>
@@ -165,8 +168,11 @@ public interface IGameConsentStore
/// <summary>
/// D33: end a game's user-mode exception, for <paramref name="reason"/> (<c>UserModeExceptionLapse</c>), and turn its
/// hooking off while the block stands. The consent stamp is preserved, as a block preserves it; the family, the
/// disclosure and the executable the grant was made on stay on the row as history.
/// disclosure and the executable the grant was made on stay on the row as history. D38: <paramref name="trialFailed"/>
/// — the end came during the grant's trial — also marks the game (<c>ac_exception_trial_failed_at</c>), and no exception
/// can be made for it again.
/// </summary>
/// <remarks><see cref="ConsentWriteOutcome.NotFound"/> when there was no exception in force.</remarks>
ValueTask<ConsentWriteOutcome> RevokeAntiCheatExceptionAsync(string normalisedExePath, string reason, CancellationToken ct = default);
ValueTask<ConsentWriteOutcome> RevokeAntiCheatExceptionAsync(string normalisedExePath, string reason, bool trialFailed = false,
CancellationToken ct = default);
}
@@ -37,6 +37,7 @@ public sealed class AgentCommandHandler
private readonly TimeProvider _clock;
private readonly VkLayerReconciler? _layer;
private readonly Func<CancellationToken, ValueTask<SweepRetentionAck>>? _sweepRetention;
private readonly ISessionRepository? _deleteSessions;
private readonly ExecutableRelocator? _relocator;
private readonly IExecutableArchitectureSource? _architecture;
private readonly AntiCheatExceptionCommands? _exceptions;
@@ -53,8 +54,12 @@ public sealed class AgentCommandHandler
/// </summary>
public const string BlockNotExceptionableReason = "BlockNotExceptionable";
/// <summary>D33: <c>Refused.reason</c> for an exception asked with fewer successful hooked sessions than the owner's threshold; <c>signal</c> carries the count.</summary>
public const string TooFewSessionsReason = "TooFewSessions";
/// <summary>
/// D38 (owner decision 2026-10-03): <c>Refused.reason</c> for an exception asked for a game an earlier exception of which
/// ended during its trial — for good; <c>signal</c> carries when (unix ms). (D33's <c>TooFewSessions</c> is gone with the
/// session threshold it named.)
/// </summary>
public const string TrialFailedReason = "TrialFailed";
/// <summary>
/// <c>disclosureVersion</c> is the version of FR-2.1's reviewed disclosure this Agent carries
@@ -65,8 +70,10 @@ public sealed class AgentCommandHandler
CaptureOrchestrator orchestrator, CapturePause pause, IAgentLifetime lifetime, Func<CancellationToken, ValueTask<string>> updateRules,
string? disclosureVersion = null, TimeProvider? clock = null, VkLayerReconciler? layer = null,
Func<CancellationToken, ValueTask<SweepRetentionAck>>? sweepRetention = null, ExecutableRelocator? relocator = null,
IExecutableArchitectureSource? architecture = null, AntiCheatExceptionCommands? exceptions = null)
IExecutableArchitectureSource? architecture = null, AntiCheatExceptionCommands? exceptions = null, ISessionRepository? deleteSessions = null)
{
// beta.11 (D40): DeleteSessions — composed under --serve over the Agent's own repository; absent, not answered (UnknownType).
_deleteSessions = deleteSessions;
// D33: the user-mode exception's collaborators — its option, its evidence, its disclosure version. Absent, no
// exception applies to SetHookEnabled and SetAntiCheatException is not answered (UnknownType).
_exceptions = exceptions;
@@ -113,10 +120,34 @@ public sealed class AgentCommandHandler
IpcMessageType.SetAntiCheatException when _exceptions is not null => await SetAntiCheatExceptionAsync(request, _exceptions, ct).ConfigureAwait(false),
IpcMessageType.SweepRetention when _sweepRetention is not null =>
IpcCodec.Encode(IpcMessageType.SweepRetentionAck, request.Id, await _sweepRetention(ct).ConfigureAwait(false)),
IpcMessageType.DeleteSessions when _deleteSessions is not null => await DeleteSessionsAsync(request, _deleteSessions, ct).ConfigureAwait(false),
_ => null,
};
}
/// <summary>
/// beta.11 (owner decision D40): every session of one game, or of every game — never while a session it would delete
/// under is being recorded (that session would land after the delete, and a summary the App opened could point at a
/// reused id). The rows are the Agent's (<c>06_DATA_MODEL</c> §Writer ownership), so the Agent deletes them.
/// </summary>
private async ValueTask<byte[]> DeleteSessionsAsync(IpcEnvelope request, ISessionRepository sessions, CancellationToken ct)
{
DeleteSessionsRequest? payload = IpcCodec.Payload<DeleteSessionsRequest>(request);
if (payload is null)
{
return Malformed(request, "DeleteSessions carries no payload");
}
bool running = payload.GameId is { } one ? _orchestrator.IsRecording(one) : _orchestrator.IsRecordingAny();
if (running)
{
return Error(request, IpcErrorCode.SessionRunning, "a session is being recorded; nothing was deleted — stop it or let it end, then try again");
}
RetentionSweepResult deleted = await sessions.DeleteSessionsAsync(payload.GameId, ct).ConfigureAwait(false);
return IpcCodec.Encode(IpcMessageType.DeleteSessionsAck, request.Id, new DeleteSessionsAck(payload.GameId, deleted.Games, deleted.Sessions));
}
/// <summary>
/// Identity only (<c>07_IPC</c>: "carries no hooking state"): every entry's row is ensured, hooking off when new.
/// Nothing is removed — removing a game is the App's FR-1.4 (with its "keep the sessions?" question), never a
@@ -231,7 +262,7 @@ public sealed class AgentCommandHandler
await _consent.RecordGuardBlockAsync(fingerprint, verdict, ct).ConfigureAwait(false);
if (tolerated is not null && verdict.IsFindingAboutTheGame)
{
await _consent.RevokeAntiCheatExceptionAsync(fingerprint.ExePath, UserModeExceptionLapse.NewFinding, ct).ConfigureAwait(false);
await _consent.RevokeAntiCheatExceptionAsync(fingerprint.ExePath, UserModeExceptionLapse.NewFinding, ct: ct).ConfigureAwait(false);
}
await ReconcileLayerAsync(ct).ConfigureAwait(false);
@@ -277,7 +308,7 @@ public sealed class AgentCommandHandler
if (!payload.Enabled)
{
ConsentWriteOutcome withdrawn = await _consent.RevokeAntiCheatExceptionAsync(game.Fingerprint.ExePath, UserModeExceptionLapse.Withdrawn, ct)
ConsentWriteOutcome withdrawn = await _consent.RevokeAntiCheatExceptionAsync(game.Fingerprint.ExePath, UserModeExceptionLapse.Withdrawn, ct: ct)
.ConfigureAwait(false);
await ReconcileLayerAsync(ct).ConfigureAwait(false);
return IpcCodec.Encode(IpcMessageType.AntiCheatExceptionAck, request.Id,
@@ -297,8 +328,9 @@ public sealed class AgentCommandHandler
/// <summary>
/// D33: the facts a grant rests on, gathered here and now — the block on the row, a tolerant pre-scan of the executable on
/// disk naming the block's family, and the successful Tier-1 sessions — each refusal said as what it is; the store then
/// writes the grant only when they make the game eligible, and only while the row still carries that block.
/// disk naming the block's family — each refusal said as what it is; the store then writes the grant only when they make
/// the game eligible, and only while the row still carries that block. D38: no session is needed any more — the grant's
/// first sessions are its trial — and a game whose exception once failed its trial is refused before anything is scanned.
/// </summary>
private async ValueTask<byte[]> GrantExceptionAsync(IpcEnvelope request, GameRow game, AntiCheatExceptionCommands exceptions, CancellationToken ct)
{
@@ -308,6 +340,12 @@ public sealed class AgentCommandHandler
return IpcCodec.Encode(IpcMessageType.Refused, request.Id, new RefusedAck(game.Id, BlockNotExceptionableReason, Family: null, Signal: null));
}
if (game.AcException.TrialFailedAt is { } failedAt)
{
return IpcCodec.Encode(IpcMessageType.Refused, request.Id, new RefusedAck(game.Id, TrialFailedReason, block.Family,
failedAt.ToUnixTimeMilliseconds().ToString(System.Globalization.CultureInfo.InvariantCulture)));
}
if (_identity.Read(path) is not { } fingerprint)
{
return Error(request, IpcErrorCode.ExecutableUnreadable, $"{path} could not be read, so nothing can be scanned or granted");
@@ -320,19 +358,11 @@ public sealed class AgentCommandHandler
return IpcCodec.Encode(IpcMessageType.Refused, request.Id, new RefusedAck(game.Id, reason, NullIfEmpty(verdict.Family), NullIfEmpty(verdict.Signal)));
}
int sessions = await exceptions.Sessions.CountSuccessfulHookedAsync(game.Id, ct).ConfigureAwait(false);
if (sessions < UserModeExceptionRules.RequiredSessions)
{
return IpcCodec.Encode(IpcMessageType.Refused, request.Id, new RefusedAck(game.Id, TooFewSessionsReason, block.Family,
sessions.ToString(System.Globalization.CultureInfo.InvariantCulture)));
}
ConsentWriteOutcome outcome = await _consent.GrantAntiCheatExceptionAsync(new AntiCheatExceptionGrantRequest
{
Fingerprint = fingerprint,
Block = game.HookBlockedReason!,
Verdict = verdict,
Sessions = sessions,
DisclosureVersion = exceptions.DisclosureVersion,
GrantedAt = _clock.GetUtcNow(),
}, ct).ConfigureAwait(false);
@@ -1,14 +1,12 @@
using FrameLedger.Application.Capture;
using FrameLedger.Application.Persistence;
namespace FrameLedger.Application.Ipc;
/// <summary>
/// D33 (owner decision 2026-09-26): what <see cref="AgentCommandHandler"/> needs to answer for a game's user-mode exception —
/// the option, the evidence, and the disclosure version this Agent grants against. One parameter rather than three, so a
/// composition either has the exception or does not.
/// the option and the disclosure version this Agent grants against. One parameter rather than two, so a composition either
/// has the exception or does not. (D38 took the session count out: a grant needs no session any more.)
/// </summary>
/// <param name="Switch"><c>hooking.usermode_ac_exceptions</c>, read on every command.</param>
/// <param name="Sessions">Where the successful Tier-1 sessions are counted.</param>
/// <param name="DisclosureVersion"><c>Shared.Safety.AntiCheatExceptionDisclosure.Version</c> under <c>--serve</c>.</param>
public sealed record AntiCheatExceptionCommands(IUserModeExceptionSwitch Switch, ISessionRepository Sessions, string DisclosureVersion);
public sealed record AntiCheatExceptionCommands(IUserModeExceptionSwitch Switch, string DisclosureVersion);
@@ -3,9 +3,10 @@ using FrameLedger.Domain.Consent;
namespace FrameLedger.Application.Persistence;
/// <summary>
/// D33 (owner decision 2026-09-26): <c>games.ac_exception_*</c> as read (schema 0014) — the Agent's eligibility answer
/// about a blocked game, the user's grant of its user-mode exception, and how the last grant ended. Read-only here: every
/// write is the consent store's (<c>IGameConsentStore</c>) or a downgrade in <c>ChangeExecutableAsync</c>.
/// D33 (owner decision 2026-09-26): <c>games.ac_exception_*</c> as read (schema 0014, and 0017 for D38's trial) — the
/// Agent's eligibility answer about a blocked game, the user's grant of its user-mode exception, how far its trial has come,
/// and how the last grant ended. Read-only here: every write is the consent store's (<c>IGameConsentStore</c>) or a
/// downgrade in <c>ChangeExecutableAsync</c>.
/// </summary>
public sealed record AntiCheatExceptionState
{
@@ -18,7 +19,11 @@ public sealed record AntiCheatExceptionState
/// <summary>The guard's tolerant pre-scan behind <see cref="Eligible"/>, as <c>Reason|Family|Signal</c>; null when nothing was asked.</summary>
public string? Verdict { get; init; }
/// <summary>Successful Tier-1 sessions of the game when the sweep last counted.</summary>
/// <summary>
/// D38: successful hooked sessions under the grant in force when the sweep last counted — its trial's progress against
/// <c>UserModeExceptionRules.TrialSessions</c>; 0 with no grant. (D33 counted every successful Tier-1 session of the game
/// here, the evidence a grant needed before D38.)
/// </summary>
public int Sessions { get; init; }
/// <summary>The rules version <see cref="Verdict"/> was reached under.</summary>
@@ -54,6 +59,15 @@ public sealed record AntiCheatExceptionState
/// <summary>Why the last grant ended (<c>UserModeExceptionLapse</c>).</summary>
public string? LapsedReason { get; init; }
/// <summary>
/// D38 (schema 0017): when an exception of this game ended during its trial; null when none did. Never cleared — not by
/// a withdrawal, a game update or <i>Change executable</i> — and while it is set no exception can be made for the game.
/// </summary>
public DateTimeOffset? TrialFailedAt { get; init; }
/// <summary>D38: an exception of this game failed its trial, so none can be made again.</summary>
public bool TrialFailed => TrialFailedAt is not null;
/// <summary>An exception is in force on the row (whether the option lets it apply is the capture path's question).</summary>
public bool IsGranted => GrantedAt is not null && !string.IsNullOrEmpty(Family);
@@ -40,12 +40,14 @@ public interface ISessionRepository
ValueTask<long> CountSinceAsync(DateTimeOffset since, CancellationToken ct = default);
/// <summary>
/// D33 (owner decision 2026-09-26): the game's successful Tier-1 sessions — hooked, frames recorded, <c>exit_status =
/// normal</c> — the evidence a user-mode exception needs <c>UserModeExceptionRules.RequiredSessions</c> of. Since beta.8
/// <c>normal</c> includes End task's exit code 1 and a user's stop; a crashed, unhooked-for-safety, degraded or
/// interrupted session never counts.
/// D38 (owner decision 2026-10-03): the game's successful sessions under ONE grant of its user-mode exception — hooked
/// under <paramref name="family"/> (<c>sessions.ac_exception_family</c>), started at or after <paramref name="grantedAt"/>,
/// frames recorded, <c>exit_status = normal</c>: how far that grant's trial has come against
/// <c>UserModeExceptionRules.TrialSessions</c>. Since beta.8 <c>normal</c> includes End task's exit code 1 and a user's
/// stop; a crashed, unhooked-for-safety, degraded or interrupted session never counts, and neither does a session from
/// before the grant or under an earlier one.
/// </summary>
ValueTask<int> CountSuccessfulHookedAsync(long gameId, CancellationToken ct = default);
ValueTask<int> CountSuccessfulUnderGrantAsync(long gameId, string family, DateTimeOffset grantedAt, CancellationToken ct = default);
ValueTask<int> SweepRetentionAsync(long gameId, int keep, CancellationToken ct = default);
@@ -57,6 +59,13 @@ public interface ISessionRepository
/// </summary>
ValueTask<RetentionSweepResult> SweepRetentionAllAsync(int keep, CancellationToken ct = default);
/// <summary>
/// beta.11 (owner decision D40): delete every session of <paramref name="gameId"/>, or of every game when it is null, in
/// one transaction — segments, frame and sensor series and annotations cascade with them (schema 0001's foreign keys).
/// Nothing about the games, their consent or the settings is touched. The Agent's to call (§Writer ownership).
/// </summary>
ValueTask<RetentionSweepResult> DeleteSessionsAsync(long? gameId, CancellationToken ct = default);
ValueTask<FrameBlobs?> FindFramesAsync(long sessionId, CancellationToken ct = default);
/// <summary>The session's segments in frame order (the ribbon, <c>08_UI</c> §Session summary).</summary>
@@ -0,0 +1,10 @@
namespace FrameLedger.Application.Recording;
/// <summary>
/// D38: the session the recorder just finished, as the exception's trial needs it — the game row it was stored under,
/// whether it was stored as a hooked session, and the frames it recorded.
/// </summary>
/// <param name="GameId">The <c>games</c> row the session belongs to.</param>
/// <param name="StoredHooked">It was hooked AND its row was written (a session too short to keep proves nothing).</param>
/// <param name="FrameCount">Frames the row records.</param>
public readonly record struct SessionForTrial(long GameId, bool StoredHooked, long FrameCount);
@@ -217,10 +217,12 @@ public sealed class SessionRecorder : ISessionRecorder
}
// D33: a session under the game's user-mode exception that ended badly ends the exception — after the row is
// stored, so the session that ended it is on the page the exception is gone from.
// stored, so the session that ended it is on the page the exception is gone from. D38: during the grant's trial a
// stored hooked session that did not succeed ends it too, and any end then is for good.
var trial = new SessionForTrial(ownerId, hooked && saved.Status == FinalizeStatus.Saved, built.Row.FrameCount);
string? lapsed = _exceptionLapse is null
? null
: await _exceptionLapse.ApplyAsync(request.NormalisedExePath, outcome, exit, ct).ConfigureAwait(false);
: await _exceptionLapse.ApplyAsync(request.NormalisedExePath, outcome, exit, trial, ct).ConfigureAwait(false);
return new RecordedSession
{
@@ -1,34 +1,47 @@
using FrameLedger.Application.AntiCheat;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Consent;
using FrameLedger.Application.Persistence;
using FrameLedger.Domain.Consent;
using FrameLedger.Domain.Sessions;
using FrameLedger.Shared;
namespace FrameLedger.Application.Recording;
/// <summary>
/// D33 (owner decision 2026-09-26): what a session under a game's user-mode exception does to the exception when it ends
/// badly (<c>19_SAFETY</c> §The user-mode exception, What ends it). A finding about the game at its start or at the 30 s
/// re-scan, a safety unhook, the Overlay's own stop on another anti-cheat's module, and a crash while hooked each end it —
/// the evidence the exception rests on said "this game is safe to measure", and each of those says otherwise.
/// D33 (owner decision 2026-09-26) as amended by D38 (2026-10-03): what a session under a game's user-mode exception does to
/// the exception when it ends (<c>19_SAFETY</c> §The user-mode exception, What ends it). A finding about the game at its
/// start or at the 30 s re-scan, a safety unhook, the Overlay's own stop on another anti-cheat's module, and a crash while
/// hooked each end it — the trust the exception rests on said "this game is safe to measure", and each of those says
/// otherwise. D38: during the grant's trial (its first <see cref="UserModeExceptionRules.TrialSessions"/> successful
/// sessions) a hooked session that recorded no frame or did not end normally ends it too, and any end during the trial
/// marks the game so that no exception can be made for it again.
/// </summary>
/// <remarks>
/// <para>
/// <b>It only ever ends an exception.</b> Nothing here grants one or clears a block; the end turns the game's hooking off
/// while its block stands and keeps the consent stamp, as a block keeps it. The user may grant it again once the sweep
/// finds the game eligible again, through the disclosure.
/// while its block stands and keeps the consent stamp, as a block keeps it. After the trial the user may grant it again
/// once the sweep finds the game eligible again, through the disclosure; after an end during the trial, never.
/// </para>
/// <para>
/// A session that ran under no exception is left alone, and so is an ordinary end under one — the game exited, the user
/// stopped it, End task (beta.8's <c>normal</c>), a refusal that found nothing about the game.
/// stopped it, End task (beta.8's <c>normal</c>), a refusal that found nothing about the game — and a session too short to
/// be stored, which proves nothing either way.
/// </para>
/// </remarks>
public sealed class UserModeExceptionLapsePolicy
{
private readonly IGameConsentStore _consent;
private readonly ISessionRepository? _sessions;
public UserModeExceptionLapsePolicy(IGameConsentStore consent) =>
/// <summary>The policy over the store that holds the exception, and the sessions its trial is counted in.</summary>
/// <param name="consent">Where the exception lives.</param>
/// <param name="sessions">Where a grant's trial is counted (D38); without it no end is judged against a trial.</param>
public UserModeExceptionLapsePolicy(IGameConsentStore consent, ISessionRepository? sessions = null)
{
_consent = consent ?? throw new ArgumentNullException(nameof(consent));
_sessions = sessions;
}
/// <summary>Why <paramref name="outcome"/> ends the exception it ran under (<see cref="UserModeExceptionLapse"/>), or null.</summary>
public static string? LapseOf(CaptureOutcome outcome, ExitStatus exit)
@@ -60,18 +73,75 @@ public sealed class UserModeExceptionLapsePolicy
: null;
}
/// <summary>End the exception when <see cref="LapseOf"/> says so; the reason, when it was ended.</summary>
public async ValueTask<string?> ApplyAsync(string normalisedExePath, CaptureOutcome outcome, ExitStatus exit, CancellationToken ct = default)
/// <summary>
/// D38: whether the session in <paramref name="session"/> succeeded as a trial counts it — stored hooked, frames
/// recorded, <c>normal</c> (<c>ISessionRepository.CountSuccessfulUnderGrantAsync</c>'s rule, for the row just written).
/// </summary>
public static bool Succeeded(SessionForTrial session, ExitStatus exit) =>
session.StoredHooked && exit == ExitStatus.Normal && session.FrameCount > 0;
/// <summary>
/// The end <paramref name="outcome"/> brings its exception, given whether the grant is still in its trial: a reason
/// from <see cref="LapseOf"/>, or <see cref="UserModeExceptionLapse.TrialFailed"/> for a stored hooked session that did
/// not succeed during the trial, or null. Pure, for the tests and for <see cref="ApplyAsync"/>.
/// </summary>
public static string? EndOf(CaptureOutcome outcome, ExitStatus exit, SessionForTrial? session, bool inTrial)
{
string? lapse = LapseOf(outcome, exit);
if (lapse is not null || !inTrial || session is not { } s || outcome.ExceptionFamily is null)
{
return lapse;
}
return s.StoredHooked && !Succeeded(s, exit) ? UserModeExceptionLapse.TrialFailed : null;
}
/// <summary>
/// End the exception when <see cref="EndOf"/> says so — marking the game when the end came during the trial — and
/// return the reason when it was ended. <paramref name="session"/> is the row the recorder just wrote (null when it
/// wrote none it can describe).
/// </summary>
public async ValueTask<string?> ApplyAsync(string normalisedExePath, CaptureOutcome outcome, ExitStatus exit, SessionForTrial? session = null,
CancellationToken ct = default)
{
ArgumentException.ThrowIfNullOrWhiteSpace(normalisedExePath);
string? lapse = LapseOf(outcome, exit);
ArgumentNullException.ThrowIfNull(outcome);
if (outcome.ExceptionFamily is null)
{
return null;
}
bool inTrial = await InTrialAsync(normalisedExePath, session, exit, ct).ConfigureAwait(false);
string? lapse = EndOf(outcome, exit, session, inTrial);
if (lapse is null)
{
return null;
}
return await _consent.RevokeAntiCheatExceptionAsync(normalisedExePath, lapse, ct).ConfigureAwait(false) == ConsentWriteOutcome.Written
return await _consent.RevokeAntiCheatExceptionAsync(normalisedExePath, lapse, trialFailed: inTrial, ct).ConfigureAwait(false) == ConsentWriteOutcome.Written
? lapse
: null;
}
/// <summary>
/// D38: the grant in force right now is still in its trial — fewer than <see cref="UserModeExceptionRules.TrialSessions"/>
/// successful sessions under it besides this one. No grant, no count: not in a trial.
/// </summary>
private async ValueTask<bool> InTrialAsync(string normalisedExePath, SessionForTrial? session, ExitStatus exit, CancellationToken ct)
{
if (_sessions is null || session is not { } s)
{
return false;
}
GameConsentRecord record = await _consent.FindAsync(normalisedExePath, ct).ConfigureAwait(false);
if (record.Exception is not { } grant)
{
return false;
}
int counted = await _sessions.CountSuccessfulUnderGrantAsync(s.GameId, grant.Family, grant.GrantedAt, ct).ConfigureAwait(false);
int before = Succeeded(s, exit) ? Math.Max(0, counted - 1) : counted;
return UserModeExceptionRules.InTrial(before);
}
}
@@ -63,6 +63,18 @@ public static class SettingsRegistry
Default = "0",
};
/// <summary>
/// How the Games library is shown (beta.11, owner request 2026-10-03): a grid of cards that fills the width, or a list.
/// The page's own switch writes it; Settings has no row for it.
/// </summary>
public static readonly SettingDefinition UiLibraryView = new()
{
Key = "ui.library_view",
Kind = SettingKind.Choice,
Default = "grid",
Choices = ["grid", "list"],
};
/// <summary>Whether the Agent's watcher records tracked games that the App did not launch (FR-3.1/FR-3.3).</summary>
public static readonly SettingDefinition CaptureBackground = new()
{
@@ -178,7 +190,7 @@ public static class SettingsRegistry
/// <summary>Every definition, in the order <c>06_DATA_MODEL</c> lists them.</summary>
public static IReadOnlyList<SettingDefinition> All { get; } =
[
UiLanguage, UiTheme, UiStartWithWindows, UiMinimizeToTray, UiHideAntiCheatHooking, UiFpsDecimals,
UiLanguage, UiTheme, UiStartWithWindows, UiMinimizeToTray, UiHideAntiCheatHooking, UiFpsDecimals, UiLibraryView,
CaptureBackground, HookingKillSwitch, HookingUserModeExceptions, CaptureRunElevated, CaptureMinSessionSeconds, TelemetryIntervalMs, RetentionRawSessionsPerGame,
UpdateChannel, UpdateAutoCheck, PrivacyOnlineMetadata, LogDebug,
];
@@ -104,6 +104,15 @@ public sealed class CaptureOrchestrator
}
}
/// <summary>Whether any session started here is still running — what deleting every session waits for (beta.11).</summary>
public bool IsRecordingAny()
{
lock (_table)
{
return _running.Values.Any(static r => !r.Task.IsCompleted);
}
}
/// <summary>Poll until cancelled, then wait for every running session to finalize.</summary>
public async Task RunAsync(CancellationToken ct)
{
@@ -0,0 +1,17 @@
-- 0017 (2026-10-03, beta.11, owner decision D38): the user-mode anti-cheat exception's trial (19_SAFETY §The user-mode
-- exception).
--
-- D33 asked for two successful Tier-1 sessions before an exception could be granted. Since beta.8 the library sweep
-- blocks a game the moment it is added, so a blocked game could never be hooked to earn them, and a reset ledger lost the
-- ones it had: the exception was unreachable for every game blocked from the start. D38 grants without them; the first two
-- hooked sessions under a grant are its trial, and an end during the trial — a crash, a safety unhook, the Overlay's own
-- stop, a new finding, or a session that recorded no frame or did not end normally — ends the exception for good.
--
-- ac_exception_trial_failed_at is that "for good": when an exception of this game ended during its trial, NULL when none
-- did. Nothing clears it — not a withdrawal, a game update, Change executable or the end of a later grant (there is none:
-- while it is set the Agent finds the game not eligible and the store refuses a grant in SQL). A twin merge keeps the
-- earlier of two. ac_exception_sessions (0014) is now the trial's progress under the grant in force.
--
-- Written by the Agent only (06_DATA_MODEL §Writer ownership: the exception's columns are the Agent's); ADD COLUMN only.
ALTER TABLE games ADD COLUMN ac_exception_trial_failed_at INTEGER;
@@ -81,22 +81,28 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
// D33 (schema 0014). The eligibility and the grant are each bound to the block they were reached about — the WHERE is
// the guarantee, so a block rewritten between the caller's read and this write leaves the row alone. Neither names
// hook_blocked_reason, hook_enabled or the consent columns in its SET list.
// hook_blocked_reason, hook_enabled or the consent columns in its SET list. D38 (schema 0017): a game an exception of
// which failed its trial is never eligible and is never granted one — in SQL, whatever the caller read.
private const string _exceptionEligibility =
"UPDATE games SET ac_exception_eligible = @eligible, ac_exception_verdict = @verdict, ac_exception_sessions = @sessions, "
"UPDATE games SET ac_exception_eligible = CASE WHEN ac_exception_trial_failed_at IS NULL THEN @eligible ELSE 0 END, "
+ "ac_exception_verdict = @verdict, ac_exception_sessions = @sessions, "
+ "ac_exception_checked_rules_version = @rules, ac_exception_checked_exe_size_bytes = @size, ac_exception_checked_exe_mtime_ms = @mtime, "
+ "ac_exception_checked_block = @block, updated_at = @at WHERE exe_path = @path AND hook_blocked_reason = @block";
private const string _exceptionGrant =
"UPDATE games SET ac_exception_at = @at, ac_exception_family = @family, ac_exception_disclosure_version = @disclosure, "
+ "ac_exception_exe_size_bytes = @size, ac_exception_exe_mtime_ms = @mtime, ac_exception_lapsed_at = NULL, ac_exception_lapsed_reason = NULL, "
+ "ac_exception_eligible = 1, ac_exception_verdict = @verdict, ac_exception_sessions = @sessions, updated_at = @at "
+ "WHERE exe_path = @path AND hook_blocked_reason = @block";
+ "ac_exception_eligible = 1, ac_exception_verdict = @verdict, ac_exception_sessions = 0, updated_at = @at "
+ "WHERE exe_path = @path AND hook_blocked_reason = @block AND ac_exception_trial_failed_at IS NULL";
private const string _trialFailedOf = "SELECT ac_exception_trial_failed_at FROM games WHERE exe_path = @path";
// The end of an exception keeps the consent stamp, as a block does, and turns hooking off while the block stands. The
// grant's family, disclosure and bytes stay as history; ac_exception_at going NULL is what ends it.
// grant's family, disclosure and bytes stay as history; ac_exception_at going NULL is what ends it. D38: an end during
// the trial also sets ac_exception_trial_failed_at, once, and nothing ever clears it.
private const string _exceptionRevoke =
"UPDATE games SET ac_exception_at = NULL, ac_exception_lapsed_at = @at, ac_exception_lapsed_reason = @reason, "
+ "ac_exception_trial_failed_at = CASE WHEN @trialFailed = 1 THEN COALESCE(ac_exception_trial_failed_at, @at) ELSE ac_exception_trial_failed_at END, "
+ "hook_enabled = CASE WHEN hook_blocked_reason IS NOT NULL THEN 0 ELSE hook_enabled END, updated_at = @at "
+ "WHERE exe_path = @path AND ac_exception_at IS NOT NULL";
@@ -306,7 +312,8 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
{
ArgumentException.ThrowIfNullOrWhiteSpace(block);
ArgumentException.ThrowIfNullOrWhiteSpace(rulesVersion);
bool eligible = verdict is { } v && UserModeExceptionRules.IsEligible(StoredBlock.Parse(block), v, sessions);
// The trial mark (D38) is the row's, and the SQL applies it: this says what the verdict alone allows.
bool eligible = verdict is { } v && UserModeExceptionRules.IsEligible(StoredBlock.Parse(block), v, trialFailed: false);
try
{
return await _db.WriteAsync(async (c, tx, token) =>
@@ -340,9 +347,10 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
ArgumentException.ThrowIfNullOrWhiteSpace(grant.DisclosureVersion, nameof(grant));
// THE STORE APPLIES THE RULE ITSELF: a grant over facts that do not make the game eligible is refused here, not
// only by the caller that gathered them.
// only by the caller that gathered them — and a game whose exception once failed its trial (D38) is refused from
// the row, in the same transaction as the write.
StoredBlock? block = StoredBlock.Parse(grant.Block);
if (!UserModeExceptionRules.IsEligible(block, grant.Verdict, grant.Sessions))
if (!UserModeExceptionRules.IsEligible(block, grant.Verdict, trialFailed: false))
{
return ConsentWriteOutcome.NotEligible;
}
@@ -351,6 +359,13 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
{
return await _db.WriteAsync(async (c, tx, token) =>
{
long? trialFailedAt = await c.ExecuteScalarAsync<long?>(new CommandDefinition(_trialFailedOf, new { path = grant.Fingerprint.ExePath }, tx,
cancellationToken: token)).ConfigureAwait(false);
if (trialFailedAt is not null)
{
return ConsentWriteOutcome.NotEligible;
}
var p = new
{
path = grant.Fingerprint.ExePath,
@@ -360,7 +375,6 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
size = grant.Fingerprint.SizeBytes,
mtime = grant.Fingerprint.MtimeUnixMs,
verdict = BlockText(grant.Verdict),
sessions = grant.Sessions,
at = grant.GrantedAt.ToUnixTimeMilliseconds(),
};
int rows = await c.ExecuteAsync(new CommandDefinition(_exceptionGrant, p, tx, cancellationToken: token)).ConfigureAwait(false);
@@ -374,7 +388,8 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
}
/// <inheritdoc />
public async ValueTask<ConsentWriteOutcome> RevokeAntiCheatExceptionAsync(string normalisedExePath, string reason, CancellationToken ct = default)
public async ValueTask<ConsentWriteOutcome> RevokeAntiCheatExceptionAsync(string normalisedExePath, string reason, bool trialFailed = false,
CancellationToken ct = default)
{
ArgumentException.ThrowIfNullOrWhiteSpace(normalisedExePath);
ArgumentException.ThrowIfNullOrWhiteSpace(reason);
@@ -382,7 +397,7 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
{
return await _db.WriteAsync(async (c, tx, token) =>
{
var p = new { path = normalisedExePath, reason, at = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() };
var p = new { path = normalisedExePath, reason, trialFailed = trialFailed ? 1 : 0, at = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() };
int rows = await c.ExecuteAsync(new CommandDefinition(_exceptionRevoke, p, tx, cancellationToken: token)).ConfigureAwait(false);
return rows == 0 ? ConsentWriteOutcome.NotFound : ConsentWriteOutcome.Written;
}, ct).ConfigureAwait(false);
@@ -28,18 +28,22 @@ namespace FrameLedger.Infrastructure.Persistence;
/// <b>The recording switch (schema 0009) follows the same direction:</b> off on either entry is off on the survivor. The
/// user turned it off for this executable under one of its two names.
/// </para>
/// <para>
/// <b>So does a failed exception trial (schema 0017, D38):</b> an exception of either entry that ended during its trial
/// marks the survivor, the earlier of two — a merge must not be the way a game's "never again" disappears.
/// </para>
/// </remarks>
public sealed class SqliteGameMerge : IGameMerge
{
private const string _read =
"SELECT id, exe_path, exe_size_bytes, exe_mtime_ms, removed_at, hook_enabled, hook_blocked_reason, hook_autodisabled_reason, "
+ "hook_autodisabled_at, hook_crash_count, hook_last_injected_at, record_sessions FROM games WHERE id = @id";
+ "hook_autodisabled_at, hook_crash_count, hook_last_injected_at, record_sessions, ac_exception_trial_failed_at FROM games WHERE id = @id";
private const string _reparent = "UPDATE sessions SET game_id = @keep WHERE game_id = @drop";
private const string _carry =
"UPDATE games SET hook_blocked_reason = @blocked, hook_autodisabled_reason = @autoReason, hook_autodisabled_at = @autoAt, "
+ "hook_crash_count = @crashes, hook_last_injected_at = @injected, record_sessions = @record, "
+ "hook_crash_count = @crashes, hook_last_injected_at = @injected, record_sessions = @record, ac_exception_trial_failed_at = @trialFailed, "
+ "hook_enabled = CASE WHEN @hookOff THEN 0 ELSE hook_enabled END, "
+ "hook_prescan_state = CASE WHEN @blockCarried THEN 'blocked' ELSE hook_prescan_state END, "
+ "updated_at = @now WHERE id = @keep";
@@ -81,6 +85,7 @@ public sealed class SqliteGameMerge : IGameMerge
crashes = keep.CrashCount + drop!.CrashCount,
injected = Later(keep.LastInjectedAt, drop.LastInjectedAt),
record = keep.RecordSessions && drop.RecordSessions ? 1 : 0,
trialFailed = Earlier(keep.TrialFailedAt, drop.TrialFailedAt),
hookOff = blockCarried || autoCarried,
blockCarried,
now,
@@ -112,6 +117,8 @@ public sealed class SqliteGameMerge : IGameMerge
private static long? Later(long? a, long? b) => a is null ? b : b is null ? a : Math.Max(a.Value, b.Value);
private static long? Earlier(long? a, long? b) => a is null ? b : b is null ? a : Math.Min(a.Value, b.Value);
private static Task<Twin?> ReadAsync(SqliteConnection c, SqliteTransaction tx, long id, CancellationToken ct) =>
SqliteReaders.ReadOneAsync(c, new CommandDefinition(_read, new { id }, tx, cancellationToken: ct), Read);
@@ -127,7 +134,8 @@ public sealed class SqliteGameMerge : IGameMerge
SqliteReaders.Int64(r, 8),
r.GetInt32(9),
SqliteReaders.Int64(r, 10),
r.GetInt64(11) != 0);
r.GetInt64(11) != 0,
SqliteReaders.Int64(r, 12));
private sealed record Twin(
long Id,
@@ -141,5 +149,6 @@ public sealed class SqliteGameMerge : IGameMerge
long? AutoDisabledAt,
int CrashCount,
long? LastInjectedAt,
bool RecordSessions);
bool RecordSessions,
long? TrialFailedAt);
}
@@ -30,7 +30,7 @@ public sealed class SqliteGameRepository : IGameRepository
+ "ac_exception_eligible, ac_exception_verdict, ac_exception_sessions, ac_exception_checked_rules_version, "
+ "ac_exception_checked_exe_size_bytes, ac_exception_checked_exe_mtime_ms, ac_exception_checked_block, ac_exception_at, "
+ "ac_exception_family, ac_exception_disclosure_version, ac_exception_exe_size_bytes, ac_exception_exe_mtime_ms, "
+ "ac_exception_lapsed_at, ac_exception_lapsed_reason, engine_version_source";
+ "ac_exception_lapsed_at, ac_exception_lapsed_reason, engine_version_source, ac_exception_trial_failed_at";
private const string _selectByPath = $"SELECT {_columns} FROM games WHERE exe_path = @path";
@@ -373,8 +373,8 @@ public sealed class SqliteGameRepository : IGameRepository
ExeFileVersion = SqliteReaders.String(r, 36),
ExeProductVersion = SqliteReaders.String(r, 37),
Libraries = LibraryVersionsJson.Parse(SqliteReaders.String(r, 38)),
AcException = ReadException(r),
EngineVersionSource = SqliteReaders.String(r, 53), // schema 0015, the last column in _columns
AcException = ReadException(r) with { TrialFailedAt = At(SqliteReaders.Int64(r, 54)) }, // schema 0017, the last column
EngineVersionSource = SqliteReaders.String(r, 53), // schema 0015
};
/// <summary>Schema 0014's columns, 39 onwards in <see cref="_columns"/>' order.</summary>
@@ -165,10 +165,14 @@ public sealed class SqliteSessionRepository : ISessionRepository
_db.ReadAsync((c, token) => c.ExecuteScalarAsync<long>(new CommandDefinition(
"SELECT COUNT(*) FROM sessions WHERE started_at >= @since", new { since = since.ToUnixTimeMilliseconds() }, cancellationToken: token)), ct);
public ValueTask<int> CountSuccessfulHookedAsync(long gameId, CancellationToken ct = default) =>
_db.ReadAsync((c, token) => c.ExecuteScalarAsync<int>(new CommandDefinition(
"SELECT COUNT(*) FROM sessions WHERE game_id = @gameId AND capture_tier = 1 AND exit_status = 'normal' AND frame_count > 0",
new { gameId }, cancellationToken: token)), ct);
public ValueTask<int> CountSuccessfulUnderGrantAsync(long gameId, string family, DateTimeOffset grantedAt, CancellationToken ct = default)
{
ArgumentException.ThrowIfNullOrWhiteSpace(family);
return _db.ReadAsync((c, token) => c.ExecuteScalarAsync<int>(new CommandDefinition(
"SELECT COUNT(*) FROM sessions WHERE game_id = @gameId AND ac_exception_family = @family AND started_at >= @since "
+ "AND capture_tier = 1 AND exit_status = 'normal' AND frame_count > 0",
new { gameId, family, since = grantedAt.ToUnixTimeMilliseconds() }, cancellationToken: token)), ct);
}
public ValueTask<IReadOnlyList<SegmentRow>> FindSegmentsAsync(long sessionId, CancellationToken ct = default) =>
_db.ReadAsync((c, token) => SqliteReaders.ReadAllAsync(
@@ -213,6 +217,20 @@ public sealed class SqliteSessionRepository : ISessionRepository
}, ct);
}
/// <summary>
/// beta.11 (D40): one transaction — count what goes, then delete; <c>PRAGMA foreign_keys = ON</c> (LedgerDatabase) lets
/// segments, frame and sensor series and annotations go with their sessions.
/// </summary>
public ValueTask<RetentionSweepResult> DeleteSessionsAsync(long? gameId, CancellationToken ct = default) =>
_db.WriteAsync(async (c, tx, token) =>
{
const string scope = "FROM sessions WHERE (@gameId IS NULL OR game_id = @gameId)";
long games = await c.ExecuteScalarAsync<long>(new CommandDefinition("SELECT COUNT(DISTINCT game_id) " + scope, new { gameId }, tx,
cancellationToken: token)).ConfigureAwait(false);
int sessions = await c.ExecuteAsync(new CommandDefinition("DELETE " + scope, new { gameId }, tx, cancellationToken: token)).ConfigureAwait(false);
return new RetentionSweepResult(checked((int)games), sessions);
}, ct);
public ValueTask<FrameBlobs?> FindFramesAsync(long sessionId, CancellationToken ct = default) =>
_db.ReadAsync((c, token) => SqliteReaders.ReadOneAsync(
c, new CommandDefinition(_selectFrames, new { sessionId }, cancellationToken: token), ReadFrames), ct);
@@ -52,6 +52,8 @@ namespace FrameLedger.Shared.Ipc;
[JsonSerializable(typeof(ShutdownAck))]
[JsonSerializable(typeof(SweepRetentionRequest))]
[JsonSerializable(typeof(SweepRetentionAck))]
[JsonSerializable(typeof(DeleteSessionsRequest))]
[JsonSerializable(typeof(DeleteSessionsAck))]
public sealed partial class IpcJsonContext : JsonSerializerContext
{
}
+20
View File
@@ -57,6 +57,13 @@ public static class IpcMessageType
public const string SweepRetention = "SweepRetention";
public const string SweepRetentionAck = "SweepRetentionAck";
/// <summary>
/// beta.11 (owner decision D40): delete every session of one game, or of every game — the Agent's rows (§Writer
/// ownership), deleted by the Agent, refused while a session it would delete under is still being recorded.
/// </summary>
public const string DeleteSessions = "DeleteSessions";
public const string DeleteSessionsAck = "DeleteSessionsAck";
public const string SessionStarted = "SessionStarted";
public const string SessionProgress = "SessionProgress";
@@ -96,6 +103,9 @@ public static class IpcErrorCode
/// <summary>D33: <c>SetAntiCheatException true</c> while <c>hooking.usermode_ac_exceptions</c> is off — nothing is granted.</summary>
public const string ExceptionsOff = "ExceptionsOff";
/// <summary>beta.11: <c>DeleteSessions</c> while a session of that game (or of any game, for all) is being recorded — nothing is deleted.</summary>
public const string SessionRunning = "SessionRunning";
}
/// <summary>Codes a <see cref="CaptureErrorEvent"/> carries (<c>07_IPC</c> §Messages, <c>CaptureError</c>).</summary>
@@ -362,3 +372,13 @@ public sealed record SweepRetentionRequest;
/// series were removed. Aggregates and segments are never touched.
/// </summary>
public sealed record SweepRetentionAck(int Keep, int Games, int Sessions);
/// <summary>
/// <c>DeleteSessions</c> (beta.11, D40): every session of <see cref="GameId"/>, or of every game when it is null — with
/// their segments, frame and sensor series and annotations (they cascade). The library, the settings and every consent
/// stay. Refused with <c>Error SessionRunning</c> while such a session is being recorded.
/// </summary>
public sealed record DeleteSessionsRequest(long? GameId);
/// <summary>What was deleted: the sessions, and how many games they belonged to.</summary>
public sealed record DeleteSessionsAck(long? GameId, int Games, int Sessions);
@@ -12,5 +12,5 @@ namespace FrameLedger.Shared.Safety;
/// </remarks>
public static class AntiCheatExceptionDisclosure
{
public const string Version = "ac-exception-dialog/1";
public const string Version = "ac-exception-dialog/2";
}
+3
View File
@@ -61,6 +61,7 @@ public static class Strings
nameof(Safety_Exception_Risk_Format),
nameof(Safety_Exception_Still_Format),
nameof(Safety_Exception_Title_Format),
nameof(Safety_Exception_Trial),
nameof(Safety_Exception_VersionMismatch),
nameof(Safety_Exception_Why_Format),
nameof(Safety_HookingTurnedOff),
@@ -142,6 +143,8 @@ public static class Strings
public static string Safety_Exception_Title_Format => ResourceManager.GetString(nameof(Safety_Exception_Title_Format), Culture) ?? nameof(Safety_Exception_Title_Format);
public static string Safety_Exception_Trial => ResourceManager.GetString(nameof(Safety_Exception_Trial), Culture) ?? nameof(Safety_Exception_Trial);
public static string Safety_Exception_VersionMismatch => ResourceManager.GetString(nameof(Safety_Exception_VersionMismatch), Culture) ?? nameof(Safety_Exception_VersionMismatch);
public static string Safety_Exception_Why_Format => ResourceManager.GetString(nameof(Safety_Exception_Why_Format), Culture) ?? nameof(Safety_Exception_Why_Format);
+3 -2
View File
@@ -34,10 +34,11 @@
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>The game is running, but Windows would not let FrameLedger open its process: it is protected by an anti-cheat driver, or it runs as administrator while FrameLedger does not. Nothing was injected and this run was not measured. FrameLedger will not work around another product's protection. If the game itself runs as administrator, the agent's admin mode in Settings lets FrameLedger open it; a protected process stays closed.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Make a user-mode exception for {0}?</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger found {0} in this game ({1}) and turned its hooking off. This dialog asks whether to make an exception for this game only. It recommends neither choice.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>The exception is offered because {0} runs entirely in user mode — no kernel driver, no service and no driver file in the game's folder — and FrameLedger has already measured this game hooked, successfully, {1} times.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>The exception is offered because {0} runs entirely in user mode — no kernel driver, no service and no driver file in the game's folder.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Trial" xml:space="preserve"><value>The first two sessions you play hooked under the exception are a trial. If either one does not go well — it crashes, records no frames, does not end normally, is stopped for safety, or something new is found — the exception ends, and no exception can be made for this game again. Two good sessions do not prove that the anti-cheat did not notice.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Risk_Format" xml:space="preserve"><value>The risk is the same as before, and it is yours. {0} is anti-cheat. It may detect FrameLedger in the game and warn, block or permanently ban your account — possibly days later, and FrameLedger cannot know whether it did. Sessions that went well before are no promise about the next one, or about the next update of the anti-cheat.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Still_Format" xml:space="preserve"><value>Under the exception the guard still runs every check, and still refuses a kernel driver in the game's folder, any other anti-cheat, an anti-cheat driver or service on this machine, a scan it cannot finish, and a title it refuses by name. The exception covers {0} and nothing else.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>The exception ends by itself when something new is found, when a session under it crashes or is stopped for safety, when FrameLedger stops observing because another anti-cheat loaded, or when the game is updated. Turning the option off in Settings suspends it. You can withdraw it at any time.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>After the trial, the exception ends by itself when something new is found, when a session under it crashes or is stopped for safety, when FrameLedger stops observing because another anti-cheat loaded, or when the game is updated; you may then make it again. Turning the option off in Settings suspends it. You can withdraw it at any time.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Next" xml:space="preserve"><value>Making the exception does not turn hooking on. You turn hooking on for this game afterwards, through the usual consent dialog.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Online" xml:space="preserve"><value>FrameLedger is intended for offline and single-player play. Do not use this exception with a game you play online or competitively unless you accept losing that account.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Accept" xml:space="preserve"><value>I accept the risk of a ban for this game</value><comment>safety: human review required</comment></data>
+3 -2
View File
@@ -39,10 +39,11 @@
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>The game is running, but Windows would not let FrameLedger open its process: it is protected by an anti-cheat driver, or it runs as administrator while FrameLedger does not. Nothing was injected and this run was not measured. FrameLedger will not work around another product's protection. If the game itself runs as administrator, the agent's admin mode in Settings lets FrameLedger open it; a protected process stays closed.</value></data>
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Make a user-mode exception for {0}?</value></data>
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger found {0} in this game ({1}) and turned its hooking off. This dialog asks whether to make an exception for this game only. It recommends neither choice.</value></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>The exception is offered because {0} runs entirely in user mode — no kernel driver, no service and no driver file in the game's folder — and FrameLedger has already measured this game hooked, successfully, {1} times.</value></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>The exception is offered because {0} runs entirely in user mode — no kernel driver, no service and no driver file in the game's folder.</value></data>
<data name="Safety_Exception_Trial" xml:space="preserve"><value>The first two sessions you play hooked under the exception are a trial. If either one does not go well — it crashes, records no frames, does not end normally, is stopped for safety, or something new is found — the exception ends, and no exception can be made for this game again. Two good sessions do not prove that the anti-cheat did not notice.</value></data>
<data name="Safety_Exception_Risk_Format" xml:space="preserve"><value>The risk is the same as before, and it is yours. {0} is anti-cheat. It may detect FrameLedger in the game and warn, block or permanently ban your account — possibly days later, and FrameLedger cannot know whether it did. Sessions that went well before are no promise about the next one, or about the next update of the anti-cheat.</value></data>
<data name="Safety_Exception_Still_Format" xml:space="preserve"><value>Under the exception the guard still runs every check, and still refuses a kernel driver in the game's folder, any other anti-cheat, an anti-cheat driver or service on this machine, a scan it cannot finish, and a title it refuses by name. The exception covers {0} and nothing else.</value></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>The exception ends by itself when something new is found, when a session under it crashes or is stopped for safety, when FrameLedger stops observing because another anti-cheat loaded, or when the game is updated. Turning the option off in Settings suspends it. You can withdraw it at any time.</value></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>After the trial, the exception ends by itself when something new is found, when a session under it crashes or is stopped for safety, when FrameLedger stops observing because another anti-cheat loaded, or when the game is updated; you may then make it again. Turning the option off in Settings suspends it. You can withdraw it at any time.</value></data>
<data name="Safety_Exception_Next" xml:space="preserve"><value>Making the exception does not turn hooking on. You turn hooking on for this game afterwards, through the usual consent dialog.</value></data>
<data name="Safety_Exception_Online" xml:space="preserve"><value>FrameLedger is intended for offline and single-player play. Do not use this exception with a game you play online or competitively unless you accept losing that account.</value></data>
<data name="Safety_Exception_Accept" xml:space="preserve"><value>I accept the risk of a ban for this game</value></data>
+3 -2
View File
@@ -33,10 +33,11 @@
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>Game đang chạy, nhưng Windows không cho FrameLedger mở tiến trình của nó: tiến trình được driver anti-cheat bảo vệ, hoặc game chạy với quyền quản trị còn FrameLedger thì không. Không có gì được inject và lần chạy này không được đo. FrameLedger sẽ không tìm cách vượt qua cơ chế bảo vệ của sản phẩm khác. Nếu chính game chạy với quyền quản trị, chế độ quản trị của agent trong Cài đặt cho phép FrameLedger mở nó; tiến trình được bảo vệ vẫn đóng.</value></data>
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Tạo ngoại lệ user-mode cho {0}?</value></data>
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger đã phát hiện {0} trong game này ({1}) và đã tắt hooking cho nó. Hộp thoại này hỏi bạn có muốn tạo ngoại lệ cho riêng game này không. Nó không khuyến nghị lựa chọn nào.</value></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>Ngoại lệ được đề xuất vì {0} chạy hoàn toàn ở user mode — không có kernel driver, không có service và không có tệp driver nào trong thư mục game — và FrameLedger đã đo game này ở chế độ hook thành công {1} lần.</value></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>Ngoại lệ được đề xuất vì {0} chạy hoàn toàn ở user mode — không có kernel driver, không có service và không có tệp driver nào trong thư mục game.</value></data>
<data name="Safety_Exception_Trial" xml:space="preserve"><value>Hai phiên đầu tiên bạn chơi có hook dưới ngoại lệ là phiên thử. Nếu một trong hai không ổn — bị crash, không ghi được frame nào, không kết thúc bình thường, bị dừng vì an toàn, hoặc phát hiện điều gì mới — ngoại lệ sẽ kết thúc và không thể tạo ngoại lệ cho game này nữa. Hai phiên tốt không chứng minh rằng anti-cheat đã không phát hiện.</value></data>
<data name="Safety_Exception_Risk_Format" xml:space="preserve"><value>Rủi ro vẫn như trước, và bạn là người chịu. {0} là anti-cheat. Nó có thể phát hiện FrameLedger trong game và cảnh báo, chặn hoặc khoá vĩnh viễn tài khoản của bạn — có thể sau nhiều ngày, và FrameLedger không thể biết điều đó có xảy ra hay không. Các phiên đã chạy ổn trước đây không bảo đảm gì cho phiên tiếp theo, hay cho bản cập nhật tiếp theo của anti-cheat.</value></data>
<data name="Safety_Exception_Still_Format" xml:space="preserve"><value>Dưới ngoại lệ, bộ bảo vệ vẫn chạy mọi bước kiểm tra, và vẫn từ chối khi có kernel driver trong thư mục game, bất kỳ anti-cheat nào khác, driver hay service anti-cheat trên máy này, một lần quét không hoàn tất, và các tựa game bị từ chối theo tên. Ngoại lệ chỉ áp dụng cho {0}, không gì khác.</value></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>Ngoại lệ tự kết thúc khi phát hiện điều gì mới, khi một phiên dưới ngoại lệ bị crash hoặc bị dừng vì an toàn, khi FrameLedger ngừng quan sát vì một anti-cheat khác được nạp, hoặc khi game được cập nhật. Tắt tuỳ chọn trong Cài đặt sẽ tạm ngưng nó. Bạn có thể rút lại bất cứ lúc nào.</value></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>Sau thời gian thử, ngoại lệ tự kết thúc khi phát hiện điều gì mới, khi một phiên dưới ngoại lệ bị crash hoặc bị dừng vì an toàn, khi FrameLedger ngừng quan sát vì một anti-cheat khác được nạp, hoặc khi game được cập nhật; khi đó bạn có thể tạo lại. Tắt tuỳ chọn trong Cài đặt sẽ tạm ngưng nó. Bạn có thể rút lại bất cứ lúc nào.</value></data>
<data name="Safety_Exception_Next" xml:space="preserve"><value>Tạo ngoại lệ không bật hooking. Sau đó bạn tự bật hooking cho game này qua hộp thoại đồng ý thông thường.</value></data>
<data name="Safety_Exception_Online" xml:space="preserve"><value>FrameLedger dành cho chơi offline và chơi đơn. Đừng dùng ngoại lệ này với game bạn chơi online hoặc thi đấu, trừ khi bạn chấp nhận mất tài khoản đó.</value></data>
<data name="Safety_Exception_Accept" xml:space="preserve"><value>Tôi chấp nhận rủi ro bị khoá tài khoản cho game này</value></data>
+14
View File
@@ -3704,6 +3704,20 @@ TEST_CASE("a listed store id refuses as BlockedStoreId, naming its family", "[gu
CHECK(g.lastStoreRoot == L"C:\\Games\\Example"); // the install root check 4 walks, derived from the pid
}
TEST_CASE("the CrackProof titles refuse by their Steam ids, naming CrackProof", "[guard][check3][store]") {
// Rules 2026.10.1 (owner's list, 2026-10-03): the floor carries them, so a rules file cannot take one off.
for (const char* id : {"steam:3224770", "steam:1973710", "steam:2987800"}) {
ResetFake();
g.storeIdentity = id;
const Verdict v = EvaluateWithSources(1234, FakeSources());
INFO(id);
REQUIRE_FALSE(v.Allowed());
CHECK(v.reason == Reason::kBlockedStoreId);
CHECK(std::strcmp(v.family, "CrackProof") == 0);
CHECK(std::strcmp(v.signal, id) == 0);
}
}
TEST_CASE("an install no store names is not refused by the store half", "[guard][check3][store]") {
ResetFake();
g.storeIdentity = "";
@@ -17,7 +17,7 @@ public sealed class AntiCheatExceptionsTests
{
private static CancellationToken Ct => TestContext.Current.CancellationToken;
private static readonly AntiCheatExceptionFacts _gf2 = new("GIRLS' FRONTLINE 2: EXILIUM", "NetEase Yidun", "NEP2.dll", 3);
private static readonly AntiCheatExceptionFacts _gf2 = new("GIRLS' FRONTLINE 2: EXILIUM", "NetEase Yidun", "NEP2.dll");
private static HelloAck Hello(string? exceptionDisclosure) =>
new("agent", IpcProtocol.Version, 1, false, "b", false, "l1", false, SafetyDisclosure.Version, exceptionDisclosure);
@@ -102,13 +102,14 @@ public sealed class AntiCheatExceptionsTests
var agent = new FakeAgent
{
Hello = Hello(AntiCheatExceptionDisclosure.Version),
Answer = static _ => Ack(IpcMessageType.Refused, new RefusedAck(56, "TooFewSessions", "NetEase Yidun", "1")),
// D38: a game whose exception once failed its trial is refused for good; the signal is when, in unix ms.
Answer = static _ => Ack(IpcMessageType.Refused, new RefusedAck(56, "TrialFailed", "NetEase Yidun", "1759449600000")),
};
var exceptions = new AntiCheatExceptions(agent, new FakePrompt { Accepts = true });
AntiCheatExceptionResult few = await exceptions.GrantAsync(56, _gf2, Ct);
few.Outcome.Should().Be(AntiCheatExceptionOutcome.Refused);
few.RefusalText().Should().Contain("1");
AntiCheatExceptionResult failed = await exceptions.GrantAsync(56, _gf2, Ct);
failed.Outcome.Should().Be(AntiCheatExceptionOutcome.Refused);
failed.RefusalText().Should().Contain("trial").And.Contain(Formats.Date(DateTimeOffset.FromUnixTimeMilliseconds(1759449600000)));
agent.Answer = static _ => throw new IpcRequestException(IpcErrorCode.ExceptionsOff, "off");
(await exceptions.GrantAsync(56, _gf2, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.OptionOff);
@@ -140,7 +141,8 @@ public sealed class AntiCheatExceptionsTests
viewModel.Accepted.Should().BeFalse("the dialog opens with the risk unaccepted");
viewModel.Intro.Should().Contain("NetEase Yidun").And.Contain("NEP2.dll");
viewModel.Why.Should().Contain("3");
viewModel.Why.Should().Contain("NetEase Yidun").And.NotContain("{1}", "D38: the disclosure names no session count");
AntiCheatExceptionDialogViewModel.Trial.Should().Contain("trial", "D38: the grant's first two sessions are a trial, and the disclosure says so");
viewModel.Risk.Should().Contain("NetEase Yidun");
viewModel.Accepted = true;
viewModel.Accepted.Should().BeTrue();
@@ -66,9 +66,17 @@ public sealed class GameDetailViewModelTests
public void GoBack() => Pages.Add("back");
}
private sealed class FakeConfirmations(RemoveGameChoice choice) : IConfirmations
private sealed class FakeConfirmations(RemoveGameChoice choice, bool deleteSessions = false) : IConfirmations
{
public List<(string? Game, long Sessions)> DeleteAsked { get; } = [];
public Task<RemoveGameChoice> RemoveGameAsync(string gameName, CancellationToken ct = default) => Task.FromResult(choice);
public Task<bool> DeleteSessionsAsync(string? gameName, long sessions, CancellationToken ct = default)
{
DeleteAsked.Add((gameName, sessions));
return Task.FromResult(deleteSessions);
}
}
private sealed class FakeEdit(GameMetadata? answer) : IEditGamePrompt
@@ -474,7 +482,11 @@ public sealed class GameDetailViewModelTests
}
}
/// <summary>D33: a game the guard would let through but with one hooked session says so; a kernel-level family says why not.</summary>
/// <summary>
/// D33: why a game is not eligible is said on its page — a kernel-level family, a guard that also found something else.
/// D38 (2026-10-03): a failed trial says it is for good; a scan that found nothing of the family says so (it finished);
/// and an ELIGIBLE game's anti-cheat card no longer says hooking "cannot be turned on" beside its Make exception button.
/// </summary>
[Fact]
public async Task WhyAGameIsNotEligibleIsSaidOnItsPage()
{
@@ -483,47 +495,33 @@ public sealed class GameDetailViewModelTests
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow few = await s.GameAsync("Few");
GameRow aniimo = await s.GameAsync("Aniimo");
GameRow eac = await s.GameAsync("Eac");
await s.Db.WriteAsync(async (c, tx, ct) =>
{
const string sql = "UPDATE games SET hook_blocked_reason = @block, hook_prescan_state = 'blocked', ac_exception_verdict = @verdict, "
+ "ac_exception_sessions = @sessions, ac_exception_checked_block = @block WHERE id = @id";
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = few.Id,
block = "AntiCheatFile|NetEase Yidun|NEP2.dll",
verdict = "AllowedUnderUserModeException|NetEase Yidun|NEP2.dll",
sessions = 1
}, tx, cancellationToken: ct)).ConfigureAwait(false);
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = aniimo.Id,
block = "AntiCheatFile|NetEase Yidun|NEP2.dll",
verdict = "AntiCheatFile|Kernel driver in the game folder|NEPKernel.sys",
sessions = 1
}, tx, cancellationToken: ct)).ConfigureAwait(false);
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = eac.Id,
block = "AntiCheatDirectory|Easy Anti-Cheat|EasyAntiCheat",
verdict = "AntiCheatDirectory|Easy Anti-Cheat|EasyAntiCheat",
sessions = 4
}, tx, cancellationToken: ct)).ConfigureAwait(false);
return 0;
}, Ct);
const string yidun = "AntiCheatFile|NetEase Yidun|NEP2.dll";
const string through = "AllowedUnderUserModeException|NetEase Yidun|NEP2.dll";
long failed = await BlockedWithAnswerAsync(s, "Failed", yidun, through, eligible: false, trialFailedAt: 1_759_449_600_000);
long gone = await BlockedWithAnswerAsync(s, "Gone", yidun, "Allow||", eligible: false);
long eligible = await BlockedWithAnswerAsync(s, "GF2", yidun, through, eligible: true);
long aniimo = await BlockedWithAnswerAsync(s, "Aniimo", yidun, "AntiCheatFile|Kernel driver in the game folder|NEPKernel.sys", eligible: false);
long eac = await BlockedWithAnswerAsync(s, "Eac", "AntiCheatDirectory|Easy Anti-Cheat|EasyAntiCheat", "AntiCheatDirectory|Easy Anti-Cheat|EasyAntiCheat",
eligible: false);
var settings = new RegisteredSettings(new MemorySettings());
await settings.SetAsync(SettingsRegistry.HookingUserModeExceptions, true, Ct);
(GameDetailViewModel vm, _, _, _, _) = await BuildAsync(s, few.Id, settings: settings);
vm.ExceptionText.Should().Contain("1").And.Contain("two");
(GameDetailViewModel vm, _, _, _, _) = await BuildAsync(s, failed, settings: settings);
vm.ExceptionText.Should().Contain("trial").And.Contain("none can be made again");
vm.CanGrantException.Should().BeFalse();
vm.AntiCheatText.Should().Contain("cannot be turned on", "nothing can be made for it");
(vm, _, _, _, _) = await BuildAsync(s, aniimo.Id, settings: settings);
(vm, _, _, _, _) = await BuildAsync(s, gone, settings: settings);
vm.ExceptionText.Should().Contain("NetEase Yidun").And.Contain("was not found", "the check finished and confirmed nothing");
(vm, _, _, _, _) = await BuildAsync(s, eligible, settings: settings);
vm.CanGrantException.Should().BeTrue("D38: no session is needed");
vm.AntiCheatText.Should().Contain("unless you make a user-mode exception").And.NotContain("cannot be turned on");
(vm, _, _, _, _) = await BuildAsync(s, aniimo, settings: settings);
vm.ExceptionText.Should().Contain("Kernel driver in the game folder").And.Contain("NEPKernel.sys");
(vm, _, _, _, _) = await BuildAsync(s, eac.Id, settings: settings);
(vm, _, _, _, _) = await BuildAsync(s, eac, settings: settings);
vm.ExceptionText.Should().Contain("Easy Anti-Cheat").And.Contain("not user-mode");
}
finally
@@ -532,6 +530,17 @@ public sealed class GameDetailViewModelTests
}
}
/// <summary>A blocked game the Agent has answered about: the block, the tolerant verdict, eligibility and a D38 trial mark.</summary>
private static async Task<long> BlockedWithAnswerAsync(ScratchLedger s, string name, string block, string verdict, bool eligible, long? trialFailedAt = null)
{
GameRow game = await s.GameAsync(name).ConfigureAwait(false);
const string sql = "UPDATE games SET hook_blocked_reason = @block, hook_prescan_state = 'blocked', ac_exception_verdict = @verdict, "
+ "ac_exception_eligible = @eligible, ac_exception_trial_failed_at = @failedAt, ac_exception_checked_block = @block WHERE id = @id";
await s.Db.WriteAsync((c, tx, ct) => Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql,
new { id = game.Id, block, verdict, eligible = eligible ? 1 : 0, failedAt = trialFailedAt }, tx, cancellationToken: ct)), Ct).ConfigureAwait(false);
return game.Id;
}
/// <summary>The library card says "Anti-cheat" for such a game (beta.8) — after "Not recorded", which says more.</summary>
[Fact]
public async Task TheLibraryCardSaysAntiCheatForAGameTheGuardFoundItIn()
@@ -0,0 +1,128 @@
using System.IO;
using FluentAssertions;
using FrameLedger.App.Controls;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Persistence;
using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.Tests;
/// <summary>
/// beta.11 (owner requests 2026-10-03): the library page counts its games, reloads itself while on screen when a session
/// ends or an import adds games, lets go when it leaves, and its grid's columns fill the width.
/// </summary>
public sealed class GamesViewModelTests
{
private static CancellationToken Ct => TestContext.Current.CancellationToken;
private sealed class NoNavigation : IPageNavigator
{
public void Navigate<TPage>()
where TPage : class
{
}
public void GoBack()
{
}
}
private sealed class NoPicker : IGamePicker
{
public string? PickExecutable() => null;
}
private sealed class NoStrip : IMessageStrip
{
public void Info(string title, string body)
{
}
public void Success(string title, string body)
{
}
public void Warn(string title, string body)
{
}
}
[Fact]
public async Task ThePageOnScreenReloadsWhenAnImportAddsGamesOrASessionEndsAndNotAfterItLeaves()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow alpha = await s.GameAsync("Alpha");
var selection = new GameSelection();
var nav = new NoNavigation();
var link = new FakeAgentLink();
var changes = new LibraryChanges();
var vm = new GamesViewModel(s.Library, selection, nav, new AddGameFlow(s.Library, new NoPicker(), selection, nav, new NoStrip()), agent: link, changes: changes);
Task loaded = vm.Pending;
await loaded;
vm.HeaderText.Should().EndWith("1");
vm.Attach();
vm.Attach(); // a second Loaded does not subscribe twice
_ = await s.GameAsync("Bravo");
changes.Announce();
Task afterImport = vm.Pending;
await afterImport;
vm.Games.Should().HaveCount(2, "an import made from the menu while the page is on screen");
vm.HeaderText.Should().EndWith("2");
long session = await s.SessionAsync(alpha.Id, DateTimeOffset.UtcNow);
link.Raise(IpcMessageType.SessionCompleted, new SessionCompletedEvent(Guid.NewGuid(), session, "normal", 1, "saved", "exited", alpha.Id, "Alpha"));
Task afterSession = vm.Pending;
await afterSession;
vm.Games.Single(static g => string.Equals(g.Name, "Alpha", StringComparison.Ordinal)).SessionCount.Should().Be(1);
vm.Detach();
Task before = vm.Pending;
_ = await s.GameAsync("Charlie");
changes.Announce();
vm.Pending.Should().BeSameAs(before, "a page that left holds nothing and reloads nothing");
vm.Games.Should().HaveCount(2);
}
[Fact]
public async Task ACardSaysWhetherItsExecutableIsThereAndWhy()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow row = await s.GameAsync("Gone", @"Q:\Games\Gone\gone.exe");
new GameCardViewModel(new GameCard(row, null)).NotInstalled.Should().BeFalse("installed unless the listing said otherwise");
var missing = new GameCardViewModel(new GameCard(row, null), installed: false);
missing.NotInstalled.Should().BeTrue();
missing.NotInstalledToolTip.Should().Be(Formats.ExecutableMissingText(@"Q:\Games\Gone\gone.exe"), "the game page's own words for why");
missing.StatusText.Should().Contain(Strings.Games_Card_NotInstalled);
await using ScratchLedger s2 = await ScratchLedger.OpenAsync();
var listed = new GamesViewModel(s2.Library, new GameSelection(), new NoNavigation(),
new AddGameFlow(s2.Library, new NoPicker(), new GameSelection(), new NoNavigation(), new NoStrip()));
string here = typeof(GamesViewModelTests).Assembly.Location;
_ = await s2.GameAsync("Here", here);
_ = await s2.GameAsync("Gone", Path.Combine(AppContext.BaseDirectory, "no-such-game.exe"));
await listed.LoadAsync(Ct);
listed.Games.Single(static g => string.Equals(g.Name, "Here", StringComparison.Ordinal)).NotInstalled.Should().BeFalse();
listed.Games.Single(static g => string.Equals(g.Name, "Gone", StringComparison.Ordinal)).NotInstalled.Should().BeTrue();
}
[Theory]
[InlineData(1200, 3)]
[InlineData(1248, 4)]
[InlineData(1235, 3)]
[InlineData(624, 2)]
[InlineData(250, 1)]
[InlineData(double.PositiveInfinity, 1)]
public void TheGridHasAsManyColumnsAsFitAtTheMinimumWidth(double width, int columns)
{
UniformWrapPanel.ColumnsFor(width, 300, 12).Should().Be(columns);
if (!double.IsInfinity(width))
{
double item = UniformWrapPanel.ItemWidthFor(width, columns, 12);
item.Should().BeGreaterThanOrEqualTo(columns == 1 ? 0 : 300);
((columns * item) + ((columns - 1) * 12)).Should().BeApproximately(width, 0.001, "a row fills the width");
}
}
}
@@ -90,7 +90,7 @@ public sealed class ImportLibraryFlowTests : IDisposable
var importer = new LibraryImporter([store], s.Games, new ExecutableIdentitySource(), new ExecutableLocator(), static _ => { });
var flow = new ImportLibraryFlow(importer, review, strip, nav);
ImportReport? report = await flow.RunAsync(Ct);
ImportReport? report = await flow.RunAsync(ct: Ct);
report.Should().NotBeNull();
report!.Added.Should().Be(1);
@@ -114,17 +114,55 @@ public sealed class ImportLibraryFlowTests : IDisposable
var nav = new FakeNavigator();
var review = new ScriptedReview(static _ => null);
var empty = new ImportLibraryFlow(new LibraryImporter([new ScriptedStore()], s.Games, new ExecutableIdentitySource(), new ExecutableLocator(), static _ => { }), review, strip, nav);
(await empty.RunAsync(Ct)).Should().BeNull();
(await empty.RunAsync(ct: Ct)).Should().BeNull();
strip.Kinds.Should().Equal("info");
review.Shown.Should().BeEmpty("nothing to review");
string exe = await ExeAsync("Game");
var cancelled = new ImportLibraryFlow(new LibraryImporter([new ScriptedStore(new StoreGame("epic", "g", "Game", Path.GetDirectoryName(exe)!, exe, null))], s.Games, new ExecutableIdentitySource(), new ExecutableLocator(), static _ => { }), review, strip, nav);
(await cancelled.RunAsync(Ct)).Should().BeNull();
(await cancelled.RunAsync(ct: Ct)).Should().BeNull();
(await s.Games.ListAsync(Ct)).Should().BeEmpty();
nav.Pages.Should().BeEmpty();
}
/// <summary>
/// beta.11: the Games page's Refresh runs the import for new games only — every title already in the library means "no
/// new games" and no checklist; a new one opens it, and the page on screen is told the library changed.
/// </summary>
[Fact]
public async Task RefreshOffersOnlyNewGamesAndSaysWhenThereAreNone()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
string old = await ExeAsync("Old");
await s.Games.EnsureAsync(new ExecutableIdentitySource().Read(old)!.Value, "Old", Ct);
var oldStore = new ScriptedStore(new StoreGame("epic", "old", "Old", Path.GetDirectoryName(old)!, old, null));
var review = new ScriptedReview(static c => [.. c.Where(static x => x.CanImport)]);
var strip = new RecordingStrip();
var nav = new FakeNavigator();
var changes = new LibraryChanges();
int announced = 0;
changes.Changed += (_, _) => announced++;
var flow = new ImportLibraryFlow(new LibraryImporter([oldStore], s.Games, new ExecutableIdentitySource(), new ExecutableLocator(), static _ => { }),
review, strip, nav, changes);
(await flow.RunAsync(onlyNew: true, Ct)).Should().BeNull();
review.Shown.Should().BeEmpty("nothing new, so no checklist");
strip.Kinds.Should().Equal("info");
announced.Should().Be(0);
string fresh = await ExeAsync("Fresh");
var both = new ScriptedStore(new StoreGame("epic", "old", "Old", Path.GetDirectoryName(old)!, old, null),
new StoreGame("epic", "fresh", "Fresh", Path.GetDirectoryName(fresh)!, fresh, null));
flow = new ImportLibraryFlow(new LibraryImporter([both], s.Games, new ExecutableIdentitySource(), new ExecutableLocator(), static _ => { }),
review, strip, nav, changes);
ImportReport? report = await flow.RunAsync(onlyNew: true, Ct);
report!.Added.Should().Be(1);
announced.Should().Be(1, "the Games page on screen reloads");
nav.Pages.Should().Equal(nameof(GamesPage));
}
[Fact]
public void TheReviewCountsTicksAndSelectAllSkipsWhatCannotBeImported()
{
@@ -150,4 +188,33 @@ public sealed class ImportLibraryFlowTests : IDisposable
vm.SelectedCount.Should().Be(1);
vm.Selected.Should().ContainSingle().Which.Should().Be(can);
}
/// <summary>
/// beta.11 (owner request 2026-10-03): the games already in the library — at this path or under another drive letter —
/// are hidden by default and come back, still unimportable, when the user asks; the count names how many.
/// </summary>
[Fact]
public void GamesAlreadyInTheLibraryAreHiddenUntilAskedFor()
{
var can = new ImportCandidate(new StoreGame("steam", "1", "A", @"C:\a", @"C:\a\a.exe", null), @"C:\a\a.exe", AlreadyInLibrary: false, ExecutableGuessed: false);
var already = new ImportCandidate(new StoreGame("steam", "2", "B", @"C:\b", @"C:\b\b.exe", null), @"C:\b\b.exe", AlreadyInLibrary: true, ExecutableGuessed: false);
var none = new ImportCandidate(new StoreGame("steam", "3", "C", @"C:\c", null, null), null, AlreadyInLibrary: false, ExecutableGuessed: true);
var moved = new ImportCandidate(new StoreGame("steam", "4", "D", @"D:\d", @"D:\d\d.exe", null), @"D:\d\d.exe", AlreadyInLibrary: false, ExecutableGuessed: false,
MovedFrom: @"H:\d\d.exe");
var vm = new ImportReviewViewModel([can, already, none, moved]);
vm.ExistingCount.Should().Be(2);
vm.HasExisting.Should().BeTrue();
vm.ShowExistingText.Should().Contain("2");
vm.Shown.Select(static r => r.Name).Should().Equal(["A", "C"], "a title with no executable is new and says why it cannot be imported");
vm.ShowExisting = true;
vm.Shown.Select(static r => r.Name).Should().Equal(["A", "B", "C", "D"]);
vm.Shown.Where(static r => r.IsExisting).Should().OnlyContain(static r => !r.CanImport, "shown dimmed, never importable");
vm.SelectAllCommand.Execute(null);
vm.SelectedCount.Should().Be(1, "showing them makes them no more importable");
vm.ShowExisting = false;
vm.Shown.Should().HaveCount(2);
}
}
@@ -0,0 +1,53 @@
using System.IO;
using System.Text.RegularExpressions;
using FluentAssertions;
using FrameLedger.App.Services;
namespace FrameLedger.App.Tests;
/// <summary>
/// <c>LIMITATIONS.md</c> (beta.10, owner decision D36) rides in the assembly for Help ▸ Limitations, is information rather
/// than one of FR-11's accepted documents, and every repository link in it names a file that exists.
/// </summary>
public sealed partial class LimitationsDocumentTests
{
[GeneratedRegex(@"\]\((?<target>[^)#\s]+)(#[^)]*)?\)", RegexOptions.ExplicitCapture, 1000)]
private static partial Regex Link();
private static string RepoRoot()
{
string dir = AppContext.BaseDirectory;
while (!File.Exists(Path.Combine(dir, "FrameLedger.slnx")))
{
dir = Path.GetDirectoryName(dir) ?? throw new InvalidOperationException("FrameLedger.slnx not found above the test binary");
}
return dir;
}
[Fact]
public void ItIsEmbeddedAsWrittenAndIsNotADocumentTheUserAccepts()
{
string text = LimitationsDocument.Load();
text.Should().StartWith("# What FrameLedger cannot do").And.NotContain("<!--");
text.Should().Be(LegalDocuments.StripComments(File.ReadAllText(Path.Combine(RepoRoot(), "LIMITATIONS.md"))), "the App shows the file this build was made from");
LegalDocuments.Keys.Should().NotContain(static k => k.Contains("limit", StringComparison.OrdinalIgnoreCase),
"the Legal Gate records an acceptance per document it shows; this is information, not terms");
LimitationsDocument.OnGitHub.Host.Should().Be("github.com");
}
[Fact]
public void EveryRepositoryLinkNamesAFileThatExists()
{
string root = RepoRoot();
string[] targets = [.. Link().Matches(LimitationsDocument.Load()).Select(static m => m.Groups["target"].Value)
.Where(static t => !t.StartsWith("http", StringComparison.OrdinalIgnoreCase))];
targets.Should().NotBeEmpty("the page links each limit to the document with its details");
foreach (string target in targets)
{
File.Exists(Path.Combine(root, target.Replace('/', Path.DirectorySeparatorChar))).Should().BeTrue($"LIMITATIONS.md links {target}");
}
}
}
@@ -72,6 +72,8 @@ public sealed class PagesLoadTests
private sealed class NoConfirm : IConfirmations
{
public Task<bool> DeleteSessionsAsync(string? gameName, long sessions, CancellationToken ct = default) => Task.FromResult(false);
public Task<RemoveGameChoice> RemoveGameAsync(string gameName, CancellationToken ct = default) => Task.FromResult(RemoveGameChoice.Cancel);
}
@@ -253,6 +255,102 @@ public sealed class PagesLoadTests
element.UpdateLayout();
}
/// <summary>
/// beta.11 (owner request 2026-10-03: "the empty band on the right"): the library's cards share the whole width — every
/// card in a row as wide as the others, the row as wide as the panel — and the list view renders with the grid gone, the
/// choice remembered. Under the real dictionaries, so a style or binding typo is red here.
/// </summary>
[Fact]
public async Task TheLibraryGridFillsItsWidthAndTheListViewReplacesIt()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
foreach (string name in new[] { "Alpha", "Bravo", "Charlie", "Delta", "Echo" })
{
_ = await s.GameAsync(name);
}
var selection = new GameSelection();
var nav = new NoNavigation();
var strip = new NoStrip();
var settings = new MemorySettings();
var games = new GamesViewModel(s.Library, selection, nav, new AddGameFlow(s.Library, new NoPicker(), selection, nav, strip),
settings: new RegisteredSettings(settings));
Task pending = games.Pending;
await pending;
games.HeaderText.Should().EndWith("5");
games.Games.Should().OnlyContain(static g => g.NotInstalled, "the scratch entries point at files that do not exist");
(double PanelWidth, double[] CardWidths, int Columns) grid = await OnStaAsync(() =>
{
var page = new GamesPage(games);
Render(page);
UniformWrapPanel panel = Find<UniformWrapPanel>(page)!;
double[] widths = [.. panel.Children.Cast<FrameworkElement>().Select(static c => c.ActualWidth)];
return (panel.ActualWidth, widths, UniformWrapPanel.ColumnsFor(panel.ActualWidth, panel.MinItemWidth, panel.Spacing));
});
grid.Columns.Should().BeGreaterThan(1);
grid.CardWidths.Should().OnlyContain(w => Math.Abs(w - grid.CardWidths[0]) < 0.5, "every card is an equal share");
((grid.Columns * grid.CardWidths[0]) + ((grid.Columns - 1) * 12)).Should().BeApproximately(grid.PanelWidth, 1, "a full row leaves no band unused");
games.ShowListCommand.Execute(null);
(bool ListShown, bool GridShown) list = await OnStaAsync(() =>
{
var page = new GamesPage(games);
Render(page);
return (((FrameworkElement)page.FindName("GameList")).Visibility == Visibility.Visible,
((FrameworkElement)page.FindName("CardGrid")).Visibility == Visibility.Visible);
});
list.ListShown.Should().BeTrue();
list.GridShown.Should().BeFalse();
settings.Rows.Should().ContainKey("ui.library_view").WhoseValue.Should().Be("list", "the choice is remembered");
}
/// <summary>beta.11: the import checklist renders with the rows already in the library shown, dimmed, under the real dictionaries.</summary>
[Fact]
public async Task TheImportChecklistRendersWithTheExistingRowsShown()
{
var vm = new ImportReviewViewModel(
[
new Application.Import.ImportCandidate(new Application.Import.StoreGame("steam", "1", "A", @"C:\a", @"C:\a\a.exe", null), @"C:\a\a.exe",
AlreadyInLibrary: false, ExecutableGuessed: false),
new Application.Import.ImportCandidate(new Application.Import.StoreGame("steam", "2", "B", @"C:\b", @"C:\b\b.exe", null), @"C:\b\b.exe",
AlreadyInLibrary: true, ExecutableGuessed: false),
])
{ ShowExisting = true };
int rows = await OnStaAsync(() =>
{
var content = new Dialogs.ImportReviewContent(vm);
Render(content);
return Find<System.Windows.Controls.DataGrid>(content)!.Items.Count;
});
rows.Should().Be(2);
}
/// <summary>The first descendant of <paramref name="root"/> of type <typeparamref name="T"/> in the visual tree, or null.</summary>
private static T? Find<T>(DependencyObject root)
where T : DependencyObject
{
for (int i = 0; i < System.Windows.Media.VisualTreeHelper.GetChildrenCount(root); i++)
{
DependencyObject child = System.Windows.Media.VisualTreeHelper.GetChild(root, i);
if (child is T hit)
{
return hit;
}
if (Find<T>(child) is { } deeper)
{
return deeper;
}
}
return null;
}
/// <summary>
/// beta.8 (owner request 2026-09-25): an anti-cheat game's page under the real dictionaries — the finding's card is
/// rendered, and the Hooking card, whose switch could only be refused, is not while <c>ui.hide_anticheat_hooking</c> is
@@ -0,0 +1,273 @@
using FluentAssertions;
using FrameLedger.App.Charts;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Persistence;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.Tests;
/// <summary>
/// beta.11: Delete all sessions (owner decision D40) through the Agent, from the game page; and the charts across a game's
/// sessions (D39) — the Sessions tab's overview, and the Trend's second metric and second unit.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class SessionDeletionAndOverviewTests
{
private static CancellationToken Ct => TestContext.Current.CancellationToken;
/// <summary>An Agent that answers DeleteSessions as scripted, and records what it was asked.</summary>
private sealed class ScriptedAgent : IAgentRequests
{
public HelloAck? Hello => null;
public bool IsConnected { get; set; } = true;
public List<DeleteSessionsRequest> Asked { get; } = [];
public Func<DeleteSessionsRequest, Task<IpcEnvelope>> Answer { get; set; } = static r =>
Task.FromResult(IpcCodec.Decode(IpcCodec.Encode(IpcMessageType.DeleteSessionsAck, "1", new DeleteSessionsAck(r.GameId, 1, 2))));
public Task<IpcEnvelope> RequestAsync<TRequest>(string type, TRequest payload, CancellationToken ct = default)
where TRequest : class
{
type.Should().Be(IpcMessageType.DeleteSessions);
var request = (DeleteSessionsRequest)(object)payload;
Asked.Add(request);
return Answer(request);
}
}
private sealed class Confirm(bool yes) : IConfirmations
{
public List<(string? Game, long Sessions)> Asked { get; } = [];
public Task<RemoveGameChoice> RemoveGameAsync(string gameName, CancellationToken ct = default) => Task.FromResult(RemoveGameChoice.Cancel);
public Task<bool> DeleteSessionsAsync(string? gameName, long sessions, CancellationToken ct = default)
{
Asked.Add((gameName, sessions));
return Task.FromResult(yes);
}
}
private sealed class Strip : IMessageStrip
{
public List<string> Lines { get; } = [];
public void Info(string title, string body) => Lines.Add("info:" + body);
public void Success(string title, string body) => Lines.Add("success:" + body);
public void Warn(string title, string body) => Lines.Add("warn:" + body);
}
private sealed class Nav : IPageNavigator
{
public void Navigate<TPage>()
where TPage : class
{
}
public void GoBack()
{
}
}
private sealed class NoEdit : IEditGamePrompt
{
public Task<GameMetadata?> EditAsync(GameMetadata current, string? provenanceJson, CancellationToken ct = default) => Task.FromResult<GameMetadata?>(null);
}
private sealed class NoSummaries : ISessionSummaryOpener
{
public void Open(long sessionId)
{
}
}
private sealed class NoPicker : IGamePicker
{
public string? PickExecutable() => null;
}
/// <summary>The summary windows, counting how often they were asked to close the deleted sessions' ones.</summary>
private sealed class Windows : ISessionWindows
{
public int Asked { get; private set; }
public Task CloseDeletedAsync(CancellationToken ct = default)
{
Asked++;
return Task.CompletedTask;
}
}
/// <summary>The scripted Agent deletes for real, as the Agent's repository would.</summary>
private static Func<DeleteSessionsRequest, Task<IpcEnvelope>> DeletesFrom(ScratchLedger s) => async r =>
{
RetentionSweepResult gone = await s.Sessions.DeleteSessionsAsync(r.GameId, Ct).ConfigureAwait(false);
return IpcCodec.Decode(IpcCodec.Encode(IpcMessageType.DeleteSessionsAck, "1", new DeleteSessionsAck(r.GameId, gone.Games, gone.Sessions)));
};
private sealed class NoPrompt : IConsentPrompt
{
public Task<bool> ShowAsync(string gameName, CancellationToken ct = default) => Task.FromResult(false);
}
private static async Task<GameDetailViewModel> PageAsync(ScratchLedger s, long gameId, IConfirmations confirm, SessionDeletion? deletion, IMessageStrip strip,
SessionSelection? selection = null)
{
var vm = new GameDetailViewModel(s.Library, new GameSelection { GameId = gameId }, new HookingConsent(new ScriptedAgent(), new NoPrompt()), new Nav(),
confirm, new NoEdit(), strip, new NoSummaries(), new SessionSeriesLoader(s.Sessions),
new Infrastructure.Persistence.SqliteHardwareSnapshotRepository(s.Db), selection ?? new SessionSelection(), new NoPicker(), deletion: deletion);
Task pending = vm.Pending;
await pending.ConfigureAwait(false);
return vm;
}
[Fact]
public async Task TheRequestSaysWhatTheAgentDidOrWhyNothingWasDeleted()
{
var agent = new ScriptedAgent();
var deletion = new SessionDeletion(agent);
SessionDeletionResult done = await deletion.DeleteAsync(7, Ct);
done.Should().Be(new SessionDeletionResult(SessionDeletionOutcome.Deleted, 1, 2));
done.Message.Should().Contain("2");
agent.Asked.Should().Equal(new DeleteSessionsRequest(7));
agent.Answer = static _ => throw new IpcRequestException(IpcErrorCode.SessionRunning, "running");
(await deletion.DeleteAsync(null, Ct)).Outcome.Should().Be(SessionDeletionOutcome.SessionRunning);
agent.Answer = static _ => throw new IpcRequestException(IpcErrorCode.UnknownType, "older agent");
(await deletion.DeleteAsync(null, Ct)).Outcome.Should().Be(SessionDeletionOutcome.AgentTooOld);
agent.IsConnected = false;
(await deletion.DeleteAsync(null, Ct)).Outcome.Should().Be(SessionDeletionOutcome.AgentUnavailable);
agent.Asked.Should().HaveCount(3, "nothing is asked of an Agent that is not there");
}
/// <summary>
/// The game page asks first and deletes nothing on a no; on a yes the Agent deletes, the page says so, reloads empty, and
/// File ▸ Export no longer points at a session that is gone.
/// </summary>
[Fact]
public async Task TheGamePageAsksThenTheAgentDeletesAndThePageReloads()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
long first = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-2));
await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-1));
var strip = new Strip();
var agent = new ScriptedAgent();
GameDetailViewModel no = await PageAsync(s, game.Id, new Confirm(false), new SessionDeletion(agent), strip);
await no.DeleteAllSessionsCommand.ExecuteAsync(null);
agent.Asked.Should().BeEmpty("a no deletes nothing");
no.Sessions.Should().HaveCount(2);
agent.Answer = DeletesFrom(s);
var confirm = new Confirm(true);
var selection = new SessionSelection();
selection.Set(first);
GameDetailViewModel yes = await PageAsync(s, game.Id, confirm, new SessionDeletion(agent, s.Sessions, selection), strip, selection);
await yes.DeleteAllSessionsCommand.ExecuteAsync(null);
confirm.Asked.Should().Equal(("Alpha", 2L));
agent.Asked.Should().Equal(new DeleteSessionsRequest(game.Id));
yes.Sessions.Should().BeEmpty();
yes.SessionsEmpty.Should().BeTrue();
strip.Lines.Should().ContainSingle(static l => l.StartsWith("success:", StringComparison.Ordinal));
selection.SessionId.Should().BeNull("an id that is gone can be reused by the next session");
}
/// <summary>
/// After a delete — from the game page or from Settings — SessionDeletion lets go of what still names a deleted session:
/// File ▸ Export's selection (a session that is still there stays selected) and the summary windows. A refused delete
/// touches neither.
/// </summary>
[Fact]
public async Task AfterADeleteWhatNamedADeletedSessionLetsGoOfIt()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow alpha = await s.GameAsync("Alpha");
GameRow beta = await s.GameAsync("Beta");
long gone = await s.SessionAsync(alpha.Id, DateTimeOffset.UtcNow.AddHours(-2));
long kept = await s.SessionAsync(beta.Id, DateTimeOffset.UtcNow.AddHours(-1));
var agent = new ScriptedAgent { Answer = DeletesFrom(s) };
var selection = new SessionSelection();
var windows = new Windows();
var deletion = new SessionDeletion(agent, s.Sessions, selection, windows);
selection.Set(gone);
(await deletion.DeleteAsync(alpha.Id, Ct)).Outcome.Should().Be(SessionDeletionOutcome.Deleted);
selection.SessionId.Should().BeNull("Export would otherwise name a session that is gone, or the next one to take its id");
windows.Asked.Should().Be(1, "the summary windows close the deleted sessions' ones");
selection.Set(kept);
(await deletion.DeleteAsync(alpha.Id, Ct)).Outcome.Should().Be(SessionDeletionOutcome.Deleted);
selection.SessionId.Should().Be(kept, "the other game's session is still there");
windows.Asked.Should().Be(2);
agent.Answer = static _ => throw new IpcRequestException(IpcErrorCode.SessionRunning, "running");
(await deletion.DeleteAsync(null, Ct)).Outcome.Should().Be(SessionDeletionOutcome.SessionRunning);
selection.SessionId.Should().Be(kept, "nothing was deleted");
windows.Asked.Should().Be(2, "nothing was deleted");
}
/// <summary>
/// D39: the overview draws every hooked session's rate and lows; the Trend draws a ticked metric beside the selected
/// one, a second unit on the right, and offers no third unit.
/// </summary>
[Fact]
public async Task TheOverviewAndTheTrendDrawSeveralMetricsTwoUnitsAtMost()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddDays(-2), native: 60);
await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddDays(-1), native: 70);
GameDetailViewModel vm = await PageAsync(s, game.Id, new Confirm(false), null, new Strip());
vm.OverviewVisible.Should().BeTrue();
vm.OverviewLines.Should().NotBeEmpty().And.OnlyContain(static l => l.Unit == Strings.Trend_Unit_Fps && l.Points.Count == 2);
vm.OverviewLines.Select(static l => l.Label).Should().NotContain(Strings.Trend_Metric_NativeFps,
"no session generated frames, so Native would only repeat the Presented line");
vm.TrendLines.Should().ContainSingle("only the selected metric until another is ticked");
TrendMetricOptionViewModel selected = vm.TrendExtras.Single(o => o.Metric == vm.TrendMetric);
selected.IsEnabled.Should().BeFalse("the selected metric is not offered beside itself");
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.MaxGpuTemp).IsSelected = true;
vm.TrendLines.Should().HaveCount(2);
vm.TrendLines[1].Unit.Should().Be(Strings.Trend_Unit_Celsius);
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.AvgGpuPower).IsEnabled.Should().BeFalse("watts would be a third unit");
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.P1Low).IsEnabled.Should().BeTrue("a frame rate is the first unit");
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.MaxCpuTemp).IsEnabled.Should().BeTrue("°C is already on the chart");
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.MaxGpuTemp).IsSelected = false;
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.AvgGpuPower).IsEnabled.Should().BeTrue("back to one unit");
// °C and a frame rate ticked, then the selected metric changed to watts: one of the two ticked units goes, so the
// boxes name exactly the lines the chart draws.
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.MaxGpuTemp).IsSelected = true;
vm.TrendExtras.Single(static o => o.Metric == TrendMetric.P1Low).IsSelected = true;
vm.TrendLines.Select(static l => l.Unit).Distinct(StringComparer.Ordinal).Should().HaveCount(2);
vm.TrendMetric = TrendMetric.AvgGpuPower;
vm.TrendLines.Select(static l => l.Unit).Distinct(StringComparer.Ordinal).Should().HaveCount(2, "the chart draws two units");
vm.TrendLines[0].Unit.Should().Be(TrendSeriesBuilder.UnitOf(TrendMetric.AvgGpuPower));
vm.TrendExtras.Count(static o => o.IsSelected).Should().Be(vm.TrendLines.Count - 1, "every ticked box has its line");
}
[Theory]
[InlineData(TrendMetric.PresentedFps, "FPS")]
[InlineData(TrendMetric.P01Low, "FPS")]
[InlineData(TrendMetric.MaxGpuTemp, "°C")]
[InlineData(TrendMetric.AvgGpuLoad, "%")]
[InlineData(TrendMetric.DisplayBorderlessShare, "%")]
[InlineData(TrendMetric.AvgGpuPower, "W")]
[InlineData(TrendMetric.AvgRam, "MB")]
public void EachMetricHasItsUnit(TrendMetric metric, string unit) => TrendSeriesBuilder.UnitOf(metric).Should().StartWith(unit);
}
@@ -128,7 +128,7 @@ public sealed class SettingsViewModelTests
}
private static async Task<Harness> OpenAsync(ScratchLedger s, FakeAgentLink? agent = null, FakeRun? run = null, FakeMaintenance? maintenance = null, FakeTool? tool = null,
IAgentAdminPrompt? adminPrompt = null)
IAgentAdminPrompt? adminPrompt = null, IConfirmations? confirmations = null, SessionDeletion? deletion = null)
{
maintenance ??= new FakeMaintenance();
tool ??= new FakeTool();
@@ -144,12 +144,71 @@ public sealed class SettingsViewModelTests
var shell = new ShellHost(new ServiceCollection().BuildServiceProvider(), null!, null!, closePolicy);
// The instance-lock probe is the test's (never the real folder's): no Agent holds it, so a restart never waits.
var vm = new SettingsViewModel(appearance, new NoTheme(), shell, settings, s.Library, new HookingConsent(agent, new NoPrompt()), agent, run, strip, maintenance, tool, closePolicy, firstRun,
adminPrompt: adminPrompt, agentHeld: static () => false);
adminPrompt: adminPrompt, agentHeld: static () => false, confirmations: confirmations, deletion: deletion);
Task pending = vm.Pending;
await pending.ConfigureAwait(false);
return new Harness { Ledger = s, Settings = settings, Agent = agent, Run = run, Strip = strip, Vm = vm, Maintenance = maintenance, Tool = tool, ClosePolicy = closePolicy, FirstRun = firstRun };
}
/// <summary>beta.11 (D40): Settings ▸ Data asks with the total, deletes nothing on a no, and deletes every game's through the Agent on a yes.</summary>
[Fact]
public async Task DeleteAllSessionsAsksWithTheTotalThenGoesThroughTheAgent()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow alpha = await s.GameAsync("Alpha");
GameRow bravo = await s.GameAsync("Bravo");
await s.SessionAsync(alpha.Id, DateTimeOffset.UtcNow.AddHours(-2));
await s.SessionAsync(bravo.Id, DateTimeOffset.UtcNow.AddHours(-1));
var confirm = new DeleteConfirm();
var agent = new DeletingAgent(s);
Harness h = await OpenAsync(s, confirmations: confirm, deletion: new SessionDeletion(agent));
await h.Vm.DeleteAllSessionsCommand.ExecuteAsync(null);
confirm.Asked.Should().Equal(((string?)null, 2L));
agent.Asked.Should().BeEmpty("a no deletes nothing");
confirm.Answer = true;
await h.Vm.DeleteAllSessionsCommand.ExecuteAsync(null);
agent.Asked.Should().Equal(new DeleteSessionsRequest(null));
(await s.Sessions.SummariseByGameAsync(Ct)).Should().BeEmpty();
(await s.Games.ListAsync(Ct)).Should().HaveCount(2, "the library stays");
h.Vm.HasHookedGames.Should().BeFalse("no game has hooking on, so that card is not shown");
}
private sealed class DeleteConfirm : IConfirmations
{
public bool Answer { get; set; }
public List<(string? Game, long Sessions)> Asked { get; } = [];
public Task<RemoveGameChoice> RemoveGameAsync(string gameName, CancellationToken ct = default) => Task.FromResult(RemoveGameChoice.Cancel);
public Task<bool> DeleteSessionsAsync(string? gameName, long sessions, CancellationToken ct = default)
{
Asked.Add((gameName, sessions));
return Task.FromResult(Answer);
}
}
/// <summary>An Agent that deletes in the scratch ledger as the real one does in its own.</summary>
private sealed class DeletingAgent(ScratchLedger s) : IAgentRequests
{
public HelloAck? Hello => null;
public bool IsConnected => true;
public List<DeleteSessionsRequest> Asked { get; } = [];
public async Task<IpcEnvelope> RequestAsync<TRequest>(string type, TRequest payload, CancellationToken ct = default)
where TRequest : class
{
var request = (DeleteSessionsRequest)(object)payload;
Asked.Add(request);
RetentionSweepResult gone = await s.Sessions.DeleteSessionsAsync(request.GameId, ct).ConfigureAwait(false);
return IpcCodec.Decode(IpcCodec.Encode(IpcMessageType.DeleteSessionsAck, "1", new DeleteSessionsAck(request.GameId, gone.Games, gone.Sessions)));
}
}
[Fact]
public async Task LoadsTheRegistrysEffectiveValuesAndWritesNothing()
{
@@ -173,8 +232,9 @@ public sealed class SettingsViewModelTests
/// <summary>
/// D33 (owner decision 2026-09-26): the option is one Agent-read settings row, off by default; on, the list names the
/// games the exception concerns — eligible, held back only by the session count, in force — and off, only a kept
/// exception, said to be suspended. The App reads the Agent's columns and writes none.
/// games it can act on — eligible, in force — and off, only a kept exception, said to be suspended. A game that can
/// never qualify (here: D38's failed trial; or a kernel-level family) is not listed: its page says why. The App reads
/// the Agent's columns and writes none.
/// </summary>
[Fact]
public async Task TheExceptionOptionIsOffByDefaultAndItsListFollowsTheAgentsColumns()
@@ -186,7 +246,8 @@ public sealed class SettingsViewModelTests
await s.Db.WriteAsync(async (c, tx, ct) =>
{
const string sql = "UPDATE games SET hook_blocked_reason = @block, hook_prescan_state = 'blocked', ac_exception_eligible = @eligible, "
+ "ac_exception_verdict = @verdict, ac_exception_sessions = @sessions, ac_exception_checked_block = @block WHERE id = @id";
+ "ac_exception_verdict = @verdict, ac_exception_sessions = @sessions, ac_exception_checked_block = @block, "
+ "ac_exception_trial_failed_at = CASE WHEN @sessions = 1 THEN 1759449600000 END WHERE id = @id";
const string yidun = "AntiCheatFile|NetEase Yidun|NEP2.dll";
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
@@ -224,9 +285,8 @@ public sealed class SettingsViewModelTests
await pending;
(await h.Settings.GetBooleanAsync(SettingsRegistry.HookingUserModeExceptions, Ct)).Should().BeTrue();
h.Vm.ExceptionGames.Select(static g => g.Name).Should().Equal("Few", "GF2");
h.Vm.ExceptionGames.Single(static g => string.Equals(g.Name, "GF2", StringComparison.Ordinal)).CanGrant.Should().BeTrue();
h.Vm.ExceptionGames.Single(static g => string.Equals(g.Name, "Few", StringComparison.Ordinal)).CanGrant.Should().BeFalse("one session is not the owner's two");
h.Vm.ExceptionGames.Select(static g => g.Name).Should().Equal(["GF2"], "a row with no action is not listed");
h.Vm.ExceptionGames.Single().CanGrant.Should().BeTrue();
h.Vm.ExceptionsChecking.Should().BeFalse("the Agent answered about every blocked game");
await s.Db.WriteAsync((c, tx, ct) => Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff. Show more