Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8ea308fee | ||
|
|
dadcacf1a0 | ||
|
|
1d0e8407bd | ||
|
|
a48e99b6c1 | ||
|
|
b42d94bf1d | ||
|
|
15b4c6b0ec | ||
|
|
2c967b3d63 | ||
|
|
1722a4ef56 | ||
|
|
b18d7dc80e |
No files matched your search
@@ -116,6 +116,22 @@ jobs:
|
||||
"dry_run=$($dry.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
|
||||
Write-Host "$(if ($dry) { 'DRY RUN of' } else { 'releasing' }) $full (pre-release: $pre)"
|
||||
|
||||
# The Overlay's build id is `git describe --dirty` at CMake's configure
|
||||
# (src/native/FrameLedger.Shm/CMakeLists.txt), and the next step edits tracked
|
||||
# files: every release until beta.18 shipped "<tag>-dirty". So the id is read
|
||||
# here, from the clean checkout, and handed to CMake through the environment;
|
||||
# buildid-check reads it back out of the published binaries.
|
||||
- name: Build id (the clean checkout)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$id = "$(git describe --always --dirty --abbrev=12)".Trim()
|
||||
if ($LASTEXITCODE -ne 0 -or -not $id) { throw 'git describe failed' }
|
||||
if ($id.EndsWith('-dirty')) { throw "the checkout is dirty before the release has touched it: $id" }
|
||||
if ($id.Length -gt 31) { throw "build id '$id' is $($id.Length) characters; FlShmHandshake::buildId holds 31" }
|
||||
"FL_BUILD_ID=$id" >> $env:GITHUB_ENV
|
||||
Write-Host "FL_BUILD_ID = $id"
|
||||
|
||||
# 12_BUILD §Release-time token substitution: the effective date of a legal
|
||||
# document is the date it ships. The only placeholder that survives into the
|
||||
# repository, substituted here and nowhere else; the App embeds legal/*.md at
|
||||
@@ -200,6 +216,9 @@ jobs:
|
||||
# beta.14 (D50): the managed half too - the eight managed binaries, carrying the tag's full version.
|
||||
./tools/versioninfo-check.ps1 -BuildDir out/app -ManagedDir out/app -ExpectedProductVersion '${{ steps.version.outputs.version }}'
|
||||
if ($LASTEXITCODE -ne 0) { throw 'versioninfo-check over the published tree' }
|
||||
# beta.18: the native binaries carry the build id read from the clean checkout, exactly - never "<tag>-dirty".
|
||||
./tools/buildid-check.ps1 -BuildDir out/app -Expected $env:FL_BUILD_ID
|
||||
if ($LASTEXITCODE -ne 0) { throw 'buildid-check over the published tree' }
|
||||
$size = (Get-ChildItem out/app -Recurse -File | Measure-Object Length -Sum).Sum / 1MB
|
||||
Write-Host ("published tree: {0:N0} MB" -f $size)
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
# The GitHub Wiki is a copy of the repository's own pages (D53/D54, the owner, 2026-10-07): wiki/ (Home, the sidebar,
|
||||
# the developer pages) and guide/ (the user guide, which is the End-user part) with LIMITATIONS.md, assembled and checked
|
||||
# by tools/wiki-build.ps1 - the check build.ps1 runs as `wiki-check`. A page edited on the Wiki tab is overwritten here;
|
||||
# edit wiki/ or guide/ instead (docs/13_CI_CD.md §wiki.yml).
|
||||
#
|
||||
# Separate from release.yml on purpose. The release stays as it was and its dry run stays a pure rehearsal; a wiki that
|
||||
# fails to publish is a red run of its own, re-run on its own, never a red release. A step after `gh release create`
|
||||
# could never be re-run at all: the release would already exist.
|
||||
#
|
||||
# A release that release.yml creates with GITHUB_TOKEN fires no `release` event for other workflows. `workflow_run` does
|
||||
# fire - the Release run itself was started by the owner's tag push - and it runs THIS file as it is on main, so the job
|
||||
# checks out the commit the release was built from (head_sha) and links the repository's files at the tag (head_branch).
|
||||
|
||||
name: Wiki
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Release]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'Branch, tag or commit to build the wiki from; repository files are linked at this ref'
|
||||
required: true
|
||||
default: main
|
||||
type: string
|
||||
publish:
|
||||
description: 'Publish to the Wiki tab (off: build, check and upload the pages only)'
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
# The repository's default token is read-only; pushing to <repo>.wiki.git needs contents: write.
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: wiki
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
wiki:
|
||||
# A rehearsal of release.yml (workflow_dispatch) never publishes the wiki: only a run started by a pushed v* tag
|
||||
# that succeeded.
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event.workflow_run.conclusion == 'success' &&
|
||||
github.event.workflow_run.event == 'push' &&
|
||||
startsWith(github.event.workflow_run.head_branch, 'v'))
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
# Values reach the scripts through the environment only, never pasted into them.
|
||||
WIKI_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.event.workflow_run.head_branch }}
|
||||
WIKI_PUBLISH: ${{ github.event_name == 'workflow_run' || inputs.publish }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.event.workflow_run.head_sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Build and check the wiki
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
./tools/wiki-build.ps1 -Ref $env:WIKI_REF -Out out/wiki
|
||||
if ($LASTEXITCODE -ne 0) { throw 'wiki-build failed' }
|
||||
|
||||
- name: Upload the pages
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: wiki-${{ github.run_id }}
|
||||
path: out/wiki/**
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
|
||||
- name: Publish to the Wiki tab
|
||||
if: env.WIKI_PUBLISH == 'true'
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
gh auth setup-git
|
||||
if ($LASTEXITCODE -ne 0) { throw 'gh auth setup-git failed' }
|
||||
git clone --depth 1 "https://github.com/$env:GITHUB_REPOSITORY.wiki.git" wiki-repo
|
||||
if ($LASTEXITCODE -ne 0) { throw 'cloning the wiki failed - it must have one page created on github.com first' }
|
||||
Get-ChildItem wiki-repo -Force | Where-Object Name -ne '.git' | Remove-Item -Recurse -Force
|
||||
Copy-Item out/wiki/* wiki-repo -Recurse
|
||||
Set-Location wiki-repo
|
||||
git add -A
|
||||
git diff --cached --quiet
|
||||
if ($LASTEXITCODE -eq 0) { Write-Host "The wiki already shows $env:WIKI_REF; nothing to publish."; exit 0 }
|
||||
git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' commit -q -m "wiki: $env:WIKI_REF"
|
||||
if ($LASTEXITCODE -ne 0) { throw 'commit failed' }
|
||||
# The wiki repository's branch is master (git ls-remote, 2026-10-07).
|
||||
git push origin HEAD:master
|
||||
if ($LASTEXITCODE -ne 0) { throw 'push failed' }
|
||||
Write-Host "Published the wiki at $env:WIKI_REF"
|
||||
@@ -28,12 +28,86 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.0-beta.18] - 2026-10-07
|
||||
|
||||
**The eighteenth pre-release: every page readable in the dark theme, notices that say what happened in words, and a
|
||||
release whose build no longer calls itself dirty.** The same unsigned installer: verify its hash against
|
||||
`SHA256SUMS.txt`, then *More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.17`:** Help ▸ Check for updates, then *Restart to update* with no game running. Nothing in
|
||||
the database changes and nothing is shown again for you to accept; sessions already stored keep their status.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Page titles and section headings read in the dark theme again.** Every page's title and its section headings — Dashboard,
|
||||
Recent sessions, Games, Compare, Settings and each of its groups, Logs — were drawn near-black on the dark window
|
||||
(owner's screenshots of beta.17; beta.16 had it too). A page is shown in WPF UI's navigation Frame, which passes no text
|
||||
colour into the page, and a text that sets none is black; a page open during a theme switch picked the right colour up,
|
||||
and the next one navigated to did not. Every page now sets the theme's text colour itself. `AccessibilityTests.EveryPageSetsItsOwnTextColour`
|
||||
and `PagesLoadTests.EveryTextIsReadableInBothThemes` (every surface hosted as the App hosts it, ≥ 3:1 in both themes)
|
||||
went red on the unfixed pages first; the theme-switch check now hosts pages in the Frame too, and its harness derives the
|
||||
accent for each theme as the App does (`docs/08_UI.md` §Contrast, `docs/16_WPFUI_SYNTAX.md` §Gotchas, `docs/14_TESTING.md`).
|
||||
- **Every notice says what happened in words.** With *Disable all hooking* on, a game's notice read "kill switch was
|
||||
detected in this game (the global 'disable all hooking' switch is on (FR-2.4); …)" — it reads "All hooking is switched
|
||||
off in Settings, so nothing was measured." now, and a game blocked before reads as that, not as a finding. A refusal no
|
||||
anti-cheat names read "… reason RefusedByGuard." and is said in the guard's words ("the game is 32-bit, and the hook
|
||||
runs in 64-bit games only"); the agent sends the guard's reason for every refusal (`docs/07_IPC.md`). A safety re-scan
|
||||
that could not look while the game ran read "Access is denied. was detected" and says the check could not be made. And
|
||||
*Measurement stopped* printed "The hook stopped (WriterSelfDisabled); the session continues without measuring." — it
|
||||
says why in a sentence, and no longer that the session went on: a stop ends it. `NoticesFromTheAgentTests` builds the
|
||||
agent's own events for every refusal and every stop and went red with each text above (`docs/08_UI.md` §Notifications policy).
|
||||
- **Disable all hooking says when it applies.** Turning it on said "The capture agent reads it at the next session start";
|
||||
a game being measured stops at its next safety scan, within 30 seconds, and the message says so.
|
||||
- **Turning hooking off with no agent says nothing changed** — Settings' *Turn off*, the game page's switch and a
|
||||
withdrawn exception said "Nothing was enabled.", the enabling path's words.
|
||||
- **A viewer over a copy leaves every agent setting alone.** The user-mode exception option, the three Recording numbers
|
||||
and the update channel stayed live in `--data-dir`, where no agent reads them (`ViewerModeTests`).
|
||||
- `docs/08_UI.md` listed a "PawnIO missing" banner that was never built; struck, with the banners that do exist.
|
||||
- **A release's overlay build no longer calls itself dirty.** The Dashboard read *Overlay build v0.1.0-beta.17-dirty* (and
|
||||
beta.16's, and every release's before): the release workflow writes the release date into the legal documents before
|
||||
the build, and the build id was read from the tree after that. It is read from the clean checkout first and handed to
|
||||
the build, and `tools/buildid-check.ps1` reads it back out of the published binaries (`docs/12_BUILD.md` §Release-time
|
||||
token substitution). Nothing changes for a game: both sides of the ring's handshake always carried the same id.
|
||||
- **Two end-to-end tests no longer fail CI by a race** (developers only). The Vulkan launch test asks the test harness
|
||||
whether this machine can present through Vulkan before it starts the capture host: on GitHub's runners the harness's
|
||||
own "skip" line never reached the host's output, and a scan of the exiting harness failed the test instead of skipping
|
||||
it. The target-exit test holds its harness 15 seconds instead of 6, the margin a slow runner's host needed
|
||||
(`docs/13_CI_CD.md`).
|
||||
|
||||
## [0.1.0-beta.17] - 2026-10-07
|
||||
|
||||
**The seventeenth pre-release: text that keeps up with a change of theme, scroll bars hidden everywhere when you ask, a
|
||||
user guide that answers more, and a wiki.** The same unsigned installer: verify its hash against `SHA256SUMS.txt`, then
|
||||
*More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.16`:** Help ▸ Check for updates, then *Restart to update* with no game running. Nothing in
|
||||
the database changes and nothing is shown again for you to accept; sessions already stored keep their status.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Text keeps up with a change of theme.** After switching between Light and Dark, the descriptions and captions of the
|
||||
page in view — Settings above all, where the theme is chosen — kept the old theme's colour: light grey on white, or dark
|
||||
grey on dark. Every such text now follows the switch, on every page, window and dialog (`08_UI` §Contrast,
|
||||
`16_WPFUI_SYNTAX` §Gotchas).
|
||||
- **Hide scroll bars hides every scroll bar.** With Settings ▸ Window ▸ Hide scroll bars on, the Dashboard still drew its
|
||||
scroll bar — and so did the first run, About, the user guide and a game's wide sessions table; only screens with a
|
||||
switch or a tick box on them lost theirs. Every scroller follows the option now, and still scrolls with the wheel, the
|
||||
keyboard and touch (`08_UI` §Settings, `16_WPFUI_SYNTAX` §Gotchas).
|
||||
- **The first run names the right place to import your library.** Its last step said *File ▸ Import library… on the
|
||||
Games page*; File is the main window's menu, and the Games page has no such button. In Vietnamese it now names the menu
|
||||
as it is shown (*Tệp*).
|
||||
|
||||
### Added
|
||||
|
||||
- **The user guide looks things up too.** Four pages join it, in Help ▸ User guide: *The screens* (every page, menu,
|
||||
button and shortcut), *Every setting* (what each one does and its default), *When something goes wrong* (what you see,
|
||||
what it means, what to do) and *Words FrameLedger uses*. Tests now fail when a setting or a menu item is added without
|
||||
its line in the guide, or a link names a section that does not exist.
|
||||
- **A wiki.** The project's [wiki](https://github.com/poli0981/frameledger/wiki) has two halves: the user guide, the
|
||||
same pages the app shows, and short pages for developers — the architecture, the repository, building and testing,
|
||||
the rules every change keeps, capture, metrics, data, the app's UI and releasing — each linking to its full document.
|
||||
It is published from the repository whenever a release is made (`wiki.yml`), so it always matches the newest
|
||||
release, and `./build.ps1 check` fails on any link in it that leads nowhere (`13_CI_CD` §wiki.yml).
|
||||
|
||||
## [0.1.0-beta.16] - 2026-10-06
|
||||
|
||||
|
||||
@@ -138,7 +138,9 @@ tools/ # accuracy-check, changelog-check, chokepoint-che
|
||||
# gen-ac-floor, hookinventory-check, license-check, license-gather
|
||||
# (+ license-overrides/), notice-check, package-closure-check,
|
||||
# release-notes, rules-validate, test-artifacts-check, vendor-exports,
|
||||
# versioninfo-check, vklayer-blastradius, fps-impact-runbook
|
||||
# versioninfo-check, vklayer-blastradius, fps-impact-runbook,
|
||||
# wiki-build (beta.17: builds and checks the wiki; the wiki-check gate),
|
||||
# buildid-check (beta.18: the release's build id in the shipped natives)
|
||||
# (six names added 2026-10-04)
|
||||
# (PowerShell). This line used to name three, one of which
|
||||
# — resx-audit — ~~does not exist~~ exists since 2026-09-13 with
|
||||
@@ -151,8 +153,13 @@ tools/ # accuracy-check, changelog-check, chokepoint-che
|
||||
# stats, signer, Vulkan layer; fl-baseline-probe;
|
||||
# vendor-stubs/ -> fixture DLLs with the vendors' export names
|
||||
rules/detection-rules.json # engine/platform/capability + anticheat blocklist
|
||||
guide/ # the user guide (beta.12, D44): eight short English pages for players, embedded in the
|
||||
guide/ # the user guide (beta.12, D44): ~~eight~~ short English pages for players, embedded in the
|
||||
# App (Help > User guide); README.md is its contents. docs/ is for developers.
|
||||
# (twelve since beta.17, D54: the screens, every setting, troubleshooting, a glossary;
|
||||
# and the guide is the wiki's End-user part)
|
||||
wiki/ # the wiki's own pages (beta.17, D53): Home, _Sidebar, the developer pages. wiki.yml
|
||||
# publishes them with guide/ and LIMITATIONS.md to the Wiki tab at a release;
|
||||
# tools/wiki-build.ps1 assembles and checks them (build.ps1 wiki-check)
|
||||
docs/ legal/ legal/licenses/
|
||||
```
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ That is the whole quality gate, and continuous integration runs the identical sc
|
||||
checks (licences, the accuracy blocks, the licence headers, the changelog rules, …). `docs/12_BUILD.md` describes each
|
||||
step and the build profiles. Run it in your main checkout: a fresh `git worktree` cannot configure the native build.
|
||||
|
||||
Documentation lives in three places: `guide/` for players (shown in the app and on the wiki), `wiki/` for the wiki's own
|
||||
pages, and `docs/` for developers. A change a player would notice updates `guide/`; a change to how the code is put
|
||||
together updates `docs/` — and the `wiki/` page that summarises it, if that page now says something else.
|
||||
`./build.ps1 check` builds the wiki and fails on a link that leads nowhere.
|
||||
|
||||
Never point a build of your own at the data FrameLedger records into (`%LOCALAPPDATA%\FrameLedger`): a newer build
|
||||
migrates the database, and the released one cannot read it back. To look at real data, copy the folder and start
|
||||
`FrameLedger.exe --data-dir <copy>` — a viewer that starts no Agent and changes nothing on the PC (`docs/12_BUILD.md`
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
|
||||
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
|
||||
page lists them in plain words; each item links to the document that has the details.
|
||||
|
||||
*Beta software: this page describes version 0.1.0-beta.16.*
|
||||
*Beta software: this page describes version 0.1.0-beta.18.*
|
||||
|
||||
## Games it will not measure
|
||||
|
||||
|
||||
@@ -5,12 +5,14 @@
|
||||
> No telemetry. No accounts. All data stays on your machine.
|
||||
|
||||
**New here? Start with the [user guide](guide/README.md)** — install, record a game, read your results, stay safe with
|
||||
anti-cheat, and look after your data, a page each. What FrameLedger cannot do is on one page:
|
||||
[Limitations](LIMITATIONS.md). Both are in the app too (Help ▸ User guide, Help ▸ Limitations).
|
||||
anti-cheat, and look after your data, a page each, then every screen, every setting and what to do when something goes
|
||||
wrong. What FrameLedger cannot do is on one page: [Limitations](LIMITATIONS.md). Both are in the app too (Help ▸ User
|
||||
guide, Help ▸ Limitations), and on the project's [wiki](https://github.com/poli0981/frameledger/wiki) with the developer
|
||||
pages.
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.16`** (2026-10-06), an unsigned installer built from that tag with its
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), 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
|
||||
@@ -161,7 +163,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
|
||||
|
||||
## Install
|
||||
|
||||
> **The latest pre-release is `v0.1.0-beta.16` (2026-10-06); before it `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `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`.
|
||||
> **The latest pre-release is `v0.1.0-beta.18` (2026-10-07); before it `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `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**.
|
||||
@@ -191,6 +193,8 @@ FrameLedger is GPL-3.0-only free software, and you are welcome to build it, chan
|
||||
[`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md). Security reports: [`SECURITY.md`](SECURITY.md).
|
||||
- **Fork or redistribute:** [`FORKING.md`](FORKING.md) — what the GPL asks of anyone who distributes builds, and the names
|
||||
a fork must change so it does not share FrameLedger's update feed, install folder, data, pipe or Vulkan layer.
|
||||
- **Find your way around:** the [wiki](https://github.com/poli0981/frameledger/wiki)'s developer pages are short, and each
|
||||
links to the document it summarises ([`wiki/`](wiki/) is their source).
|
||||
- **Read the design:** the developer documentation is in [`docs/`](docs/). Start with [`CLAUDE.md`](CLAUDE.md), then
|
||||
[`docs/19_SAFETY_AND_ANTICHEAT.md`](docs/19_SAFETY_AND_ANTICHEAT.md) — which constrains everything else — then
|
||||
[`docs/01_ARCHITECTURE.md`](docs/01_ARCHITECTURE.md).
|
||||
@@ -208,4 +212,4 @@ GPU telemetry is layered so the project never depends on a proprietary vendor li
|
||||
|
||||
---
|
||||
|
||||
**Status:** pre-release (beta). Sixteen 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). Eighteen 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.
|
||||
@@ -464,6 +464,15 @@ function Invoke-ProjectGates {
|
||||
Invoke-Checked 'notice-check (self-test)' { & $noticeTool -SelfTest }
|
||||
Invoke-Checked 'notice-check' { & $noticeTool -RepoRoot $repo }
|
||||
|
||||
# beta.17 (D53/D54): the GitHub Wiki is built from wiki/, guide/ and LIMITATIONS.md, and wiki.yml publishes it when a
|
||||
# release is made. A link or a section that leads nowhere, a page nothing leads to, a sidebar out of the guide's
|
||||
# order, a path that names nothing or a version written into a page is red here, not on the published wiki.
|
||||
# Self-test first (nine cases, both directions), then the live assembly into a temporary folder.
|
||||
Write-Step 'wiki-check'
|
||||
$wikiTool = Join-Path $repo 'tools/wiki-build.ps1'
|
||||
Invoke-Checked 'wiki-check (self-test)' { & $wikiTool -RepoRoot $repo -SelfTest }
|
||||
Invoke-Checked 'wiki-check' { & $wikiTool -RepoRoot $repo -Check }
|
||||
|
||||
Write-Step 'changelog-check'
|
||||
$changelogTool = Join-Path $repo 'tools/changelog-check.ps1'
|
||||
if (Test-Path $changelogTool) {
|
||||
@@ -479,6 +488,12 @@ function Invoke-ProjectGates {
|
||||
Write-Step 'release-notes'
|
||||
Invoke-Checked 'release-notes (self-test)' { & (Join-Path $repo 'tools/release-notes.ps1') -SelfTest }
|
||||
|
||||
# beta.18: the build id a release hands CMake (read from the clean checkout before the date substitution edits
|
||||
# legal/*.md) is read back out of the published native binaries by release.yml. Self-test only here — the live
|
||||
# pass needs that id, which only a release has (12_BUILD §Release-time token substitution).
|
||||
Write-Step 'buildid-check'
|
||||
Invoke-Checked 'buildid-check (self-test)' { & (Join-Path $repo 'tools/buildid-check.ps1') -SelfTest }
|
||||
|
||||
# 09_I18N's gate, built with the first .resx family (P3 PR-2, 2026-09-13): every key in en/vi/ja, ja
|
||||
# Safety_* marked for human review, the generated accessor current. Self-test first (at least four
|
||||
# cases must go red), then the live pass; a tree with no family is red, not skipped.
|
||||
|
||||
+2
-2
@@ -406,8 +406,8 @@ Unchanged in spirit from v1, bumped to `v2` for the new message set.
|
||||
| `SessionHeld` | A→UI | **Added 2026-09-23.** 1 Hz while a client listens, for a session held unhooked only: `{ sessionGuid, elapsedS, gpuTempC?, cpuTempC?, gpuLoadPct?, cpuLoadPct?, gameVramDedicatedMb?, gameRamPrivateMb? }` — how long it has run and the machine's sensors (and since beta.12 the game process's own memory, read from outside it — optional, an older client ignores them). **Never `SessionProgress`**: its `presents5s`, `presentedQualifier` and `fgMode` are required, and zeros there would put measured-looking numbers on the wire for a session that measures nothing (rule 6 has nothing to show and shows nothing) |
|
||||
| `SessionProgress` | A→UI | 1 Hz: `{ sessionGuid, elapsedS, presents5s, presentedFps5s?, presentedQualifier, nativeFps5s?, displayedFps5s?, fgFactor?, fgMode, upscaler?, upscalerQuality?, upscalerDriverReported?, renderW/H?, outputW/H?, rtActive?, gpuTempC?, cpuTempC?, cpuLoadPct?, vramProcMb?, latencyUs?, fgRefusal?, fgRuntimeCensus?, gameVramDedicatedMb?, gameRamPrivateMb? }` (the last two added 2026-10-03, beta.12, optional: the game process's dedicated GPU memory and private working set, MiB, from the newest telemetry tick; `vramProcMb` stays reserved for the in-process figure and has no producer) — a 5 s rolling window over the ring through the SAME Domain calculators the row uses (`SessionProgressCalculator`, D13). **`upscalerDriverReported` added 2026-09-21, optional:** `dlss` when the NVIDIA driver reports an NGX super-resolution feature created and evaluated in the target (`03_METRICS` §The driver-reported rung), so the live card says `DLSS (driver-reported)` where no hook can name the upscaler; identity only. **`cpuLoadPct` added 2026-09-21, optional** (CPU time busy over the last telemetry tick, 0–100; `cpuTempC` has a producer from the same date, present only when the Agent is elevated with PawnIO). **Two fields added 2026-09-14, both optional (an older client ignores them, §C):** `fgRefusal` is the row's `fg_refusal` (schema 0003) — present when `fgMode` names a technology and `fgFactor` is absent, so the live card can say "DLSS-G active — factor not counted" rather than N/A; `fgRuntimeCensus` is the raw census so the `fg_runtime_loaded` chip can name the module. **Rule 6 at the wire (2026-09-13):** `nativeFps5s` / `displayedFps5s` / `fgFactor` are present only when frame generation was measured in the window; otherwise `presentedFps5s` stands alone with `presentedQualifier` (`census_not_run` · `no_fg_runtime` · `fg_runtime_loaded` · `none_withheld`, the row's `presented_qualifier` from the same function). Every unmeasured field is absent, never 0. Suppressed when no client is connected |
|
||||
| `SessionCompleted` | A→UI | `{ sessionGuid, sessionId?, exitStatus, tier, finalize, reason, gameId?, gameName? }` — UI loads the full row from SQLite; `sessionId` is null and `finalize` is `discarded` when the row was not stored (under the minimum length), or `game_removed` when its entry was removed with its sessions while it ran (2026-09-23), or **`faulted` when the session's task threw before it could finalize** (2026-09-23: it follows the `CaptureError SessionFaulted`, with `exitStatus` `interrupted` and `reason` `SessionFaulted`, so the live card and the tray let go of a session that no longer runs; the `.partial` stays for recovery); `exitStatus` is the row's vocabulary (`normal` · `crashed` · `unhooked_safety` · `degraded`); `reason` is the loop's `SessionEndReason`. **`gameId` / `gameName` added 2026-09-23, optional:** the entry the session was stored under — the finalizer's owner when it re-keyed a session whose entry was removed, else the one it started under — so the notice names the session that completed, not whatever the live card last showed |
|
||||
| `CaptureRefused` | A→UI | `{ gameId, gameName, reason, family?, signal?, hookingTurnedOff, guardReason? }` — **`guardReason` (beta.13, optional)** is the guard's own reason when it named a family; `BlockedService` / `BlockedDriver` is a finding on the PC, not in the game, and the notice says so (§S23-3); `reason` stays the session's end reason — **guard fired**; `hookingTurnedOff` (2026-09-22) is true when the finding turned the game's hooking off (`19_SAFETY` §What a finding does to the game); UI shows the plain-language explanation — ~~and the Tier-2 offer~~; there is no alternative measurement to offer, only the option to record the session unmeasured (`08_UI` §Safety events). *(Built: for `RefusedByGuard`, `RefusedPreviouslyBlocked`, `RefusedKillSwitch`, `PreScanCouldNotVerify` and, since 2026-09-21 (beta.4), `TargetUnreadable` — a protected process the Agent could not open (added 2026-10-04) — `PreScanCouldNotVerify` with no family, because "could not verify" is neither a hit nor a pass; `family`/`signal` are the verdict's. A game merely not enabled or not consented raises nothing: that is an ordinary Tier-2 row, not a refusal to explain.)* |
|
||||
| `CaptureDegraded` | A→UI | `{ sessionGuid, from: 1, to: 2, reason }` — Tier 1 → Tier 2 mid-flight, or overlay self-disabled. **Under a two-rung ladder this means measurement STOPPED**, not that it continued at lower fidelity, and the notice must say so. *(Built: `SupervisionLost`, `WriterSelfDisabled`, `WriterStoppedBlocklisted`, `WriterNeverInstalledHooks`, `SupervisionFaulted`, `KillSwitchEngaged` — `RecordedSessionEvents.Classify` is the table.)* |
|
||||
| `CaptureRefused` | A→UI | `{ gameId, gameName, reason, family?, signal?, hookingTurnedOff, guardReason? }` — **`guardReason` (beta.13, optional)** is the guard's own reason ~~when it named a family~~ **whenever it refused (beta.18; beside a family only until then)**: `BlockedService` / `BlockedDriver` is a finding on the PC, not in the game, and the notice says so (§S23-3), and a refusal no family names is said in the guard's words (`Formats.GuardSentence`) — it printed the end's name, "reason RefusedByGuard"; `reason` stays the session's end reason — **guard fired**; `hookingTurnedOff` (2026-09-22) is true when the finding turned the game's hooking off (`19_SAFETY` §What a finding does to the game); UI shows the plain-language explanation — ~~and the Tier-2 offer~~; there is no alternative measurement to offer, only the option to record the session unmeasured (`08_UI` §Safety events). *(Built: for `RefusedByGuard`, `RefusedPreviouslyBlocked`, `RefusedKillSwitch`, `PreScanCouldNotVerify` and, since 2026-09-21 (beta.4), `TargetUnreadable` — a protected process the Agent could not open (added 2026-10-04) — `PreScanCouldNotVerify` with no family, because "could not verify" is neither a hit nor a pass; `family`/`signal` are the verdict's. A game merely not enabled or not consented raises nothing: that is an ordinary Tier-2 row, not a refusal to explain.)* |
|
||||
| `CaptureDegraded` | A→UI | `{ sessionGuid, from: 1, to: 2, reason }` — Tier 1 → Tier 2 mid-flight, or overlay self-disabled. **Under a two-rung ladder this means measurement STOPPED**, not that it continued at lower fidelity, and the notice must say so. *(Since beta.18 it says the end in words, `Formats.EndReasonText`; it printed `reason` raw — "The hook stopped (WriterSelfDisabled); the session continues without measuring" — and a stop ends the session, it does not continue it.)* *(Built: `SupervisionLost`, `WriterSelfDisabled`, `WriterStoppedBlocklisted`, `WriterNeverInstalledHooks`, `SupervisionFaulted`, `KillSwitchEngaged` — `RecordedSessionEvents.Classify` is the table.)* |
|
||||
| `SafetyUnhook` | A→UI | `{ sessionGuid, family?, signal?, hookingTurnedOff, guardReason? }` — `guardReason` as on `CaptureRefused` (beta.13) — anti-cheat appeared mid-session; prominent UI notice; `hookingTurnedOff` as on `CaptureRefused`. *(Built: the verdict that FIRED, not the pass that started the session — `CaptureOutcome.Verdict` carries the supervisor's last verdict on this reason since 2026-09-13.)* |
|
||||
| `HookingTurnedOff` | A→UI | `{ gameId, gameName?, reason, family?, signal? }` — **since 2026-09-25 (beta.8):** the Agent's pre-scan of the library (`19_SAFETY` §What a finding does to the game) found anti-cheat in a game whose hooking the user had turned on, and turned it off. Not a session event — no session is running — so the UI's notice carries no "record without measuring" action, only Dismiss (`SafetyNoticeKind.HookingOff`). A finding on a game whose hooking was already off sends nothing: its page and its library card change, nothing the user switched on did. Additive: a client that does not know the type ignores it (§Versioning). |
|
||||
| `CaptureError` | A→UI | `{ sessionGuid?, code, message }` — `InjectFailed`, `RingVersionMismatch`, `AttachRefused`, ~~`EtwAccessDenied`~~ (struck 2026-09-13 with the tier), ~~`PresentMonMissing`~~ (retired with the tool, 2026-08-27 — a code naming an implementation nobody chose), `TelemetryUnavailable`, `DbWriteFailed`, `SessionFaulted` (the session's task threw before finalize; the `.partial` stays for recovery, and ~~no `SessionCompleted` follows~~ a `SessionCompleted` with `finalize: faulted` follows since 2026-09-23). *(Built: `RingVersionMismatch` for a layout / record-size / build-id refusal — the "restart the game after an update" case — `AttachRefused` for the rest of the ring's refusals, `InjectFailed` for a target that could not be started, pinned, read or singled out.)* |
|
||||
|
||||
+60
-11
@@ -27,7 +27,10 @@ WPF + **WPF UI (Wpf.Ui, Fluent)**. Shell = `ui:FluentWindow` with custom `ui:Tit
|
||||
> `ViewerModeTests`); the pill reads *Viewer — no Agent*, a persistent InfoBar names the folder, and every control that
|
||||
> would ask the Agent or change the PC is disabled — hooking, the exception's grant and withdrawal, re-enabling, Delete
|
||||
> all sessions, the kill switch, the admin mode, the logon task, the Vulkan layer, Start with Windows, the automatic
|
||||
> update check, Help ▸ Check for updates, Tools ▸ Update detection rules and the tray's Pause. The profile's own folder
|
||||
> update check, Help ▸ Check for updates, Tools ▸ Update detection rules and the tray's Pause — and, since beta.18,
|
||||
> every setting the Agent reads (the user-mode exception option and the three Recording numbers had been missed, and a
|
||||
> change said the capture agent would read it) and the update channel beside the update check
|
||||
> (`ViewerModeTests.EverySettingTheAgentReadsIsOffInAViewer`). The profile's own folder
|
||||
> is refused however it is spelled (case, separators, a relative path, a junction), as is a folder that does not exist;
|
||||
> a refusal is a message box and exit 2. The viewer's folder is its own single-instance key, so it runs beside the
|
||||
> profile's App. D6 is unchanged: the Agent's `--data-dir` stays under `--console`.
|
||||
@@ -44,12 +47,16 @@ WPF + **WPF UI (Wpf.Ui, Fluent)**. Shell = `ui:FluentWindow` with custom `ui:Tit
|
||||
> rendered — below; corrected 2026-10-04). It is information, not one of FR-11's documents:
|
||||
> nothing is accepted or recorded, and the Disclaimer points at it.
|
||||
>
|
||||
> **Help ▸ User guide, beta.12 (D44).** `guide/` — eight short English pages for players (install, record a game, read
|
||||
> your results, anti-cheat and safety, your data, questions and answers, the terms in plain words) — embedded in the
|
||||
> **Help ▸ User guide, beta.12 (D44).** `guide/` — ~~eight~~ short English pages for players (install, record a game, read
|
||||
> your results, anti-cheat and safety, your data, questions and answers, the terms in plain words; *since beta.17, D54,
|
||||
> also the screens, every setting, what to do when something goes wrong and the words the App uses — twelve pages,
|
||||
> and the wiki's End-user part*) — embedded in the
|
||||
> App (`Services.EmbeddedDocuments.Guide`, titles from each page's first heading) and shown in a `Windows/DocumentWindow`
|
||||
> with a page list, Limitations last; a link between guide pages opens the page in the window. Help ▸ Documentation is
|
||||
> *Online documentation*: the README at this build's source. `GuideDocumentsTests` holds every page listed and titled and
|
||||
> every link leading somewhere.
|
||||
> every link leading somewhere — and since beta.17 every section link (against the anchors the App's renderer gives the
|
||||
> target), the contents in the App's order, and that *Every setting* and *The screens* name every setting the Settings
|
||||
> page shows and every page and menu item of the main window.
|
||||
>
|
||||
> **Documents are rendered, beta.12 (owner request 4, D45).** Every Markdown document the App shows — the Legal Gate's
|
||||
> three texts, Help ▸ Limitations, the update notes, About's documents — is drawn by `Markdown/MarkdownRenderer`
|
||||
@@ -124,7 +131,7 @@ The Menu sits in its own row **below** the TitleBar (never inside the drag regio
|
||||
## Notifications policy
|
||||
|
||||
- **In-app, transient** (rules updated, export done, non-fatal capture warning): `ISnackbarService` snackbar, 4 s.
|
||||
- **In-app, persistent** (Agent offline, PawnIO missing, update downloaded): `ui:InfoBar` banner pinned above content with action button.
|
||||
- **In-app, persistent** (Agent offline, ~~PawnIO missing,~~ update downloaded, a viewer's folder, the safety notices): `ui:InfoBar` banner pinned above content with action button. *(Corrected 2026-10-07: no PawnIO banner was ever built — CPU temperature reads N/A, and Settings ▸ System says it needs the admin mode and PawnIO; the viewer's banner (D52) and the safety notices were missing from the list.)*
|
||||
- **System-level, app possibly minimized** (session saved with "View" action, capture error while in tray, update available): tray balloon/toast via H.NotifyIcon.
|
||||
- One event → exactly one channel; never duplicate the same event across snackbar *and* tray.
|
||||
|
||||
@@ -163,6 +170,26 @@ The Menu sits in its own row **below** the TitleBar (never inside the drag regio
|
||||
> reads as before. Tests: `SafetyNoticesTests.AServiceOrDriverIsOnThisPcAndAModuleIsInThisGame`,
|
||||
> `…AnUnhookSaysWhereTheFindingWasAndPromisesNoReEnable`, `Tier2ReasonTests`.
|
||||
>
|
||||
> **Every notice in words — beta.18** (found while writing the guide, beta.17). Three texts printed what only the code
|
||||
> knows. The gate's own refusals — *Disable all hooking*, a game blocked before — carry the gate's label where a finding
|
||||
> carries its family, and the kill switch's notice read *"kill switch was detected in this game (the global 'disable all
|
||||
> hooking' switch is on (FR-2.4); …). FrameLedger will not inject into it, and nothing overrides that."* They are said as
|
||||
> the session's end now (`Formats.EndReasonText`: "All hooking is switched off in Settings, so nothing was measured."),
|
||||
> never as a finding. A refusal no family names read *"The anti-cheat guard did not hook this game: reason
|
||||
> RefusedByGuard."*: the events carry the guard's own reason for every refusal since (`07_IPC`), and the sentence is its
|
||||
> words — "… the game is 32-bit, and the hook runs in 64-bit games only."; an older Agent's reads `End_RefusedByGuard`.
|
||||
> A 30 s re-scan that could not look while the game still ran read *"Capture stopped: Access is denied. was detected while
|
||||
> the game was running"*; it reads `Safety_Unhooked_Unnamed_Format` ("Capture stopped while the game was running — the
|
||||
> game's process could not be opened — and FrameLedger unhooked."). And `CaptureDegraded` printed its reason raw and said
|
||||
> the session went on — *"The hook stopped (WriterSelfDisabled); the session continues without measuring."* — where a stop
|
||||
> ends it: the notice is the end's own sentence ("The measuring hook turned itself off after repeated faults, so measuring
|
||||
> stopped."), and `Notice_Degraded_Unknown_Format` names only a reason this build has no words for. Tests:
|
||||
> `NoticesFromTheAgentTests` builds each event as the Agent does — the gate's verdicts, the native facade's
|
||||
> (`AntiCheatVerdict.FromNative`), `RecordedSessionEvents.PublishReason`, the wire's codec — walks every refusal and every
|
||||
> stop, and refuses an enum's name, a requirement's id or "reason X" in any notice; it went red on the unfixed code with
|
||||
> exactly the texts above. Until then the notices' tests raised events written by hand ("GuardBlocked", "HookFaulted", a
|
||||
> guard reason sent as the end), which no Agent sends.
|
||||
>
|
||||
> **Corrected 2026-09-14, after the owner saw a red bar with no way out.** WPF UI 4.3.0's `InfoBar` template has
|
||||
> **no `ContentPresenter`**, so the action button above — placed as the InfoBar's Content, the only dismissal once
|
||||
> `IsClosable="False"` removed the X — was never rendered. The view model was right and the screen was wrong.
|
||||
@@ -604,13 +631,19 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
|
||||
### Settings
|
||||
> **beta.14 (owner request 2026-10-05: "an option to hide the scroll bars but still scroll").** The Window section has
|
||||
> **Hide scroll bars** (`ui.hide_scrollbars`, off by default). A bar's visibility is bound inside its scroller's template,
|
||||
> which no style reaches, so `Services.ScrollBarHiding` sets the scrollers themselves: one class handler on
|
||||
> `ScrollViewer`'s Loaded (registered at start beside `DialogKeyboard`) reaches every scroller the App shows, those inside a
|
||||
> DataGrid, a TextBox, a rendered document and a dialog included. While on, an axis that is `Auto` or `Visible` becomes
|
||||
> which no style reaches, so `Services.ScrollBarHiding` sets the scrollers themselves: ~~one class handler on
|
||||
> `ScrollViewer`'s Loaded (registered at start beside `DialogKeyboard`) reaches every scroller the App shows~~ class
|
||||
> handlers on `ScrollViewer`'s ScrollChanged and Loaded (registered at start beside `DialogKeyboard`) reach every scroller
|
||||
> the App shows *(corrected 2026-10-07, beta.17, the owner's screenshot of the Dashboard with its bar: WPF raises Loaded
|
||||
> only where a subtree listens for it with a handler of its own, and a class handler is not one — `16_WPFUI_SYNTAX`
|
||||
> §Gotchas. Settings, full of toggle switches whose template listens, lost its bar; the Dashboard, the first run, About,
|
||||
> the user guide and a game's wide sessions table kept theirs. Every scroller raises ScrollChanged from its first layout)*,
|
||||
> those inside a DataGrid, a TextBox, a rendered document and a dialog included. While on, an axis that is `Auto` or `Visible` becomes
|
||||
> `Hidden` — WPF's "no bar, still scrolls": wheel, keyboard and touch — and its own value is kept on it; a `Disabled` axis is
|
||||
> never touched (it lays its content out at the viewport's width). The toggle applies to the open windows at once, and off
|
||||
> puts every kept value back. Tests: `ScrollBarHidingTests` (on hides every bar and the wheel still scrolls; off restores
|
||||
> each; a scroller that loads later follows), `SettingsViewModelTests.HidingScrollBars…`.
|
||||
> each; a scroller that loads later follows; since beta.17 a scroller laid out with no Loaded at all, and every page,
|
||||
> window and dialog shown in a real window with the option on), `SettingsViewModelTests.HidingScrollBars…`.
|
||||
|
||||
> **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*
|
||||
@@ -639,7 +672,8 @@ Agent section: elevation state with a plain explanation of what elevation *optio
|
||||
> **Built 2026-09-14 (P3 PR-8a), with three rows deferred to PR-8b and one to PR-9.** `SettingsViewModel` over
|
||||
> `Application.Settings.RegisteredSettings` (the registry of `06_DATA_MODEL` §Settings registry — every write is
|
||||
> one `settings` row, and a key the Agent reads gets the 4 s "Applied. The capture agent reads it at the next
|
||||
> session start" line, D16). **Capture, first:** the kill switch as a `CardExpander` whose header is the toggle
|
||||
> session start" line, D16 — but for turning the kill switch on, which says a game being measured stops at its next
|
||||
> safety scan, within 30 seconds: beta.18; until then it said the next session start). **Capture, first:** the kill switch as a `CardExpander` whose header is the toggle
|
||||
> and whose state line says "All hooking is off" / "Per-game settings decide" — it is `hooking.kill_switch`, the
|
||||
> gate's fourth input (`CaptureSession` consults it at every 30 s re-scan, so a running measured session stops at
|
||||
> its next scan; nothing else needs pushing); the hook-enabled list is `games.hook_enabled` as the ledger has it,
|
||||
@@ -759,7 +793,8 @@ the requirement was one bullet under §UX rules, and nothing checked it.
|
||||
| **Arrows, Home/End, Page Up/Down** | Move within a `DataGrid` (Sessions, Compare picker, Import checklist) | `DataGrid` defaults |
|
||||
| **Esc** | Closes the open `ContentDialog` or `MessageBox` with no result — the same as its Close/Cancel button | `DialogKeyboard`, one class handler per dialog type registered at start-up |
|
||||
|
||||
**Esc is the Close button, never the primary one.** On the consent dialog (FR-2.1) that is "Keep it off": nothing is
|
||||
**Esc is the Close button, never the primary one.** On the consent dialog (FR-2.1) that is ~~"Keep it off"~~ "Keep hooking
|
||||
off" *(the button's text, corrected 2026-10-07)*: nothing is
|
||||
stamped. A dialog that offers no Close button is not dismissed by Esc, and the Legal Gate (FR-11) is a window of its own
|
||||
(`FirstRunWindow`) with explicit Decline and Accept, on which Esc does nothing. WPF UI 4.3.0 handles no key in
|
||||
either dialog type (its `ContentDialog.cs` and `MessageBox.cs` at tag 4.3.0 have no key handler — read 2026-09-15),
|
||||
@@ -834,6 +869,20 @@ palette per theme, chosen with the theme).
|
||||
> summary, every dialog's content and the safety InfoBar, made under one theme, switched, and compared text by text with
|
||||
> the same surface made fresh under the other — both ways). Both went red on the unfixed XAML, the second with 146 stale
|
||||
> texts each way, before they went green.
|
||||
>
|
||||
> **A fifth hole, closed 2026-10-07 (beta.18; the owner's screenshots of beta.17 in the dark theme: every page's title and
|
||||
> section headings near-black on the dark window — beta.16's screenshot shows it too).** This text had no colour of ours,
|
||||
> because it had none. A page is shown in WPF UI's `NavigationViewContentPresenter`, a `Frame`, and a Frame passes no
|
||||
> inherited value into its page (`InheritanceBehavior.SkipToAppNow`), so a text that sets no colour falls to the TextBlock
|
||||
> default, which WPF UI 4.3.0 makes black (`16_WPFUI_SYNTAX` §Gotchas). Cards, grids and controls set their own; the bare
|
||||
> titles and headings did not: 19 texts on the six pages at 1.29:1. Every check above laid a page out straight in a
|
||||
> window, whose text colour the page then inherited — a page the App never draws — and a page on screen during a theme
|
||||
> switch did take the window's colour, while each navigation makes a new one that does not, so it came and went. Every
|
||||
> page sets `Foreground="{DynamicResource TextFillColorPrimaryBrush}"` on its root. Held two ways:
|
||||
> `AccessibilityTests.EveryPageSetsItsOwnTextColour`, and `PagesLoadTests.EveryTextIsReadableInBothThemes` — every
|
||||
> surface hosted as the App hosts it, a page in the presenter, and every text that shows ≥ 3:1 over the colour painted
|
||||
> under it, in both themes. `EveryTextFollowsAThemeSwitch` hosts its pages in the presenter too since, and went red with
|
||||
> them: a page made after a switch stayed black. All three went red on the unfixed XAML before they went green.
|
||||
|
||||
### DPI
|
||||
|
||||
|
||||
@@ -272,6 +272,16 @@ substitutes it with ~~the tag date~~ the run's UTC date (corrected 2026-10-04) w
|
||||
address — is resolved in the source files, because an unsubstituted token in a
|
||||
document the app displays for acceptance (FR-11) is a defect, not a template.
|
||||
|
||||
**The build id is read before it (beta.18).** The substitution edits tracked files, and the native build id is
|
||||
`git describe --dirty` at CMake's configure (`src/native/FrameLedger.Shm/CMakeLists.txt`): every release until beta.18
|
||||
shipped `<tag>-dirty` — the owner's Dashboard read *Overlay build v0.1.0-beta.17-dirty*, and that run's log printed
|
||||
`FL_BUILD_ID = v0.1.0-beta.17-dirty` two lines after `RELEASE_DATE = 2026-10-07 in 3 file(s)`. `release.yml` now reads
|
||||
describe from the clean checkout first, refuses one that is already dirty or longer than 31 characters, and passes it
|
||||
as the environment's `FL_BUILD_ID`, which CMake takes as given (checked for the characters a C string literal carries);
|
||||
after the publish, `tools/buildid-check.ps1` reads it back out of the four native binaries that compile it, by their
|
||||
bytes — nothing is loaded. A developer's build still runs describe itself (`+` marks a dirty tree when the long form
|
||||
would not fit).
|
||||
|
||||
## Local quality gate (pre-push)
|
||||
|
||||
`./build.ps1 check`:
|
||||
@@ -298,8 +308,10 @@ document the app displays for acceptance (FR-11) is a defect, not a template.
|
||||
13b. `tools/accuracy-check.ps1 -SelfTest`, then live — the accuracy block is ONE text (`legal/ACCURACY.md`) embedded verbatim in `README.md` and `legal/DISCLAIMER.md` §4; a copy that drifted, a copy with no markers, or an empty source is red. Four self-test cases, both directions (§S23-6, 2026-09-06)
|
||||
13c. **`tools/notice-check.ps1 -SelfTest`, then live** (beta.12, owner decision D45, 2026-10-03) — every first-party source file (`.cs .cpp .h .inl .ps1 .xaml`, tracked or new, minus `src/native/third_party/`) opens with `SPDX-License-Identifier: GPL-3.0-only` and `Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE` in its own comment syntax, because GPLv3 §7 wants additional terms named "in the relevant source files" (`NOTICE` carries them); the second line may name another holder and year in the same form (a contributor's own file).
|
||||
Seven self-test cases, both directions; `./tools/notice-check.ps1 -Fix` writes a missing header, and `tools/resx-gen.ps1` generates the accessor with it
|
||||
13d. **`tools/wiki-build.ps1 -SelfTest`, then `-Check`** (beta.17, owner decisions D53/D54, 2026-10-07) — assembles the GitHub Wiki from `wiki/`, `guide/` and `LIMITATIONS.md` into a temporary folder, as `wiki.yml` does at a release (`13_CI_CD` §wiki.yml), and fails on a link to a file, folder or section that does not exist, two sources for one page, a page that neither Home nor the sidebar leads to, a sidebar that lists the guide in another order than `guide/README.md`, a backticked repository path in a `wiki/` page that names nothing, and a version number written into a `wiki/` page (the footer says which release the wiki shows). Nine self-test cases, both directions
|
||||
14. `tools/changelog-check.ps1 -SelfTest` — nine cases, five expected RED. The live half needs a pull request's changed-file list and is supplied by `ci.yml`
|
||||
14b. `tools/release-notes.ps1 -SelfTest` — five cases over a fixture changelog (a dated and an undated section, a missing one, a prefix that must not match, an empty one). The live half needs a tag's version and runs in `release.yml`, where a missing or empty section is a red release (P4 PR-5)
|
||||
14c. **`tools/buildid-check.ps1 -SelfTest`** (beta.18) — eight cases, both directions: a binary built from a dirty tree (`-dirty`, or the short form's `+`), one with no id, a missing one, and an expected id that is dirty or not an id are red. The live half needs the release's clean-checkout id and runs in `release.yml` over the published tree (§Release-time token substitution)
|
||||
15. `tools/resx-audit.ps1` — ~~**skipped loudly; it does not exist, and no `.resx` file does either**~~ **built 2026-09-13 (P3 PR-2)**: `-SelfTest` first (11 fixture cases, both directions), then the live pass over every `Strings.resx` family under `src/` — key sets equal across en/vi/ja, `Safety_*` in `ja` marked for review or signed, `Strings.Designer.cs` current with `tools/resx-gen.ps1`. A tree with no family is red (`09_I18N` §Translation workflow)
|
||||
16. **struct-mirror** — reads this run's `.trx` and fails when `ShmLayoutMirrorTests` did not execute, so deleting the mirror test is red as well as breaking it
|
||||
16b. **`tools/test-artifacts-check.ps1`** — `-SelfTest` first (seven cases, two RED), then live: an `overlay-*.log` created since this gate started, still in the real `%LOCALAPPDATA%\FrameLedger\logs` after the tests, whose first line names a `hook-harness*` image, fails the gate. It is what makes a test binary without its log sweep red (`17_HOOK_ENGINE` §Native logging, 2026-09-15); a game's log never counts
|
||||
|
||||
+40
-1
@@ -52,6 +52,17 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
|
||||
case. `Kill` now waits for exit (bounded, asserted) and the delete retries. Not §S19(b) either — a test-harness
|
||||
race, and the third flake shape of the day (the registry-subtree race between `VkLayerRegistrationTests` and the
|
||||
GOG reader's test, fixed in #188) was the same kind.
|
||||
- **Two more on 2026-10-07 (beta.18), both re-run green and then fixed the same day.**
|
||||
`WhenTheTargetExitsTheHostStopsAndSaysWhy` ended **`TargetNotRunning`** (#286, run 37619719203): the host resolves its
|
||||
target once, as it starts, and a host slower than the harness's 6 s hold found it gone — the shape recorded since
|
||||
2026-09-21. The hold is 15 s: a margin, not a signal, because the host prints nothing until its session ends.
|
||||
`LaunchModeOnAVulkanTargetAttachesToTheLayersRingAndInjectsNothing` ended **`RefusedByGuard` / `ModuleScanFailed`**
|
||||
(#288, run 37627351438): the hosted runner has the Vulkan loader and no device, so the harness exits 77 with a
|
||||
`[SKIP]` line — but the runner is elevated, the host starts the harness through `CreateProcessWithTokenW`
|
||||
(`UnelevatedProcess`), the child gets no stdout, and the line never reached the host's output; the test then
|
||||
depended on the session reading `LaunchTargetExited`, and a scan that hit the dying harness failed it instead. The
|
||||
test now asks the harness directly, before the host runs (exit 77 = skip, with the harness's own line); hiding the
|
||||
Vulkan ICDs from that probe makes it skip in under a second, and on a machine with a device it runs in full.
|
||||
- **A re-run ERASES the evidence, which is why the count above had to be kept by hand.**
|
||||
`gh run rerun --failed` updates the original run's conclusion, so `gh run list` showed **18 success, 1
|
||||
cancelled, 0 failed** across the twenty runs that contained all three failures above. Anyone measuring
|
||||
@@ -127,6 +138,10 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
|
||||
`VERSION` file (`12_BUILD` §Version); and `CHANGELOG.md` must carry a **non-empty** `## [x.y.z]` section for the
|
||||
full version, extracted by `tools/release-notes.ps1` (self-tested on every `build.ps1 check`). A missing
|
||||
section is a red release, not an empty note — the ledger's header said the opposite for five weeks.
|
||||
- **The build id from the clean checkout** (beta.18): `git describe --always --dirty --abbrev=12` before anything edits a
|
||||
tracked file — a dirty one or one over 31 characters stops the run — into `FL_BUILD_ID` for CMake. Until beta.18 the
|
||||
substitution below ran first and every release's natives called themselves `<tag>-dirty` (`12_BUILD` §Release-time
|
||||
token substitution).
|
||||
- `{{RELEASE_DATE}}` substituted in `legal/*.md` with the run's UTC date **before the build**, because the App
|
||||
embeds those documents (FR-11); any `{{` token left anywhere after that fails the job.
|
||||
- **The identical gate** — `./build.ps1 check`, native first, every tool including `versioninfo-check` against
|
||||
@@ -184,6 +199,29 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
|
||||
- **The `anticheat` block gets extra scrutiny:** schema-valid, non-empty, no entry removed without a justification in the PR body. Removing a blocklist entry is a safety change and requires the same review as a security fix. *(Added 2026-10-04: the PR-only removal step fails the job on any removal, a shrunk per-title list or an added trusted signer, whatever the body says — the justification is for the reviewer, and the job stays red.)*
|
||||
- `permissions: contents: read`.
|
||||
|
||||
### `wiki.yml` — after a successful Release run, and by hand · **repo-local, built 2026-10-07 (beta.17, D53/D54)**
|
||||
- **What:** the GitHub Wiki is a copy of the repository's own pages — `wiki/` (Home, the sidebar, the developer pages)
|
||||
and `guide/` (the user guide: the End-user part, the same pages the App shows) with `LIMITATIONS.md`.
|
||||
`tools/wiki-build.ps1` names each page (a guide page after its first heading, `guide/README.md` as *User-guide*,
|
||||
`LIMITATIONS.md` as *Limitations*), rewrites links between pages to page names and every other repository link to
|
||||
its address on GitHub **at the release's tag**, drops each page's first heading (the wiki prints the page name), and
|
||||
writes a footer naming the tag. The same assembly is `build.ps1`'s `wiki-check` gate (`12_BUILD` §Local quality gate,
|
||||
13d), so a dead link is red on the pull request, never on the published wiki.
|
||||
- **When:** `workflow_run` on `Release`, completed — the job runs only when that run succeeded and was started by a
|
||||
pushed `v*` tag, so a `workflow_dispatch` rehearsal of `release.yml` never publishes. It checks out the run's
|
||||
`head_sha` (a `workflow_run` job runs `main`'s copy of this file) and links at `head_branch`, the tag. By hand:
|
||||
`gh workflow run wiki.yml -f ref=main -f publish=false` builds, checks and uploads the pages as an artifact; with
|
||||
`publish=true` it publishes them.
|
||||
- **Why not a step of `release.yml`:** the release stays as it was, its rehearsal stays a pure rehearsal, and a wiki
|
||||
that fails to publish is a red run of its own that can be re-run — a step after `gh release create` could never be
|
||||
re-run, the release already existing. A release created with `GITHUB_TOKEN` fires no `release` event for other
|
||||
workflows; `workflow_run` fires because the Release run itself was started by a tag push.
|
||||
- **Publishing:** `gh auth setup-git`, a clone of `<repo>.wiki.git`, everything but `.git` replaced, a commit as
|
||||
`github-actions[bot]` only when something changed, `git push origin HEAD:master` (the wiki's branch is `master`). A
|
||||
page edited on the Wiki tab is overwritten at the next release: edit `wiki/` or `guide/`.
|
||||
- `permissions: contents: write` — the repository's default workflow token is read-only (read from the API,
|
||||
2026-10-07), and pushing to the wiki repository needs write.
|
||||
|
||||
## Dependabot (`.github/dependabot.yml`)
|
||||
|
||||
```yaml
|
||||
@@ -215,7 +253,7 @@ Central package management makes Dependabot PRs single-file diffs.
|
||||
|
||||
**In the tree — done:**
|
||||
|
||||
- [x] Repo-local `ci.yml`, `codeql.yml`, `release.yml`, `rules-publish.yml` (all four repo-local by decision, §Workflows); ~~caller stubs pointing at `poli0981/.github`~~ — never the design, see the first paragraph
|
||||
- [x] Repo-local `ci.yml`, `codeql.yml`, `release.yml`, `rules-publish.yml` (all four repo-local by decision, §Workflows); ~~caller stubs pointing at `poli0981/.github`~~ — never the design, see the first paragraph *(and `wiki.yml` since beta.17, repo-local too: five)*
|
||||
- [x] Issue forms `bug_report.yml`, `feature_request.yml`, `safety_gap.yml`; `ISSUE_TEMPLATE/config.yml` pointing a vulnerability at private reporting; PR template referencing CLAUDE.md's definition of done
|
||||
- [x] `.github/dependabot.yml` (nuget + github-actions, weekly)
|
||||
- [x] `SECURITY.md` — the private route for a vulnerability, the public route for a safety gap, and the honest response intent (2026-09-16)
|
||||
@@ -227,4 +265,5 @@ Central package management makes Dependabot PRs single-file diffs.
|
||||
- [ ] `Rules / validate` as a required check (§S23-2, after its skip-shim)
|
||||
- [ ] Dependabot alerts + security updates (the manifest is in the tree; the alerts are a setting)
|
||||
- [x] Private vulnerability reporting enabled (Settings ▸ Security), so `config.yml`'s link resolves *(marked 2026-10-04: GitHub reports it enabled)*
|
||||
- [ ] Wiki editing restricted to collaborators (Settings ▸ General ▸ Features ▸ Wikis ▸ *Restrict editing to collaborators only*): otherwise anyone with a GitHub account can change a page until the next release overwrites it (§wiki.yml, beta.17)
|
||||
- [ ] Repo topics: `windows`, `wpf`, `benchmark`, `fps`, `game-performance` (~~`presentmon`~~ — dropped 2026-08-27, §G)
|
||||
@@ -71,6 +71,26 @@ under the new theme. `PagesLoadTests.Surfaces` builds every page, window and dia
|
||||
any check that wants all of them. Colours are compared and texts only reported: another test class may change
|
||||
`Strings.Culture` between the two builds.
|
||||
|
||||
**A page is measured in the Frame the App shows it in, and a theme brings its accent (beta.18).** WPF UI's
|
||||
`NavigationViewContentPresenter` is a `Frame`, which passes no inherited value into the page, the text colour included, so
|
||||
a page laid out straight in a window measures the window's colour and not the App's: the theme-switch check above did, and
|
||||
stayed green over every page title drawn black (`08_UI` §Contrast, fifth hole). The rendered checks host a page in the
|
||||
presenter (`PagesLoadTests.Hosted`), and `PagesLoadTests.EveryTextIsReadableInBothThemes` measures every surface's shown
|
||||
texts at ≥ 3:1 in both themes. `Visuals.UnderTheme` switches as the App does — the accent resources derived for the theme
|
||||
from Windows' default accent (`Visuals.DefaultAccent`, the App's derivation rather than the machine's own palette), then
|
||||
the dictionary — and puts the application's own resources back afterwards. The accent lives in `Application.Resources`,
|
||||
not in a theme dictionary; until then a check under Light measured the dark theme's link blue on the light window, 1.9:1,
|
||||
a colour the App never shows. The theme-switch check compares what can be seen: a text only one of the two instances holds
|
||||
counts where it shows, and a collapsed part is not compared (a switch re-applies the template of a DataGrid's idle scroll
|
||||
bar, and its glyphs exist in the switched instance only).
|
||||
|
||||
**Loaded needs a shown window, and even then it is not raised everywhere (beta.17).** A tree laid out by hand never raises
|
||||
Loaded, and a shown one raises it only where a subtree listens for it (`16_WPFUI_SYNTAX` §Gotchas) — so a test that calls
|
||||
`RaiseEvent(Loaded)` proves a handler, never that WPF reaches it. `ScrollBarHidingTests.EverySurfaceShownWithTheOptionOnDrawsNoBar`
|
||||
shows each surface in a real window, off the screen and never activated, with the option on before anything is built as
|
||||
at start-up; `WpfRaisesLoadedOnlyWhereASubtreeListensForIt` checks the harness against WPF itself (a scroller holding a
|
||||
Border is never loaded, one holding a CheckBox is), on CI too.
|
||||
|
||||
**A test that sends input must also say which keys are held.** `Keyboard.Modifiers` is the machine's real keyboard, read
|
||||
from any thread (a fresh background thread's `GetKeyState` reports the machine's NumLock — measured 2026-10-06), so a
|
||||
wheel test that read it held whatever key a person pressed while the gate ran: `ChartWheelTests`' plain half went red once
|
||||
|
||||
+24
-1
@@ -152,6 +152,8 @@ Native `Menu`, `TabControl`, `ComboBox`, `Slider`~~, `ListView`~~ are fine — t
|
||||
styles (`Styles/FrameLedger.xaml`), or the `Pill` style with a `SystemFillColor*BackgroundBrush` and an explicit text
|
||||
brush; `ContrastTests` refuses all five (`08_UI` §Contrast).
|
||||
- Do **not** set `Background` on `FluentWindow` (kills Mica). Page backgrounds transparent by default.
|
||||
- **Every `Page` root sets `Foreground="{DynamicResource TextFillColorPrimaryBrush}"`** (2026-10-07): the navigation's
|
||||
Frame passes no text colour into a page, and a text with none is black (§Gotchas).
|
||||
- Exception to the no-hex rule: the chart palette — defined once per theme in ~~`Styles/ChartPalette.xaml` (two dictionaries)~~ `Styles/ChartPalette.Dark.xaml` and `ChartPalette.Light.xaml` (corrected 2026-10-04), never inline.
|
||||
|
||||
## FlowDocument (rendered documents, beta.12)
|
||||
@@ -254,7 +256,17 @@ On startup and on `ApplicationThemeManager.Changed`: for every live plot set fig
|
||||
- [ ] **A scroll bar's visibility is bound inside its scroller's template** (`ComputedVerticalScrollBarVisibility`), so a style
|
||||
on `ScrollBar` or `ui:DynamicScrollBar` cannot hide it. Set the scroller's own `ScrollBarVisibility` to `Hidden` — no
|
||||
bar, and the wheel, the keyboard and touch still scroll (`ui:PassiveScrollViewer` treats only `Disabled` as "cannot
|
||||
scroll") — as `Services.ScrollBarHiding` does for `ui.hide_scrollbars` (beta.14).
|
||||
scroll") — as `Services.ScrollBarHiding` does for `ui.hide_scrollbars` (beta.14), reaching each scroller from a class
|
||||
handler on `ScrollChanged` since beta.17 rather than from `Loaded` alone (next item).
|
||||
- [ ] **A class handler on `Loaded` is not a load hook.** WPF raises Loaded only on an element whose subtree listens for it
|
||||
with a handler of its own — an instance handler, a style's `EventSetter`, a template's trigger
|
||||
(`BroadcastEventHelper.OnBroadcastCallback` walks only into `SubtreeHasLoadedChangeHandler`;
|
||||
`FrameworkElement.ThisHasLoadedChangeEventHandler`) — and `EventManager.RegisterClassHandler` counts as none of them.
|
||||
WPF UI 4.3.0's `ToggleSwitch`, `CheckBox` and `ProgressRing` templates carry a Loaded trigger, so a scroller over those
|
||||
loads and a scroller over plain cards and text never does: `ScrollBarHiding` hid Settings' bar and not the Dashboard's
|
||||
(beta.17). To reach every instance, hook an event the element raises itself — a scroller's `ScrollChanged` comes from its
|
||||
first layout. `ScrollBarHidingTests.WpfRaisesLoadedOnlyWhereASubtreeListensForIt` keeps the behaviour visible, and a test
|
||||
that raises Loaded with `RaiseEvent` proves the handler, never that it is reached.
|
||||
- [ ] **No dialog in 4.3.0 closes on Esc.** Neither `ContentDialog.cs` nor `MessageBox.cs` at the 4.3.0 tag handles a
|
||||
key (read 2026-09-15), and `ContentDialog.CloseButtonText` DEFAULTS to "Close" — an empty string is how a dialog
|
||||
says it has no Close button. `MessageBox.Close()` is `[Obsolete("Use Close with MessageBoxResult instead")]` while no
|
||||
@@ -270,3 +282,14 @@ On startup and on `ApplicationThemeManager.Changed`: for every live plot set fig
|
||||
`DynamicResource`). `ContrastTests.NoTextBlockTakesItsColourFromAppearance` refuses every form in the App's XAML and code,
|
||||
`PagesLoadTests.EveryTextFollowsAThemeSwitch` renders every surface through a switch both ways, and
|
||||
`PagesLoadTests.WpfUisAppearanceStillKeepsTheThemeATextWasMadeUnder` turns red the day upstream follows a switch.
|
||||
- [ ] **A page in the `NavigationView` inherits nothing, its text colour included.** `NavigationViewContentPresenter` is a
|
||||
`Frame`, and `Frame` sets `InheritanceBehavior.SkipToAppNow`: the window's `Foreground` stops there, and a text that sets
|
||||
no colour falls to the TextBlock default, which WPF UI 4.3.0's `TextBlockMetadata` makes `Brushes.Black`. Cards, grids
|
||||
and controls set their own colour in their templates; the bare texts did not — every page's title and section headings
|
||||
were black on the dark window, 1.3:1 (the owner's screenshots of beta.17; beta.16's show it too). It came and went: a
|
||||
page on screen during a theme switch did take the window's new colour through the switch, and every navigation makes a
|
||||
new page that does not. Every `Page` root sets `Foreground="{DynamicResource TextFillColorPrimaryBrush}"`
|
||||
(`AccessibilityTests.EveryPageSetsItsOwnTextColour`). A check that lays a page out straight in a window measures the
|
||||
window's colour, not the App's — beta.17's theme-switch check did and was green over the black titles — so the rendered
|
||||
checks host a page in the presenter, and `PagesLoadTests.EveryTextIsReadableInBothThemes` measures every surface so
|
||||
hosted at ≥ 3:1 in both themes.
|
||||
+101
-3
@@ -1410,9 +1410,11 @@ stops there"~~ — the override itself is gone since 2026-09-22 (D22).
|
||||
**Found and NOT fixed — each needs its own PR.**
|
||||
- ~~**A refused session is not recorded, though the notice says it is.**~~ **Fixed 2026-09-22 (D23):** the loop holds a
|
||||
refused session open until the target exits, so Tier 2 has a producer and the sentence is true for every refusal.
|
||||
- **A released Overlay logs its build as `v0.1.0-beta.3-dirty`**: the CI checkout is dirty by the time CMake runs
|
||||
- ~~**A released Overlay logs its build as `v0.1.0-beta.3-dirty`**: the CI checkout is dirty by the time CMake runs
|
||||
`git describe`. Both sides of the handshake compile the same string, so nothing breaks; it is a release that calls
|
||||
itself dirty.
|
||||
itself dirty.~~ **Fixed 2026-10-07 (beta.18 PR-3):** the dirt was `release.yml`'s own date substitution in
|
||||
`legal/*.md`; the workflow reads describe from the clean checkout before it and hands it to CMake as `FL_BUILD_ID`,
|
||||
and `tools/buildid-check.ps1` reads it back out of the published binaries (`12_BUILD` §Release-time token substitution).
|
||||
- ~~**An install over a running Agent half-replaces the folder** (three failed starts, `Microsoft.Data.Sqlite` not
|
||||
found).~~ **A GUESS, WITHDRAWN the same evening, and it had already been published in beta.4's notes.** Nothing was
|
||||
installed between the failures (20:59–21:01) and the start that worked (21:02); the PC had been restarted at 20:57
|
||||
@@ -2011,7 +2013,7 @@ during finalize, PR-4 the scan set's creation times (D51), PR-5 the App's viewer
|
||||
|
||||
**Owner-only, added to the list below:** item 12.
|
||||
|
||||
## **START HERE** — 2026-10-06, 0.1.0-beta.16: beta.15 verified, and the chip it left
|
||||
## ~~**START HERE**~~ — 2026-10-06, 0.1.0-beta.16: beta.15 verified, and the chip it left *(struck 2026-10-07: the head is §beta.17 below)*
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.16]`; this is what no other file carries. The owner, after beta.15's release
|
||||
(2026-10-06): owner-only item 12 passed on real hardware ("đã chạy và ok"), do the chip beta.15 left, release, and close
|
||||
@@ -2039,6 +2041,88 @@ added.*
|
||||
- **The desktop app forbids polling CI** (no `gh` loop, Monitor or ScheduleWakeup): it wakes the session on a failure, a
|
||||
conflict or a review comment, never on green, so a green PR waits for the owner's word or the owner's auto-merge.
|
||||
|
||||
## ~~**START HERE**~~ — 2026-10-07, 0.1.0-beta.17: text that follows a theme switch, scroll bars hidden everywhere, a wiki *(struck 2026-10-07: the head is §beta.18 below)*
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.17]`; this is what no other file carries. The owner's report (2026-10-07, three
|
||||
screenshots of beta.16): Settings' descriptions kept the old theme's colour after a switch; the Dashboard kept its
|
||||
scroll bar with Hide scroll bars on; "a complete wiki, concise and easy, End-user and Dev". Five stacked PRs — #281 the
|
||||
theme text, #282 the scroll bars, #283 the guide's four new pages, #284 the wiki and its publishing, then the
|
||||
release.*
|
||||
|
||||
**Decisions (owner, 2026-10-07, asked before the plan — do not re-ask):**
|
||||
|
||||
- **D53 — the wiki's source is the repository.** `wiki/` (Home, the sidebar, the developer pages) and `guide/` with
|
||||
`LIMITATIONS.md` are assembled by `tools/wiki-build.ps1` and published to the Wiki tab by `.github/workflows/wiki.yml`
|
||||
after a successful Release run (and by hand); a page edited on the tab is overwritten at the next release. English.
|
||||
- **D54 — the wiki's End-user half is the user guide**, one source: it grows past D44's eight pages (the screens, every
|
||||
setting, troubleshooting, a glossary — twelve) and stays embedded in the App. Tests hold that every setting the
|
||||
Settings page shows and every page and menu item of the main window is named in it.
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **`ui:TextBlock Appearance` pins a brush.** WPF UI 4.3.0 resolves it once (`TryFindResource`) and coerces Foreground
|
||||
to it, so a theme switch leaves the text in the old theme; 129 texts used it. Every contrast check before measured a
|
||||
theme as a surface was *made* under it — a switch needs the surface hosted in a `Window`, because only
|
||||
`Application.Windows` hear a dictionary change (`16_WPFUI_SYNTAX` §Gotchas, `14_TESTING`).
|
||||
- **A class handler on `Loaded` is not a load hook.** WPF raises Loaded only where a subtree listens for it with its own
|
||||
handler, style EventSetter or template trigger — WPF UI's toggle switches carry one, which is why Settings hid its
|
||||
bar and the Dashboard never did. A test that calls `RaiseEvent(Loaded)` proves the handler, never that WPF reaches it;
|
||||
`ScrollChanged` reaches every scroller from its first layout.
|
||||
- **The wiki's git branch is `master`, and the repository's default workflow token is read-only:** `wiki.yml` declares
|
||||
`contents: write`. A release made with `GITHUB_TOKEN` fires no `release` event for another workflow; `workflow_run`
|
||||
does, and runs `main`'s copy of the file — so it checks out the run's `head_sha` and links at its tag.
|
||||
- **A fresh worktree cannot run the full gate** (the native configure, `CONTRIBUTING`): the stack's tip was gated in the
|
||||
main checkout on a detached HEAD, and each PR's own CI ran on its branch.
|
||||
- **Found while writing the guide, not fixed** (a task each): two notices can print an internal name — *"The hook
|
||||
stopped (WriterSelfDisabled)…"*, and a refusal no anti-cheat names reads ~~*"The anti-cheat guard did not hook this
|
||||
game: reason RefusedKillSwitch."*~~ *"…: reason RefusedByGuard."* *(corrected 2026-10-07 by beta.18's tests, which
|
||||
build the Agent's own events: the kill switch's refusal carries the gate's label where a family goes, and read "kill
|
||||
switch was detected in this game (… (FR-2.4) …)"; a re-scan that could not look read "Access is denied. was detected")*; the kill switch's *Applied* strip says "at the next session start" (it applies
|
||||
within 30 s); *Turn off* failing says "Nothing was enabled."; in the viewer, the exception switch, the Recording numbers and the Channel stay enabled;
|
||||
`08_UI` lists a "PawnIO missing" banner that does not exist; and a release's Overlay build id reads `-dirty` (§0.1.0-beta.4,
|
||||
"Found and NOT fixed", still open). *(All but the build id fixed by beta.18 PR-2, 2026-10-07; the build id is PR-3's.)*
|
||||
|
||||
**Owner-only, added to the list below:** item 13.
|
||||
|
||||
## **START HERE** — 2026-10-07, 0.1.0-beta.18: page titles readable in the dark theme, notices in words, a clean build id
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.18]`; this is what no other file carries. The owner's report (2026-10-07, five
|
||||
screenshots of beta.17 in the dark theme): every page's title and section headings near-black on the dark window — and
|
||||
the two chips beta.17 left (§beta.17, "Found while writing the guide"). Three stacked PRs — #286 the page text, #287
|
||||
the notices and the rest of that list, #288 the release build id — then the release.*
|
||||
|
||||
**No new decisions.** The train is the owner's request of 2026-10-07 ("beta18 with the two chip tasks, and the text that
|
||||
blends into the background in dark mode").
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **A page in the `NavigationView` inherits nothing.** `NavigationViewContentPresenter` is a `Frame`, and a Frame sets
|
||||
`InheritanceBehavior.SkipToAppNow`; WPF UI 4.3.0 makes the TextBlock default black. A page on screen during a theme
|
||||
switch takes the window's new colour through the switch and a page navigated to afterwards does not, so it came and
|
||||
went. Every check before hosted pages straight in a window and measured a page the App never draws — host a page in the
|
||||
presenter (`PagesLoadTests.Hosted`, `16_WPFUI_SYNTAX` §Gotchas).
|
||||
- **The accent is not in the theme dictionary.** WPF UI writes it into `Application.Resources` at every
|
||||
`ApplicationThemeManager.Apply(…, updateAccent: true)`; a test that swaps only the dictionary measures the other theme's
|
||||
accent (`Visuals.UnderTheme` derives it as the App does; `systemAccentColor: true` reads the machine's own palette).
|
||||
- **The gate's own refusals look like findings on the wire.** `HookedCaptureGate` puts a label ("kill switch", "previously
|
||||
blocked") where a family goes; whatever reads a family as "an anti-cheat was found" asks the end reason first. A test
|
||||
of what the user reads builds the event as the Agent does (`NoticesFromTheAgentTests`), never by hand — the
|
||||
hand-written events were why every notice test was green.
|
||||
- **`Safety_Consent_*` strings are versioned with the consent disclosure** (`SafetyDisclosure`): a message that is wrong
|
||||
on one path gets a key of its own rather than a changed meaning.
|
||||
- **A release's natives were `-dirty` by the release's own hand:** its date substitution edits `legal/*.md` before CMake
|
||||
reads describe. The id is read first, handed in, and read back out of the binaries (`tools/buildid-check.ps1`).
|
||||
- **Met again:** `CaptureHostEndToEndTests.WhenTheTargetExitsTheHostStopsAndSaysWhy` (`TargetNotRunning` on a slow
|
||||
runner) failed #286's first CI run; the job was re-run. **And a new one** failed #288's:
|
||||
`…LaunchModeOnAVulkanTargetAttachesToTheLayersRingAndInjectsNothing`. A hosted runner has the Vulkan loader and no
|
||||
device, so the harness exits 77 with a `[SKIP]` line — but the runner is elevated, the launch goes through
|
||||
`CreateProcessWithTokenW` (`UnelevatedProcess`), the child inherits no stdout, and the line never reaches the host's
|
||||
output; when the guard's scan hits the exiting harness (`ModuleScanFailed`) the test fails instead of skipping. Re-run;
|
||||
~~the deterministic fix is a task of its own~~ fixed the same day by beta.18 PR-5 (the test asks the harness itself,
|
||||
before the host runs), which also gave the `TargetNotRunning` case a 15 s hold (`13_CI_CD` §ci.yml).
|
||||
|
||||
**Owner-only, added to the list below:** item 14.
|
||||
|
||||
## Owner-only — no PR can close these
|
||||
|
||||
1. **§S23-2 — branch protection.** `Rules / validate` is not a required status check on
|
||||
@@ -2126,6 +2210,20 @@ added.*
|
||||
(`12_BUILD` §Debugging) and start `FrameLedger.exe --data-dir <copy>`; the banner names the folder, the pill reads
|
||||
*Viewer — no Agent*, the switches are off, and the installed App runs beside it untouched. (f) The `ja` strings
|
||||
marked `review`.
|
||||
13. **beta.17 on real hardware.** (a) **A theme switch:** on Settings, Dark → Light → Dark, and again with a session's
|
||||
summary window open — every description and caption follows at once. (b) **Hide scroll bars** on: the Dashboard,
|
||||
Games, a game's page, Logs, About, Help ▸ User guide and a drop-down list draw no bar, and the wheel still scrolls;
|
||||
off, the bars come back without a restart. (c) **Help ▸ User guide** lists twelve pages and Limitations; a link to a
|
||||
section opens that section. (d) **The wiki**, once the release is out: the Wiki tab shows Home, the sidebar's two
|
||||
halves and a footer naming `v0.1.0-beta.17` — then tick *Restrict editing to collaborators only* (Settings ▸ General
|
||||
▸ Features ▸ Wikis), or anyone can change a page until the next release overwrites it. (e) The `ja` strings marked
|
||||
`review`.
|
||||
14. **beta.18 on real hardware.** (a) **The dark theme:** every page's title and section headings — Dashboard, Games, a
|
||||
game's page, Compare, Settings, Logs — read light on the dark window, after starting in Dark, after Light → Dark, and
|
||||
after moving between pages. (b) **The overlay build** on the Dashboard's *Capture agent* card reads `v0.1.0-beta.18`,
|
||||
without `-dirty`. (c) **Disable all hooking:** turning it on says a game being measured stops within 30 seconds; with
|
||||
it on, a hooked game's notice reads "All hooking is switched off in Settings, so nothing was measured." (d) The `ja`
|
||||
strings marked `review`, `Safety_Unhooked_Unnamed_Format` among them.
|
||||
|
||||
**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
|
||||
|
||||
+5
-2
@@ -7,7 +7,8 @@ This folder is for people who build, change or review FrameLedger. **If you only
|
||||
|
||||
| You want to… | Read |
|
||||
|---|---|
|
||||
| Pick up work where it stopped | [`HANDOFF.md`](HANDOFF.md) — sequencing, decisions (D1…D46) and the traps that each cost a cycle. It carries no status on purpose |
|
||||
| Pick up work where it stopped | [`HANDOFF.md`](HANDOFF.md) — sequencing, decisions (~~D1…D46~~ D1 onward — *corrected 2026-10-07: the range grows with every train*) and the traps that each cost a cycle. It carries no status on purpose |
|
||||
| Find your way around first | The [wiki](https://github.com/poli0981/frameledger/wiki)'s developer pages (source: [`../wiki/`](../wiki/), beta.17) — a short page per part, each linking here |
|
||||
| Learn the system | [`../CLAUDE.md`](../CLAUDE.md) (the rules and the layout), then the reading order below |
|
||||
| Build it | [`12_BUILD.md`](12_BUILD.md) — `./build.ps1 check` is the whole gate, the same one CI runs |
|
||||
| Contribute or fork | [`../CONTRIBUTING.md`](../CONTRIBUTING.md), [`../FORKING.md`](../FORKING.md), [`../NOTICE`](../NOTICE) |
|
||||
@@ -76,7 +77,9 @@ are safety items, and something listed there as unresolved should not be built t
|
||||
|
||||
## Beside this folder
|
||||
|
||||
- [`../guide/`](../guide/README.md) — the user guide (players, English).
|
||||
- [`../guide/`](../guide/README.md) — the user guide (players, English); since beta.17 (D54) also the wiki's End-user part.
|
||||
- [`../wiki/`](../wiki/Home.md) — the wiki's own pages: Home, the sidebar, the developer pages (D53). `wiki.yml`
|
||||
publishes them with the guide to the Wiki tab when a release is made; `build.ps1`'s `wiki-check` holds every link.
|
||||
- [`../legal/`](../legal/) — the documents a user accepts, the accuracy statement, the third-party notices and licence
|
||||
texts, the trademark note.
|
||||
- [`../LIMITATIONS.md`](../LIMITATIONS.md) — what the whole software cannot do, in a player's words.
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
# The screens
|
||||
|
||||
What each part of FrameLedger shows and what each button does. What the numbers mean is in
|
||||
[Read your results](03-read-your-results.md); every setting is in [Every setting](08-settings.md).
|
||||
|
||||
## The main window
|
||||
|
||||
**The badge at the top right** says how the capture agent is doing:
|
||||
|
||||
| Badge | Meaning |
|
||||
|---|---|
|
||||
| Agent connected | Everything works. |
|
||||
| Connecting to agent… · Starting agent… | FrameLedger is reaching the agent, or starting it. Give it a few seconds. |
|
||||
| Waiting for administrator permission… | *Run the agent as administrator* is on, and Windows is asking you. |
|
||||
| Agent offline | The agent is installed but does not answer. FrameLedger keeps trying; **Retry** on the banner tries now. |
|
||||
| Agent not installed | `FrameLedger.Agent.exe` is missing: install FrameLedger again. |
|
||||
| Viewer — no Agent | You opened a copy of a data folder to look at ([When something goes wrong](09-troubleshooting.md#looking-at-a-copy-of-your-data)). |
|
||||
|
||||
**Banners** under the menus stay until you act on them: *Capture agent offline* with **Retry**; *Update* with **Restart to
|
||||
update** (it waits while a game is being recorded); and the safety notices — a game's hooking refused, measurement
|
||||
stopped, hooking turned off — each with one button that only says you have read it.
|
||||
|
||||
**The pages** are on the left: **Dashboard**, **Games**, **Compare**, **Logs**, and **Settings** at the bottom.
|
||||
|
||||
## The menus
|
||||
|
||||
| Menu | Item | What it does |
|
||||
|---|---|---|
|
||||
| **File** | **Add game…** | Pick a game's `.exe` file. It is added with hooking off, and its page opens. |
|
||||
| | **Import library…** | A checklist of the games installed through Steam, GOG Galaxy, Epic and itch.io. |
|
||||
| | **Export** ▸ **Session CSV** · **Session JSON** · **Chart PNG** | Saves the session you last selected or opened. Read [Your data](05-your-data.md) before you share a file. |
|
||||
| | **Exit** | Quits FrameLedger, even when *Minimize to tray on close* is on. |
|
||||
| **Tools** | **Agent status…** | Opens the Dashboard, where the agent's card is. |
|
||||
| | **Update detection rules** | The agent reads its detection rules again and checks your games again. |
|
||||
| | **Vulkan layer registration…** | Opens Settings, where the Vulkan layer is. |
|
||||
| | **Open data folder** | Opens `%LOCALAPPDATA%\FrameLedger` in Explorer. |
|
||||
| | **Database maintenance…** | **Check**, **Back up…**, **Sweep…** and **Compact** your database ([When something goes wrong](09-troubleshooting.md#the-database)). |
|
||||
| **Help** | **User guide** | This guide. |
|
||||
| | **Check for updates** | Asks GitHub now. |
|
||||
| | **Report a bug…** | Builds a report on your PC ([When something goes wrong](09-troubleshooting.md#report-a-problem)). |
|
||||
| | **Online documentation** | The project's page on GitHub. |
|
||||
| | **Limitations** | What FrameLedger cannot do. |
|
||||
| | **About FrameLedger** | The version, the licences and the notices. |
|
||||
|
||||
## Dashboard
|
||||
|
||||
- **Live capture** — the game being recorded right now: its name, **T1** (measured) or **T2** (recorded only), and the
|
||||
time so far. While it is measured: the frame rate, the resolution, the upscaler, frame generation, ray tracing, the GPU
|
||||
and CPU temperatures and the game's memory. *Attached — waiting for the first frames…* means hooking worked and the
|
||||
first frames are on their way.
|
||||
- **Games tracked**, **Total playtime**, **Sessions this week**.
|
||||
- **Capture agent** — *State*, *Agent version*, *Telemetry source* (which sensor readers work on this PC: `l1` is
|
||||
Windows itself, `lhm` is LibreHardwareMonitor, `nvapi` is NVIDIA's own and only on NVIDIA cards), *Overlay build* (the
|
||||
version of the component loaded into games), *Elevated* (whether the agent runs as administrator) and *Running
|
||||
sessions*. Everything reads N/A until the agent answers.
|
||||
- **Recent sessions** — the ten newest. Click one to open its summary.
|
||||
|
||||
## Games
|
||||
|
||||
- **Search games**; sort by **Name**, **Last played** or **Playtime**; **Show as a list** or **Show as a grid**.
|
||||
- **Refresh** reads your library again: it offers games newly installed through a store, and marks a game whose `.exe`
|
||||
is gone as *Not installed*.
|
||||
- **Add game…** — or drop `.exe` files onto the page.
|
||||
- Each game shows its name, its store and engine, and one state: **Hooking on**, **Hooking off**, **Anti-cheat** (found,
|
||||
so it is not hooked), **Exception** (a user-mode exception is in force) or **Not recorded**; then its sessions,
|
||||
playtime and last play. Click it to open its page (in the list: double-click, or Enter).
|
||||
|
||||
## A game's page
|
||||
|
||||
- **At the top:** the name, publisher, version, store and engine, the `.exe` path, the last session, the last measured
|
||||
session's frame rate and its ray-tracing chips. **Edit…** changes the name, publisher, version and notes. **Change
|
||||
executable…** points the entry at another `.exe` and turns hooking back off. **Remove…** asks whether to keep the
|
||||
game's sessions.
|
||||
- **Recording** — off, FrameLedger ignores the program completely: for a launcher or a tool that is not a game.
|
||||
- **Hooking** — on, the game is measured. A warning comes first, and you type `I ACCEPT THE INJECTION RISK` to go on.
|
||||
Read [Anti-cheat and safety](04-anti-cheat-and-safety.md) before you do.
|
||||
- **Anti-cheat** — shown in its place when anti-cheat was found: what was found, and where. **User-mode exception**
|
||||
appears when the game qualifies for the one exception.
|
||||
- **Supports** and **Details** — what the game's own files contain, as far as FrameLedger can tell.
|
||||
- **Tabs:** **Sessions** (every session: double-click a row or press **Open**; **Delete all sessions…** at the top),
|
||||
**Frametime**, **Distribution**, **Trend** (one point per session for a figure you choose, with changes to your
|
||||
hardware or driver marked), **Sensors**, and **Latency** when the game reported it.
|
||||
|
||||
## A session's summary
|
||||
|
||||
It opens from a session row, from the Dashboard, and from the notice when a session is saved.
|
||||
|
||||
- A warning at the top when the game crashed or measuring stopped early.
|
||||
- The **Ray Tracing**, **Path Tracing** and **Ray Reconstruction** chips: click one to correct it by hand, for this
|
||||
session or as the game's default. Your correction is labelled as yours.
|
||||
- The figures, the charts and **Statistics per series** — [Read your results](03-read-your-results.md) explains each.
|
||||
- **Tags and notes** with **Save**, and **Export CSV**, **Export JSON**, **Export PNG**.
|
||||
|
||||
## Compare
|
||||
|
||||
Tick **2 to 5 sessions**, from any of your games, and press **Compare**: one frame-rate curve per measured session, and
|
||||
a table with the best value of each row in bold. Comparing a measured session with an unmeasured one asks first,
|
||||
because they measured different things.
|
||||
|
||||
## Logs
|
||||
|
||||
What FrameLedger and its agent wrote down. Choose **App** or **Agent**, a level, and search; **Pause** stops the view from
|
||||
following new lines. **Open logs folder**, and **Export bug bundle**, which does the same as Help ▸ Report a bug….
|
||||
|
||||
## Settings
|
||||
|
||||
Every switch and box is described in [Every setting](08-settings.md).
|
||||
|
||||
## The tray icon
|
||||
|
||||
The icon by the clock has **Open FrameLedger**, **Pause capture** / **Resume capture**, **Agent status** and **Exit**; a
|
||||
click on it opens the window. **Pause capture** stops measuring the running sessions until you resume, and the paused
|
||||
stretch is left out of their figures. While the window is hidden, a notice pops up when a session is saved or an update
|
||||
is ready.
|
||||
|
||||
## Keyboard and mouse
|
||||
|
||||
- **Ctrl+1** … **Ctrl+5** open Dashboard, Games, Compare, Logs and Settings.
|
||||
- **Alt** or **F10** moves to the menus.
|
||||
- **Esc** closes a dialog the way its Close or Cancel button does.
|
||||
- Over a chart, **Ctrl** and the mouse wheel zoom, dragging pans, and a double-click resets. The wheel alone scrolls the
|
||||
page.
|
||||
@@ -0,0 +1,75 @@
|
||||
# Every setting
|
||||
|
||||
Settings is the last item on the left. Its sections follow, in the order it shows them. Settings marked *agent* are read
|
||||
by the capture agent; unless the row says otherwise, a change applies from the next session.
|
||||
|
||||
## Capture
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Disable all hooking** | Nothing is loaded into any game, whatever each game's own switch says. A game being measured stops being measured at the next safety check, within 30 seconds. Sessions are still recorded. *Agent.* | Off |
|
||||
| **Games with hooking on** | Shown while any game has hooking on: one **Turn off** per game. | — |
|
||||
| **Hide hooking on anti-cheat games** | On, the page of a game where anti-cheat was found shows only what was found; off, it also shows the Hooking switch, greyed out. Such a game is never hooked either way. | On |
|
||||
| **Allow hooking in games whose only anti-cheat runs in user mode** | Turns on the one narrow exception ([Anti-cheat and safety](04-anti-cheat-and-safety.md#the-one-exception-you-can-make)). The games that qualify are listed under it, each with **Make exception…** (after a warning) or **Withdraw**. *Agent.* | Off |
|
||||
| **Vulkan layer** | The component that measures Vulkan games — but only a game FrameLedger starts itself, which the App cannot do yet, so a Vulkan game you start is recorded, not measured. The agent registers and removes it by itself; **Register** and **Unregister** repair that, for your Windows user only. | — |
|
||||
|
||||
The link under them, *Read what the hook does and does not do*, opens the safety document on GitHub.
|
||||
|
||||
## Recording
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Minimum session length (s)** | A shorter session is not kept. 5 to 600 seconds. *Agent.* | 30 |
|
||||
| **Sensor interval (ms)** | How often the PC's sensors are read during a session. 500 to 2000 ms. *Agent.* | 1000 |
|
||||
| **Raw series kept per game** | How many of each game's newest sessions keep their per-frame data; older ones keep their statistics. 0 keeps everything. *Agent.* | 20 |
|
||||
|
||||
## Data
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Delete all sessions** | Deletes every session of every game, with its data and notes, after asking. Your library, your settings and each game's hooking choice stay. It cannot be undone, and it is refused while a game is being recorded. | — |
|
||||
|
||||
## Capture agent
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Run the agent as administrator** | Lets FrameLedger measure games that run as administrator, and read CPU temperature with PawnIO installed. Windows asks every time the agent starts, at logon too. A warning explains the risk first; read [Limitations](../LIMITATIONS.md#running-the-agent-as-administrator). The agent restarts to apply it, or at its next start if a game is being recorded. | Off |
|
||||
| **Start the agent at logon** | **Register**, **Repair** or **Remove** a task that starts the agent when you log on, for your user only and without administrator rights. Without it, FrameLedger starts the agent when you open it. | Not installed |
|
||||
|
||||
## Appearance
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Theme** | Follow system, Light or Dark. Applies at once. | Follow system |
|
||||
| **Language** | English, Tiếng Việt or 日本語. The window is rebuilt in the new language at once. | English |
|
||||
|
||||
## Window
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Start FrameLedger with Windows** | Opens FrameLedger when you log on, for your user only. | Off |
|
||||
| **Minimize to tray on close** | Closing the window keeps FrameLedger running by the clock; quit with **Exit** in the tray's menu or the File menu. | Off |
|
||||
| **Show FPS with two decimals** | Every frame rate with two decimals (62.40) instead of a whole number (62). Pages show it when they next open. | Off |
|
||||
| **Hide scroll bars** | No scroll bars are drawn anywhere; the wheel, the keyboard and touch still scroll. Applies at once. | Off |
|
||||
|
||||
## Updates
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Channel** | *Automatic* follows your copy: a test version (a pre-release) looks for test versions, a release for releases. Or choose *Stable*, or *Beta* (releases and pre-releases). | Automatic |
|
||||
| **Check for updates at startup** | One question to GitHub a few seconds after FrameLedger starts. A new version downloads in the background and installs only when you restart. | On |
|
||||
|
||||
## Logging
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Debug logging** | FrameLedger writes far more detail into its log, for a bug report. The agent keeps its own level. | Off |
|
||||
|
||||
## System
|
||||
|
||||
This PC as FrameLedger records it with every session: processor, graphics card and driver, memory, Windows build and
|
||||
the main display. Nothing is sent anywhere. **Copy** puts the lines on the clipboard, for a bug report.
|
||||
|
||||
## Legal
|
||||
|
||||
**Reopen the legal documents** shows the documents you accepted, and the GPL, again. Nothing is accepted again.
|
||||
@@ -0,0 +1,98 @@
|
||||
# When something goes wrong
|
||||
|
||||
Find what you see, then what it means and what to do. Questions that are not problems are in
|
||||
[Questions and answers](06-faq.md).
|
||||
|
||||
## The capture agent is not working
|
||||
|
||||
| You see | It means | Do this |
|
||||
|---|---|---|
|
||||
| **Connecting to agent…** or **Starting agent…** | FrameLedger is reaching its agent, or starting it. | Wait a few seconds. |
|
||||
| **Agent offline**, and a banner: *The capture agent is not answering* | The agent is installed but does not answer. Your library, sessions and charts still work; only what is live does not. FrameLedger keeps trying. | **Retry** on the banner, or close FrameLedger and open it again. |
|
||||
| **Agent not installed** | `FrameLedger.Agent.exe` is missing from FrameLedger's folder. | Install FrameLedger again from the [Releases page](https://github.com/poli0981/frameledger/releases). |
|
||||
| **Waiting for administrator permission…** | *Run the agent as administrator* is on, and Windows is asking. The prompt may be waiting on the taskbar. | Answer it — or switch the option off in Settings ▸ Capture agent. |
|
||||
| Settings says *the administrator prompt was declined* | The agent runs with your normal rights. | Nothing, unless you need it ([Every setting](08-settings.md#capture-agent)). |
|
||||
|
||||
## A game was recorded but not measured
|
||||
|
||||
The session is **T2**, its frame figures read N/A, and its summary says why on the **Why:** line — go by that line.
|
||||
While the game runs, a notice may say *hooking refused*.
|
||||
|
||||
| Why | Do this |
|
||||
|---|---|
|
||||
| Hooking was off for the game. | Switch **Hooking** on in the game's page, after reading [Anti-cheat and safety](04-anti-cheat-and-safety.md). |
|
||||
| The game's file changed since hooking was switched on — an update, usually. | Switch hooking on again for it. |
|
||||
| The game you added is its launcher. | Add the game's own `.exe` too: hooking a launcher does not reach the game it starts. |
|
||||
| Anti-cheat was found in the game. | Nothing: FrameLedger will not hook it, and hooking stays off. The only exception is narrow ([Anti-cheat and safety](04-anti-cheat-and-safety.md#the-one-exception-you-can-make)). |
|
||||
| An anti-cheat driver or service was running on the PC. It may belong to another game. | Close the program it belongs to: the next session is measured again. |
|
||||
| Anti-cheat appeared while the game was running. | Nothing: measuring stopped, and the summary says *Measurement stopped early*. |
|
||||
| FrameLedger could not check the game's files. | It checks again by itself; Tools ▸ Update detection rules checks now. |
|
||||
| The game runs as administrator. | Settings ▸ Capture agent ▸ *Run the agent as administrator* — read its risk in [Limitations](../LIMITATIONS.md#running-the-agent-as-administrator) first. A game protected by an anti-cheat driver cannot be measured either way. |
|
||||
| The game is 32-bit, uses DirectX 9, or uses Vulkan. | Nothing: these are recorded, not measured ([Limitations](../LIMITATIONS.md#games-it-will-not-measure)). |
|
||||
| **Disable all hooking** is on. | Switch it off in Settings ▸ Capture. |
|
||||
| The game was already running when FrameLedger was updated. | Close the game and start it again. |
|
||||
| Hooking was switched off after the game crashed twice soon after it started. | Switch it on again in the game's page if the cause may be gone — after a driver update, for example. |
|
||||
| The game's file is gone. | If only its drive letter changed, FrameLedger follows it within about 15 seconds; otherwise **Change executable…** on the game's page. |
|
||||
| The component could not be loaded into the game. | [Report a problem](#report-a-problem). |
|
||||
|
||||
## Some numbers read N/A
|
||||
|
||||
- **Everything** reads N/A: the session was not measured — see above.
|
||||
- **1% low** needs 1,000 of the game's own frames, and **0.1% low** 10,000: a shorter session reads N/A for them.
|
||||
- **VSync** reads N/A for OpenGL games.
|
||||
- **VRAM (this game)** reads N/A for the game's first second.
|
||||
- **GPU sensors** on AMD and Intel cards have not been tested, and **GPU held back** is read on NVIDIA cards only.
|
||||
- **A session's charts are gone**: its per-frame data was removed under *Raw series kept per game*
|
||||
([Every setting](08-settings.md#recording)); its statistics stay.
|
||||
- **Presented FPS** instead of the game's own frame rate, **video memory** that differs from an in-game overlay, and
|
||||
**CPU temperature**: see [Questions and answers](06-faq.md).
|
||||
|
||||
## A session says the game crashed
|
||||
|
||||
*How it ended*, on the session's summary:
|
||||
|
||||
| It says | It means |
|
||||
|---|---|
|
||||
| ended normally | The game closed by itself. |
|
||||
| ended with exit code 1 | What *End task* or `taskkill` leaves behind: not a crash. |
|
||||
| crashed (0xC0000005 …) | The game ended with an error code. *0xC0000006* often points at a failing drive. |
|
||||
| crashed (Windows logged an application error) | Windows recorded the game's crash. |
|
||||
| crashed (the game started its crash reporter, …) | The game's own crash reporter started while it was ending. |
|
||||
| interrupted | The agent itself stopped during the session; the session was rebuilt when the agent next started. |
|
||||
|
||||
More in [Limitations](../LIMITATIONS.md#when-a-game-crashed). If FrameLedger itself stops, it says *FrameLedger stopped
|
||||
unexpectedly* and offers to report it.
|
||||
|
||||
## An update does not install
|
||||
|
||||
- *A session is running, so it is applied only after the session ends* — restart FrameLedger once the game has closed.
|
||||
- *… is still loaded in a game FrameLedger measured* — close that game, then **Restart to update**.
|
||||
- *Try again in about an hour* — GitHub limits how often it is asked. *Offline* — no connection.
|
||||
- A download that fails its check twice: [report a problem](#report-a-problem).
|
||||
- Windows warns about the installer: see [Install and first start](01-install.md#download-and-install).
|
||||
|
||||
## The database
|
||||
|
||||
Everything is in one file, the ledger. **Tools ▸ Database maintenance…**:
|
||||
|
||||
- **Check** reads the whole file. If it finds a problem, **Back up…** first, then [report a problem](#report-a-problem).
|
||||
- **Back up…** writes a consistent copy wherever you choose, even while a game is recorded.
|
||||
- **Sweep…** removes old per-frame data, as *Raw series kept per game* does; it needs the agent running.
|
||||
- **Compact** gives freed space back to the disk; it waits until no game is being recorded.
|
||||
- *The ledger was busy* — try again in a moment.
|
||||
|
||||
## Looking at a copy of your data
|
||||
|
||||
`FrameLedger.exe --data-dir <folder>` opens a **copy** of a data folder to look at — one sent with a bug report, for
|
||||
example. The badge reads **Viewer — no Agent**: nothing is recorded and nothing on this PC is changed. It refuses your own
|
||||
data folder.
|
||||
|
||||
## Report a problem
|
||||
|
||||
- **Help ▸ Report a bug…** (or Logs ▸ Export bug bundle) saves a zip on your PC with FrameLedger's logs, a description of
|
||||
your PC and your settings — and, if you tick them, FrameLedger's last crash dump and the last session without its
|
||||
frames, notes or tags. Your Windows user name is removed from the paths in the logs; the crash dump is not cleaned.
|
||||
You see every file, then the issue form opens on GitHub, and you add the zip yourself: FrameLedger sends nothing.
|
||||
- The logs are in `%LOCALAPPDATA%\FrameLedger\logs` (Logs ▸ Open logs folder).
|
||||
- If FrameLedger missed a game's anti-cheat, use the **Safety gap** form instead
|
||||
([Anti-cheat and safety](04-anti-cheat-and-safety.md#if-frameledger-missed-a-games-anti-cheat)).
|
||||
@@ -0,0 +1,60 @@
|
||||
# Words FrameLedger uses
|
||||
|
||||
What the words on FrameLedger's screens mean, in alphabetical order. How each figure is computed is in the developers'
|
||||
[metrics document](../docs/03_METRICS.md).
|
||||
|
||||
- **0.1% low, 1% low** — the frame rate of the game's slowest 0.1% and 1% of frames. The further they fall below the
|
||||
average, the less smooth the game felt. They need 10,000 and 1,000 of the game's own frames.
|
||||
- **Agent** (the capture agent) — the program FrameLedger runs in the background, with your normal rights, that notices
|
||||
a game starting and records it.
|
||||
- **Anti-cheat finding** — what FrameLedger's anti-cheat check found for a game: a component loaded into it, a file or
|
||||
folder of it, or the game itself on a list. A game with a finding is not hooked ([Anti-cheat and
|
||||
safety](04-anti-cheat-and-safety.md)).
|
||||
- **Bug bundle** — the zip **Help ▸ Report a bug…** writes on your PC. Nothing is sent by FrameLedger.
|
||||
- **Compare** — two to five sessions side by side, from any of your games.
|
||||
- **Disable all hooking** — the switch that stops every game from being hooked at once, whatever each game's own switch
|
||||
says. Sessions are still recorded.
|
||||
- **Displayed FPS** — the frames you saw, generated frames included.
|
||||
- **FG factor** — Displayed FPS divided by Native FPS, shown as `×1.9 FG`.
|
||||
- **FPS** — frames per second over the time measured.
|
||||
- **Frame generation** — the technology (DLSS Frame Generation, FSR Frame Generation) that inserts frames the game did
|
||||
not render itself.
|
||||
- **Frame time** — how long one frame took, in milliseconds.
|
||||
- **Frame to frame** — how much one frame's time differs from the next. Lower is smoother.
|
||||
- **Frames per watt** — the game's own frames per second for each watt the graphics card drew.
|
||||
- **GPU held back** — how much of the time the card's power limit or its temperature slowed it down. NVIDIA cards only.
|
||||
- **Hooking** — loading FrameLedger's small component into a game to measure it. Off for every game until you switch
|
||||
it on for that game.
|
||||
- **Ledger** — the one database file that holds your library and sessions, `%LOCALAPPDATA%\FrameLedger\ledger.db`.
|
||||
- **N/A** — not measured. Never 0, and never an estimate.
|
||||
- **Native FPS** — the frames the game rendered itself.
|
||||
- **Overlay build** — the version of the component that hooking loads into a game. It draws nothing on your screen.
|
||||
- **Override** — your own Yes, No or N/A for a ray-tracing chip. The measured value is kept, and yours is marked as
|
||||
yours.
|
||||
- **Presented FPS** — every frame the game handed to Windows, shown when frame generation could not be measured, with a
|
||||
note saying whether generated frames could be among them.
|
||||
- **RAM (this game)** — the game's own memory, what Task Manager's Details tab shows as its private working set.
|
||||
- **Ray tracing, Path tracing, Ray reconstruction** — read *Yes*, *No* or *N/A*. Ray tracing is measured on DirectX 12
|
||||
games; path tracing is never stated as a fact.
|
||||
- **Render scale** — the share of the screen's resolution the game drew at before upscaling. 100% means no upscaling.
|
||||
- **Session** — one run of a game, from its start to its end. A session shorter than 30 seconds is not kept.
|
||||
- **Steady state** — when frame generation changed during a session (menus, loading screens, a settings change), the
|
||||
figures are for the state that lasted longest, with the share of the session it covers: `×1.9 FG · 75%`.
|
||||
- **Stutter** — frames that took more than twice as long as the frames around them, counted, with the share of time
|
||||
they took.
|
||||
- **T1** — a measured session. **T2** — a session that was only recorded: how long you played, your PC's sensors and
|
||||
the game's memory, with every frame figure N/A.
|
||||
- **Tags and notes** — what you write on a session's summary.
|
||||
- **Telemetry source** — which sensor readers work on this PC: `l1` is Windows itself, `lhm` is LibreHardwareMonitor,
|
||||
`nvapi` is NVIDIA's own.
|
||||
- **Time below 60 FPS** — how much of the session ran slower than 60 frames per second (and *below 30*, and *below your
|
||||
display's refresh rate*), not counting the tiny wobble of a game held at its frame limit.
|
||||
- **Trend** — one point per measured session over time, on a game's page.
|
||||
- **Upscaler** — the technology that draws the game at a lower resolution and scales it up (DLSS, FSR).
|
||||
- **User-mode exception** — the one way to hook a game where anti-cheat was found: only an anti-cheat that runs entirely
|
||||
inside the game, one game at a time, after a warning. Its first two sessions are a trial.
|
||||
- **Viewer** — FrameLedger opened over a copy of a data folder: no agent, nothing recorded, nothing changed.
|
||||
- **VRAM (this game)** — the game's own video memory, what Task Manager shows as its *Dedicated GPU memory*.
|
||||
- **VSync** — how many frames asked to wait for the display; *tearing allowed*, how many did not mind tearing. It is
|
||||
what the game asked: your graphics driver can override it.
|
||||
- **Vulkan layer** — the component that measures Vulkan games, used only when FrameLedger starts a game itself.
|
||||
+7
-3
@@ -4,7 +4,7 @@ FrameLedger records how your games run on this PC — frame rate, frame times, t
|
||||
with, temperatures, and how much memory the game uses — and keeps every session so you can compare them later.
|
||||
Everything stays on your PC.
|
||||
|
||||
Each page below takes a minute or two to read.
|
||||
Each page below takes a minute or two to read. The first six are the guide; the next four are there to look things up.
|
||||
|
||||
1. [Install and first start](01-install.md)
|
||||
2. [Record a game](02-record-a-game.md)
|
||||
@@ -12,7 +12,11 @@ Each page below takes a minute or two to read.
|
||||
4. [Anti-cheat and safety](04-anti-cheat-and-safety.md) — read this before you switch hooking on for any game
|
||||
5. [Your data](05-your-data.md)
|
||||
6. [Questions and answers](06-faq.md)
|
||||
7. [The terms, in plain words](terms-in-plain-words.md)
|
||||
7. [The screens](07-screens.md) — what each page, menu and button does
|
||||
8. [Every setting](08-settings.md)
|
||||
9. [When something goes wrong](09-troubleshooting.md)
|
||||
10. [Words FrameLedger uses](10-glossary.md)
|
||||
11. [The terms, in plain words](terms-in-plain-words.md)
|
||||
|
||||
What FrameLedger cannot do is listed on its own page: [Limitations](../LIMITATIONS.md) (in the app: Help ▸
|
||||
Limitations).
|
||||
@@ -21,4 +25,4 @@ Limitations).
|
||||
report on your PC that you can look at before you decide to share it.
|
||||
|
||||
This guide is part of FrameLedger and describes the version it came with. It is also in the project's repository on
|
||||
GitHub, in the `guide` folder.
|
||||
GitHub, in the `guide` folder, and on the project's wiki, which shows the newest release.
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
HTML comments are not part of the block.
|
||||
-->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.16`** (2026-10-06), an unsigned installer built from that tag with its
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), 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
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.16`** (2026-10-06), an unsigned installer built from that tag with its
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), 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
|
||||
|
||||
@@ -77,7 +77,8 @@ public partial class App : System.Windows.Application
|
||||
HookCrashHandlers();
|
||||
// 08_UI §Accessibility (P4 PR-8): Esc closes the open ContentDialog or MessageBox, before any window exists.
|
||||
DialogKeyboard.Register();
|
||||
// beta.14: ui.hide_scrollbars reaches every scroller as it loads, those in a control's template too.
|
||||
// beta.14: ui.hide_scrollbars reaches every scroller as it is laid out (beta.17: not only as it loads), those in a
|
||||
// control's template too.
|
||||
ScrollBarHiding.Register();
|
||||
_run = DiagReport.Requested(e.Args) ? DiagAsync() : RunAsync();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
Title="{x:Static res:Strings.Compare_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<!-- 08_UI §Compare: the picker (2–5, cross-game), the overlaid percentile curves, the stat table; FR-6.2's guard is the view model's. -->
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
|
||||
Title="{x:Static res:Strings.Dashboard_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
Title="{x:Static res:Strings.Games_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<!--
|
||||
08_UI §Games › Game detail. The two rows — Supports (files on disk) and Last session measured (the
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
Title="{x:Static res:Strings.Games_Header}"
|
||||
AllowDrop="True"
|
||||
Drop="OnDrop"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<!--
|
||||
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):
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
Title="{x:Static res:Strings.Logs_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<Grid Margin="24,16,24,16">
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
Title="{x:Static res:Strings.Settings_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
@@ -83,7 +84,7 @@
|
||||
Text="{x:Static res:Strings.Settings_Exceptions_Body}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch Grid.Column="1" Margin="12,0" AutomationProperties.Name="{x:Static res:Strings.Settings_Exceptions_Label}"
|
||||
IsChecked="{Binding ViewModel.UserModeExceptions, Mode=TwoWay}" />
|
||||
IsChecked="{Binding ViewModel.UserModeExceptions, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
|
||||
</Grid>
|
||||
</ui:CardExpander.Header>
|
||||
<StackPanel>
|
||||
@@ -164,7 +165,8 @@
|
||||
Content="{x:Static res:Strings.Settings_SafetyDocs}"
|
||||
Icon="{ui:SymbolIcon Open24}" />
|
||||
|
||||
<!-- Recording policy: the three numbers and background capture (D16: the Agent reads them at session start). -->
|
||||
<!-- Recording policy: the three numbers and background capture (D16: the Agent reads them at session start) — off in a
|
||||
viewer, which has no Agent (beta.18; every setting the Agent reads is, ViewerModeTests). -->
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Policy_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Timer24}">
|
||||
<ui:CardControl.Header>
|
||||
@@ -175,6 +177,7 @@
|
||||
</ui:CardControl.Header>
|
||||
<ui:NumberBox MinWidth="140"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_MinSession_Label}"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
Maximum="{x:Static vm:SettingsViewModel.MinSessionMaximum}"
|
||||
Minimum="{x:Static vm:SettingsViewModel.MinSessionMinimum}"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
@@ -189,6 +192,7 @@
|
||||
</ui:CardControl.Header>
|
||||
<ui:NumberBox MinWidth="140"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_Interval_Label}"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
Maximum="{x:Static vm:SettingsViewModel.IntervalMaximum}"
|
||||
Minimum="{x:Static vm:SettingsViewModel.IntervalMinimum}"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
@@ -203,6 +207,7 @@
|
||||
</ui:CardControl.Header>
|
||||
<ui:NumberBox MinWidth="140"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_Retention_Label}"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
Maximum="{x:Static vm:SettingsViewModel.RetentionMaximum}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
@@ -341,6 +346,7 @@
|
||||
<ComboBox MinWidth="140"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_UpdateChannel_Label}"
|
||||
DisplayMemberPath="Label"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
ItemsSource="{Binding ViewModel.UpdateChannels}"
|
||||
SelectedValue="{Binding ViewModel.UpdateChannel, Mode=TwoWay}"
|
||||
SelectedValuePath="Value" />
|
||||
|
||||
@@ -24,7 +24,8 @@ public sealed record AntiCheatExceptionResult(AntiCheatExceptionOutcome Outcome,
|
||||
RefusalText() ?? Detail ?? Strings.Common_NotAvailable),
|
||||
AntiCheatExceptionOutcome.VersionMismatch => Shared.Strings.Safety_Exception_VersionMismatch,
|
||||
AntiCheatExceptionOutcome.OptionOff => Shared.Strings.Safety_Exception_OptionOff,
|
||||
AntiCheatExceptionOutcome.AgentUnavailable => Shared.Strings.Safety_Consent_AgentUnavailable,
|
||||
// A grant and a withdrawal alike (beta.18): "Nothing was enabled." was the hooking consent's words, untrue for a withdrawal.
|
||||
AntiCheatExceptionOutcome.AgentUnavailable => Strings.Agent_NotConnected_NothingChanged,
|
||||
AntiCheatExceptionOutcome.Failed => Detail ?? Strings.Common_NotAvailable,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
@@ -23,6 +23,7 @@ public static class EmbeddedDocuments
|
||||
/// <summary>
|
||||
/// The user guide's pages in reading order (beta.12, D44; <c>guide/</c> in the repository). Each page's title is its
|
||||
/// first heading; <see cref="LimitationsDocument"/> closes the list, so the guide's links to it open in the window.
|
||||
/// beta.17 (D54): the four reference pages after the FAQ make the guide the wiki's End-user part too.
|
||||
/// </summary>
|
||||
public static IReadOnlyList<string> GuidePages { get; } =
|
||||
[
|
||||
@@ -33,6 +34,10 @@ public static class EmbeddedDocuments
|
||||
"guide/04-anti-cheat-and-safety.md",
|
||||
"guide/05-your-data.md",
|
||||
"guide/06-faq.md",
|
||||
"guide/07-screens.md",
|
||||
"guide/08-settings.md",
|
||||
"guide/09-troubleshooting.md",
|
||||
"guide/10-glossary.md",
|
||||
"guide/terms-in-plain-words.md",
|
||||
];
|
||||
|
||||
|
||||
@@ -55,13 +55,16 @@ public sealed class SafetyNotices : IDisposable
|
||||
return new SafetyNotice(SafetyNoticeKind.Unhooked, Strings.Notice_Unhooked_Title, TurnedOff(UnhookText(unhooked), unhooked.HookingTurnedOff), now);
|
||||
// The Agent's pre-scan of the library turned hooking off for a game the user had turned it on for (2026-09-25):
|
||||
// not a session event, so none of a refusal's "this run is still recorded" — no run is going on.
|
||||
// Its reason is the guard's own, and it is sent only for a finding about the game, which names its family.
|
||||
case IpcMessageType.HookingTurnedOff when IpcCodec.Payload<HookingTurnedOffEvent>(envelope) is { } off:
|
||||
return new SafetyNotice(SafetyNoticeKind.HookingOff,
|
||||
string.Format(CultureInfo.CurrentCulture, Strings.Notice_HookingOff_Title_Format, off.GameName ?? Strings.Common_NotAvailable),
|
||||
TurnedOff(RefusalText(off.Reason, off.Reason, off.Family, off.Signal), turnedOff: true), now);
|
||||
TurnedOff(GuardText(off.Reason, off.Family, off.Signal) ?? Shared.Strings.Safety_Refused_Unnamed, turnedOff: true), now);
|
||||
// The session's end in words (beta.18): it printed the enum's name — "The hook stopped (WriterSelfDisabled)" —
|
||||
// and said the session continued without measuring, while a stop ends it (07_IPC: measurement STOPPED).
|
||||
case IpcMessageType.CaptureDegraded when IpcCodec.Payload<CaptureDegradedEvent>(envelope) is { } degraded:
|
||||
return new SafetyNotice(SafetyNoticeKind.Degraded, Strings.Notice_Degraded_Title,
|
||||
string.Format(CultureInfo.CurrentCulture, Strings.Notice_Degraded_Body_Format, degraded.Reason), now);
|
||||
Formats.EndReasonText(degraded.Reason) ?? string.Format(CultureInfo.CurrentCulture, Strings.Notice_Degraded_Unknown_Format, degraded.Reason), now);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -73,35 +76,45 @@ public sealed class SafetyNotices : IDisposable
|
||||
/// <summary>
|
||||
/// A driver or service that started on the PC mid-session is said as that (beta.13, §S23-3) — not "detected while the
|
||||
/// game was running … until you enable it again", which was untrue twice: such a finding turns no hooking off, and a
|
||||
/// finding about the game turns it off for good (the turned-off sentence follows).
|
||||
/// finding about the game turns it off for good (the turned-off sentence follows). A re-scan that could not look while
|
||||
/// the game still ran is said as that too (beta.18): it named its signal as a finding, "Access is denied was detected".
|
||||
/// </summary>
|
||||
private static string UnhookText(SafetyUnhookEvent unhooked) =>
|
||||
Formats.IsMachineWide(unhooked.GuardReason) && unhooked.Family is { } family
|
||||
? string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_MachineWide_Format, family, unhooked.Signal ?? Strings.Common_NotAvailable)
|
||||
: string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_Format, unhooked.Family ?? unhooked.Signal ?? Strings.Common_NotAvailable);
|
||||
|
||||
/// <summary><paramref name="reason"/> is the session's end reason; <paramref name="guardReason"/> the guard's own, when it named a family.</summary>
|
||||
private static string RefusalText(string reason, string? guardReason, string? family, string? signal)
|
||||
private static string UnhookText(SafetyUnhookEvent unhooked) => unhooked switch
|
||||
{
|
||||
if (string.Equals(reason, "PreScanCouldNotVerify", StringComparison.Ordinal))
|
||||
{
|
||||
return Shared.Strings.Safety_Refused_CouldNotVerify;
|
||||
}
|
||||
{ Family: { } family } when Formats.IsMachineWide(unhooked.GuardReason) =>
|
||||
string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_MachineWide_Format, family, unhooked.Signal ?? Strings.Common_NotAvailable),
|
||||
{ Family: null, GuardReason: { Length: > 0 } guardReason } =>
|
||||
string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_Unnamed_Format, Formats.GuardReasonText(guardReason)),
|
||||
_ => string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_Format, unhooked.Family ?? unhooked.Signal ?? Strings.Common_NotAvailable),
|
||||
};
|
||||
|
||||
if (string.Equals(reason, "TargetUnreadable", StringComparison.Ordinal))
|
||||
{
|
||||
return Shared.Strings.Safety_Refused_TargetUnreadable;
|
||||
}
|
||||
/// <summary>
|
||||
/// A refusal in words. <paramref name="reason"/> is the session's end; <paramref name="guardReason"/> the guard's own,
|
||||
/// sent for every refusal it gave since beta.18 (beside a family only, before).
|
||||
/// </summary>
|
||||
private static string RefusalText(string reason, string? guardReason, string? family, string? signal) => reason switch
|
||||
{
|
||||
"PreScanCouldNotVerify" => Shared.Strings.Safety_Refused_CouldNotVerify,
|
||||
"TargetUnreadable" => Shared.Strings.Safety_Refused_TargetUnreadable,
|
||||
// What the guard found, or could not do; from an agent that sent no reason beside no family, the end's own words.
|
||||
"RefusedByGuard" => GuardText(guardReason, family, signal) ?? Strings.End_RefusedByGuard,
|
||||
// The gate's own refusals (beta.18) — Disable all hooking, a game blocked before — are the user's switch or the row's,
|
||||
// never a finding. The gate labels them in the family's place, and the kill switch's notice read "kill switch was
|
||||
// detected in this game (the global 'disable all hooking' switch is on (FR-2.4); …)".
|
||||
// A name this build has no words for (a newer agent's) is named as it is, never as something detected.
|
||||
_ => Formats.EndReasonText(reason) ?? GuardText(guardReason, family, signal)
|
||||
?? (string.IsNullOrEmpty(reason) ? Shared.Strings.Safety_Refused_Unnamed : Formats.GuardSentence(reason)),
|
||||
};
|
||||
|
||||
// A refusal no anti-cheat family names (beta.8) — the guard could not look, the game is 32-bit — is said as what it
|
||||
// is. It used to name its SIGNAL as the family, and the notice read "Access is denied was detected in this game".
|
||||
if (family is null)
|
||||
{
|
||||
return string.IsNullOrEmpty(reason) ? Shared.Strings.Safety_Refused_Unnamed : Formats.GuardSentence(reason);
|
||||
}
|
||||
|
||||
return Formats.NamedRefusal(guardReason, family, signal ?? reason);
|
||||
}
|
||||
/// <summary>
|
||||
/// What the guard said, as a sentence: an anti-cheat it named, found in this game or on this PC; a refusal no family names
|
||||
/// (beta.8) in its own words — never its signal as the family, which read "Access is denied was detected in this game".
|
||||
/// Null when it said nothing.
|
||||
/// </summary>
|
||||
private static string? GuardText(string? guardReason, string? family, string? signal) =>
|
||||
family is { Length: > 0 }
|
||||
? Formats.NamedRefusal(guardReason, family, signal ?? Strings.Common_NotAvailable)
|
||||
: guardReason is { Length: > 0 } ? Formats.GuardSentence(guardReason) : null;
|
||||
|
||||
private void OnEvent(object? sender, AgentEventArgs e)
|
||||
{
|
||||
|
||||
@@ -10,13 +10,22 @@ namespace FrameLedger.App.Services;
|
||||
/// <summary>
|
||||
/// <c>ui.hide_scrollbars</c> (beta.14, owner request 2026-10-05): the App draws no scroll bars, and every scroller still
|
||||
/// scrolls — with the wheel, the keyboard and touch. A bar's visibility is bound in its scroller's template, so no style can
|
||||
/// reach it; this sets the scroller's own <see cref="ScrollBarVisibility"/> instead. One class handler on
|
||||
/// <see cref="ScrollViewer"/>'s <c>Loaded</c>, registered at start beside <see cref="DialogKeyboard"/>, sees every scroller the
|
||||
/// App shows, those inside a control's template too (a DataGrid's, a TextBox's, a rendered document's, a dialog's). While
|
||||
/// on, an axis whose bar is <see cref="ScrollBarVisibility.Auto"/> or <see cref="ScrollBarVisibility.Visible"/> becomes
|
||||
/// reach it; this sets the scroller's own <see cref="ScrollBarVisibility"/> instead, from two class handlers on
|
||||
/// <see cref="ScrollViewer"/> registered at start beside <see cref="DialogKeyboard"/>, which reach every scroller the App shows,
|
||||
/// those inside a control's template too (a DataGrid's, a TextBox's, a rendered document's, a dialog's):
|
||||
/// <list type="bullet">
|
||||
/// <item><c>ScrollChanged</c>, which every scroller raises from its first layout, when its extent and viewport stop being
|
||||
/// zero, and again whenever they change — inside the layout pass, so the bar is gone before the first frame is drawn.</item>
|
||||
/// <item><c>Loaded</c>, which beta.14 relied on alone, wrongly (beta.17, the owner's screenshot: the Dashboard kept its bar).
|
||||
/// WPF raises Loaded only on an element whose subtree listens for it with a handler of its own — an instance handler, a
|
||||
/// style's EventSetter, a template's trigger — and a class handler is none of those; WPF UI's toggle switches carry one,
|
||||
/// so Settings was hidden and the Dashboard, all cards and text, never was. It stays for a scroller that comes back with
|
||||
/// nothing to lay out again.</item>
|
||||
/// </list>
|
||||
/// While on, an axis whose bar is <see cref="ScrollBarVisibility.Auto"/> or <see cref="ScrollBarVisibility.Visible"/> becomes
|
||||
/// <see cref="ScrollBarVisibility.Hidden"/> — WPF's "no bar, still scrolls" — and its own value is remembered on it;
|
||||
/// <see cref="ScrollBarVisibility.Disabled"/> is never touched, because a disabled axis lays its content out at the viewport's
|
||||
/// size and wraps text. Off puts every remembered value back, on screen at once and on the next load for the rest.
|
||||
/// size and wraps text. Off puts every remembered value back, on screen at once and at the next layout for the rest.
|
||||
/// </summary>
|
||||
public static class ScrollBarHiding
|
||||
{
|
||||
@@ -32,11 +41,12 @@ public static class ScrollBarHiding
|
||||
/// <summary>Whether the bars are hidden right now.</summary>
|
||||
public static bool Hidden => _hidden;
|
||||
|
||||
/// <summary>Registers the class handler, once per process.</summary>
|
||||
/// <summary>Registers the class handlers, once per process.</summary>
|
||||
public static void Register()
|
||||
{
|
||||
if (Interlocked.Exchange(ref _registered, 1) == 0)
|
||||
{
|
||||
EventManager.RegisterClassHandler(typeof(ScrollViewer), ScrollViewer.ScrollChangedEvent, new ScrollChangedEventHandler(OnScrollChanged), handledEventsToo: true);
|
||||
EventManager.RegisterClassHandler(typeof(ScrollViewer), FrameworkElement.LoadedEvent, new RoutedEventHandler(OnLoaded), handledEventsToo: true);
|
||||
}
|
||||
}
|
||||
@@ -96,6 +106,15 @@ public static class ScrollBarHiding
|
||||
}
|
||||
}
|
||||
|
||||
// ScrollChanged bubbles: a scroller's ancestors that are scrollers hear it too, and each gets the same idempotent check.
|
||||
private static void OnScrollChanged(object sender, ScrollChangedEventArgs e)
|
||||
{
|
||||
if (sender is ScrollViewer viewer)
|
||||
{
|
||||
Set(viewer);
|
||||
}
|
||||
}
|
||||
|
||||
private static void Set(ScrollViewer viewer)
|
||||
{
|
||||
Axis(viewer, ScrollViewer.VerticalScrollBarVisibilityProperty, _ownVerticalProperty);
|
||||
|
||||
Generated
+9
-3
@@ -62,6 +62,7 @@ public static class Strings
|
||||
nameof(Agent_Banner_Offline_Body),
|
||||
nameof(Agent_Banner_Offline_Title),
|
||||
nameof(Agent_Banner_Retry),
|
||||
nameof(Agent_NotConnected_NothingChanged),
|
||||
nameof(Agent_State_Connected),
|
||||
nameof(Agent_State_Connecting),
|
||||
nameof(Agent_State_Elevating),
|
||||
@@ -645,8 +646,8 @@ public static class Strings
|
||||
nameof(Nav_Games),
|
||||
nameof(Nav_Logs),
|
||||
nameof(Nav_Settings),
|
||||
nameof(Notice_Degraded_Body_Format),
|
||||
nameof(Notice_Degraded_Title),
|
||||
nameof(Notice_Degraded_Unknown_Format),
|
||||
nameof(Notice_Dismiss),
|
||||
nameof(Notice_Error_Title),
|
||||
nameof(Notice_HookingOff_Title_Format),
|
||||
@@ -810,6 +811,7 @@ public static class Strings
|
||||
nameof(Settings_Interval_Body),
|
||||
nameof(Settings_Interval_Label),
|
||||
nameof(Settings_Invalid_Format),
|
||||
nameof(Settings_KillSwitch_Applied_On),
|
||||
nameof(Settings_KillSwitch_Body),
|
||||
nameof(Settings_KillSwitch_Label),
|
||||
nameof(Settings_KillSwitch_Off),
|
||||
@@ -1124,6 +1126,8 @@ public static class Strings
|
||||
|
||||
public static string Agent_Banner_Retry => ResourceManager.GetString(nameof(Agent_Banner_Retry), Culture) ?? nameof(Agent_Banner_Retry);
|
||||
|
||||
public static string Agent_NotConnected_NothingChanged => ResourceManager.GetString(nameof(Agent_NotConnected_NothingChanged), Culture) ?? nameof(Agent_NotConnected_NothingChanged);
|
||||
|
||||
public static string Agent_State_Connected => ResourceManager.GetString(nameof(Agent_State_Connected), Culture) ?? nameof(Agent_State_Connected);
|
||||
|
||||
public static string Agent_State_Connecting => ResourceManager.GetString(nameof(Agent_State_Connecting), Culture) ?? nameof(Agent_State_Connecting);
|
||||
@@ -2290,10 +2294,10 @@ public static class Strings
|
||||
|
||||
public static string Nav_Settings => ResourceManager.GetString(nameof(Nav_Settings), Culture) ?? nameof(Nav_Settings);
|
||||
|
||||
public static string Notice_Degraded_Body_Format => ResourceManager.GetString(nameof(Notice_Degraded_Body_Format), Culture) ?? nameof(Notice_Degraded_Body_Format);
|
||||
|
||||
public static string Notice_Degraded_Title => ResourceManager.GetString(nameof(Notice_Degraded_Title), Culture) ?? nameof(Notice_Degraded_Title);
|
||||
|
||||
public static string Notice_Degraded_Unknown_Format => ResourceManager.GetString(nameof(Notice_Degraded_Unknown_Format), Culture) ?? nameof(Notice_Degraded_Unknown_Format);
|
||||
|
||||
public static string Notice_Dismiss => ResourceManager.GetString(nameof(Notice_Dismiss), Culture) ?? nameof(Notice_Dismiss);
|
||||
|
||||
public static string Notice_Error_Title => ResourceManager.GetString(nameof(Notice_Error_Title), Culture) ?? nameof(Notice_Error_Title);
|
||||
@@ -2620,6 +2624,8 @@ public static class Strings
|
||||
|
||||
public static string Settings_Invalid_Format => ResourceManager.GetString(nameof(Settings_Invalid_Format), Culture) ?? nameof(Settings_Invalid_Format);
|
||||
|
||||
public static string Settings_KillSwitch_Applied_On => ResourceManager.GetString(nameof(Settings_KillSwitch_Applied_On), Culture) ?? nameof(Settings_KillSwitch_Applied_On);
|
||||
|
||||
public static string Settings_KillSwitch_Body => ResourceManager.GetString(nameof(Settings_KillSwitch_Body), Culture) ?? nameof(Settings_KillSwitch_Body);
|
||||
|
||||
public static string Settings_KillSwitch_Label => ResourceManager.GetString(nameof(Settings_KillSwitch_Label), Culture) ?? nameof(Settings_KillSwitch_Label);
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
<value>キャプチャエージェントがオフライン</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Agent_NotConnected_NothingChanged" xml:space="preserve">
|
||||
<value>キャプチャエージェントに接続されていません。何も変更されていません。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Agent_Banner_Retry" xml:space="preserve">
|
||||
<value>再試行</value>
|
||||
<comment>review</comment>
|
||||
@@ -1833,8 +1837,8 @@
|
||||
<value>アプリ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Body_Format" xml:space="preserve">
|
||||
<value>フックが停止しました ({0})。セッションは実測なしで続行します。</value>
|
||||
<data name="Notice_Degraded_Unknown_Format" xml:space="preserve">
|
||||
<value>計測を停止しました ({0})。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Title" xml:space="preserve">
|
||||
@@ -1921,6 +1925,10 @@
|
||||
<value>適用しました。キャプチャエージェントは次回のセッション開始時に読み込みます。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_KillSwitch_Applied_On" xml:space="preserve">
|
||||
<value>すべてのフックを無効にしました。実測中のゲームは次回の安全スキャン (30 秒以内) で実測を停止します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_Capture_Header" xml:space="preserve">
|
||||
<value>キャプチャ</value>
|
||||
<comment>review</comment>
|
||||
@@ -2262,7 +2270,7 @@
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Body" xml:space="preserve">
|
||||
<value>FrameLedger は Steam、GOG Galaxy、Epic、itch.io のインストール済みゲームを読み取り、チェックリストから追加できます — 入った後、ゲームページの「ファイル ▸ ライブラリを取り込む…」から。取り込んだゲームはどれも、手動で追加したものと同じくフック無効で始まります。</value>
|
||||
<value>FrameLedger は Steam、GOG Galaxy、Epic、itch.io のインストール済みゲームを読み取り、チェックリストから追加できます — 入った後、「ファイル ▸ ライブラリをインポート…」から。取り込んだゲームはどれも、手動で追加したものと同じくフック無効で始まります。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Header" xml:space="preserve">
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
<data name="Agent_Banner_Offline_Title" xml:space="preserve">
|
||||
<value>Capture agent offline</value>
|
||||
</data>
|
||||
<data name="Agent_NotConnected_NothingChanged" xml:space="preserve">
|
||||
<value>The capture agent is not connected. Nothing was changed.</value>
|
||||
</data>
|
||||
<data name="Agent_Banner_Retry" xml:space="preserve">
|
||||
<value>Retry</value>
|
||||
</data>
|
||||
@@ -1380,8 +1383,8 @@
|
||||
<data name="Logs_Source_Ui" xml:space="preserve">
|
||||
<value>App</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Body_Format" xml:space="preserve">
|
||||
<value>The hook stopped ({0}); the session continues without measuring.</value>
|
||||
<data name="Notice_Degraded_Unknown_Format" xml:space="preserve">
|
||||
<value>Measuring stopped ({0}).</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Title" xml:space="preserve">
|
||||
<value>Measurement stopped</value>
|
||||
@@ -1446,6 +1449,9 @@
|
||||
<data name="Settings_Applied" xml:space="preserve">
|
||||
<value>Applied. The capture agent reads it at the next session start.</value>
|
||||
</data>
|
||||
<data name="Settings_KillSwitch_Applied_On" xml:space="preserve">
|
||||
<value>All hooking is off. A game being measured stops being measured at its next safety scan, within 30 seconds.</value>
|
||||
</data>
|
||||
<data name="Settings_Capture_Header" xml:space="preserve">
|
||||
<value>Capture</value>
|
||||
</data>
|
||||
@@ -1702,7 +1708,7 @@
|
||||
<value>Finish</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Body" xml:space="preserve">
|
||||
<value>FrameLedger can read what Steam, GOG Galaxy, Epic and itch.io have installed and add them from a checklist — File ▸ Import library… on the Games page, once you are in. Every imported game starts with hooking off, exactly like one you add by hand.</value>
|
||||
<value>FrameLedger can read what Steam, GOG Galaxy, Epic and itch.io have installed and add them from a checklist — File ▸ Import library…, once you are in. Every imported game starts with hooking off, exactly like one you add by hand.</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Header" xml:space="preserve">
|
||||
<value>Your library</value>
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
<data name="Agent_Banner_Offline_Title" xml:space="preserve">
|
||||
<value>Capture agent ngoại tuyến</value>
|
||||
</data>
|
||||
<data name="Agent_NotConnected_NothingChanged" xml:space="preserve">
|
||||
<value>Capture agent chưa kết nối. Không có gì thay đổi.</value>
|
||||
</data>
|
||||
<data name="Agent_Banner_Retry" xml:space="preserve">
|
||||
<value>Thử lại</value>
|
||||
</data>
|
||||
@@ -1375,8 +1378,8 @@
|
||||
<data name="Logs_Source_Ui" xml:space="preserve">
|
||||
<value>Ứng dụng</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Body_Format" xml:space="preserve">
|
||||
<value>Hook đã dừng ({0}); phiên tiếp tục mà không đo.</value>
|
||||
<data name="Notice_Degraded_Unknown_Format" xml:space="preserve">
|
||||
<value>Việc đo đã dừng ({0}).</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Title" xml:space="preserve">
|
||||
<value>Đã dừng đo</value>
|
||||
@@ -1441,6 +1444,9 @@
|
||||
<data name="Settings_Applied" xml:space="preserve">
|
||||
<value>Đã áp dụng. Capture agent đọc ở lần bắt đầu phiên kế tiếp.</value>
|
||||
</data>
|
||||
<data name="Settings_KillSwitch_Applied_On" xml:space="preserve">
|
||||
<value>Đã tắt toàn bộ hooking. Game đang được đo sẽ dừng đo ở lần quét an toàn kế tiếp, trong vòng 30 giây.</value>
|
||||
</data>
|
||||
<data name="Settings_Capture_Header" xml:space="preserve">
|
||||
<value>Thu thập</value>
|
||||
</data>
|
||||
@@ -1697,7 +1703,7 @@
|
||||
<value>Hoàn tất</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Body" xml:space="preserve">
|
||||
<value>FrameLedger có thể đọc những gì Steam, GOG Galaxy, Epic và itch.io đã cài và thêm chúng từ một danh sách chọn — File ▸ Nhập thư viện… ở trang Game, khi bạn đã vào trong. Mọi game nhập vào đều bắt đầu với hooking tắt, đúng như game bạn thêm thủ công.</value>
|
||||
<value>FrameLedger có thể đọc những gì Steam, GOG Galaxy, Epic và itch.io đã cài và thêm chúng từ một danh sách chọn — Tệp ▸ Nhập thư viện…, khi bạn đã vào trong. Mọi game nhập vào đều bắt đầu với hooking tắt, đúng như game bạn thêm thủ công.</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Header" xml:space="preserve">
|
||||
<value>Thư viện của bạn</value>
|
||||
|
||||
@@ -755,7 +755,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
try
|
||||
{
|
||||
HookingConsentResult result = await _consent.DisableAsync(Game.Id).ConfigureAwait(true);
|
||||
Notice(result);
|
||||
Notice(result, turningOff: true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -940,14 +940,17 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
OnPropertyChanged(nameof(NoticeVisible));
|
||||
}
|
||||
|
||||
/// <summary>A refusal, a mismatch or a failure is a persistent notice on the page; a success clears it.</summary>
|
||||
private void Notice(HookingConsentResult result)
|
||||
/// <summary>
|
||||
/// A refusal, a mismatch or a failure is a persistent notice on the page; a success clears it. With no Agent, turning
|
||||
/// hooking off changed nothing — not "Nothing was enabled.", the enable path's words, which it said until beta.18.
|
||||
/// </summary>
|
||||
private void Notice(HookingConsentResult result, bool turningOff = false)
|
||||
{
|
||||
(NoticeText, NoticeSeverity) = result.Outcome switch
|
||||
{
|
||||
HookingConsentOutcome.Refused => (result.RefusalText(), InfoBarSeverity.Error),
|
||||
HookingConsentOutcome.VersionMismatch => (Shared.Strings.Safety_Consent_VersionMismatch, InfoBarSeverity.Warning),
|
||||
HookingConsentOutcome.AgentUnavailable => (Shared.Strings.Safety_Consent_AgentUnavailable, InfoBarSeverity.Warning),
|
||||
HookingConsentOutcome.AgentUnavailable => (turningOff ? Strings.Agent_NotConnected_NothingChanged : Shared.Strings.Safety_Consent_AgentUnavailable, InfoBarSeverity.Warning),
|
||||
// The Agent could not read the executable (beta.8): say whether its drive or the file is missing, not the IPC code.
|
||||
HookingConsentOutcome.Failed when string.Equals(result.Detail, Shared.Ipc.IpcErrorCode.ExecutableUnreadable, StringComparison.Ordinal) && Game is not null
|
||||
=> (Formats.ExecutableMissingText(Game.Fingerprint.ExePath), InfoBarSeverity.Warning),
|
||||
|
||||
@@ -712,7 +712,8 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
return;
|
||||
}
|
||||
|
||||
string body = result.Outcome == HookingConsentOutcome.AgentUnavailable ? Shared.Strings.Safety_Consent_AgentUnavailable : result.Detail ?? Strings.Common_NotAvailable;
|
||||
// Turning off with no Agent changed nothing (beta.18): it said the enable path's "Nothing was enabled."
|
||||
string body = result.Outcome == HookingConsentOutcome.AgentUnavailable ? Strings.Agent_NotConnected_NothingChanged : result.Detail ?? Strings.Common_NotAvailable;
|
||||
_strip.Warn(game.Name, body);
|
||||
}
|
||||
|
||||
@@ -765,7 +766,9 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
await _settings.SetAsync(definition, value).ConfigureAwait(true);
|
||||
if (definition.AgentReads)
|
||||
{
|
||||
_strip.Info(Strings.Settings_Header, Strings.Settings_Applied);
|
||||
// Disable all hooking does not wait for a session to start (beta.18): a measured one stops at its next safety scan.
|
||||
bool killSwitchOn = ReferenceEquals(definition, SettingsRegistry.HookingKillSwitch) && string.Equals(value, "1", StringComparison.Ordinal);
|
||||
_strip.Info(Strings.Settings_Header, killSwitchOn ? Strings.Settings_KillSwitch_Applied_On : Strings.Settings_Applied);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -161,8 +161,12 @@ public static class RecordedSessionEvents
|
||||
private static string? NullIfEmpty(string? value) => string.IsNullOrEmpty(value) ? null : value;
|
||||
|
||||
/// <summary>
|
||||
/// The guard's own reason when it named a family (beta.13, §S23-3): the App says a <c>BlockedService</c> or
|
||||
/// <c>BlockedDriver</c> was found on the PC, not in the game. Null when the guard named nothing.
|
||||
/// The guard's own reason whenever it refused: the App says a <c>BlockedService</c> or <c>BlockedDriver</c> was found on
|
||||
/// the PC, not in the game (beta.13, §S23-3), and a refusal no family names in the guard's words — "the game is 32-bit…",
|
||||
/// "the game's loaded modules could not be listed" — rather than by the session's end reason, which printed as
|
||||
/// <c>reason RefusedByGuard</c> (beta.18). Until beta.18 it was sent only beside a family. Null for an allow, and for a
|
||||
/// verdict nobody produced.
|
||||
/// </summary>
|
||||
private static string? GuardReasonOf(AntiCheatVerdict verdict) => string.IsNullOrEmpty(verdict.Family) ? null : verdict.Reason.ToString();
|
||||
private static string? GuardReasonOf(AntiCheatVerdict verdict) =>
|
||||
verdict.Reason is AntiCheatRefusalReason.Allow or AntiCheatRefusalReason.AllowedUnderUserModeException ? null : verdict.Reason.ToString();
|
||||
}
|
||||
+3
@@ -76,6 +76,7 @@ public static class Strings
|
||||
nameof(Safety_Refused_Unnamed),
|
||||
nameof(Safety_Unhooked_Format),
|
||||
nameof(Safety_Unhooked_MachineWide_Format),
|
||||
nameof(Safety_Unhooked_Unnamed_Format),
|
||||
];
|
||||
|
||||
public static string Safety_AdminMode_Accept => ResourceManager.GetString(nameof(Safety_AdminMode_Accept), Culture) ?? nameof(Safety_AdminMode_Accept);
|
||||
@@ -171,4 +172,6 @@ public static class Strings
|
||||
public static string Safety_Unhooked_Format => ResourceManager.GetString(nameof(Safety_Unhooked_Format), Culture) ?? nameof(Safety_Unhooked_Format);
|
||||
|
||||
public static string Safety_Unhooked_MachineWide_Format => ResourceManager.GetString(nameof(Safety_Unhooked_MachineWide_Format), Culture) ?? nameof(Safety_Unhooked_MachineWide_Format);
|
||||
|
||||
public static string Safety_Unhooked_Unnamed_Format => ResourceManager.GetString(nameof(Safety_Unhooked_Unnamed_Format), Culture) ?? nameof(Safety_Unhooked_Unnamed_Format);
|
||||
}
|
||||
@@ -33,6 +33,7 @@
|
||||
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking has been turned off for this game; its page says what was found.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Capture stopped: {0} was detected while the game was running, and FrameLedger unhooked.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Unhooked_MachineWide_Format" xml:space="preserve"><value>Capture stopped: {0} started on this PC while the game was running ({1}) — a driver or service, which may belong to another game or program — and FrameLedger unhooked. The game's next session is measured again once it is no longer running.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Unhooked_Unnamed_Format" xml:space="preserve"><value>Capture stopped while the game was running — {0} — and FrameLedger unhooked.</value><comment>safety: human review required</comment></data>
|
||||
<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>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking has been turned off for this game; its page says what was found.</value></data>
|
||||
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Capture stopped: {0} was detected while the game was running, and FrameLedger unhooked.</value></data>
|
||||
<data name="Safety_Unhooked_MachineWide_Format" xml:space="preserve"><value>Capture stopped: {0} started on this PC while the game was running ({1}) — a driver or service, which may belong to another game or program — and FrameLedger unhooked. The game's next session is measured again once it is no longer running.</value></data>
|
||||
<data name="Safety_Unhooked_Unnamed_Format" xml:space="preserve"><value>Capture stopped while the game was running — {0} — and FrameLedger unhooked.</value></data>
|
||||
<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>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking đã được tắt cho game này; trang của game ghi rõ đã phát hiện gì.</value></data>
|
||||
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Đã dừng thu thập: phát hiện {0} khi game đang chạy, và FrameLedger đã gỡ hook.</value></data>
|
||||
<data name="Safety_Unhooked_MachineWide_Format" xml:space="preserve"><value>Đã dừng thu thập: {0} khởi động trên máy này khi game đang chạy ({1}) — một driver hoặc service, có thể thuộc về game hay chương trình khác — và FrameLedger đã gỡ hook. Phiên sau của game sẽ được đo lại khi nó không còn chạy.</value></data>
|
||||
<data name="Safety_Unhooked_Unnamed_Format" xml:space="preserve"><value>Đã dừng thu thập khi game đang chạy — {0} — và FrameLedger đã gỡ hook.</value></data>
|
||||
<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>
|
||||
|
||||
@@ -22,40 +22,60 @@ target_compile_features(FrameLedger.Shm INTERFACE cxx_std_20)
|
||||
#
|
||||
# KNOWN LIMIT, stated rather than discovered: this runs at CONFIGURE time, so the
|
||||
# `-dirty` suffix reflects the tree when CMake last ran, not when the DLL was
|
||||
# last compiled. For a released build that is exact — CI configures and builds
|
||||
# once from a clean checkout. For a developer editing between configures it is
|
||||
# approximate, and the field is a version-skew signal rather than a provenance
|
||||
# guarantee. Making it exact means re-running git on every build, which is a cost
|
||||
# on every incremental compile for a value only the attach handshake reads.
|
||||
execute_process(
|
||||
COMMAND git describe --always --dirty --abbrev=12
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE FL_BUILD_ID_RAW
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
if(NOT FL_BUILD_ID_RAW)
|
||||
set(FL_BUILD_ID_RAW "unknown")
|
||||
endif()
|
||||
# buildId is char[32] and the guard side compares the whole array, so a value
|
||||
# that would be truncated must be caught here rather than becoming a permanent
|
||||
# mismatch nobody can explain.
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
# AFTER THE FIRST TAG the long form stopped fitting on a developer's machine: `v0.1.0-beta.2-2-gd3e74988a7bc-dirty`
|
||||
# is 35 characters, so every local configure with an uncommitted change failed here and the documented workaround
|
||||
# was "commit before you build" (measured 2026-09-17, again 2026-09-21). The id is a version-skew signal, not a
|
||||
# provenance guarantee (above), so the fallback spends fewer characters on the same facts: an 8-digit abbreviation
|
||||
# and `+` for dirty. A released build is a clean checkout AT a tag and never reaches this branch. Still too long
|
||||
# after that is still fatal, for the reason the check exists.
|
||||
if(FL_BUILD_ID_LEN GREATER 31)
|
||||
# last compiled. This comment said that for a released build it was exact, "CI
|
||||
# configures and builds once from a clean checkout", and it was not (corrected
|
||||
# 2026-10-07, beta.18): release.yml writes the release date into the tracked
|
||||
# legal/*.md before the gate configures, and every release until beta.18 shipped
|
||||
# "<tag>-dirty" — the owner's Dashboard read "Overlay build v0.1.0-beta.17-dirty",
|
||||
# and the run's log "FL_BUILD_ID = v0.1.0-beta.17-dirty" two lines after
|
||||
# "RELEASE_DATE = 2026-10-07 in 3 file(s)". A release now hands the id in (below). For a
|
||||
# developer editing between configures it is approximate, and the field is a
|
||||
# version-skew signal rather than a provenance guarantee. Making it exact means
|
||||
# re-running git on every build, which is a cost on every incremental compile for a
|
||||
# value only the attach handshake reads.
|
||||
#
|
||||
# A RELEASE HANDS THE ID IN: release.yml reads describe from the clean checkout, before
|
||||
# anything edits a tracked file, and passes it as the environment's FL_BUILD_ID; it is
|
||||
# taken as given here, and tools/buildid-check.ps1 then reads it back out of the
|
||||
# published binaries. It goes into a C string literal, so it must be what describe can
|
||||
# print and nothing a literal would have to escape.
|
||||
if(DEFINED ENV{FL_BUILD_ID} AND NOT "$ENV{FL_BUILD_ID}" STREQUAL "")
|
||||
set(FL_BUILD_ID_RAW "$ENV{FL_BUILD_ID}")
|
||||
if(NOT FL_BUILD_ID_RAW MATCHES "^[0-9A-Za-z._+-]+$")
|
||||
message(FATAL_ERROR "FL_BUILD_ID '${FL_BUILD_ID_RAW}' from the environment holds a character no build id has (0-9 A-Z a-z . _ + -).")
|
||||
endif()
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND git describe --always --dirty=+ --abbrev=8
|
||||
COMMAND git describe --always --dirty --abbrev=12
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE FL_BUILD_ID_RAW
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
if(NOT FL_BUILD_ID_RAW)
|
||||
set(FL_BUILD_ID_RAW "unknown")
|
||||
endif()
|
||||
# buildId is char[32] and the guard side compares the whole array, so a value
|
||||
# that would be truncated must be caught here rather than becoming a permanent
|
||||
# mismatch nobody can explain.
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
# AFTER THE FIRST TAG the long form stopped fitting on a developer's machine: `v0.1.0-beta.2-2-gd3e74988a7bc-dirty`
|
||||
# is 35 characters, so every local configure with an uncommitted change failed here and the documented workaround
|
||||
# was "commit before you build" (measured 2026-09-17, again 2026-09-21). The id is a version-skew signal, not a
|
||||
# provenance guarantee (above), so the fallback spends fewer characters on the same facts: an 8-digit abbreviation
|
||||
# and `+` for dirty. A released build hands its id in (above) and never reaches this branch. Still too long
|
||||
# after that is still fatal, for the reason the check exists.
|
||||
if(FL_BUILD_ID_LEN GREATER 31)
|
||||
execute_process(
|
||||
COMMAND git describe --always --dirty=+ --abbrev=8
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE FL_BUILD_ID_RAW
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
endif()
|
||||
endif()
|
||||
if(FL_BUILD_ID_LEN GREATER 31)
|
||||
message(FATAL_ERROR
|
||||
|
||||
@@ -185,6 +185,24 @@ public sealed class AccessibilityTests
|
||||
wrapped.Should().BeEmpty("a page without ScrollViewer.CanContentScroll=\"False\" is wrapped in WPF UI's scroller, and its own root swallows the wheel");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.18 (the owner's screenshots of beta.17 in the dark theme: every page's title near-black on the dark window). A
|
||||
/// page is shown in WPF UI's <c>NavigationViewContentPresenter</c>, a <c>Frame</c>, and a Frame sets
|
||||
/// <c>InheritanceBehavior.SkipToAppNow</c>: the window's text colour never reaches the page, and a text with no colour
|
||||
/// of its own is WPF UI's TextBlock default, black. Every page gives its texts the theme's colour itself.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void EveryPageSetsItsOwnTextColour()
|
||||
{
|
||||
List<string> pages = [.. AppXaml().Where(static x => string.Equals(x.Xaml.Root!.Name.LocalName, "Page", StringComparison.Ordinal)).Select(static x => x.File)];
|
||||
List<string> uncoloured = [.. AppXaml().Where(static x => string.Equals(x.Xaml.Root!.Name.LocalName, "Page", StringComparison.Ordinal)
|
||||
&& !string.Equals(x.Xaml.Root.Attribute("Foreground")?.Value, "{DynamicResource TextFillColorPrimaryBrush}", StringComparison.Ordinal))
|
||||
.Select(static x => x.File)];
|
||||
|
||||
pages.Should().HaveCountGreaterThanOrEqualTo(6);
|
||||
string.Join(", ", uncoloured).Should().BeEmpty("a Frame passes no text colour into a page: each sets Foreground=\"{DynamicResource TextFillColorPrimaryBrush}\" (16_WPFUI_SYNTAX §Gotchas)");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A stock <c>ScrollViewer</c> takes every wheel, even with nothing left to scroll; inside a dialog that scrolls, the wheel
|
||||
/// then stops at it. WPF UI's <c>PassiveScrollViewer</c> hands the wheel on at its ends (beta.14).
|
||||
|
||||
@@ -23,13 +23,6 @@ public sealed class ContrastTests
|
||||
{
|
||||
private static readonly string[] _paletteAppearances = ["Info", "Caution", "Danger", "Success"];
|
||||
|
||||
/// <summary>
|
||||
/// Windows' default accent. The accent brushes are not in the theme dictionaries: `ApplicationThemeManager.Apply(…,
|
||||
/// updateAccent: true)` derives them from the system accent at start-up (`MainWindow`), so the test derives them the
|
||||
/// same way from a fixed colour and measures WPF UI's own on-accent text against them.
|
||||
/// </summary>
|
||||
private static readonly Color _defaultAccent = Color.FromRgb(0x00, 0x78, 0xD4);
|
||||
|
||||
[Fact]
|
||||
public void NoBadgeUsesAPaletteAppearance()
|
||||
{
|
||||
@@ -143,10 +136,12 @@ public sealed class ContrastTests
|
||||
[InlineData(ApplicationTheme.Light)]
|
||||
public async Task EveryPillPairMeetsAAInBothThemes(ApplicationTheme theme)
|
||||
{
|
||||
Dictionary<string, double> ratios = await PagesLoadTests.OnStaAsync(() =>
|
||||
// The accent brushes are not in the theme dictionaries: the App derives them from the system accent at each theme
|
||||
// switch, and Visuals.UnderTheme derives them the same way from Windows' default accent. Until 2026-10-07 this
|
||||
// passed systemAccentColor: true, which reads the machine's own accent palette wherever Windows answers.
|
||||
Dictionary<string, double> ratios = await PagesLoadTests.OnStaAsync(() => Visuals.UnderTheme(theme, () =>
|
||||
{
|
||||
var themed = new ThemesDictionary { Theme = theme };
|
||||
ApplicationAccentColorManager.Apply(_defaultAccent, theme, systemGlassColor: false, systemAccentColor: true);
|
||||
Color window = Wcag.Resolve(themed, "ApplicationBackgroundColor");
|
||||
Color card = Wcag.Over(Wcag.Resolve(themed, "CardBackgroundFillColorDefault"), window);
|
||||
Color pillOff = Wcag.Over(Wcag.Resolve(themed, "ControlFillColorDefault"), card);
|
||||
@@ -159,7 +154,7 @@ public sealed class ContrastTests
|
||||
["qualifier warning: primary text on caution"] = Wcag.Ratio(Wcag.Over(Wcag.Resolve(themed, "TextFillColorPrimary"), caution), caution),
|
||||
["the Info badge, for the record"] = Wcag.Ratio(Wcag.Over(Wcag.Resolve(themed, "TextFillColorPrimary"), PaletteLightBlue()), PaletteLightBlue()),
|
||||
};
|
||||
});
|
||||
}));
|
||||
|
||||
using (new FluentAssertions.Execution.AssertionScope(theme.ToString()))
|
||||
{
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Markdown;
|
||||
using FrameLedger.App.Services;
|
||||
@@ -75,14 +77,108 @@ public sealed class GuideDocumentsTests
|
||||
dead.Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Every link to a section — on the same page, another guide page, Limitations, or a document in the repository — names an
|
||||
/// anchor the App's own renderer gives that page's headings (beta.17: the guide grew from eight pages to twelve, and its
|
||||
/// pages link into each other's sections). Rendered as the window renders them, so GitHub's rules for a repeated heading
|
||||
/// and for punctuation are the ones checked.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ALinkToAnotherSectionOfTheGuideNamesAHeadingThatExists()
|
||||
public async Task EveryLinkToASectionNamesAHeadingOfItsPage()
|
||||
{
|
||||
// 05-your-data.md links to 01-install.md#updates: the anchor must be one the target page's headings produce.
|
||||
string install = EmbeddedDocuments.Read("guide/01-install.md");
|
||||
MarkdownDocument ast = Markdig.Markdown.Parse(install, MarkdownRenderer.Pipeline);
|
||||
string[] anchors = [.. ast.Descendants<HeadingBlock>().Select(static h => MarkdownLinks.Slug(string.Concat(h.Inline!.Descendants<LiteralInline>().Select(static l => l.Content.ToString()))))];
|
||||
string root = RepoRoot();
|
||||
var wanted = new List<(string Page, string Target, string Anchor)>();
|
||||
foreach (string page in EmbeddedDocuments.GuidePages)
|
||||
{
|
||||
MarkdownDocument ast = Markdig.Markdown.Parse(EmbeddedDocuments.Read(page), MarkdownRenderer.Pipeline);
|
||||
foreach (string href in ast.Descendants<LinkInline>().Where(static l => !l.IsImage).Select(static l => l.Url ?? string.Empty))
|
||||
{
|
||||
MarkdownLinkTarget target = MarkdownLinks.Resolve(page, href);
|
||||
if (target is { Anchor: { } anchor, External: null })
|
||||
{
|
||||
wanted.Add((page, target.RepositoryPath ?? page, anchor));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
anchors.Should().Contain("updates");
|
||||
wanted.Should().NotBeEmpty("the guide links into its own sections");
|
||||
List<string> dead = await PagesLoadTests.OnStaAsync(() =>
|
||||
{
|
||||
var missing = new List<string>();
|
||||
var anchors = new Dictionary<string, IReadOnlyDictionary<string, System.Windows.Documents.Block>>(StringComparer.Ordinal);
|
||||
foreach ((string page, string target, string anchor) in wanted)
|
||||
{
|
||||
if (!anchors.TryGetValue(target, out IReadOnlyDictionary<string, System.Windows.Documents.Block>? known))
|
||||
{
|
||||
bool limitations = string.Equals(target, LimitationsDocument.ResourceName, StringComparison.Ordinal);
|
||||
string text = limitations ? LimitationsDocument.Load()
|
||||
: target.StartsWith("guide/", StringComparison.Ordinal) ? EmbeddedDocuments.Read(target)
|
||||
: File.ReadAllText(Path.Combine(root, target.Replace('/', Path.DirectorySeparatorChar)));
|
||||
known = MarkdownRenderer.Render(text, target).Anchors;
|
||||
anchors[target] = known;
|
||||
}
|
||||
|
||||
if (!known.ContainsKey(anchor))
|
||||
{
|
||||
missing.Add($"{page}: {target}#{anchor}");
|
||||
}
|
||||
}
|
||||
|
||||
return missing;
|
||||
});
|
||||
|
||||
string.Join(Environment.NewLine, dead).Should().BeEmpty("a section link that names no heading opens the page at its top, or nowhere");
|
||||
}
|
||||
|
||||
/// <summary>The guide's contents list names its pages in the order the App lists them (beta.17).</summary>
|
||||
[Fact]
|
||||
public void TheContentsListThePagesInTheAppsOrder()
|
||||
{
|
||||
MarkdownDocument ast = Markdig.Markdown.Parse(EmbeddedDocuments.Read("guide/README.md"), MarkdownRenderer.Pipeline);
|
||||
string[] listed = [.. ast.Descendants<LinkInline>()
|
||||
.Select(static l => MarkdownLinks.Resolve("guide/README.md", l.Url).RepositoryPath)
|
||||
.OfType<string>()
|
||||
.Where(static path => path.StartsWith("guide/", StringComparison.Ordinal))
|
||||
.Distinct(StringComparer.Ordinal)];
|
||||
|
||||
listed.Should().Equal(EmbeddedDocuments.GuidePages.Skip(1), "guide/README.md is the contents, and the window lists the pages in that order");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// "Every setting" names every setting the Settings page shows, by its English label (beta.17): a setting added to the
|
||||
/// page and not to the guide is red here, not a question a player cannot find the answer to.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TheSettingsPageOfTheGuideNamesEverySetting()
|
||||
{
|
||||
string xaml = File.ReadAllText(Path.Combine(RepoRoot(), "src", "FrameLedger.App", "Pages", "SettingsPage.xaml"));
|
||||
IEnumerable<string> keys = Regex.Matches(xaml, @"res:Strings\.(?<key>Settings_\w+_Label)\b", RegexOptions.CultureInvariant | RegexOptions.ExplicitCapture, TimeSpan.FromSeconds(1))
|
||||
.Select(static m => m.Groups["key"].Value)
|
||||
.Concat(["Settings_Theme_Label", "Settings_Language_Label"]);
|
||||
|
||||
Unnamed(keys, EmbeddedDocuments.Read("guide/08-settings.md")).Should().BeEmpty("guide/08-settings.md names every setting the page shows");
|
||||
}
|
||||
|
||||
/// <summary>"The screens" names every page of the navigation and every menu item, by its English text (beta.17).</summary>
|
||||
[Fact]
|
||||
public void TheScreensPageOfTheGuideNamesEveryPageAndMenuItem()
|
||||
{
|
||||
string xaml = File.ReadAllText(Path.Combine(RepoRoot(), "src", "FrameLedger.App", "MainWindow.xaml"));
|
||||
IEnumerable<string> keys = Regex.Matches(xaml, @"res:Strings\.(?<key>(?:Nav|Menu)_\w+)\b", RegexOptions.CultureInvariant | RegexOptions.ExplicitCapture, TimeSpan.FromSeconds(1))
|
||||
.Select(static m => m.Groups["key"].Value);
|
||||
|
||||
Unnamed(keys, EmbeddedDocuments.Read("guide/07-screens.md")).Should().BeEmpty("guide/07-screens.md names every page and menu item");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The English text of each key that <paramref name="page"/> does not contain — the menu's access-key underscore and a
|
||||
/// trailing ellipsis removed, since the guide writes "File ▸ Add game".
|
||||
/// </summary>
|
||||
private static List<string> Unnamed(IEnumerable<string> keys, string page) =>
|
||||
[
|
||||
.. keys.Distinct(StringComparer.Ordinal)
|
||||
.Select(static key => (Key: key, Text: (Strings.ResourceManager.GetString(key, CultureInfo.GetCultureInfo("en")) ?? key).Replace("_", string.Empty, StringComparison.Ordinal).TrimEnd('…', '.')))
|
||||
.Where(k => !page.Contains(k.Text, StringComparison.Ordinal))
|
||||
.Select(static k => $"{k.Key}: \"{k.Text}\""),
|
||||
];
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public sealed partial class MarkdownRendererTests
|
||||
text.Should().Contain(" 0. Definitions.").And.Contain(" # not a heading", "the GPL is not Markdown: its numbered sections are not a list");
|
||||
}
|
||||
|
||||
/// <summary>Every embedded document — the Legal Gate's four, LIMITATIONS, NOTICE, the trademark note, the third-party notices, the package index and the user guide's eight pages.</summary>
|
||||
/// <summary>Every embedded document — the Legal Gate's four, LIMITATIONS, NOTICE, the trademark note, the third-party notices, the package index and the user guide's twelve pages (eight until beta.17).</summary>
|
||||
[Fact]
|
||||
public async Task NothingAnyEmbeddedDocumentSaysIsDropped()
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public sealed partial class MarkdownRendererTests
|
||||
return problems;
|
||||
});
|
||||
|
||||
documents.Should().HaveCount(17, "nine documents and the guide's eight pages");
|
||||
documents.Should().HaveCount(21, "nine documents and the guide's twelve pages");
|
||||
missing.Should().BeEmpty("the renderer must never shorten a document a user reads or accepts");
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Services;
|
||||
using FrameLedger.Application.AntiCheat;
|
||||
using FrameLedger.Application.Capture;
|
||||
using FrameLedger.Application.Ipc;
|
||||
using FrameLedger.Application.Recording;
|
||||
using FrameLedger.Domain.AntiCheat;
|
||||
using FrameLedger.Domain.Consent;
|
||||
using FrameLedger.Domain.Sessions;
|
||||
using FrameLedger.Shared.Ipc;
|
||||
|
||||
namespace FrameLedger.App.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// beta.18: a notice is made from what the Agent sends, so these are made from what the Agent sends — the gate's own
|
||||
/// verdicts, the verdicts the native guard's facade builds (<see cref="AntiCheatVerdict.FromNative"/>), published by
|
||||
/// <see cref="RecordedSessionEvents.PublishReason"/> through the wire's codec — never an event written by hand. Hand-written
|
||||
/// events had been the notices' only tests ("GuardBlocked", "HookFaulted", a guard reason sent as the end) while the Agent's
|
||||
/// own read "The hook stopped (WriterSelfDisabled)…", "kill switch was detected in this game (… (FR-2.4) …)" and "Access is
|
||||
/// denied was detected while the game was running".
|
||||
/// </summary>
|
||||
[Collection(StringsCultureCollection.Name)]
|
||||
public sealed class NoticesFromTheAgentTests
|
||||
{
|
||||
private static readonly ExecutableFingerprint _onDisk = new() { ExePath = @"C:\Games\Title\game.exe", SizeBytes = 90_000, MtimeUnixMs = 1_700_000_000_000 };
|
||||
|
||||
/// <summary>The gate's refusal of a game blocked before, labelled as <c>HookedCaptureGate</c> labels it.</summary>
|
||||
private static readonly AntiCheatVerdict _blockedBefore =
|
||||
AntiCheatVerdict.Refused(AntiCheatRefusalReason.PreviouslyBlocked, "previously blocked", "AntiCheatFile|NetEase Yidun|NEP2.dll");
|
||||
|
||||
/// <summary>What a user must never read in a notice: the enums' names, a requirement's id, the fallback's "reason X".</summary>
|
||||
private static readonly Regex[] _internal =
|
||||
[
|
||||
.. Enum.GetNames<SessionEndReason>().Concat(Enum.GetNames<AntiCheatRefusalReason>()).Select(static n => Pattern(@"\b" + n + @"\b")),
|
||||
Pattern(@"FR-\d"),
|
||||
Pattern(@"\breason [A-Z]"),
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// "kill switch was detected in this game (the global 'disable all hooking' switch is on (FR-2.4); …)" until beta.18. The
|
||||
/// switch is checked before anything else, so the gate refuses even a record nobody stored, and its guard is never asked.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task DisableAllHookingIsTheUsersSwitchNeverAFinding()
|
||||
{
|
||||
AntiCheatVerdict gate = await new HookedCaptureGate(new UnaskedGuard())
|
||||
.StartAsync(HookRequest.FromConsent(default, _onDisk, targetPid: 4242, @"C:\FrameLedger\FrameLedger.Overlay.dll", killSwitchEngaged: true),
|
||||
TestContext.Current.CancellationToken);
|
||||
|
||||
SafetyNotice notice = InEnglish(() => Notice(new CaptureOutcome { Reason = SessionEndReason.RefusedKillSwitch, Verdict = gate }));
|
||||
|
||||
gate.Family.Should().Be("kill switch", "the gate labels its own refusal in the family's place — which is what the notice printed");
|
||||
notice.Body.Should().Be("All hooking is switched off in Settings, so nothing was measured. " + Strings.Notice_Refused_Recording);
|
||||
Leaks(notice).Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A game with its user-mode exception granted and the option since turned off (D33): hooking is on, the row is blocked,
|
||||
/// no family is tolerated. The verdict is the gate's as <c>HookedCaptureGate</c> labels it — a stored record is not a
|
||||
/// test's to make (Domain's InternalsVisibleTo).
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AGameBlockedBeforeIsSaidAsThatNeverAsAFindingNamedPreviouslyBlocked()
|
||||
{
|
||||
SafetyNotice notice = InEnglish(() => Notice(new CaptureOutcome { Reason = SessionEndReason.RefusedPreviouslyBlocked, Verdict = _blockedBefore }));
|
||||
|
||||
notice.Body.Should().StartWith("Anti-cheat was found in this game before, so it is never hooked.").And.NotContain("previously blocked was detected");
|
||||
Leaks(notice).Should().BeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AGuardRefusalThatNamesNoFamilyIsSaidInTheGuardsWords()
|
||||
{
|
||||
AntiCheatVerdict wow64 = AntiCheatVerdict.FromNative((int)AntiCheatRefusalReason.TargetIsWow64, string.Empty, "target is a WOW64 process");
|
||||
|
||||
SafetyNotice notice = InEnglish(() => Notice(new CaptureOutcome { Reason = SessionEndReason.RefusedByGuard, Verdict = wow64 }));
|
||||
|
||||
notice.Body.Should().StartWith("The anti-cheat guard did not hook this game: the game is 32-bit, and the hook runs in 64-bit games only.");
|
||||
Leaks(notice).Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>An agent from before beta.18 sent no guard reason beside no family: the end's own words, not its name.</summary>
|
||||
[Fact]
|
||||
public void AnOlderAgentsFamilylessRefusalIsStillWords()
|
||||
{
|
||||
SafetyNotice notice = InEnglish(() => new SafetyNotices(new FakeAgentLink(), new RecordingStrip()).Translate(
|
||||
FakeAgentLink.Envelope(IpcMessageType.CaptureRefused, new CaptureRefusedEvent(7, "Title", "RefusedByGuard", null, "target is a WOW64 process")))!);
|
||||
|
||||
notice.Body.Should().StartWith("The anti-cheat guard refused to hook this game.");
|
||||
Leaks(notice).Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>The control: a finding is still said as one, by its family and signal.</summary>
|
||||
[Fact]
|
||||
public void AFindingIsStillNamed()
|
||||
{
|
||||
AntiCheatVerdict found = AntiCheatVerdict.FromNative((int)AntiCheatRefusalReason.BlockedModule, "BattlEye", "BEClient_x64.dll");
|
||||
|
||||
SafetyNotice notice = InEnglish(() => Notice(new CaptureOutcome { Reason = SessionEndReason.RefusedByGuard, Verdict = found, HookingTurnedOff = true }));
|
||||
|
||||
notice.Body.Should().StartWith("BattlEye was detected in this game (BEClient_x64.dll).");
|
||||
Leaks(notice).Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>The 30 s re-scan could not read the game's process while it still ran (an exit is relabelled, D48(b)).</summary>
|
||||
[Fact]
|
||||
public void AReScanThatCouldNotLookIsNotAFinding()
|
||||
{
|
||||
AntiCheatVerdict unreadable = AntiCheatVerdict.FromNative((int)AntiCheatRefusalReason.ProcessUnreadable, string.Empty, "Access is denied.");
|
||||
|
||||
SafetyNotice notice = InEnglish(() => Notice(new CaptureOutcome { Reason = ExitScanRelabel.EndOf(unreadable, targetExited: false), Verdict = unreadable }));
|
||||
|
||||
notice.Kind.Should().Be(SafetyNoticeKind.Unhooked);
|
||||
notice.Body.Should().Be("Capture stopped while the game was running — the game's process could not be opened — and FrameLedger unhooked.");
|
||||
Leaks(notice).Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>Every end that stops measuring mid-session is said in its own sentence, and never as continuing.</summary>
|
||||
[Fact]
|
||||
public void EveryStopMidSessionIsItsOwnSentence()
|
||||
{
|
||||
List<SessionEndReason> stops = [.. Enum.GetValues<SessionEndReason>().Where(static r => RecordedSessionEvents.Classify(r) == RecordedSessionEvents.Kind.Degraded)];
|
||||
|
||||
List<string> wrong = InEnglish(() => stops
|
||||
.Select(r => (Reason: r, Notice: Notice(new CaptureOutcome { Reason = r, Verdict = AntiCheatVerdict.Allowed() })))
|
||||
.Where(static x => !string.Equals(x.Notice.Body, Formats.EndReasonText(x.Reason.ToString()), StringComparison.Ordinal) || Leaks(x.Notice).Count > 0
|
||||
|| x.Notice.Body.Contains("continues", StringComparison.Ordinal))
|
||||
.Select(static x => $"{x.Reason}: \"{x.Notice.Body}\"")
|
||||
.ToList());
|
||||
|
||||
stops.Should().Contain([SessionEndReason.WriterSelfDisabled, SessionEndReason.KillSwitchEngaged]);
|
||||
string.Join(Environment.NewLine, wrong).Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>Every refusal the Agent publishes, each with the verdict it comes with, reads without an internal name.</summary>
|
||||
[Fact]
|
||||
public async Task EveryRefusalReadsAsWords()
|
||||
{
|
||||
AntiCheatVerdict killSwitch = await new HookedCaptureGate(new UnaskedGuard())
|
||||
.StartAsync(HookRequest.FromConsent(default, _onDisk, targetPid: 4242, @"C:\FrameLedger\FrameLedger.Overlay.dll", killSwitchEngaged: true),
|
||||
TestContext.Current.CancellationToken);
|
||||
List<SessionEndReason> refusals = [.. Enum.GetValues<SessionEndReason>().Where(static r => RecordedSessionEvents.Classify(r) == RecordedSessionEvents.Kind.Refused)];
|
||||
|
||||
List<string> wrong = InEnglish(() => refusals
|
||||
.Select(r => (Reason: r, Notice: Notice(new CaptureOutcome
|
||||
{
|
||||
Reason = r,
|
||||
Verdict = r switch
|
||||
{
|
||||
SessionEndReason.RefusedKillSwitch => killSwitch,
|
||||
SessionEndReason.RefusedPreviouslyBlocked => _blockedBefore,
|
||||
SessionEndReason.RefusedByGuard => AntiCheatVerdict.FromNative((int)AntiCheatRefusalReason.ModuleScanFailed, string.Empty, "Only part of a ReadProcessMemory request was completed."),
|
||||
_ => default,
|
||||
},
|
||||
})))
|
||||
.Where(static x => Leaks(x.Notice).Count > 0)
|
||||
.Select(static x => $"{x.Reason}: \"{x.Notice.Body}\" ({string.Join(", ", Leaks(x.Notice))})")
|
||||
.ToList());
|
||||
|
||||
refusals.Should().HaveCountGreaterThanOrEqualTo(5);
|
||||
string.Join(Environment.NewLine, wrong).Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>The one safety event <paramref name="outcome"/> publishes, over the wire's codec, as the App's notice.</summary>
|
||||
private static SafetyNotice Notice(CaptureOutcome outcome)
|
||||
{
|
||||
var pipe = new Pipe();
|
||||
RecordedSessionEvents.PublishReason(pipe, Guid.NewGuid(), outcome,
|
||||
new SessionStartedInfo(Guid.NewGuid(), 7, "Title", _onDisk.ExePath, CaptureMode.Attach, DateTimeOffset.UnixEpoch, 10_000_000));
|
||||
IpcEnvelope sent = pipe.Sent.Should().ContainSingle($"{outcome.Reason} publishes one event").Subject;
|
||||
using var notices = new SafetyNotices(new FakeAgentLink(), new RecordingStrip());
|
||||
return notices.Translate(sent) ?? throw new InvalidOperationException($"{sent.Type} made no notice");
|
||||
}
|
||||
|
||||
private static List<string> Leaks(SafetyNotice notice) => [.. _internal.Select(r => r.Match(notice.Body)).Where(static m => m.Success).Select(static m => m.Value)];
|
||||
|
||||
private static Regex Pattern(string pattern) => new(pattern, RegexOptions.CultureInvariant | RegexOptions.ExplicitCapture, TimeSpan.FromSeconds(1));
|
||||
|
||||
private static T InEnglish<T>(Func<T> f)
|
||||
{
|
||||
CultureInfo? app = Strings.Culture;
|
||||
CultureInfo? shared = Shared.Strings.Culture;
|
||||
CultureInfo current = CultureInfo.CurrentCulture;
|
||||
try
|
||||
{
|
||||
Strings.Culture = CultureInfo.GetCultureInfo("en");
|
||||
Shared.Strings.Culture = CultureInfo.GetCultureInfo("en");
|
||||
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en");
|
||||
return f();
|
||||
}
|
||||
finally
|
||||
{
|
||||
Strings.Culture = app;
|
||||
Shared.Strings.Culture = shared;
|
||||
CultureInfo.CurrentCulture = current;
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class Pipe : IIpcEventPublisher
|
||||
{
|
||||
public List<IpcEnvelope> Sent { get; } = [];
|
||||
|
||||
public bool HasClients => true;
|
||||
|
||||
public void Publish<T>(string type, T payload)
|
||||
where T : class => Sent.Add(IpcCodec.Decode(IpcCodec.Encode(type, null, payload)));
|
||||
}
|
||||
|
||||
/// <summary>A guard that must not be reached: every refusal these tests take from the gate is the gate's own.</summary>
|
||||
private sealed class UnaskedGuard : IAntiCheatGuard
|
||||
{
|
||||
public ValueTask<AntiCheatVerdict> EvaluateAsync(int targetPid, string? toleratedFamily, CancellationToken ct = default) => throw Asked();
|
||||
|
||||
public ValueTask<AntiCheatVerdict> GuardedInjectAsync(int targetPid, string payloadPath, string? toleratedFamily, CancellationToken ct = default) => throw Asked();
|
||||
|
||||
public ValueTask<AntiCheatVerdict> GuardedInjectWhenReadyAsync(int targetPid, string payloadPath, int timeoutMs, string? toleratedFamily,
|
||||
CancellationToken ct = default) => throw Asked();
|
||||
|
||||
public ValueTask<AntiCheatVerdict> PreScanGameAsync(string executablePath, string? toleratedFamily, CancellationToken ct = default) => throw Asked();
|
||||
|
||||
private static InvalidOperationException Asked() => new("the gate asked the guard");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using FluentAssertions;
|
||||
using Wpf.Ui.Appearance;
|
||||
using Wpf.Ui.Markup;
|
||||
|
||||
namespace FrameLedger.App.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Every text the App shows is readable in both themes (beta.18, the owner's screenshots of beta.17 in the dark theme: each
|
||||
/// page's title and section headings near-black on the dark window). Each surface is hosted as the App hosts it
|
||||
/// (<see cref="Hosted"/>): a page in WPF UI's <c>NavigationViewContentPresenter</c>, which is a <c>Frame</c>, and a Frame
|
||||
/// sets <c>InheritanceBehavior.SkipToAppNow</c> — nothing above it, the window's text colour included, reaches the page. A
|
||||
/// text with no colour of its own then falls back to the TextBlock default, which WPF UI 4.3.0's <c>TextBlockMetadata</c>
|
||||
/// sets to black. Text inside a card or a grid never showed it: their templates set a colour. The theme-switch check could
|
||||
/// not see it either: it compares a switched surface with a fresh one, and black was black in both.
|
||||
/// </summary>
|
||||
public sealed partial class PagesLoadTests
|
||||
{
|
||||
/// <summary>WCAG's minimum for large text and for what a user must make out; black on the dark window is 1.3.</summary>
|
||||
private const double _readableAtLeast = 3.0;
|
||||
|
||||
[Theory]
|
||||
[InlineData(ApplicationTheme.Dark)]
|
||||
[InlineData(ApplicationTheme.Light)]
|
||||
public async Task EveryTextIsReadableInBothThemes(ApplicationTheme theme)
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
using Surfaces surfaces = await Surfaces.LoadAsync(s);
|
||||
|
||||
(int Texts, List<string> Faint) result = await OnStaAsync(() => Visuals.UnderTheme(theme, () =>
|
||||
{
|
||||
Color window = Wcag.Resolve(new ThemesDictionary { Theme = theme }, "ApplicationBackgroundColor");
|
||||
int texts = 0;
|
||||
var faint = new List<string>();
|
||||
foreach ((string name, Func<FrameworkElement> build) in surfaces.All())
|
||||
{
|
||||
(Window host, FrameworkElement root) = Hosted(build);
|
||||
try
|
||||
{
|
||||
Lay(root);
|
||||
foreach (TextBlock text in ShownTexts(root))
|
||||
{
|
||||
texts++;
|
||||
Color under = Visuals.PaintedUnder(text, root, window);
|
||||
double ratio = Wcag.Ratio(Visuals.TextOver(text, under), under);
|
||||
if (ratio < _readableAtLeast)
|
||||
{
|
||||
faint.Add(string.Create(CultureInfo.InvariantCulture, $"{name}: \"{text.Text}\" {ratio:0.00}:1 ({text.Foreground} on {under})"));
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
host.Close();
|
||||
}
|
||||
}
|
||||
|
||||
return (texts, faint);
|
||||
}));
|
||||
|
||||
result.Texts.Should().BeGreaterThan(300, "every surface was rendered and holds text");
|
||||
string.Join(Environment.NewLine, result.Faint).Should().BeEmpty($"every text the App shows reads at {_readableAtLeast}:1 or better in the {theme} theme");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The non-empty texts under <paramref name="root"/> that a user can see and is meant to read: no collapsed or hidden
|
||||
/// element above them, and none disabled (WCAG asks nothing of an inactive control's text).
|
||||
/// </summary>
|
||||
private static IEnumerable<TextBlock> ShownTexts(DependencyObject root)
|
||||
{
|
||||
if (root is UIElement { Visibility: not Visibility.Visible } or UIElement { IsEnabled: false })
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (root is TextBlock { Text.Length: > 0 } text && text.Foreground is SolidColorBrush)
|
||||
{
|
||||
yield return text;
|
||||
}
|
||||
|
||||
int count = VisualTreeHelper.GetChildrenCount(root);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
foreach (TextBlock child in ShownTexts(VisualTreeHelper.GetChild(root, i)))
|
||||
{
|
||||
yield return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,17 +121,22 @@ public sealed partial class PagesLoadTests
|
||||
try
|
||||
{
|
||||
Lay(fresh);
|
||||
List<(string Path, string Text, string Colour)> before = Texts(switched);
|
||||
List<(string Path, string Text, string Colour)> after = Texts(fresh);
|
||||
if (before.Count != after.Count)
|
||||
{
|
||||
return (before.Count, [$"{name}: {before.Count} texts after the switch, {after.Count} in a fresh one"]);
|
||||
}
|
||||
List<DrawnText> before = Texts(switched);
|
||||
List<DrawnText> after = Texts(fresh);
|
||||
Dictionary<string, DrawnText> lived = before.ToDictionary(static d => d.Path, StringComparer.Ordinal);
|
||||
Dictionary<string, DrawnText> made = after.ToDictionary(static d => d.Path, StringComparer.Ordinal);
|
||||
|
||||
// Texts are reported, never compared: another test class may change Strings.Culture between the two builds.
|
||||
List<string> stale = [.. before.Zip(after)
|
||||
.Where(static p => !string.Equals(p.First.Path, p.Second.Path, StringComparison.Ordinal) || !string.Equals(p.First.Colour, p.Second.Colour, StringComparison.Ordinal))
|
||||
.Select(p => $"{name}: \"{p.First.Text}\" is {p.First.Colour}, made fresh {p.Second.Colour} ({p.First.Path})")];
|
||||
// Texts are reported, never compared: another test class may change Strings.Culture between the two builds. What is
|
||||
// compared is what a user can see (beta.18, when pages moved into the Frame): inside a collapsed part a theme switch
|
||||
// re-applies a DataGrid's idle scroll bar, whose arrow glyphs then exist in the switched page only, and the select-all
|
||||
// corner — collapsed, every grid here shows column headers only — kept the old theme's disabled colour.
|
||||
List<string> stale =
|
||||
[
|
||||
.. before.Where(d => made.TryGetValue(d.Path, out DrawnText f) && (d.Shown || f.Shown) && !string.Equals(d.Colour, f.Colour, StringComparison.Ordinal))
|
||||
.Select(d => $"{name}: \"{d.Text}\" is {d.Colour}, made fresh {made[d.Path].Colour} ({d.Path})"),
|
||||
.. before.Where(d => d.Shown && !made.ContainsKey(d.Path)).Select(d => $"{name}: \"{d.Text}\" shows after the switch only ({d.Path})"),
|
||||
.. after.Where(d => d.Shown && !lived.ContainsKey(d.Path)).Select(d => $"{name}: \"{d.Text}\" shows in a fresh one only ({d.Path})"),
|
||||
];
|
||||
return (before.Count, stale.Count <= _staleShownPerSurface ? stale : [.. stale.Take(_staleShownPerSurface), $"{name}: … and {stale.Count - _staleShownPerSurface} more"]);
|
||||
}
|
||||
finally
|
||||
@@ -140,7 +145,12 @@ public sealed partial class PagesLoadTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A surface in a window that is never shown: itself when it is one, otherwise as the window's content.</summary>
|
||||
/// <summary>
|
||||
/// A surface hosted as the App shows it, in a window that is never shown: a window as itself; a page in WPF UI's
|
||||
/// <c>NavigationViewContentPresenter</c>, the shell's Frame — which passes no inherited value into the page, the text
|
||||
/// colour included (beta.18; until then pages sat straight in the window here, and their black titles inherited the
|
||||
/// window's colour in this check only); anything else as the window's content.
|
||||
/// </summary>
|
||||
private static (Window Host, FrameworkElement Root) Hosted(Func<FrameworkElement> build)
|
||||
{
|
||||
FrameworkElement built = build();
|
||||
@@ -149,6 +159,16 @@ public sealed partial class PagesLoadTests
|
||||
return (window, (FrameworkElement)window.Content);
|
||||
}
|
||||
|
||||
if (built is Page page)
|
||||
{
|
||||
var frame = new Wpf.Ui.Controls.NavigationViewContentPresenter();
|
||||
var shell = new Wpf.Ui.Controls.FluentWindow { Content = frame };
|
||||
Lay(frame);
|
||||
_ = frame.Navigate(page);
|
||||
Visuals.Pump();
|
||||
return (shell, frame);
|
||||
}
|
||||
|
||||
// A FluentWindow, as the shell is: its style gives the inherited text colour by theme resource too.
|
||||
var host = new Wpf.Ui.Controls.FluentWindow { Content = built };
|
||||
return (host, built);
|
||||
@@ -156,28 +176,34 @@ public sealed partial class PagesLoadTests
|
||||
|
||||
private static void Lay(FrameworkElement root) => Visuals.Layout(root, 1200, 900);
|
||||
|
||||
/// <summary>Every TextBlock under <paramref name="root"/> in visual-tree order: where it is, what it says, the colour it is drawn in.</summary>
|
||||
private static List<(string Path, string Text, string Colour)> Texts(DependencyObject root)
|
||||
/// <summary>
|
||||
/// Every TextBlock under <paramref name="root"/> in visual-tree order: where it is, what it says, the colour it is drawn
|
||||
/// in, and whether it shows — nothing above it collapsed or hidden.
|
||||
/// </summary>
|
||||
private static List<DrawnText> Texts(DependencyObject root)
|
||||
{
|
||||
var found = new List<(string, string, string)>();
|
||||
Walk(root, root.GetType().Name, found);
|
||||
var found = new List<DrawnText>();
|
||||
Walk(root, root.GetType().Name, shown: true, found);
|
||||
return found;
|
||||
}
|
||||
|
||||
private static void Walk(DependencyObject node, string path, List<(string, string, string)> found)
|
||||
private static void Walk(DependencyObject node, string path, bool shown, List<DrawnText> found)
|
||||
{
|
||||
shown &= node is not UIElement { Visibility: not Visibility.Visible };
|
||||
if (node is TextBlock text)
|
||||
{
|
||||
found.Add((path, text.Text, text.Foreground is SolidColorBrush solid ? solid.Color.ToString(CultureInfo.InvariantCulture) : text.Foreground?.ToString(CultureInfo.InvariantCulture) ?? "null"));
|
||||
found.Add(new DrawnText(path, text.Text, text.Foreground is SolidColorBrush solid ? solid.Color.ToString(CultureInfo.InvariantCulture) : text.Foreground?.ToString(CultureInfo.InvariantCulture) ?? "null", shown));
|
||||
}
|
||||
|
||||
int count = VisualTreeHelper.GetChildrenCount(node);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
DependencyObject child = VisualTreeHelper.GetChild(node, i);
|
||||
Walk(child, string.Create(CultureInfo.InvariantCulture, $"{path}/{child.GetType().Name}[{i}]"), found);
|
||||
Walk(child, string.Create(CultureInfo.InvariantCulture, $"{path}/{child.GetType().Name}[{i}]"), shown, found);
|
||||
}
|
||||
}
|
||||
|
||||
private readonly record struct DrawnText(string Path, string Text, string Colour, bool Shown);
|
||||
|
||||
private static Color Solid(Brush brush) => brush is SolidColorBrush solid ? solid.Color : throw new InvalidOperationException("a text whose foreground is not a solid colour");
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public sealed class ReasonTextTests
|
||||
|
||||
var link = new FakeAgentLink();
|
||||
using var notices = new SafetyNotices(link, new RecordingStrip());
|
||||
link.Raise(IpcMessageType.CaptureRefused, new CaptureRefusedEvent(7, "Title", "PreScanFailed", null, "the folder could not be listed"));
|
||||
link.Raise(IpcMessageType.CaptureRefused, new CaptureRefusedEvent(7, "Title", "RefusedByGuard", null, "the folder could not be listed", GuardReason: "PreScanFailed"));
|
||||
notices.Items.Should().ContainSingle().Which.Body.Should().StartWith("The anti-cheat guard did not hook this game: the game's folder could not be scanned.")
|
||||
.And.NotContain("detected");
|
||||
new HookingConsentResult(HookingConsentOutcome.Refused, Refusal: new RefusedAck(7, "ProcessUnreadable", null, "Access is denied")).RefusalText()
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Pages;
|
||||
using FrameLedger.App.Services;
|
||||
|
||||
namespace FrameLedger.App.Tests;
|
||||
@@ -128,4 +130,181 @@ public sealed class ScrollBarHidingTests
|
||||
result.FirstAfterOff.Should().Be(ScrollBarVisibility.Auto, "and gives it back its own setting on its next load after off");
|
||||
result.LoadedAfterOff.Should().Be(ScrollBarVisibility.Visible, "a scroller the option never touched keeps what it has");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.17 (the owner's screenshot of 2026-10-07: the Dashboard kept its bar with the option on). WPF raises Loaded only on
|
||||
/// an element whose subtree listens for it with a handler of its own — an instance handler, a style's EventSetter or a
|
||||
/// template's trigger (<c>BroadcastEventHelper</c>, <c>FrameworkElement.ThisHasLoadedChangeEventHandler</c>) — and a
|
||||
/// class handler is none of those, so a scroller over plain cards and text never loaded as far as the option knew. Laid
|
||||
/// out with no Loaded at all, a scroller must be hidden all the same.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task AScrollerLaidOutWithNoLoadedEventIsHidden()
|
||||
{
|
||||
(ScrollBarVisibility Axis, Visibility Bar, double Scrollable) result = await PagesLoadTests.OnStaAsync(() =>
|
||||
{
|
||||
ScrollBarHiding.Register();
|
||||
try
|
||||
{
|
||||
ScrollBarHiding.Apply(true);
|
||||
var viewer = new ScrollViewer { Height = 120, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Content = new Border { Height = 600 } };
|
||||
Visuals.Layout(viewer, 300, 120);
|
||||
return (viewer.VerticalScrollBarVisibility, viewer.ComputedVerticalScrollBarVisibility, viewer.ScrollableHeight);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ScrollBarHiding.Apply(false);
|
||||
}
|
||||
});
|
||||
|
||||
result.Scrollable.Should().BeGreaterThan(0, "the scroller has something to scroll");
|
||||
result.Axis.Should().Be(ScrollBarVisibility.Hidden, "the option reaches a scroller when it is laid out, Loaded or not");
|
||||
result.Bar.Should().NotBe(Visibility.Visible);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The option as the owner has it: on at start-up (<c>App.RunAsync</c> applies it before the first window), then every
|
||||
/// surface shown in a real window off the screen — each page navigated in WPF UI's presenter as the shell does, the
|
||||
/// secondary windows, the first run, every dialog's content. No scroller that has something to scroll draws a bar. Before
|
||||
/// beta.17 Settings passed (its toggle switches' template has a Loaded trigger, so its scroller loaded) and the Dashboard
|
||||
/// did not; Settings and the Dashboard must both be scrollable here, or the check proves nothing.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task EverySurfaceShownWithTheOptionOnDrawsNoBar()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
using PagesLoadTests.Surfaces surfaces = await PagesLoadTests.Surfaces.LoadAsync(s);
|
||||
|
||||
(List<string> Bars, HashSet<string> Scrollable) result = await PagesLoadTests.OnStaAsync(() =>
|
||||
{
|
||||
ScrollBarHiding.Register();
|
||||
ScrollBarHiding.Apply(true);
|
||||
try
|
||||
{
|
||||
var bars = new List<string>();
|
||||
var scrollable = new HashSet<string>(StringComparer.Ordinal);
|
||||
foreach ((string name, Func<FrameworkElement> build) in surfaces.Pages())
|
||||
{
|
||||
Sweep(name, () => InPresenter(build()), bars, scrollable);
|
||||
}
|
||||
|
||||
foreach ((string name, Func<FrameworkElement> build) in surfaces.Windows().Concat(surfaces.Dialogs()))
|
||||
{
|
||||
Sweep(name, build, bars, scrollable);
|
||||
}
|
||||
|
||||
return (bars, scrollable);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ScrollBarHiding.Apply(false);
|
||||
}
|
||||
});
|
||||
|
||||
result.Scrollable.Should().Contain(["Dashboard", "Settings", "Logs", "User guide"], "the check is vacuous unless those scroll in a window this small");
|
||||
string.Join(Environment.NewLine, result.Bars).Should().BeEmpty("ui.hide_scrollbars: no scroller the App shows draws a bar, and the wheel still scrolls it");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The harness against WPF itself: a scroller of our own with a Loaded class handler, shown in a real window, is never
|
||||
/// called while it holds only a Border, and is called once it holds a CheckBox, whose template listens for Loaded. If the
|
||||
/// first half fails, WPF raises Loaded everywhere and the reason above is gone; if the second fails, the harness does not
|
||||
/// deliver Loaded and <see cref="EverySurfaceShownWithTheOptionOnDrawsNoBar"/> could not tell Settings from the Dashboard.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task WpfRaisesLoadedOnlyWhereASubtreeListensForIt()
|
||||
{
|
||||
(int WithBorder, int WithCheckBox) loads = await PagesLoadTests.OnStaAsync(() =>
|
||||
(LoadsOfAProbeHolding(new Border { Height = 40 }), LoadsOfAProbeHolding(new CheckBox { Content = "listens" })));
|
||||
|
||||
loads.WithBorder.Should().Be(0, "a class handler does not put an element on WPF's Loaded route");
|
||||
loads.WithCheckBox.Should().BeGreaterThan(0, "WPF UI's CheckBox template has a Loaded trigger, which does");
|
||||
}
|
||||
|
||||
private sealed class ProbeScrollViewer : ScrollViewer
|
||||
{
|
||||
static ProbeScrollViewer() => EventManager.RegisterClassHandler(typeof(ProbeScrollViewer), LoadedEvent, new RoutedEventHandler(static (_, _) => Loads++), handledEventsToo: true);
|
||||
|
||||
public static int Loads { get; private set; }
|
||||
}
|
||||
|
||||
private static int LoadsOfAProbeHolding(UIElement content)
|
||||
{
|
||||
var probe = new ProbeScrollViewer { Content = content };
|
||||
int before = ProbeScrollViewer.Loads;
|
||||
Window window = OffScreen(new Window { Content = probe });
|
||||
try
|
||||
{
|
||||
window.Show();
|
||||
Visuals.Pump();
|
||||
return ProbeScrollViewer.Loads - before;
|
||||
}
|
||||
finally
|
||||
{
|
||||
window.Close();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A page navigated in WPF UI's presenter, as the shell's NavigationView hosts it.</summary>
|
||||
private static Grid InPresenter(FrameworkElement page)
|
||||
{
|
||||
var presenter = new Wpf.Ui.Controls.NavigationViewContentPresenter();
|
||||
_ = presenter.Navigate(page);
|
||||
return new Grid { Children = { presenter } };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the surface in a real window off the screen, lets WPF load and lay it out, and notes every scroller that has
|
||||
/// something to scroll and every one of those that draws a bar.
|
||||
/// </summary>
|
||||
private static void Sweep(string name, Func<FrameworkElement> build, List<string> bars, HashSet<string> scrollable)
|
||||
{
|
||||
FrameworkElement built = build();
|
||||
Window window = OffScreen(built as Window ?? new Window { Content = built });
|
||||
try
|
||||
{
|
||||
window.Show();
|
||||
Visuals.Pump();
|
||||
if (Visuals.Find<LogsPage>(window) is { } logs)
|
||||
{
|
||||
// The tail is empty in a scratch folder; fill it as a log file would.
|
||||
logs.Tail.Text = string.Join(Environment.NewLine, Enumerable.Range(1, 200).Select(static i => "line " + i.ToString(CultureInfo.InvariantCulture)));
|
||||
Visuals.Pump();
|
||||
}
|
||||
|
||||
foreach (ScrollViewer viewer in Visuals.FindAll<ScrollViewer>(window))
|
||||
{
|
||||
bool vertical = viewer.ScrollableHeight > 0.5;
|
||||
bool horizontal = viewer.ScrollableWidth > 0.5;
|
||||
if (vertical || horizontal)
|
||||
{
|
||||
_ = scrollable.Add(name);
|
||||
}
|
||||
|
||||
if ((vertical && viewer.ComputedVerticalScrollBarVisibility == Visibility.Visible)
|
||||
|| (horizontal && viewer.ComputedHorizontalScrollBarVisibility == Visibility.Visible))
|
||||
{
|
||||
bars.Add(string.Create(CultureInfo.InvariantCulture,
|
||||
$"{name}: {(viewer.TemplatedParent ?? viewer).GetType().Name} draws a bar ({viewer.ScrollableWidth:0} x {viewer.ScrollableHeight:0} to scroll)"));
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
window.Close();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A window shown where nobody sees it and never activated, small enough that the surfaces overflow it.</summary>
|
||||
private static Window OffScreen(Window window)
|
||||
{
|
||||
window.Width = 1000;
|
||||
window.Height = 420;
|
||||
window.WindowStartupLocation = WindowStartupLocation.Manual;
|
||||
window.Left = -20000;
|
||||
window.Top = -20000;
|
||||
window.ShowActivated = false;
|
||||
window.ShowInTaskbar = false;
|
||||
return window;
|
||||
}
|
||||
}
|
||||
@@ -300,8 +300,12 @@ public sealed class SettingsViewModelTests
|
||||
h.Vm.ExceptionsSuspended.Should().BeTrue();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The strip says when it applies (beta.18): turned on, a measured session stops at its next safety scan — not "at the next
|
||||
/// session start", which it said until then — and turned off, per-game settings decide from the next session start.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task TheKillSwitchIsOneSettingsRowAndTheAgentIsToldWhenItReadsIt()
|
||||
public async Task TheKillSwitchIsOneSettingsRowAndTheStripSaysWhenItApplies()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
Harness h = await OpenAsync(s);
|
||||
@@ -312,7 +316,14 @@ public sealed class SettingsViewModelTests
|
||||
|
||||
(await h.Settings.GetBooleanAsync(SettingsRegistry.HookingKillSwitch, Ct)).Should().BeTrue();
|
||||
h.Vm.KillSwitchState.Should().Be(Strings.Settings_KillSwitch_On);
|
||||
h.Strip.Shown.Should().ContainSingle().Which.Body.Should().Be(Strings.Settings_Applied, "hooking.kill_switch is an Agent-read key (D16)");
|
||||
h.Strip.Shown.Should().ContainSingle().Which.Body.Should().Be(Strings.Settings_KillSwitch_Applied_On, "a measured session stops at its next safety scan");
|
||||
new Application.Capture.CaptureOptions().ScanInterval.Should().Be(TimeSpan.FromSeconds(30), "the strip says within 30 seconds");
|
||||
|
||||
h.Vm.KillSwitch = false;
|
||||
Task off = h.Vm.Pending;
|
||||
await off;
|
||||
|
||||
h.Strip.Shown.Should().HaveCount(2).And.Subject.Last().Body.Should().Be(Strings.Settings_Applied, "hooking.kill_switch is an Agent-read key (D16)");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -458,7 +469,7 @@ public sealed class SettingsViewModelTests
|
||||
await h.Vm.HookedGames[0].RevokeCommand.ExecuteAsync(null);
|
||||
|
||||
h.Vm.HookedGames.Should().ContainSingle();
|
||||
h.Strip.Shown.Should().ContainSingle().Which.Body.Should().Be(Shared.Strings.Safety_Consent_AgentUnavailable);
|
||||
h.Strip.Shown.Should().ContainSingle().Which.Body.Should().Be(Strings.Agent_NotConnected_NothingChanged, "turning off changed nothing; \"Nothing was enabled.\" was the enable path's words");
|
||||
h.Vm.ElevationText.Should().Be(Strings.Settings_VkLayer_Unknown, "no HelloAck, no claim");
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Xml.Linq;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Services;
|
||||
using FrameLedger.App.Update;
|
||||
using FrameLedger.Application.Settings;
|
||||
using FrameLedger.Shared.Ipc;
|
||||
using FrameLedger.Shared.Safety;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
@@ -111,6 +112,7 @@ public sealed class ViewerModeTests
|
||||
[InlineData("Pages/SettingsPage.xaml", "IsChecked", "RunElevated, Mode=TwoWay")]
|
||||
[InlineData("Pages/SettingsPage.xaml", "IsChecked", "StartWithWindows, Mode=TwoWay")]
|
||||
[InlineData("Pages/SettingsPage.xaml", "IsChecked", "AutoCheckUpdates, Mode=TwoWay")]
|
||||
[InlineData("Pages/SettingsPage.xaml", "SelectedValue", "UpdateChannel, Mode=TwoWay")]
|
||||
[InlineData("Pages/SettingsPage.xaml", "ItemsSource", "ExceptionGames")]
|
||||
public void EveryControlThatAsksTheAgentOrChangesThisPcIsOffInAViewer(string file, string attribute, string binding)
|
||||
{
|
||||
@@ -122,4 +124,32 @@ public sealed class ViewerModeTests
|
||||
|
||||
((string?)control.Attribute("IsEnabled")).Should().Be("{Binding ViewModel.ActsOnThisPc}", $"{file}: {binding}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.18: every setting the Agent reads is off in a viewer, which has no Agent — the exception option and the three
|
||||
/// Recording numbers stayed live, and a change said "Applied. The capture agent reads it at the next session start." The
|
||||
/// registry says which settings the Agent reads, so a new one without its control here turns this red.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void EverySettingTheAgentReadsIsOffInAViewer()
|
||||
{
|
||||
Dictionary<string, (string Attribute, string Binding)> controls = new(StringComparer.Ordinal)
|
||||
{
|
||||
[SettingsRegistry.HookingKillSwitch.Key] = ("IsChecked", "KillSwitch, Mode=TwoWay"),
|
||||
[SettingsRegistry.HookingUserModeExceptions.Key] = ("IsChecked", "UserModeExceptions, Mode=TwoWay"),
|
||||
[SettingsRegistry.CaptureRunElevated.Key] = ("IsChecked", "RunElevated, Mode=TwoWay"),
|
||||
[SettingsRegistry.CaptureMinSessionSeconds.Key] = ("Value", "MinSessionSeconds, Mode=TwoWay"),
|
||||
[SettingsRegistry.TelemetryIntervalMs.Key] = ("Value", "TelemetryIntervalMs, Mode=TwoWay"),
|
||||
[SettingsRegistry.RetentionRawSessionsPerGame.Key] = ("Value", "RetentionRawSessions, Mode=TwoWay"),
|
||||
};
|
||||
XDocument xaml = AccessibilityTests.AppXaml().Single(static x => string.Equals(x.File, Path.Combine("Pages", "SettingsPage.xaml"), StringComparison.Ordinal)).Xaml;
|
||||
|
||||
List<string> live = [.. controls
|
||||
.Select(c => (Key: c.Key, Control: xaml.Descendants().Single(e => string.Equals((string?)e.Attribute(c.Value.Attribute), "{Binding ViewModel." + c.Value.Binding + "}", StringComparison.Ordinal))))
|
||||
.Where(static c => !string.Equals((string?)c.Control.Attribute("IsEnabled"), "{Binding ViewModel.ActsOnThisPc}", StringComparison.Ordinal))
|
||||
.Select(static c => c.Key)];
|
||||
|
||||
SettingsRegistry.All.Where(static d => d.AgentReads).Select(static d => d.Key).Should().BeEquivalentTo(controls.Keys, "every setting the Agent reads has its control named here");
|
||||
string.Join(", ", live).Should().BeEmpty("a viewer has no Agent to read them");
|
||||
}
|
||||
}
|
||||
@@ -76,14 +76,31 @@ internal static class Visuals
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs <paramref name="work"/> with the App's theme dictionary swapped for <paramref name="theme"/>, and puts Dark back:
|
||||
/// elements made inside take the theme's resources when they are created.
|
||||
/// Windows' default accent. The App derives its accent resources from the system's at each theme switch; the checks
|
||||
/// derive them from this one colour, so a result does not depend on the machine's personalisation.
|
||||
/// </summary>
|
||||
public static readonly Color DefaultAccent = Color.FromRgb(0x00, 0x78, 0xD4);
|
||||
|
||||
/// <summary>
|
||||
/// Runs <paramref name="work"/> under <paramref name="theme"/> the way the App switches (<c>WpfThemeApplier</c> →
|
||||
/// <c>ApplicationThemeManager.Apply(theme, …, updateAccent: true)</c>): the accent resources derived for the theme from
|
||||
/// <see cref="DefaultAccent"/>, then the theme dictionary swapped. Afterwards the dictionary and the application's own
|
||||
/// resources are put back as they were, so no other check inherits this one's theme. Elements made inside take the
|
||||
/// theme's resources when they are created; elements made before it hear the change, as a shown window does.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The accent is not in the theme dictionaries (WPF UI 4.3.0 writes it into <c>Application.Resources</c>), and the
|
||||
/// test application's only accent is <c>Accent.xaml</c>'s default, the dark theme's: before 2026-10-07 a check under
|
||||
/// Light measured a link in the dark theme's light blue on the light window, 1.9:1, a colour the App never shows.
|
||||
/// </remarks>
|
||||
public static T UnderTheme<T>(ApplicationTheme theme, Func<T> work)
|
||||
{
|
||||
System.Collections.ObjectModel.Collection<ResourceDictionary> merged = System.Windows.Application.Current.Resources.MergedDictionaries;
|
||||
ResourceDictionary resources = System.Windows.Application.Current.Resources;
|
||||
System.Collections.ObjectModel.Collection<ResourceDictionary> merged = resources.MergedDictionaries;
|
||||
int index = merged.ToList().FindIndex(static d => d is ThemesDictionary);
|
||||
ResourceDictionary original = merged[index];
|
||||
Dictionary<object, object> own = resources.Keys.Cast<object>().ToDictionary(static k => k, k => resources[k]);
|
||||
ApplicationAccentColorManager.Apply(DefaultAccent, theme);
|
||||
merged[index] = new ThemesDictionary { Theme = theme };
|
||||
try
|
||||
{
|
||||
@@ -92,6 +109,15 @@ internal static class Visuals
|
||||
finally
|
||||
{
|
||||
merged[index] = original;
|
||||
foreach (object added in resources.Keys.Cast<object>().Where(k => !own.ContainsKey(k)).ToList())
|
||||
{
|
||||
resources.Remove(added);
|
||||
}
|
||||
|
||||
foreach ((object key, object value) in own.Where(kv => !ReferenceEquals(resources[kv.Key], kv.Value)))
|
||||
{
|
||||
resources[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -162,26 +162,33 @@ public sealed class RecordedSessionEventsTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// §S23-3 (beta.13): the events carry the guard's own reason when it named a family, so the App can say a service or a
|
||||
/// driver was found on the PC — and nothing when the guard named nothing (the kill switch, a block already on the row).
|
||||
/// The events carry the guard's own reason whenever it refused: beside a family since §S23-3 (beta.13), so the App can say
|
||||
/// a service or a driver was found on the PC, and beside none since beta.18, so a refusal no family names is said in the
|
||||
/// guard's words — not as the end's name, "reason RefusedByGuard", nor its signal as a finding. Nothing when no verdict
|
||||
/// refused (a process that could not be opened is the loop's, not the guard's).
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BothSafetyEventsCarryTheGuardsReasonWhenItNamedAFamily()
|
||||
public void BothSafetyEventsCarryTheGuardsReasonWheneverItRefused()
|
||||
{
|
||||
var pipe = new RecordingPublisher();
|
||||
RecordedSession service = Session(SessionEndReason.RefusedByGuard, ExitStatus.Normal, new FinalizeOutcome(FinalizeStatus.Discarded, null, 0),
|
||||
verdict: AntiCheatVerdict.Refused(AntiCheatRefusalReason.BlockedService, "Easy Anti-Cheat", "EasyAntiCheat_EOS"), tier: CaptureTier.NotHooked);
|
||||
RecordedSession wow64 = Session(SessionEndReason.RefusedByGuard, ExitStatus.Normal, new FinalizeOutcome(FinalizeStatus.Discarded, null, 0),
|
||||
verdict: AntiCheatVerdict.FromNative((int)AntiCheatRefusalReason.TargetIsWow64, string.Empty, "target is a WOW64 process"), tier: CaptureTier.NotHooked);
|
||||
RecordedSession unreadable = Session(SessionEndReason.TargetUnreadable, ExitStatus.Normal, new FinalizeOutcome(FinalizeStatus.Discarded, null, 0),
|
||||
tier: CaptureTier.NotHooked);
|
||||
RecordedSession driver = Session(SessionEndReason.SafetyUnhook, ExitStatus.UnhookedSafety, new FinalizeOutcome(FinalizeStatus.Saved, 9, 0),
|
||||
verdict: AntiCheatVerdict.Refused(AntiCheatRefusalReason.BlockedDriver, "Riot Vanguard", "vgk.sys"));
|
||||
RecordedSession killSwitch = Session(SessionEndReason.RefusedKillSwitch, ExitStatus.Normal, new FinalizeOutcome(FinalizeStatus.Discarded, null, 0),
|
||||
tier: CaptureTier.NotHooked);
|
||||
RecordedSession rescan = Session(SessionEndReason.SafetyUnhook, ExitStatus.UnhookedSafety, new FinalizeOutcome(FinalizeStatus.Saved, 10, 0),
|
||||
verdict: AntiCheatVerdict.FromNative((int)AntiCheatRefusalReason.ProcessUnreadable, string.Empty, "Access is denied."));
|
||||
|
||||
RecordedSessionEvents.PublishAll(pipe, service, _info);
|
||||
RecordedSessionEvents.PublishAll(pipe, driver, _info);
|
||||
RecordedSessionEvents.PublishAll(pipe, killSwitch, _info);
|
||||
foreach (RecordedSession session in new[] { service, wow64, unreadable, driver, rescan })
|
||||
{
|
||||
RecordedSessionEvents.PublishAll(pipe, session, _info);
|
||||
}
|
||||
|
||||
pipe.Of<CaptureRefusedEvent>().Select(static e => e.GuardReason).Should().Equal("BlockedService", null);
|
||||
pipe.Of<SafetyUnhookEvent>().Single().GuardReason.Should().Be("BlockedDriver");
|
||||
pipe.Of<CaptureRefusedEvent>().Select(static e => e.GuardReason).Should().Equal("BlockedService", "TargetIsWow64", null);
|
||||
pipe.Of<SafetyUnhookEvent>().Select(static e => e.GuardReason).Should().Equal("BlockedDriver", "ProcessUnreadable");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -39,11 +39,10 @@ namespace FrameLedger.CaptureHost.Tests;
|
||||
/// machine, so the record's path is pinned too.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Category=Integration, and CI will not run it.</b> §S19(b): the guard refuses a
|
||||
/// .NET test host that has loaded a <c>protect</c>-matching module, measured on CI.
|
||||
/// On this dev box the guard allows it, so these are dev-box-reproducible and
|
||||
/// merge-gate-absent — the same split <c>ShmDrainIntegrationTests</c> lives with, and
|
||||
/// stated rather than implied.
|
||||
/// <b>Category=Integration — and CI runs it.</b> This paragraph said CI would not (corrected 2026-10-07): §S19(b), the
|
||||
/// guard refusing a .NET test host that had loaded a <c>protect</c>-matching module, was answered on 2026-09-06 by the
|
||||
/// signer check, and <c>./build.ps1 check</c> runs the Integration category on CI since (<c>13_CI_CD</c> §ci.yml). A green
|
||||
/// CI is evidence for this suite, and a race in it fails a merge: two did on 2026-10-07 (the two cases below that say so).
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Trait("Category", "Integration")]
|
||||
@@ -454,13 +453,26 @@ public sealed class CaptureHostEndToEndTests : IDisposable
|
||||
// P1 item 3, from OUTSIDE the process: the host launches the harness in its Vulkan mode with the
|
||||
// layer's environment, the guard passes and injects nothing (TargetIsVulkanLayered), and the
|
||||
// records come from the layer's ring. Skipped honestly where there is no Vulkan loader or no
|
||||
// presentable device -- the harness says so with exit 77, which the session reports as
|
||||
// LaunchTargetExited before any ring existed.
|
||||
// presentable device -- the harness says so itself, with exit 77 and a "[SKIP]" line.
|
||||
if (!File.Exists(Path.Combine(Environment.SystemDirectory, "vulkan-1.dll")))
|
||||
{
|
||||
Assert.Skip("no Vulkan loader on this machine");
|
||||
}
|
||||
|
||||
// ASKED BEFORE THE HOST RUNS, of the harness itself (beta.18). This used to be read off the host's run: its output
|
||||
// for the harness's "[SKIP]" line, or the session's LaunchTargetExited. Neither holds on a hosted runner, which has
|
||||
// the loader and no device. The runner is elevated, so the host starts the harness through CreateProcessWithTokenW
|
||||
// (UnelevatedProcess), which hands the child no stdout -- the line never reached the host's output -- and the
|
||||
// harness's exit races the guard's poll: #288's CI run scanned it while it died and ended RefusedByGuard
|
||||
// (ModuleScanFailed, "a module list came back incomplete"), failing where it should have skipped. Run directly, the
|
||||
// harness's own output and exit code are this test's; and once it HAS presented here, every failure below is real.
|
||||
(int probeExit, string probeOutput) = await ProbeVulkanAsync();
|
||||
if (probeExit == 77)
|
||||
{
|
||||
Assert.Skip("the harness found no presentable Vulkan device on this machine: " + probeOutput);
|
||||
}
|
||||
|
||||
probeExit.Should().Be(0, "the harness presents through Vulkan on this machine, or says why it cannot: " + probeOutput);
|
||||
(await GrantConsentAsync()).Should().Be(ConsentWriteOutcome.Written);
|
||||
|
||||
using Process host = StartHost("launch", "--exe", ConsentedExecutable, "--args", "--vulkan --hold-presenting 8",
|
||||
@@ -470,16 +482,6 @@ public sealed class CaptureHostEndToEndTests : IDisposable
|
||||
await host.WaitForExitAsync(TestContext.Current.CancellationToken);
|
||||
stdout += "\n---- stderr ----\n" + await stderrTask + $"\n---- exit {host.ExitCode} ----\n";
|
||||
|
||||
// The harness says so itself (exit 77, a "[SKIP]" line on the shared console) when this
|
||||
// machine has a loader but no device -- a hosted runner's shape. Its exit races the guard's
|
||||
// poll, so the session may read LaunchTargetExited or, if it died under the scan, whatever
|
||||
// the scan could not read; the harness's own line is the signal that does not race.
|
||||
if (stdout.Contains("[SKIP]", StringComparison.Ordinal)
|
||||
|| stdout.Contains(nameof(SessionEndReason.LaunchTargetExited), StringComparison.Ordinal))
|
||||
{
|
||||
Assert.Skip("the harness found no presentable Vulkan device on this machine: " + stdout);
|
||||
}
|
||||
|
||||
stdout.Should().Contain("vulkan layer: ", "the launch names the manifest it wrote and the enable-list entry");
|
||||
stdout.Should().Contain("capture side: the Vulkan implicit layer", stdout);
|
||||
stdout.Should().Contain("apiMask=0x8", "FL_API_VULKAN is bit 3; the ring is the layer's, not an Overlay's");
|
||||
@@ -487,6 +489,34 @@ public sealed class CaptureHostEndToEndTests : IDisposable
|
||||
host.ExitCode.Should().Be(0, stdout);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plain harness asked to present through Vulkan for a second, under its own name — never the consented copy, whose
|
||||
/// name the host resolves its target by — with its output and exit code read here: 77 and a "[SKIP]" line where this
|
||||
/// machine cannot, 0 where it can. Bounded: a driver that hangs is a failure to report, not a test that never ends.
|
||||
/// </summary>
|
||||
private static async Task<(int ExitCode, string Output)> ProbeVulkanAsync()
|
||||
{
|
||||
using var probe = Process.Start(new ProcessStartInfo(Harness, "--vulkan --hold-presenting 1")
|
||||
{
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardOutput = true,
|
||||
})!;
|
||||
using var bound = CancellationTokenSource.CreateLinkedTokenSource(TestContext.Current.CancellationToken);
|
||||
bound.CancelAfter(TimeSpan.FromSeconds(60));
|
||||
try
|
||||
{
|
||||
string output = await probe.StandardOutput.ReadToEndAsync(bound.Token).ConfigureAwait(false);
|
||||
await probe.WaitForExitAsync(bound.Token).ConfigureAwait(false);
|
||||
return (probe.ExitCode, output);
|
||||
}
|
||||
catch (OperationCanceledException e) when (!TestContext.Current.CancellationToken.IsCancellationRequested)
|
||||
{
|
||||
probe.Kill(entireProcessTree: true);
|
||||
throw new TimeoutException("hook-harness --vulkan --hold-presenting 1 did not end within 60 s", e);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task WhenTheTargetExitsTheHostStopsAndSaysWhy()
|
||||
{
|
||||
@@ -494,7 +524,11 @@ public sealed class CaptureHostEndToEndTests : IDisposable
|
||||
// DLL_PROCESS_DETACH teardown — so this can only come from the held process handle.
|
||||
(await GrantConsentAsync()).Should().Be(ConsentWriteOutcome.Written);
|
||||
|
||||
Process harness = StartHarness("--real --hold-presenting 6");
|
||||
// 15 s, not 6 (beta.18): the host resolves its target once, as it starts, and on a loaded runner a host that took
|
||||
// longer than the hold found the harness gone and ended TargetNotRunning — #286's first CI run, as on 2026-09-21
|
||||
// and before. The host prints nothing until its session ends, so there is no "attached" to wait for; the hold is
|
||||
// the margin, and the case's run time with it.
|
||||
Process harness = StartHarness("--real --hold-presenting 15");
|
||||
Process? host = null;
|
||||
try
|
||||
{
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
# Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
#Requires -Version 7.0
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Fails when a shipped native binary does not carry the release's build id, exactly.
|
||||
|
||||
.DESCRIPTION
|
||||
FL_BUILD_ID is `git describe` at CMake's configure (src/native/FrameLedger.Shm/CMakeLists.txt), compiled into the
|
||||
Overlay, the guard, the NVAPI bridge and the process-stats reader; the ring's handshake compares the Overlay's with the
|
||||
guard's, and the App shows the Overlay's as "Overlay build". release.yml wrote the release date into the tracked
|
||||
legal/*.md before the gate configured, so describe read the tree as dirty and every release until beta.18 shipped
|
||||
"<tag>-dirty" (the owner's Dashboard, 0.1.0-beta.16 and beta.17). The workflow now reads the id from the clean
|
||||
checkout, hands it to CMake as the environment's FL_BUILD_ID, and runs this over the published tree.
|
||||
|
||||
The id is looked for as the C string it is compiled as — its characters and the NUL after them — in each binary's
|
||||
bytes. Nothing is loaded: loading the Overlay would run its DllMain in this process.
|
||||
|
||||
.PARAMETER BuildDir
|
||||
The directory holding the native binaries (release.yml: out/app).
|
||||
|
||||
.PARAMETER Expected
|
||||
The id they must carry: describe of the clean checkout. One that marks a dirty tree is refused too.
|
||||
|
||||
.PARAMETER SelfTest
|
||||
Runs the fixture cases below, in a scratch directory, and exits 0 only if every one behaves.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string]$BuildDir,
|
||||
[string]$Expected,
|
||||
[switch]$SelfTest
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# The four that compile FL_BUILD_ID in (FrameLedger.Shm's INTERFACE define): FlGetBuildId, FlGuardBuildId, FlNvBuildId, FlPsBuildId.
|
||||
$binaries = 'FrameLedger.Overlay.dll', 'FrameLedger.Guard.dll', 'FrameLedger.NvapiBridge.dll', 'FrameLedger.ProcessStats.dll'
|
||||
|
||||
function Get-BuildIdProblem {
|
||||
param([string]$Directory, [string]$Id)
|
||||
|
||||
$problems = [System.Collections.Generic.List[string]]::new()
|
||||
# What describe can print, and what a C string literal carries without escaping (CMakeLists.txt checks the same).
|
||||
if ([string]::IsNullOrEmpty($Id) -or $Id -notmatch '^[0-9A-Za-z._+-]{1,31}$') {
|
||||
$problems.Add("the expected id '$Id' is not a build id (1 to 31 of [0-9A-Za-z._+-])")
|
||||
return , $problems.ToArray()
|
||||
}
|
||||
if ($Id.EndsWith('-dirty', [StringComparison]::Ordinal) -or $Id.EndsWith('+', [StringComparison]::Ordinal)) {
|
||||
$problems.Add("the expected id '$Id' marks a dirty tree; a release is built from a clean checkout")
|
||||
}
|
||||
# Latin-1 maps every byte to one char, so a byte search is an ordinal string search.
|
||||
$needle = $Id + [char]0
|
||||
foreach ($name in $binaries) {
|
||||
$path = Join-Path $Directory $name
|
||||
if (-not (Test-Path -LiteralPath $path -PathType Leaf)) {
|
||||
$problems.Add("$name is missing")
|
||||
continue
|
||||
}
|
||||
$text = [Text.Encoding]::Latin1.GetString([IO.File]::ReadAllBytes($path))
|
||||
if ($text.IndexOf($needle, [StringComparison]::Ordinal) -lt 0) {
|
||||
$problems.Add("$name does not carry '$Id'")
|
||||
}
|
||||
}
|
||||
return , $problems.ToArray()
|
||||
}
|
||||
|
||||
if ($SelfTest) {
|
||||
$root = Join-Path ([IO.Path]::GetTempPath()) ('fl-buildid-selftest-' + [guid]::NewGuid().ToString('N'))
|
||||
$id = 'v0.1.0-beta.18'
|
||||
$cases = @(
|
||||
@{ Name = 'every binary carries the id passes'; Expected = $id; Ids = @($id, $id, $id, $id); Bad = 0 },
|
||||
@{ Name = 'a commit id with no tag passes'; Expected = '15b4c6b1a2c3'; Ids = @('15b4c6b1a2c3', '15b4c6b1a2c3', '15b4c6b1a2c3', '15b4c6b1a2c3'); Bad = 0 },
|
||||
@{ Name = "the Overlay built from a dirty tree FAILS"; Expected = $id; Ids = @("$id-dirty", $id, $id, $id); Bad = 1 },
|
||||
@{ Name = "the short fallback's dirty mark FAILS"; Expected = $id; Ids = @($id, "$id+", $id, $id); Bad = 1 },
|
||||
@{ Name = 'a binary with no id at all FAILS'; Expected = $id; Ids = @($id, $id, 'unknown', $id); Bad = 1 },
|
||||
@{ Name = 'a missing binary FAILS'; Expected = $id; Ids = @($id, $id, $id, $null); Bad = 1 },
|
||||
@{ Name = 'an expected id that marks a dirty tree FAILS'; Expected = "$id-dirty"; Ids = @("$id-dirty", "$id-dirty", "$id-dirty", "$id-dirty"); Bad = 1 },
|
||||
@{ Name = 'an expected id no build has FAILS'; Expected = 'v0.1.0 "beta"'; Ids = @($id, $id, $id, $id); Bad = 1 }
|
||||
)
|
||||
$failed = 0
|
||||
try {
|
||||
$i = 0
|
||||
foreach ($c in $cases) {
|
||||
$i++
|
||||
$dir = Join-Path $root "case$i"
|
||||
New-Item -ItemType Directory -Path $dir -Force | Out-Null
|
||||
for ($b = 0; $b -lt $binaries.Count; $b++) {
|
||||
if ($null -eq $c.Ids[$b]) { continue }
|
||||
# A string among other bytes, as the linker leaves it in .rdata.
|
||||
$body = [Text.Encoding]::Latin1.GetBytes("MZ`0`0padding`0" + $c.Ids[$b] + "`0more`0")
|
||||
[IO.File]::WriteAllBytes((Join-Path $dir $binaries[$b]), $body)
|
||||
}
|
||||
$got = Get-BuildIdProblem -Directory $dir -Id $c.Expected
|
||||
$ok = ($got.Count -gt 0) -eq ($c.Bad -gt 0)
|
||||
Write-Host (" {0,-4} {1}" -f ($(if ($ok) { 'ok' } else { 'FAIL' })), $c.Name) -ForegroundColor ($(if ($ok) { 'DarkGray' } else { 'Red' }))
|
||||
if (-not $ok) { $failed++ }
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (Test-Path -LiteralPath $root) { Remove-Item -LiteralPath $root -Recurse -Force }
|
||||
}
|
||||
if ($failed -gt 0) { Write-Host "buildid-check self-test FAILED ($failed)" -ForegroundColor Red; exit 1 }
|
||||
Write-Host "buildid-check self-test: $($cases.Count) cases, both directions" -ForegroundColor Green
|
||||
exit 0
|
||||
}
|
||||
|
||||
if (-not $BuildDir) { throw 'buildid-check: -BuildDir is required (or -SelfTest)' }
|
||||
$problems = Get-BuildIdProblem -Directory $BuildDir -Id $Expected
|
||||
if ($problems.Count -gt 0) {
|
||||
$problems | ForEach-Object { Write-Host " $_" -ForegroundColor Red }
|
||||
Write-Host "buildid-check: the native binaries in $BuildDir do not all carry '$Expected' (src/native/FrameLedger.Shm/CMakeLists.txt, 12_BUILD)." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Write-Host "buildid-check: ok - $($binaries.Count) native binaries carry '$Expected'" -ForegroundColor Green
|
||||
exit 0
|
||||
@@ -0,0 +1,337 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
# Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
#Requires -Version 7.0
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Builds the GitHub Wiki from the repository - wiki/ (Home, the sidebar, the developer pages), guide/ (the user
|
||||
guide, which is the wiki's End-user part) and LIMITATIONS.md - and refuses a wiki with a link that leads nowhere.
|
||||
|
||||
.DESCRIPTION
|
||||
D53/D54 (the owner, 2026-10-07): the wiki's source lives in the repository and the Wiki tab is a copy of it, written
|
||||
by .github/workflows/wiki.yml when a release is published. The user guide is the End-user part: one source, shown
|
||||
in the App (Help > User guide) and on the wiki.
|
||||
|
||||
Assembling:
|
||||
- wiki/*.md keeps its file name, which GitHub turns into the page's title (Build-and-test.md: "Build and test").
|
||||
- A guide page becomes the page its first heading names (guide/README.md is User-guide, LIMITATIONS.md is
|
||||
Limitations). Every page's first heading is dropped: the wiki prints the page's name above it.
|
||||
- A link to one of those pages becomes the page's name; a link to any other file or folder of the repository
|
||||
becomes its address on GitHub at -Ref, the release being published; anchors are kept.
|
||||
- _Footer.md is written here, naming -Ref and where to edit.
|
||||
|
||||
Refused, each with a line, exit 1:
|
||||
- a link to a file or folder that does not exist, or to a section no heading of its page produces;
|
||||
- two sources that give one page name;
|
||||
- a page that neither Home nor the sidebar leads to;
|
||||
- a sidebar that lists the guide's pages in another order than guide/README.md does;
|
||||
- a path in backticks in a wiki/ page that names nothing in the repository;
|
||||
- a version number written in a wiki/ page (the footer is where the wiki says which release it shows).
|
||||
|
||||
-Check assembles into a temporary folder and only reports. -SelfTest proves every refusal, both ways, on copies.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string]$RepoRoot = (Split-Path $PSScriptRoot -Parent),
|
||||
[string]$Out,
|
||||
[string]$Ref = 'main',
|
||||
[switch]$Check,
|
||||
[switch]$SelfTest
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$repoUrl = 'https://github.com/poli0981/frameledger'
|
||||
$special = @{ 'guide/README.md' = 'User-guide'; 'LIMITATIONS.md' = 'Limitations' }
|
||||
$pathPrefixes = @('src/', 'docs/', 'tools/', 'tests/', 'guide/', 'legal/', 'wiki/', 'rules/', '.github/')
|
||||
$rootFiles = @('README.md', 'CLAUDE.md', 'CHANGELOG.md', 'LIMITATIONS.md', 'CONTRIBUTING.md', 'FORKING.md', 'SECURITY.md',
|
||||
'CODE_OF_CONDUCT.md', 'NOTICE', 'LICENSE', 'VERSION', 'build.ps1', 'global.json', 'FrameLedger.slnx', 'Directory.Build.props')
|
||||
|
||||
if ($Ref -notmatch '^[A-Za-z0-9][A-Za-z0-9._/-]*$') { throw "-Ref '$Ref' is not a branch, tag or commit name" }
|
||||
|
||||
# The anchor GitHub gives a heading: lower-case, letters, digits, '-' and '_' kept, a space a '-', the rest dropped
|
||||
# (MarkdownLinks.Slug in the App follows the same rule, so the guide's anchors work in both places).
|
||||
function Get-Slug([string]$Heading) {
|
||||
$sb = [System.Text.StringBuilder]::new()
|
||||
foreach ($c in $Heading.Trim().ToLowerInvariant().ToCharArray()) {
|
||||
if ([char]::IsLetterOrDigit($c) -or $c -eq '-' -or $c -eq '_') { [void]$sb.Append($c) }
|
||||
elseif ($c -eq ' ') { [void]$sb.Append('-') }
|
||||
}
|
||||
return $sb.ToString()
|
||||
}
|
||||
|
||||
# Lines outside fenced code blocks, each as @{ Index; Text }.
|
||||
function Get-ProseLines([string[]]$Lines) {
|
||||
$inFence = $false
|
||||
for ($i = 0; $i -lt $Lines.Count; $i++) {
|
||||
if ($Lines[$i] -match '^\s*(```|~~~)') { $inFence = -not $inFence; continue }
|
||||
if (-not $inFence) { [pscustomobject]@{ Index = $i; Text = $Lines[$i] } }
|
||||
}
|
||||
}
|
||||
|
||||
function Get-Anchors([string]$Text) {
|
||||
$anchors = [System.Collections.Generic.HashSet[string]]::new([StringComparer]::Ordinal)
|
||||
foreach ($line in Get-ProseLines (($Text -replace "`r`n", "`n") -split "`n")) {
|
||||
if ($line.Text -match '^\s{0,3}#{1,6}\s+(.+?)\s*#*\s*$') {
|
||||
$heading = [regex]::Replace($Matches[1], '\[([^\]]*)\]\([^)]*\)', '$1') -replace '[`*]', ''
|
||||
$slug = Get-Slug $heading
|
||||
if ($slug.Length -eq 0) { continue }
|
||||
$unique = $slug
|
||||
for ($n = 1; $anchors.Contains($unique); $n++) { $unique = "$slug-$n" }
|
||||
[void]$anchors.Add($unique)
|
||||
}
|
||||
}
|
||||
return , $anchors
|
||||
}
|
||||
|
||||
function Get-PageName([string]$Path, [string]$Text) {
|
||||
if ($special.ContainsKey($Path)) { return $special[$Path] }
|
||||
if ($Path.StartsWith('wiki/', [StringComparison]::Ordinal)) { return [IO.Path]::GetFileNameWithoutExtension($Path) }
|
||||
$h1 = @(($Text -replace "`r`n", "`n") -split "`n" | Where-Object { $_ -match '^# \S' }) | Select-Object -First 1
|
||||
if (-not $h1) { throw "$Path has no first heading to name its wiki page" }
|
||||
return (($h1.Substring(2).Trim() -replace '[^A-Za-z0-9]+', '-').Trim('-'))
|
||||
}
|
||||
|
||||
function Get-Sources([string]$SourceRoot) {
|
||||
$sources = [System.Collections.Generic.List[object]]::new()
|
||||
$add = {
|
||||
param([string]$Path, [string]$File)
|
||||
$text = [IO.File]::ReadAllText($File)
|
||||
$sources.Add([pscustomobject]@{ Path = $Path; Text = $text; Name = (Get-PageName $Path $text); FromWiki = $Path.StartsWith('wiki/', [StringComparison]::Ordinal) })
|
||||
}
|
||||
foreach ($f in Get-ChildItem (Join-Path $SourceRoot 'wiki') -Filter *.md -File | Sort-Object Name) { & $add "wiki/$($f.Name)" $f.FullName }
|
||||
foreach ($f in Get-ChildItem (Join-Path $SourceRoot 'guide') -Filter *.md -File | Sort-Object Name) { & $add "guide/$($f.Name)" $f.FullName }
|
||||
& $add 'LIMITATIONS.md' (Join-Path $SourceRoot 'LIMITATIONS.md')
|
||||
return , $sources
|
||||
}
|
||||
|
||||
# A link's target as a path from the repository root, or $null when it climbs out of it.
|
||||
function Resolve-RepoPath([string]$From, [string]$Link) {
|
||||
$parts = [System.Collections.Generic.List[string]]::new()
|
||||
$dir = [IO.Path]::GetDirectoryName($From) -replace '\\', '/'
|
||||
if ($dir) { foreach ($s in $dir -split '/') { $parts.Add($s) } }
|
||||
foreach ($seg in ($Link -split '/')) {
|
||||
if ($seg -eq '' -or $seg -eq '.') { continue }
|
||||
if ($seg -eq '..') {
|
||||
if ($parts.Count -eq 0) { return $null }
|
||||
$parts.RemoveAt($parts.Count - 1)
|
||||
continue
|
||||
}
|
||||
$parts.Add($seg)
|
||||
}
|
||||
return ($parts -join '/')
|
||||
}
|
||||
|
||||
# Every inline link of a page outside code: @{ Start; Length; Href }, in order.
|
||||
function Get-Links([string]$Text) {
|
||||
$lines = $Text -split "`n"
|
||||
$offsets = [int[]]::new($lines.Count)
|
||||
$at = 0
|
||||
for ($i = 0; $i -lt $lines.Count; $i++) { $offsets[$i] = $at; $at += $lines[$i].Length + 1 }
|
||||
foreach ($line in Get-ProseLines $lines) {
|
||||
foreach ($m in [regex]::Matches($line.Text, '(?<!!)\]\((?<href>[^)\s]+)(?:\s+"[^"]*")?\)')) {
|
||||
$g = $m.Groups['href']
|
||||
[pscustomobject]@{ Start = $offsets[$line.Index] + $g.Index; Length = $g.Length; Href = $g.Value }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Assembles the wiki in memory: @{ Pages = name -> text; Problems = string[] }.
|
||||
function Invoke-Assembly([string]$SourceRoot, [string]$Root, [string]$GitRef) {
|
||||
$problems = [System.Collections.Generic.List[string]]::new()
|
||||
$sources = Get-Sources $SourceRoot
|
||||
$byPath = @{}
|
||||
$byName = @{}
|
||||
foreach ($s in $sources) {
|
||||
$byPath[$s.Path] = $s
|
||||
if ($byName.ContainsKey($s.Name)) { $problems.Add("$($s.Path) and $($byName[$s.Name].Path) both make the page '$($s.Name)'") }
|
||||
else { $byName[$s.Name] = $s }
|
||||
}
|
||||
foreach ($req in 'Home', '_Sidebar') {
|
||||
if (-not $byName.ContainsKey($req)) { $problems.Add("wiki/$req.md is missing") }
|
||||
}
|
||||
|
||||
$anchorCache = @{}
|
||||
$anchorsOf = {
|
||||
param([string]$Path, [string]$Text)
|
||||
if (-not $anchorCache.ContainsKey($Path)) { $anchorCache[$Path] = Get-Anchors $Text }
|
||||
return , $anchorCache[$Path]
|
||||
}
|
||||
|
||||
$pages = [ordered]@{}
|
||||
$edges = @{}
|
||||
foreach ($s in $sources) {
|
||||
$text = $s.Text -replace "`r`n", "`n"
|
||||
$targets = [System.Collections.Generic.List[string]]::new()
|
||||
$links = @(Get-Links $text)
|
||||
$sb = [System.Text.StringBuilder]::new($text)
|
||||
for ($k = $links.Count - 1; $k -ge 0; $k--) {
|
||||
$link = $links[$k]
|
||||
$href = $link.Href
|
||||
if ($href -match '^(https?:|mailto:)') { continue }
|
||||
$hash = $href.IndexOf('#')
|
||||
$anchor = if ($hash -ge 0) { $href.Substring($hash + 1) } else { $null }
|
||||
$pathPart = if ($hash -ge 0) { $href.Substring(0, $hash) } else { $href }
|
||||
$new = $null
|
||||
if ($pathPart -eq '') {
|
||||
if (-not $anchor -or -not (& $anchorsOf $s.Path $s.Text).Contains($anchor.ToLowerInvariant())) { $problems.Add("$($s.Path): '$href' names no section of the page") }
|
||||
continue
|
||||
}
|
||||
$isDir = $pathPart.EndsWith('/')
|
||||
$target = Resolve-RepoPath $s.Path ([Uri]::UnescapeDataString($pathPart))
|
||||
if ($null -eq $target -or $target -eq '') { $problems.Add("$($s.Path): '$href' leaves the repository"); continue }
|
||||
if ($byPath.ContainsKey($target)) {
|
||||
$page = $byPath[$target]
|
||||
if ($anchor -and -not (& $anchorsOf $page.Path $page.Text).Contains($anchor.ToLowerInvariant())) { $problems.Add("$($s.Path): '$href' names no section of $target") }
|
||||
$new = $page.Name + $(if ($anchor) { "#$anchor" } else { '' })
|
||||
$targets.Add($page.Name)
|
||||
}
|
||||
else {
|
||||
$full = Join-Path $Root ($target -replace '/', [IO.Path]::DirectorySeparatorChar)
|
||||
$exists = if ($isDir) { Test-Path -LiteralPath $full -PathType Container } else { Test-Path -LiteralPath $full }
|
||||
if (-not $exists) { $problems.Add("$($s.Path): '$href' leads to $target, which does not exist"); continue }
|
||||
$folder = Test-Path -LiteralPath $full -PathType Container
|
||||
if ($anchor -and ($folder -or -not $target.EndsWith('.md') -or -not (& $anchorsOf $target ([IO.File]::ReadAllText($full))).Contains($anchor.ToLowerInvariant()))) {
|
||||
$problems.Add("$($s.Path): '$href' names no section of $target")
|
||||
}
|
||||
$kind = if ($folder) { 'tree' } else { 'blob' }
|
||||
$new = "$repoUrl/$kind/$GitRef/$($target.TrimEnd('/'))" + $(if ($anchor) { "#$anchor" } else { '' })
|
||||
}
|
||||
[void]$sb.Remove($link.Start, $link.Length).Insert($link.Start, $new)
|
||||
}
|
||||
|
||||
# The wiki prints the page's name as its title; the source's own first heading - kept for reading it in the
|
||||
# repository and, for a guide page, in the App - would repeat it.
|
||||
$converted = [regex]::Replace($sb.ToString(), '\A(?:<!--.*?-->\s*)*# [^\n]*\n(\s*\n)?', '', [Text.RegularExpressions.RegexOptions]::Singleline)
|
||||
if ($s.FromWiki) { Test-WikiSource $s $Root $problems }
|
||||
|
||||
$pages[$s.Name] = $converted
|
||||
$edges[$s.Name] = $targets
|
||||
}
|
||||
|
||||
Test-Reachable $edges $byName $problems
|
||||
Test-SidebarOrder $byPath $problems
|
||||
$pages['_Footer'] = "This wiki is generated from the repository at [``$GitRef``]($repoUrl/tree/$GitRef). Edit " +
|
||||
"[``wiki/``]($repoUrl/tree/main/wiki) or [``guide/``]($repoUrl/tree/main/guide) there: a change made here is " +
|
||||
"overwritten when the next release is published.`n"
|
||||
return [pscustomobject]@{ Pages = $pages; Problems = $problems.ToArray() }
|
||||
}
|
||||
|
||||
# A wiki/ page names only paths that exist, and no version number.
|
||||
function Test-WikiSource($Source, [string]$Root, $Problems) {
|
||||
foreach ($line in Get-ProseLines (($Source.Text -replace "`r`n", "`n") -split "`n")) {
|
||||
foreach ($m in [regex]::Matches($line.Text, '`([^`\s]+)`')) {
|
||||
$candidate = $m.Groups[1].Value.TrimEnd('.', ',', ';', ':')
|
||||
$isPath = ($pathPrefixes | Where-Object { $candidate.StartsWith($_, [StringComparison]::Ordinal) }) -or ($rootFiles -contains $candidate)
|
||||
if (-not $isPath -or $candidate -match '[*<>{}|?]') { continue }
|
||||
$full = Join-Path $Root ($candidate.TrimEnd('/') -replace '/', [IO.Path]::DirectorySeparatorChar)
|
||||
if (-not (Test-Path -LiteralPath $full)) { $Problems.Add("$($Source.Path): ``$candidate`` names nothing in the repository") }
|
||||
}
|
||||
if ($line.Text -match '\b\d+\.\d+\.\d+-(?:beta|rc|alpha)\.\d+\b') {
|
||||
$Problems.Add("$($Source.Path): '$($Matches[0])' - a wiki page names no version; the footer says which release it shows")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Test-Reachable($Edges, $ByName, $Problems) {
|
||||
$seen = [System.Collections.Generic.HashSet[string]]::new([StringComparer]::Ordinal)
|
||||
$queue = [System.Collections.Generic.Queue[string]]::new()
|
||||
foreach ($start in 'Home', '_Sidebar') { if ($ByName.ContainsKey($start) -and $seen.Add($start)) { $queue.Enqueue($start) } }
|
||||
while ($queue.Count -gt 0) {
|
||||
foreach ($next in $Edges[$queue.Dequeue()]) { if ($seen.Add($next)) { $queue.Enqueue($next) } }
|
||||
}
|
||||
foreach ($name in $ByName.Keys | Sort-Object) {
|
||||
if (-not $seen.Contains($name)) { $Problems.Add("$($ByName[$name].Path): no link from Home or the sidebar leads to '$name'") }
|
||||
}
|
||||
}
|
||||
|
||||
# The sidebar lists the guide's pages in the order of the guide's own contents.
|
||||
function Test-SidebarOrder($ByPath, $Problems) {
|
||||
if (-not $ByPath.ContainsKey('wiki/_Sidebar.md') -or -not $ByPath.ContainsKey('guide/README.md')) { return }
|
||||
$order = {
|
||||
param($Source)
|
||||
$paths = foreach ($l in Get-Links ($Source.Text -replace "`r`n", "`n")) {
|
||||
$hash = $l.Href.IndexOf('#')
|
||||
$p = Resolve-RepoPath $Source.Path ([Uri]::UnescapeDataString($(if ($hash -ge 0) { $l.Href.Substring(0, $hash) } else { $l.Href })))
|
||||
if ($p -and $p.StartsWith('guide/', [StringComparison]::Ordinal) -and $p -ne 'guide/README.md') { $p }
|
||||
}
|
||||
return @($paths | Select-Object -Unique)
|
||||
}
|
||||
$contents = & $order $ByPath['guide/README.md']
|
||||
$sidebar = & $order $ByPath['wiki/_Sidebar.md']
|
||||
if (($contents -join '|') -ne ($sidebar -join '|')) {
|
||||
$Problems.Add("wiki/_Sidebar.md lists the guide as [$($sidebar -join ', ')], guide/README.md as [$($contents -join ', ')]")
|
||||
}
|
||||
}
|
||||
|
||||
function Write-Wiki($Pages, [string]$Folder) {
|
||||
New-Item -ItemType Directory -Path $Folder -Force | Out-Null
|
||||
Get-ChildItem -LiteralPath $Folder -Force | Where-Object { $_.Name -ne '.git' } | Remove-Item -Recurse -Force
|
||||
$utf8 = [System.Text.UTF8Encoding]::new($false)
|
||||
foreach ($name in $Pages.Keys) {
|
||||
[IO.File]::WriteAllText((Join-Path $Folder "$name.md"), ($Pages[$name] -replace "`r`n", "`n"), $utf8)
|
||||
}
|
||||
}
|
||||
|
||||
if ($SelfTest) {
|
||||
$tmp = Join-Path ([IO.Path]::GetTempPath()) ('fl-wiki-' + [Guid]::NewGuid().ToString('N'))
|
||||
New-Item -ItemType Directory -Path $tmp | Out-Null
|
||||
try {
|
||||
Copy-Item (Join-Path $RepoRoot 'wiki') (Join-Path $tmp 'wiki') -Recurse
|
||||
Copy-Item (Join-Path $RepoRoot 'guide') (Join-Path $tmp 'guide') -Recurse
|
||||
Copy-Item (Join-Path $RepoRoot 'LIMITATIONS.md') $tmp
|
||||
$cases = 0
|
||||
$expect = {
|
||||
param([string]$What, [string]$Pattern)
|
||||
$p = @((Invoke-Assembly $tmp $RepoRoot $Ref).Problems)
|
||||
if ($Pattern -eq '') {
|
||||
if ($p.Count -ne 0) { throw "self-test: $What should pass, got: $($p -join '; ')" }
|
||||
}
|
||||
elseif ($p.Count -ne 1 -or $p[0] -notmatch $Pattern) { throw "self-test: $What should fail once matching '$Pattern', got: $($p -join '; ')" }
|
||||
$script:cases++
|
||||
}
|
||||
$mutate = {
|
||||
param([string]$Rel, [scriptblock]$Change, [string]$What, [string]$Pattern)
|
||||
$file = Join-Path $tmp $Rel
|
||||
$existed = Test-Path $file
|
||||
$orig = if ($existed) { [IO.File]::ReadAllText($file) } else { $null }
|
||||
[IO.File]::WriteAllText($file, (& $Change $orig))
|
||||
try { & $expect $What $Pattern }
|
||||
finally { if ($existed) { [IO.File]::WriteAllText($file, $orig) } else { Remove-Item $file } }
|
||||
}
|
||||
|
||||
& $expect 'the shipped sources' ''
|
||||
& $mutate 'wiki/Home.md' { param($t) $t + "`n[gone](../docs/NO_SUCH_FILE.md)`n" } 'a link to a missing file' 'NO_SUCH_FILE.*does not exist'
|
||||
& $mutate 'wiki/Home.md' { param($t) $t + "`n[gone](../guide/01-install.md#no-such-section)`n" } 'a link to a missing section' 'no-such-section.*names no section'
|
||||
& $mutate 'wiki/Home.md' { param($t) $t + "`n[out](../../outside.md)`n" } 'a link out of the repository' 'leaves the repository'
|
||||
& $mutate 'wiki/Limitations.md' { param($t) "Same name as LIMITATIONS.md.`n" } 'two sources for one page' "both make the page 'Limitations'"
|
||||
& $mutate 'wiki/Orphan.md' { param($t) "Nothing links here.`n" } 'a page nothing leads to' "leads to 'Orphan'"
|
||||
& $mutate 'wiki/_Sidebar.md' { param($t) ($t -replace '(?m)^- \[Questions and answers\]\(\.\./guide/06-faq\.md\)\r?\n', '') + "- [Questions and answers](../guide/06-faq.md)`n" } 'a sidebar out of the guide''s order' 'lists the guide as'
|
||||
& $mutate 'wiki/Home.md' { param($t) $t + "`nSee ``src/FrameLedger.App/NoSuchFile.cs``.`n" } 'a backticked path that names nothing' 'NoSuchFile\.cs.*names nothing'
|
||||
& $mutate 'wiki/Home.md' { param($t) $t + "`nSince 0.1.0-beta.99.`n" } 'a version number in a page' 'names no version'
|
||||
Write-Host "wiki-build self-test OK - $cases cases, both directions"
|
||||
}
|
||||
finally {
|
||||
Remove-Item $tmp -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
$result = Invoke-Assembly $RepoRoot $RepoRoot $Ref
|
||||
if ($result.Problems.Count -ne 0) {
|
||||
Write-Host 'WIKI CHECK FAILED:' -ForegroundColor Red
|
||||
foreach ($p in $result.Problems) { Write-Host " $p" -ForegroundColor Red }
|
||||
Write-Host ' The wiki is built from wiki/, guide/ and LIMITATIONS.md (docs/13_CI_CD.md, wiki.yml).' -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
if ($Check) {
|
||||
$tmp = Join-Path ([IO.Path]::GetTempPath()) ('fl-wiki-check-' + [Guid]::NewGuid().ToString('N'))
|
||||
try { Write-Wiki $result.Pages $tmp } finally { Remove-Item $tmp -Recurse -Force -ErrorAction SilentlyContinue }
|
||||
Write-Host "wiki-check OK - $($result.Pages.Count) pages, every link leads somewhere"
|
||||
exit 0
|
||||
}
|
||||
if (-not $Out) { $Out = Join-Path $RepoRoot 'out/wiki' }
|
||||
Write-Wiki $result.Pages $Out
|
||||
Write-Host "wiki-build OK - $($result.Pages.Count) pages written to $Out at $Ref"
|
||||
exit 0
|
||||
@@ -0,0 +1,51 @@
|
||||
# App UI development
|
||||
|
||||
The screens are specified, and described as built, in [`docs/08_UI.md`](../docs/08_UI.md); the rules for the UI library
|
||||
are [`docs/16_WPFUI_SYNTAX.md`](../docs/16_WPFUI_SYNTAX.md). The App is `src/FrameLedger.App`: WPF on .NET 10 with
|
||||
WPF UI 4.3.0 (pinned), CommunityToolkit.Mvvm, ScottPlot for charts and Markdig for documents.
|
||||
|
||||
## How it is put together
|
||||
|
||||
- A .NET Generic Host with dependency injection. Pages and their view models are transient — a page is made again on
|
||||
every navigation, so state lives in the view models' services and the database, never in a page.
|
||||
- Navigation goes only through WPF UI's `INavigationService`; a page implements `INavigableView<TViewModel>`.
|
||||
- The App opens `ledger.db` itself to read; anything that acts on the PC — hooking, deleting sessions, pausing — is a
|
||||
request to the agent over the pipe.
|
||||
- `FrameLedger.exe --data-dir <copy>` is a viewer: no agent, no update, the controls that would change the PC disabled.
|
||||
|
||||
## Strings
|
||||
|
||||
Every user-visible string comes from `.resx`, in English, Vietnamese and Japanese (`src/FrameLedger.App/Strings.resx`
|
||||
and its `.vi` and `.ja` siblings; the shared ones are in `src/FrameLedger.Shared`). `tools/resx-gen.ps1` writes the
|
||||
accessor class, and `tools/resx-audit.ps1` fails the build when a key is missing in a language. The safety texts in
|
||||
Japanese wait for a human reviewer, never a machine draft ([`docs/09_I18N.md`](../docs/09_I18N.md)).
|
||||
|
||||
## Colours and theme
|
||||
|
||||
Colours come only from WPF UI's theme brushes, by `DynamicResource` — never a hex value, never `StaticResource` for a
|
||||
theme brush. Muted text uses the App's `SecondaryText` and `TertiaryText` styles (`src/FrameLedger.App/Styles/FrameLedger.xaml`),
|
||||
and every page sets the theme's text colour on its root.
|
||||
The chart palettes are the one place a colour is written out, once per theme.
|
||||
|
||||
## The traps of WPF UI 4.3.0
|
||||
|
||||
Each of these cost a release; the full list, with the tests that hold each, is §Gotchas checklist of
|
||||
[`docs/16_WPFUI_SYNTAX.md`](../docs/16_WPFUI_SYNTAX.md).
|
||||
|
||||
- `ui:TextBlock Appearance=` looks its brush up once: a theme switch leaves the text in the old theme's colour.
|
||||
- A page is shown in a `Frame`, which passes it no text colour: a text that sets none is black, on the dark theme too.
|
||||
- A class handler on `Loaded` does not reach every element: WPF raises Loaded only where a subtree listens for it.
|
||||
- Every page sets `ScrollViewer.CanContentScroll="False"`, or WPF UI wraps it in a scroller that eats the mouse wheel;
|
||||
a scroller inside a dialog is a `ui:PassiveScrollViewer`.
|
||||
- A scroll bar is hidden through its scroller's own `ScrollBarVisibility`, never a style on the bar.
|
||||
- `ui:InfoBar` draws no content (the App's copy of its template does); `ui:Badge` palette appearances are not theme
|
||||
colours; WPF UI's DataGrid parts have keyed styles only; its CheckBox is 120 px wide at least.
|
||||
- No dialog closes on Esc by itself (`Services/DialogKeyboard` does it); ScottPlot zooms on every wheel unless told not to.
|
||||
- Apply the theme before the first window loads; watch the system theme only once the window has a handle.
|
||||
|
||||
## Testing the UI
|
||||
|
||||
`tests/FrameLedger.App.Tests` renders every page, window and dialog under the real theme dictionaries on one STA thread
|
||||
(`PagesLoadTests.OnStaAsync`): contrast in both themes, a theme switch while a surface is on screen, scroll bars with the
|
||||
option on in a real window, keyboard and automation names. Each surface is hosted as the App hosts it — a page in WPF UI's
|
||||
navigation presenter, not straight in a window. A rendered check is run red against the unfixed XAML first.
|
||||
@@ -0,0 +1,55 @@
|
||||
# Architecture
|
||||
|
||||
The full document is [`docs/01_ARCHITECTURE.md`](../docs/01_ARCHITECTURE.md); the IPC details are in
|
||||
[`docs/07_IPC.md`](../docs/07_IPC.md).
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph game["Game process (only games the user enabled)"]
|
||||
G["Game"] -- "present and API calls" --> O["FrameLedger.Overlay.dll: hooks"]
|
||||
end
|
||||
O -- "fixed-size frame records" --> R[("shared-memory ring")]
|
||||
R -- "drained every 100 ms" --> A["FrameLedger.Agent.exe"]
|
||||
A -- "sessions, frames, sensors" --> DB[("ledger.db (SQLite)")]
|
||||
DB --> UI["FrameLedger.exe (the App)"]
|
||||
UI -- "named pipe: commands" --> A
|
||||
A -- "named pipe: events" --> UI
|
||||
```
|
||||
|
||||
## The processes
|
||||
|
||||
| What | Runs | Does |
|
||||
|---|---|---|
|
||||
| `FrameLedger.exe` — `src/FrameLedger.App` | as the user | The WPF app: library, sessions, charts, settings. Reads SQLite; talks to the agent over the pipe. |
|
||||
| `FrameLedger.Agent.exe` — `src/FrameLedger.Agent` | as the user; as administrator only if the user opts in | Watches for tracked games, runs the anti-cheat guard, injects, drains the ring, reads sensors once a second, writes SQLite. Closing the App never stops it. |
|
||||
| `FrameLedger.Overlay.dll` — `src/native/FrameLedger.Overlay` | inside the game | Hooks presentation (DXGI for Direct3D 11 and 12, and OpenGL) and the upscaler, frame-generation and ray-tracing calls, and writes one record per frame into the ring. A hook never blocks, allocates, logs or throws. It draws nothing on screen. |
|
||||
| `FrameLedger.VkLayer.dll` — `src/native/FrameLedger.VkLayer` | inside a Vulkan game | An implicit Vulkan layer instead of hooks, active only in a game FrameLedger starts. |
|
||||
| `FrameLedger.Guard.dll`, `FrameLedger.NvapiBridge.dll`, `FrameLedger.ProcessStats.dll` | inside the agent, never a game | The anti-cheat guard (required), NVIDIA's extra sensors (optional), and the game's own memory read from outside it (optional). An optional one missing makes its fields N/A. |
|
||||
|
||||
`src/FrameLedger.CaptureHost` is a developer tool and is never shipped.
|
||||
|
||||
## Two tiers
|
||||
|
||||
- **Tier 1 — measured.** The user switched hooking on for the game, and the guard found nothing: every frame is
|
||||
recorded.
|
||||
- **Tier 2 — recorded only.** No hooking: the session keeps its duration, the PC's sensors, the game's memory, its
|
||||
display mode, and *why* it was not measured. Every frame figure is N/A, never an estimate.
|
||||
|
||||
There is no third rung: without the hook there is no frame measurement at all.
|
||||
|
||||
## How a frame gets to the screen
|
||||
|
||||
1. The agent's watcher sees a tracked game's executable start (by full path, once a second).
|
||||
2. Hooking off, or not consented: the session is Tier 2.
|
||||
3. The guard checks the game's process tree, the PC's drivers and services, its title lists and the game's install
|
||||
folder. Any finding, or any doubt, refuses: Tier 2, with the reason.
|
||||
4. On a pass, the guard injects the Overlay with the documented `LoadLibraryW`, under its real name.
|
||||
5. The Overlay installs its hooks, creates the ring and publishes a handshake; the agent checks the layout version and
|
||||
the build id before it reads anything.
|
||||
6. The agent drains the ring every 100 ms and checks the game again every 30 seconds; a finding unhooks.
|
||||
7. When the game exits, the agent finalizes the session and writes it to SQLite in one transaction; the App reads it.
|
||||
|
||||
## Where data lives
|
||||
|
||||
`%LOCALAPPDATA%\FrameLedger`: `ledger.db` (WAL mode), `logs\`, `crashdumps\`, and `tmp\` for a session in progress
|
||||
(its `.partial` file). The App installs separately, in `%LOCALAPPDATA%\FrameLedger.App`.
|
||||
@@ -0,0 +1,47 @@
|
||||
# Build and test
|
||||
|
||||
The full documents are [`docs/12_BUILD.md`](../docs/12_BUILD.md) and [`docs/14_TESTING.md`](../docs/14_TESTING.md).
|
||||
|
||||
## What you need
|
||||
|
||||
- Windows 10 (22H2) or 11, 64-bit.
|
||||
- Visual Studio with the C++ workload (MSVC v143 or later, a Windows SDK of 22621 or later) and CMake 3.28 or later.
|
||||
- The .NET SDK that [`global.json`](../global.json) pins.
|
||||
- PowerShell 7.
|
||||
|
||||
## The one gate
|
||||
|
||||
```powershell
|
||||
./build.ps1 check
|
||||
```
|
||||
|
||||
It is the whole gate, and CI runs the same script. In order:
|
||||
|
||||
| Step | What fails it |
|
||||
|---|---|
|
||||
| Native build and ctest | A C++ warning (`/W4 /WX`) or a native test. |
|
||||
| clang-format, `dotnet format` | Code not formatted as committed. |
|
||||
| Managed build and tests | A C# warning (warnings are errors), or a test — the integration tests included. |
|
||||
| coverage-gate | Too little coverage of Domain and Application. |
|
||||
| rules-validate | A detection-rules file that breaks its schema or weakens the anti-cheat blocklist. |
|
||||
| versioninfo, chokepoint, hookinventory, package-closure | A binary without its version resources; an injection anywhere but the guard's own code, or an evasion primitive anywhere; a hook not in the inventory; a developer tool in the package. |
|
||||
| license-check, accuracy-check, notice-check | A package without its licence, a copy of the accuracy statement that drifted, a source file without its licence header. |
|
||||
| changelog-check, release-notes, resx-audit | The changelog or the release-notes extractor broken, or a string missing in English, Vietnamese or Japanese. |
|
||||
| struct-mirror, test-artifacts, wiki-check, placeholder guard | The shared-memory mirror test not run, test leftovers, a wiki link that leads nowhere, a stray `{{…}}` in a shipped document. |
|
||||
|
||||
Other tasks: `./build.ps1 native`, `./build.ps1 managed`, `./build.ps1 format` (writes the formatting). A skipped gate is
|
||||
reported, never hidden.
|
||||
|
||||
## Tests
|
||||
|
||||
- **Managed:** one project per layer under `tests/` (xUnit v3, FluentAssertions). The App's tests render every page,
|
||||
window and dialog under the real theme dictionaries.
|
||||
- **Native:** ctest suites for the guard, the ring, the layout, the Vulkan layer, the telemetry DLLs.
|
||||
- **Integration:** the hook-harness is hooked for real, on WARP, so it runs on CI without a GPU.
|
||||
- **A new test is shown red first** on the unfixed code: a check that has never failed has not been seen to work.
|
||||
|
||||
## Looking at the App with real data
|
||||
|
||||
`FrameLedger.exe --data-dir <a copy of a data folder>` opens the App as a viewer: no agent is started or contacted, and
|
||||
nothing on the PC is changed. **Never run a development build against your own `%LOCALAPPDATA%\FrameLedger`**: a newer
|
||||
build upgrades the database, and an older one cannot open it again.
|
||||
@@ -0,0 +1,45 @@
|
||||
# Capture pipeline
|
||||
|
||||
What the agent does from the moment a game starts. The full document is [`docs/04_CAPTURE.md`](../docs/04_CAPTURE.md);
|
||||
the guard is [`docs/19_SAFETY_AND_ANTICHEAT.md`](../docs/19_SAFETY_AND_ANTICHEAT.md); the code is in
|
||||
`src/FrameLedger.Application/Capture`, `src/FrameLedger.Application/Recording` and `src/FrameLedger.Application/Watch`.
|
||||
|
||||
## Watching
|
||||
|
||||
- Once a second, the watcher lists the running processes and matches each executable's **full path** against the
|
||||
library entries that have recording on. A file name alone never starts a session — except the same file on a
|
||||
changed drive letter, which the agent follows.
|
||||
- A launcher's consent does not carry over to the game it starts: the game's own executable is the one that counts.
|
||||
- One session per game at a time. At every start, the agent first rebuilds any session a crash interrupted.
|
||||
|
||||
## A session's life
|
||||
|
||||
`Idle → Detected → Guarded → Injecting → Capturing → Finalizing → Saved`, with three side roads:
|
||||
|
||||
- **Refused** — the guard found something, or hooking is off: the session continues as Tier 2, with the reason.
|
||||
- **Unhooked for safety** — a finding at a 30-second re-scan: the hook goes dormant (it is never unloaded), measuring
|
||||
stops, and the session keeps the frames measured so far and says it stopped early.
|
||||
- **Interrupted** — the agent itself stopped: its `.partial` file is turned into a session at the next start.
|
||||
|
||||
A session shorter than the minimum length (30 seconds by default) is discarded.
|
||||
|
||||
## While capturing
|
||||
|
||||
- The ring is drained every 100 ms; it holds about 16 seconds of frames at 500 fps, so a stall of the agent loses
|
||||
nothing, and a dropped record is a warning on the session, never silently accepted.
|
||||
- Sensors are read on their own thread once a second, through three layers: Windows itself (DXGI and performance
|
||||
counters, any GPU), LibreHardwareMonitor (any GPU), and NVAPI (NVIDIA cards). A missing layer makes its fields N/A.
|
||||
- The game's own video memory and RAM are read from outside the game, in both tiers.
|
||||
- Everything is written to the session's `.partial` file at each step and every 60 seconds.
|
||||
|
||||
## Ending
|
||||
|
||||
- The last drain, then one SQLite transaction writes the session, its segments, its frame and sensor series.
|
||||
- How the game ended is classified: *normal*; *crashed* (an exception exit code, an application-error event in the
|
||||
window, or the game's own crash reporter starting late); *unhooked for safety*; *degraded* (the hook faulted or lost
|
||||
the game); *interrupted*.
|
||||
- Two abnormal ends within 60 seconds of attaching switch hooking off for that game, and nothing switches it back on
|
||||
automatically.
|
||||
|
||||
Why a session ended is the `SessionEndReason` type in `src/FrameLedger.Application/Capture` — the list grows, so read
|
||||
the code rather than a copy of it.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Contributor rules
|
||||
|
||||
The rules are stated in full, with their amendments, in [`CLAUDE.md`](../CLAUDE.md) §Non-negotiable rules; the safety
|
||||
policy behind them is [`docs/19_SAFETY_AND_ANTICHEAT.md`](../docs/19_SAFETY_AND_ANTICHEAT.md). In plain words:
|
||||
|
||||
## The nine rules
|
||||
|
||||
1. **Hooking is opt-in, per game.** The user adds the game *and* switches hooking on for it, after a warning. There is
|
||||
no "hook everything" mode and no automatic injection.
|
||||
2. **The anti-cheat guard is a gate, not a warning.** It checks before every injection and every 30 seconds after. A
|
||||
finding refuses, says why, and switches the game's hooking off. There is no override — apart from one narrow,
|
||||
evidence-bound exception for anti-cheat that runs entirely in user mode, which the user grants per game and which
|
||||
ends for good the first time it goes wrong. Do not add another form of override.
|
||||
3. **No evasion.** Injection uses the documented `LoadLibraryW`; the component keeps its real name, exports and version
|
||||
information. A performance tool must be *visible* to anti-cheat. A change that makes FrameLedger harder to detect is
|
||||
refused on principle.
|
||||
4. **Never read or write game memory** beyond the arguments of the calls we hooked and the objects we own.
|
||||
5. **The hook must never crash the game.** Every hook body is guarded, allocates nothing, takes no lock, logs nothing
|
||||
and lets no exception out; repeated faults switch the hook off.
|
||||
6. **Never one inflated frame rate.** With frame generation measured, Native, Displayed and the factor are shown
|
||||
together; without it, *Presented FPS* with a sentence saying whether generated frames could be in it
|
||||
([Metrics](Metrics.md)).
|
||||
7. **Ray tracing, path tracing and ray reconstruction are Yes, No or N/A.** Where it cannot be measured, the answer is
|
||||
N/A — never a made-up Yes.
|
||||
8. **No telemetry, no analytics, no silent network calls.** The rule permits three requests — the update check, a
|
||||
detection-rules fetch and store metadata the user opts into. Only the update check, and its download, exists today,
|
||||
and the user can switch it off.
|
||||
9. **No obfuscation of our own binaries.** GPL v3; releases ship with SHA-256 checksums.
|
||||
|
||||
## What will never be built
|
||||
|
||||
Manual mapping or reflective loading; erasing PE headers; unlinking from the module list; hiding, renaming or
|
||||
randomising the component, its exports or its object names; hiding threads or evading debuggers; packing; any bypass or
|
||||
stealth mode, or instructions to defeat the guard; reading game state; a kernel driver of our own. A pull request that
|
||||
proposes one is closed with a pointer to the safety document.
|
||||
|
||||
## Every pull request
|
||||
|
||||
The checklist is [`.github/pull_request_template.md`](../.github/pull_request_template.md):
|
||||
|
||||
- `./build.ps1 check` passes — no warning in C# or C++, every test green, formatting clean.
|
||||
- A document a change makes wrong is corrected **in the same pull request**. A stale sentence is struck through and
|
||||
dated where it stands, not quietly rewritten.
|
||||
- Every new user-visible string exists in English, Vietnamese and Japanese (`.resx`).
|
||||
- Every first-party source file opens with the two-line licence header that [`NOTICE`](../NOTICE) explains
|
||||
(`tools/notice-check.ps1 -Fix` writes it).
|
||||
- A change to `src/` adds a line to `CHANGELOG.md` `[Unreleased]`.
|
||||
- A change to the hook layer states its measured overhead, lists any new hook in the inventory
|
||||
([`docs/17_HOOK_ENGINE.md`](../docs/17_HOOK_ENGINE.md)) and answers the safety review questions in the template.
|
||||
- A user-visible limit that moves updates [`LIMITATIONS.md`](../LIMITATIONS.md) in the same pull request.
|
||||
|
||||
How to contribute and how contributions are licensed: [`CONTRIBUTING.md`](../CONTRIBUTING.md).
|
||||
@@ -0,0 +1,45 @@
|
||||
# Data and IPC
|
||||
|
||||
The full documents are [`docs/06_DATA_MODEL.md`](../docs/06_DATA_MODEL.md) and [`docs/07_IPC.md`](../docs/07_IPC.md).
|
||||
|
||||
## The database
|
||||
|
||||
One SQLite file, `%LOCALAPPDATA%\FrameLedger\ledger.db`, in WAL mode, used through Microsoft.Data.Sqlite and Dapper.
|
||||
|
||||
| Table | Holds |
|
||||
|---|---|
|
||||
| `games` | The library, with each game's hooking, consent and anti-cheat state. |
|
||||
| `sessions` | One row per session: its tier, how it ended, its figures. |
|
||||
| `session_segments` | Spans of a session at one resolution and upscaler. |
|
||||
| `frame_blobs`, `sensor_blobs` | The per-frame and sensor series, compressed. |
|
||||
| `hardware_snapshots` | The PC as it was, shared by the sessions recorded on it. |
|
||||
| `session_annotations` | Tags, notes and the user's overrides. |
|
||||
| `settings` | Key and value, as `SettingsRegistry` (`src/FrameLedger.Application/Settings`) defines them. |
|
||||
| `legal_acceptance` | Which version of each document the user accepted, and when. |
|
||||
| `schema_migrations` | The migrations applied. |
|
||||
|
||||
- **Who writes what:** the agent writes sessions, their series and snapshots, and a game's hooking state; the App
|
||||
writes what the user edits — a game's details, annotations, settings, legal acceptance. Consent never goes through
|
||||
the database: the App asks the agent over the pipe.
|
||||
- **Migrations** are numbered SQL files embedded in `src/FrameLedger.Infrastructure/Persistence/Migrations`, applied in
|
||||
order by whichever process opens the file first, under a lock. A database newer than the build is refused, which is
|
||||
why an older version cannot open a database a newer one has touched.
|
||||
|
||||
## Shared memory — the game and the agent
|
||||
|
||||
- One mapping per game process, created by the component in the game and opened by the agent: a handshake, the
|
||||
writer's state, a control block, the display state, then a ring of fixed-size frame records — one writer, one reader,
|
||||
no locks.
|
||||
- The layout is defined twice: `src/native/FrameLedger.Shm/include/fl_shm.h` (normative) and
|
||||
`src/FrameLedger.Shared/ShmLayout.cs`. `ShmLayoutMirrorTests` compares every field's offset against JSON the native
|
||||
`fl-layout-dump` writes, in both directions, and the gate fails if that test did not run.
|
||||
- Before reading anything, the agent compares the layout version, the record size and the build id, and refuses to
|
||||
attach on a mismatch.
|
||||
|
||||
## The pipe — the App and the agent
|
||||
|
||||
- A named pipe, `\\.\pipe\FrameLedger.v2`, carrying length-prefixed JSON messages (source-generated System.Text.Json,
|
||||
unknown fields ignored): commands from the App (switch hooking on, pause, delete sessions…) and events from the agent
|
||||
(a session started, made progress, ended; a safety notice).
|
||||
- **The pipe is not a trust boundary for safety:** no message can tell the agent that something is safe. The guard
|
||||
decides on its own.
|
||||
@@ -0,0 +1,32 @@
|
||||
# Developer glossary
|
||||
|
||||
The words the code and the documents use. The player's glossary is [Words FrameLedger uses](../guide/10-glossary.md).
|
||||
|
||||
- **Agent** — `FrameLedger.Agent.exe`, the capture orchestrator; `--serve` is its normal mode, `--console` the
|
||||
developer's.
|
||||
- **Census** — the frame-generation runtimes found loaded in a game; it decides the qualifier beside Presented FPS.
|
||||
- **Consent** — a user's per-game agreement to hooking, typed in the consent dialog, stamped with where it came from.
|
||||
- **D-numbers** (D1, D2, …) — the owner's decisions, recorded in [`docs/HANDOFF.md`](../docs/HANDOFF.md).
|
||||
- **Drain** — the agent reading the ring, every 100 ms.
|
||||
- **FR-x / NFR-x** — requirement ids from [`docs/02_SPEC.md`](../docs/02_SPEC.md).
|
||||
- **Guard** — the native anti-cheat check that runs before every injection and every 30 seconds after; one
|
||||
implementation, in `src/native/FrameLedger.Injector`.
|
||||
- **Handshake** — the first region of the shared memory: layout version, record size and build id, checked before
|
||||
anything is read.
|
||||
- **Hook harness** — `src/native/tools/hook-harness`, a dummy Direct3D 11, Direct3D 12, Vulkan and OpenGL program the
|
||||
tests hook instead of a game.
|
||||
- **Kill switch** — `hooking.kill_switch`, *Disable all hooking*: nothing is injected, whatever each game says.
|
||||
- **Ledger** — `ledger.db`, the SQLite file.
|
||||
- **Overlay** — `FrameLedger.Overlay.dll`, the component injected into a game. It draws nothing; the name is historical.
|
||||
- **`.partial`** — a session in progress, written in checksummed chunks so a crash leaves a usable prefix.
|
||||
- **Pre-scan** — the guard's check of a game when it is added, so the game's page can say what was found before it runs.
|
||||
- **Ring** — the single-producer, single-consumer queue of fixed-size frame records in shared memory.
|
||||
- **Safety unhook** — a finding during a session: the hook goes dormant and the session says so.
|
||||
- **Steady state** — the frame-generation state a session spent most of its time in, shown with its share.
|
||||
- **Tier 1 / Tier 2** — measured / recorded only. There is no third tier.
|
||||
- **Trial** — the first two hooked sessions under a user-mode exception; one that goes badly ends the exception for
|
||||
good.
|
||||
- **User-mode exception** — the one narrow exception to the guard's refusal, for anti-cheat that runs entirely in user
|
||||
mode ([`docs/19_SAFETY_AND_ANTICHEAT.md`](../docs/19_SAFETY_AND_ANTICHEAT.md)).
|
||||
- **Viewer** — the App started with `--data-dir` over a copy: no agent, nothing changed on the PC.
|
||||
- **WARP** — Windows' software renderer, which lets the hook harness run on CI without a GPU.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Developers
|
||||
|
||||
FrameLedger is a C++ component loaded into the games a user chose, a C# capture agent beside it, and a WPF app, with one
|
||||
SQLite file between them. These pages are short on purpose: each says what a part is and where its full document is.
|
||||
The full set is [`docs/`](../docs/README.md), and the rules every AI-assisted change follows are in
|
||||
[`CLAUDE.md`](../CLAUDE.md).
|
||||
|
||||
## Start here
|
||||
|
||||
1. [Contributor rules](Contributor-rules.md) — the rules every change keeps. Safety comes first, and some changes are
|
||||
refused whatever they improve.
|
||||
2. [Architecture](Architecture.md), then [Repository map](Repository-map.md).
|
||||
3. [Build and test](Build-and-test.md) — `./build.ps1 check` is the whole gate, the same one CI runs.
|
||||
|
||||
Picking up work where it stopped: [`docs/HANDOFF.md`](../docs/HANDOFF.md) has the sequencing, the owner's decisions
|
||||
and the traps that each cost a cycle.
|
||||
|
||||
## Where status lives
|
||||
|
||||
These pages never say what is done or what is next. Status is in four files, and nowhere else:
|
||||
|
||||
| Question | File |
|
||||
|---|---|
|
||||
| What is unresolved, and what does it block? | [`docs/20_OPEN_QUESTIONS.md`](../docs/20_OPEN_QUESTIONS.md) |
|
||||
| What was measured, and on what machine? | [`docs/spike-notes.md`](../docs/spike-notes.md) |
|
||||
| Which phase is where? | [`docs/15_ROADMAP.md`](../docs/15_ROADMAP.md) |
|
||||
| What landed, in which release? | [`CHANGELOG.md`](../CHANGELOG.md) |
|
||||
|
||||
Check a status claim against the code before you plan on it: more than one document has said "built" of something that
|
||||
was not, and the repository corrects such sentences where they stand — struck through and dated — rather than quietly.
|
||||
|
||||
## The other pages
|
||||
|
||||
- [Capture pipeline](Capture-pipeline.md) — what the agent does from the moment a game starts.
|
||||
- [Metrics](Metrics.md) — what each number means, and the rules for showing it.
|
||||
- [Data and IPC](Data-and-IPC.md) — the database, the shared memory and the pipe.
|
||||
- [App UI development](App-UI-development.md) — the WPF app, and the traps of its UI library.
|
||||
- [Releasing](Releasing.md) — from a merged change to an update on a user's PC.
|
||||
- [Developer glossary](Developer-glossary.md) — the project's own words.
|
||||
|
||||
Contributing is described in [`CONTRIBUTING.md`](../CONTRIBUTING.md), redistributing in [`FORKING.md`](../FORKING.md),
|
||||
and how to report a vulnerability in [`SECURITY.md`](../SECURITY.md).
|
||||
@@ -0,0 +1,43 @@
|
||||
# FrameLedger
|
||||
|
||||
**FrameLedger** records how your games run on this PC — frame rate and frame times, the settings a game really renders
|
||||
with, ray tracing, temperatures, and the game's own memory — and keeps every session so you can compare them later.
|
||||
Everything stays on your PC: no account, no telemetry. It is free software under the GNU GPL v3, for 64-bit Windows 10
|
||||
(22H2) and Windows 11, and it is in beta.
|
||||
|
||||
Download it from the [Releases page](https://github.com/poli0981/frameledger/releases).
|
||||
|
||||
## Use FrameLedger
|
||||
|
||||
The [user guide](../guide/README.md) is the one FrameLedger shows under Help ▸ User guide.
|
||||
|
||||
1. [Install and first start](../guide/01-install.md)
|
||||
2. [Record a game](../guide/02-record-a-game.md)
|
||||
3. [Read your results](../guide/03-read-your-results.md)
|
||||
4. [Anti-cheat and safety](../guide/04-anti-cheat-and-safety.md) — read it before you switch hooking on for any game
|
||||
5. [Your data](../guide/05-your-data.md)
|
||||
6. [Questions and answers](../guide/06-faq.md)
|
||||
|
||||
To look something up: [The screens](../guide/07-screens.md), [Every setting](../guide/08-settings.md),
|
||||
[When something goes wrong](../guide/09-troubleshooting.md), [Words FrameLedger uses](../guide/10-glossary.md),
|
||||
[The terms, in plain words](../guide/terms-in-plain-words.md), and [Limitations](../LIMITATIONS.md) — what FrameLedger
|
||||
cannot do.
|
||||
|
||||
## Build or change FrameLedger
|
||||
|
||||
Start at [Developers](Developers.md). The developer pages are short; each says what a part is and links to its full
|
||||
document in [`docs/`](../docs/README.md).
|
||||
|
||||
- [Architecture](Architecture.md) — the processes, and how a frame travels from the game to the screen.
|
||||
- [Repository map](Repository-map.md) — what is where.
|
||||
- [Build and test](Build-and-test.md) — the toolchain and the one gate.
|
||||
- [Contributor rules](Contributor-rules.md) — the rules every change keeps, safety first.
|
||||
- [Capture pipeline](Capture-pipeline.md), [Metrics](Metrics.md), [Data and IPC](Data-and-IPC.md),
|
||||
[App UI development](App-UI-development.md), [Releasing](Releasing.md), [Developer glossary](Developer-glossary.md).
|
||||
|
||||
## More
|
||||
|
||||
- A bug or a question: the project's [issues](https://github.com/poli0981/frameledger/issues). A game whose anti-cheat
|
||||
FrameLedger missed: the **Safety gap** form there.
|
||||
- A vulnerability: [`SECURITY.md`](../SECURITY.md).
|
||||
- The licence: [`LICENSE`](../LICENSE) (GPL v3) and [`NOTICE`](../NOTICE); the name: [`legal/TRADEMARKS.md`](../legal/TRADEMARKS.md).
|
||||
@@ -0,0 +1,38 @@
|
||||
# Metrics
|
||||
|
||||
How every number is computed is [`docs/03_METRICS.md`](../docs/03_METRICS.md) — the source of truth; the user's side is
|
||||
[Read your results](../guide/03-read-your-results.md). The calculators are in `src/FrameLedger.Domain/Metrics`, and the
|
||||
frame-generation ladder in `src/FrameLedger.Application/Recording`.
|
||||
|
||||
## The basics
|
||||
|
||||
- **Frame time** — present to present, timed with the performance counter at the moment the game presents, per swap
|
||||
chain. A paused or interrupted stretch is a gap, and gaps are left out of every figure.
|
||||
- **Average FPS** — frames divided by the time measured, never the mean of instantaneous rates.
|
||||
- **1% low / 0.1% low** — 1000 divided by the 99th / 99.9th percentile of the game's own frame times. They need at least
|
||||
1,000 / 10,000 frames; with fewer, N/A.
|
||||
- **Stutter** — a frame longer than twice the median of the 19 frames centred on it.
|
||||
|
||||
## The rules for showing a number
|
||||
|
||||
- **N/A means not measured.** Never 0, and never an estimate (`docs/02_SPEC.md`, FR-4.9).
|
||||
- **Frame generation is never folded into one number** (rule 6). Measured: `Native → Displayed (×N FG)`, for example
|
||||
`62 → 118 FPS (×1.9 FG)`. Not measured: **Presented FPS**, with a chip saying whether a frame-generation runtime was
|
||||
loaded — the word *Native* never stands alone. A session whose frame generation changed shows the state that lasted
|
||||
longest, always with its share: `×1.9 FG · 75%`.
|
||||
- **Ray tracing, path tracing, ray reconstruction** are Yes, No or N/A, each with where it came from (measured, the
|
||||
user's override, the game's default). Ray tracing is *Yes* on acceleration-structure builds or `DispatchRays`; *No*
|
||||
needs a capable device, the hook in place and no activity at all. Path tracing has no signature in the API, so it is
|
||||
only ever suggested.
|
||||
- **Tier 1 and Tier 2 are never averaged together.** A query and a chart split by tier; comparing across tiers asks the
|
||||
user first.
|
||||
|
||||
## The game's memory and the sensors
|
||||
|
||||
- The game's video memory and RAM are read from outside the game, as Task Manager shows them, once a second, in both
|
||||
tiers.
|
||||
- The PC's sensors come from three layers (Windows, LibreHardwareMonitor, NVAPI); what a layer cannot read is N/A.
|
||||
*GPU held back* exists on NVIDIA cards only. CPU temperature needs the agent elevated and PawnIO installed.
|
||||
|
||||
What is still unmeasured, or measured on one machine only, is in [`LIMITATIONS.md`](../LIMITATIONS.md) and
|
||||
[`legal/ACCURACY.md`](../legal/ACCURACY.md).
|
||||
@@ -0,0 +1,39 @@
|
||||
# Releasing
|
||||
|
||||
The full documents are [`docs/13_CI_CD.md`](../docs/13_CI_CD.md) and [`docs/11_UPDATER.md`](../docs/11_UPDATER.md).
|
||||
|
||||
## The workflows
|
||||
|
||||
| Workflow | Runs on | Does |
|
||||
|---|---|---|
|
||||
| `.github/workflows/ci.yml` | pushes to `main`, pull requests | `./build.ps1 check`, and on a pull request the changelog check. |
|
||||
| `.github/workflows/codeql.yml` | pushes and pull requests to `main`, weekly | CodeQL for C# and C++. |
|
||||
| `.github/workflows/rules-publish.yml` | a change to the detection rules or their validator | Fails when an anti-cheat entry is removed. |
|
||||
| `.github/workflows/release.yml` | a pushed `v*` tag; by hand, a rehearsal | Builds, gates and publishes a release. |
|
||||
| `.github/workflows/wiki.yml` | a successful release; by hand | Builds this wiki from `wiki/` and `guide/` and publishes it to the Wiki tab. |
|
||||
|
||||
## Cutting a release
|
||||
|
||||
1. One pull request moves the `[Unreleased]` entries of [`CHANGELOG.md`](../CHANGELOG.md) under a `## [x.y.z]` or
|
||||
`## [x.y.z-beta.N]` heading with an *Updating from* note, and updates the release lines in `README.md`, the accuracy
|
||||
statement (`legal/ACCURACY.md` and its copies) and `LIMITATIONS.md`. `VERSION` changes only with the numeric core.
|
||||
2. After it merges, a signed tag `vx.y.z` (or `vx.y.z-beta.N`) on the merge commit starts `release.yml`:
|
||||
- it checks the tag against `VERSION` and that the changelog has the section;
|
||||
- reads the build id from the clean checkout, before anything is edited;
|
||||
- writes the release date into the legal documents;
|
||||
- runs the whole gate;
|
||||
- publishes the App and the agent (self-contained, ReadyToRun) and checks the published tree, the build id in the
|
||||
native binaries included;
|
||||
- packs them with Velopack, with a delta from the previous release;
|
||||
- writes `SHA256SUMS.txt`;
|
||||
- creates the GitHub release from the changelog section, marked pre-release for a beta.
|
||||
3. The wiki follows: `wiki.yml` runs when the release run succeeds.
|
||||
4. Check the published assets against `SHA256SUMS.txt`, and the update feed.
|
||||
|
||||
Releases are not code-signed, so every release says so and publishes its checksums.
|
||||
|
||||
## How users get it
|
||||
|
||||
Velopack reads GitHub Releases. Settings ▸ Updates ▸ Channel is *Automatic* by default: a pre-release looks for
|
||||
pre-releases, a release for releases. A new version downloads in the background and installs only when FrameLedger
|
||||
restarts — never while a game is being recorded.
|
||||
@@ -0,0 +1,45 @@
|
||||
# Repository map
|
||||
|
||||
The layout with its history is in [`CLAUDE.md`](../CLAUDE.md) §Solution layout.
|
||||
|
||||
## Managed code (`src/`, .NET 10, C#)
|
||||
|
||||
| Project | What it holds |
|
||||
|---|---|
|
||||
| `src/FrameLedger.Domain` | Entities and the metric calculators. References nothing. |
|
||||
| `src/FrameLedger.Application` | Use cases and ports: the capture loop, the session recorder, settings, the safety decisions. |
|
||||
| `src/FrameLedger.Infrastructure` | SQLite, the shared-memory reader, telemetry, the native interop, parsers. The **only** project that calls native code. |
|
||||
| `src/FrameLedger.Shared` | The pipe's message contracts and the C# mirror of the shared-memory structs. |
|
||||
| `src/FrameLedger.Agent` | The capture agent's host: the watcher, the pipe server, the recorder. |
|
||||
| `src/FrameLedger.App` | The WPF app (WPF UI 4.3.0): pages, dialogs, charts, strings in English, Vietnamese and Japanese. |
|
||||
| `src/FrameLedger.CaptureHost` | A developer tool, never shipped. |
|
||||
|
||||
Dependencies point inwards: App and Agent → Application → Domain; Infrastructure implements Application's ports.
|
||||
|
||||
## Native code (`src/native/`, C++20, MSVC)
|
||||
|
||||
| Folder | What it holds |
|
||||
|---|---|
|
||||
| `src/native/FrameLedger.Overlay` | The component loaded into a game: hooks, the ring writer. |
|
||||
| `src/native/FrameLedger.Injector` | The anti-cheat guard and injection, built into `FrameLedger.Guard.dll` for the agent. |
|
||||
| `src/native/FrameLedger.VkLayer` | The Vulkan implicit layer and its manifest. |
|
||||
| `src/native/FrameLedger.Shm` | The shared-memory layout, header-only; `fl_shm.h` is normative. |
|
||||
| `src/native/FrameLedger.NvapiBridge` | NVIDIA telemetry, loaded by the agent. |
|
||||
| `src/native/FrameLedger.ProcessStats` | The game's own memory, read from the agent. |
|
||||
| `src/native/tests` | The native test suites (ctest). |
|
||||
| `src/native/tools` | `hook-harness` (a dummy Direct3D 11/12, Vulkan and OpenGL app to hook), the probes, `fl-layout-dump`. |
|
||||
| `src/native/third_party` | Vendored vendor headers: NVAPI, Streamline, FidelityFX, Vulkan. |
|
||||
|
||||
## Everything else
|
||||
|
||||
| Path | What it holds |
|
||||
|---|---|
|
||||
| `tests/` | One test project per managed project, plus shared helpers and fixtures. |
|
||||
| `tools/` | The PowerShell gates and generators `./build.ps1` runs — see [Build and test](Build-and-test.md). |
|
||||
| `rules/detection-rules.json` | Engine, platform and capability signatures, and the anti-cheat blocklist. |
|
||||
| `guide/` | The user guide — embedded in the App, and the End-user half of this wiki. |
|
||||
| `wiki/` | This wiki's own pages, published to the Wiki tab when a release is made. |
|
||||
| `docs/` | The developer documents; [`docs/README.md`](../docs/README.md) is their index. |
|
||||
| `legal/` | The documents a user accepts, the accuracy statement, licences and notices. |
|
||||
| `.github/workflows/` | CI, CodeQL, the rules gate, the release and the wiki. |
|
||||
| `LIMITATIONS.md` | What the whole software cannot do, in a player's words; also in the App. |
|
||||
@@ -0,0 +1,31 @@
|
||||
**[Home](Home.md)**
|
||||
|
||||
**Use FrameLedger**
|
||||
|
||||
- [User guide](../guide/README.md)
|
||||
- [Install and first start](../guide/01-install.md)
|
||||
- [Record a game](../guide/02-record-a-game.md)
|
||||
- [Read your results](../guide/03-read-your-results.md)
|
||||
- [Anti-cheat and safety](../guide/04-anti-cheat-and-safety.md)
|
||||
- [Your data](../guide/05-your-data.md)
|
||||
- [Questions and answers](../guide/06-faq.md)
|
||||
- [The screens](../guide/07-screens.md)
|
||||
- [Every setting](../guide/08-settings.md)
|
||||
- [When something goes wrong](../guide/09-troubleshooting.md)
|
||||
- [Words FrameLedger uses](../guide/10-glossary.md)
|
||||
- [The terms, in plain words](../guide/terms-in-plain-words.md)
|
||||
- [Limitations](../LIMITATIONS.md)
|
||||
|
||||
**Build or change FrameLedger**
|
||||
|
||||
- [Developers](Developers.md)
|
||||
- [Architecture](Architecture.md)
|
||||
- [Repository map](Repository-map.md)
|
||||
- [Build and test](Build-and-test.md)
|
||||
- [Contributor rules](Contributor-rules.md)
|
||||
- [Capture pipeline](Capture-pipeline.md)
|
||||
- [Metrics](Metrics.md)
|
||||
- [Data and IPC](Data-and-IPC.md)
|
||||
- [App UI development](App-UI-development.md)
|
||||
- [Releasing](Releasing.md)
|
||||
- [Developer glossary](Developer-glossary.md)
|
||||
Reference in new issue
Block a user