Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0df4af980
|
||
|
|
249c02be56 | ||
|
|
042fdd631c |
No files matched your search
+2
-39
@@ -35,51 +35,14 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- **Games from the Xbox app and the Microsoft Store** (the owner's request of 2026-11-03, owner decisions D77–D81; PC Game
|
||||
Pass games included): **Import library** finds the games those apps installed into a games folder — each drive's
|
||||
`.GamingRoot` names the folders, each game's own `MicrosoftGame.config` and `appxmanifest.xml` say what it is, and
|
||||
Windows says whether its package is installed for you — and lists them as **Xbox**, with the process that actually
|
||||
draws (an Unreal title's shipping executable, not the stub its package launches; never the GDK's `gamelaunchhelper.exe`).
|
||||
A game's page shows its own square logo and splash image, read from its folder, and its package version (*Xbox version
|
||||
1.3.5124.0*). Only games built on Microsoft's GDK are listed; an older Store app (UWP) is not (`docs/05_DETECTION.md`
|
||||
§Platform signatures & metadata, `LIMITATIONS.md`, the user guide). Everything was measured first, on the owner's eleven
|
||||
titles: the layout, and what Windows lets another program read there — every game executable refuses to be read, so no
|
||||
Unreal Engine version is shown for these games (`docs/spike-notes/25-xbox-gdk.md`).
|
||||
- **The detection rules know Xbox games** (rules `2026.11.1`, so every game in the library is read again once): an `xbox`
|
||||
platform, first in the list — a GDK FINAL FANTASY ships Steam's DLL and read *Steam* — decided by a new signal,
|
||||
`root_file`, from the install folder's own listing, so a very large install whose deep walk ran short still reads as
|
||||
its store (`docs/05_DETECTION.md`).
|
||||
|
||||
### Changed
|
||||
|
||||
- **The Privacy Policy is 2.13**, shown once at the next start: it names what the Xbox library reads — the games folders
|
||||
`.GamingRoot` names, each game's package files, Windows' answer whether its package is installed for you, and the
|
||||
pictures a game ships in its own folder — that Play asks Windows to start such a game, and that before any injection
|
||||
FrameLedger reads whether a game runs in an app container and which of Windows' code protections it runs under. The
|
||||
EULA and the Disclaimer do not change.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **The anti-cheat check saw only part of an Xbox game's folder** (safety): no install-root boundary matched the
|
||||
`<games folder>\<Game>\Content\` layout, so for an Unreal title's executable, three levels down, check 4 walked only its
|
||||
`Binaries\WinGDK` folder, and anti-cheat at the root of `Content` would have read clean. A GDK package root — the folder
|
||||
holding `MicrosoftGame.config` beside `appxmanifest.xml` — is now a boundary for the guard and for detection alike, used
|
||||
only where no store boundary matched, so it can only widen what is walked. The guard also gained `GamesInstalled\<X>`,
|
||||
which detection had had alone since #17; one case list read by both test suites now holds the two resolvers together
|
||||
(`docs/19_SAFETY_AND_ANTICHEAT.md`, `tests/fixtures/install-roots/cases.txt`).
|
||||
- **The second alpha's release would have stopped at its delta check** (for developers): Velopack names a non-default
|
||||
channel's packages with the channel (`FrameLedger.App-<version>-alpha-delta.nupkg`), and `release.yml` looked for the
|
||||
default channel's name. It now takes the delta the pack listed in `assets.<channel>.json`; the betas' packages are named
|
||||
as before (seen on the `0.1.0-alpha.1` rehearsal, which had no delta to make).
|
||||
|
||||
## Releases
|
||||
|
||||
Newest first. Each file holds that release's section exactly as it stood here.
|
||||
|
||||
| Version | Date | Notes |
|
||||
|---|---|---|
|
||||
| `0.1.0-alpha.2` | 2026-11-03 | [`docs/changelog/0.1.0-alpha.2.md`](docs/changelog/0.1.0-alpha.2.md) |
|
||||
| `0.1.0-beta.33` | 2026-11-03 | [`docs/changelog/0.1.0-beta.33.md`](docs/changelog/0.1.0-beta.33.md) |
|
||||
| `0.1.0-alpha.1` | 2026-10-31 | [`docs/changelog/0.1.0-alpha.1.md`](docs/changelog/0.1.0-alpha.1.md) |
|
||||
| `0.1.0-beta.32` | 2026-10-31 | [`docs/changelog/0.1.0-beta.32.md`](docs/changelog/0.1.0-beta.32.md) |
|
||||
| `0.1.0-beta.31` | 2026-10-26 | [`docs/changelog/0.1.0-beta.31.md`](docs/changelog/0.1.0-beta.31.md) |
|
||||
|
||||
+9
-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.32.*
|
||||
*Beta software: this page describes version 0.1.0-beta.33.*
|
||||
|
||||
## Games it will not measure
|
||||
|
||||
@@ -224,6 +224,14 @@ you accept the prompt. Turn it on only if you trust everything that runs under y
|
||||
- **The anti-cheat list's per-game entries know Steam ids only.** An Xbox copy of a game listed there by its Steam id is
|
||||
checked like any other game — its files, its executables, the anti-cheat drivers and services on your PC — but not
|
||||
by that entry. ([Safety](docs/19_SAFETY_AND_ANTICHEAT.md), [open question](docs/20_OPEN_QUESTIONS.md))
|
||||
- **Play starts them through Windows, in either Play mode** — as their Start-menu tile does — because Windows starts
|
||||
such a game only through its package: *Start directly* cannot start one, so it is recorded once it appears, a few
|
||||
seconds after its start, and the first frames before then are not measured. ([Play](docs/08_UI.md),
|
||||
[capture](docs/04_CAPTURE.md))
|
||||
- **An older Store app (UWP), and a game Windows runs under code protection the hook cannot live under** — only
|
||||
Microsoft-signed code, no generated code, strict stack or control-flow protection — **is never hooked**: its session
|
||||
keeps its duration, your PC's sensors and the reason. Measuring a game from the Xbox app with the Vulkan graphics API
|
||||
has not been tried. ([Safety](docs/19_SAFETY_AND_ANTICHEAT.md), [open question](docs/20_OPEN_QUESTIONS.md))
|
||||
|
||||
## Game artwork
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ pages.
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
|
||||
> **beta is `0.1.0-beta.32`** (2026-10-31), an unsigned installer built from that tag with its
|
||||
> **beta is `0.1.0-beta.33`** (2026-11-03), an unsigned installer built from that tag with its
|
||||
> checksums published beside it (alphas — experimental builds on a prerelease .NET — are published apart). 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
|
||||
@@ -174,7 +174,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
|
||||
|
||||
## Install
|
||||
|
||||
> **The latest beta is `v0.1.0-beta.32` (2026-10-31); before it `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `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 the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
|
||||
> **The latest beta is `v0.1.0-beta.33` (2026-11-03); before it `v0.1.0-beta.32` (2026-10-31), `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `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 the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for 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**.
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
|
||||
- FR-1.5 "Supports" row shows shipped-capability hints (DLSS/FSR/XeSS/FG) — visually distinct from measured per-session values (`05_DETECTION` §Capability hints).
|
||||
- FR-1.7 Delete all sessions (beta.11, owner decision D40): of one game from its page, or of every game from Settings ▸ Data, after a confirmation that says how many — with their frame and sensor series and notes; the library, the settings and every consent stay. The Agent deletes them (the rows are its, `06_DATA_MODEL` §Writer ownership) and refuses while a session it would delete under is being recorded.
|
||||
- FR-1.8 Uninstalled games leave the library by themselves (beta.19, owner decision D55, amending D41): an entry whose executable has been gone for ten minutes — its drive connected and the folder it was installed in still there, so an unplugged or re-lettered drive never counts, and neither does a folder Windows will not list (`ExecutablePresenceProbeTests`) — and that has no session (stored, being recorded or waiting to be recovered) is removed by the Agent, behind Settings ▸ Data ▸ *Remove uninstalled games* (on by default). Never an entry carrying an anti-cheat block, an exception or a failed-trial mark (FR-2.2, rule 2). The App is told (`GameRemoved`).
|
||||
- FR-1.9 Play (beta.21, owner decision D59): a game's page and each library entry start the game — through the app of the store whose own records name its folder (Steam, the Epic Games Launcher, GOG GALAXY, itch), or by the agent's launch mode (FR-3.2), as Settings ▸ Games says; never as administrator, and never in a viewer (`08_UI` §Games).
|
||||
- FR-1.9 Play (beta.21, owner decision D59): a game's page and each library entry start the game — through the app of the store whose own records name its folder (Steam, the Epic Games Launcher, GOG GALAXY, itch), or by the agent's launch mode (FR-3.2), as Settings ▸ Games says; never as administrator, and never in a viewer (`08_UI` §Games). *(beta.33, D80: a game the Xbox app or the Microsoft Store installed starts through Windows in either mode — its package activated as its Start-menu tile does — and never by the agent's launch mode, which cannot start it in its package.)*
|
||||
- FR-1.6 Recording switch per entry (2026-09-23, HANDOFF D29): off, the program is not watched at all — no session, no measurement, no injection — and a session of it that is running stops. On by default; entries an old import made for Steam's own tools start with it off. The library card says "Not recorded".
|
||||
|
||||
### FR-2 Hooking consent & control (new, safety-critical — see `19_SAFETY`)
|
||||
|
||||
@@ -132,6 +132,7 @@ which makes the notification more important than it was, not less.
|
||||
## Process watcher
|
||||
|
||||
- 1 Hz snapshot via `CreateToolhelp32Snapshot` (CsWin32): pid, ppid, exe path (`QueryFullProcessImageName`).
|
||||
- **One spelling of the exe path for the whole capture path (beta.33).** The watcher keys a game on the kernel's image name (`QueryFullProcessImageName`), and `TargetResolver`, which re-finds the game just before the guard, read the loader's (`Process.MainModule`) until beta.33: for a game started through a junction — a package Windows activates from `C:\Program Files\WindowsApps\<package>`, a junction to the game's own folder — the two could differ, and the session would end `TargetNotRunning` about a game the watcher had just matched. Both read `Infrastructure.Io.ProcessImagePath` now; the resolver still opens a candidate with the guard's own rights (`PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ`), so a process an anti-cheat driver closes stays `TargetUnreadable` (D21). `spike-notes` §25 measured the two spellings equal on the owner's eleven Xbox titles; one reader keeps them equal by construction (`TargetResolverTests`).
|
||||
- Watchlist match on normalized full path (~~`GetFinalPathNameByHandle`~~ `File.ResolveLinkTarget` *(corrected 2026-10-04 — `ExecutableIdentity` says why)* — junctions/symlinks), ~~filename fallback with a stale-path warning badge~~ **and a file name alone never starts a session (2026-09-23, HANDOFF D25): it can only be the entry's own executable on a drive that changed its letter (the relocator's rule), or it is not in the library.**
|
||||
- Process tree assembled from ppid chains; the **capture target** is the descendant that actually presents. In launch mode we know it; in attach mode we wait for the first ring handshake. ~~or (Tier 2) elect the PID with the most presents in the first 10 s~~ — there is no Tier-2 present stream to elect from. Re-elect if the presenting PID dies while the tree lives (level-transition relaunches).
|
||||
|
||||
@@ -242,6 +243,8 @@ which makes the notification more important than it was, not less.
|
||||
|
||||
**Attach mode.** Game launched from Steam/GOG/Epic normally; watcher sees it, guard runs, inject. Feature hooks install late, so early-init facts may be missed; the Overlay compensates by re-reading state on the first `EvaluateFeature` call it does observe, and the session is flagged `late_attach = true` so the UI can note that startup-time settings may be incomplete.
|
||||
|
||||
> **A game the Xbox app or the Microsoft Store installed is always attach mode (beta.33, D80).** Windows starts it through its package — **Play** runs `explorer.exe shell:AppsFolder\<AUMID>` in either mode — and started by its path it is never the game in its package (`spike-notes` §25: `CreateProcess` of the launch executable makes Windows activate the package itself, so the game is not the launcher's descendant; of an Unreal shipping executable, the game runs outside its package). So `LaunchGame` for an executable whose install root is a GDK package root answers `PackagedGame` and starts nothing (`OrchestratorOptions.IsPackaged` = `GdkPackageFiles.IsInPackage`), the watcher records the game when it appears, and the session is `late_attach`: §25 measured an Unreal title's D3D device 2.4–3.7 s after its process, a Unity title's 0.1–1.2 s, so what ran before the hook is in `dxgiPresentsBeforeHook`. The Vulkan layer's switch (`FRAMELEDGER_ENABLE_VK_LAYER=1`) is set only by `ProcessLauncher`, so a Vulkan GDK title cannot get it (`20_OPEN_QUESTIONS` §G).
|
||||
|
||||
~~Steam users can also set FrameLedger as a launch option wrapper; documented in the UI rather than automated (never modify a user's Steam config for them).~~ *(Corrected 2026-10-04: not built — there is no wrapper entry point and no UI text; a game started from Steam is recorded in attach mode. The parenthesis still holds: never modify a user's Steam config for them.)*
|
||||
|
||||
## The guard
|
||||
|
||||
+1
-1
@@ -393,7 +393,7 @@ Unchanged in spirit from v1, bumped to `v2` for the new message set.
|
||||
| `Hello` | UI→A | `{ appVersion, protocol: 2 }` → `HelloAck { agentVersion, protocol, pid, elevated, overlayBuildId, vulkanLayerRegistered, telemetrySource /* composite, e.g. l1+lhm+nvapi */, cpuTempAvailable, disclosureVersion /* P3 PR-4, D14: the FR-2.1 text this Agent stamps against */, exceptionDisclosureVersion /* D33, 2026-09-26: the user-mode exception's disclosure this Agent grants against */, elevationOutcome /* beta.10, D34: the admin mode's answer at this start — granted, declined, other-account, failed — or null when nobody asked */, ~~etwAvailable~~ }` — `etwAvailable` struck 2026-09-13 with the tier it described (2026-08-28); `pid` added. ~~`vulkanLayerRegistered` is **false by construction** today (the layer is per-launch, never registered)~~ `vulkanLayerRegistered` is the HKCU implicit-layer registration as the Agent found it at start *(corrected 2026-10-04: since P3 PR-8b; true while `VkLayerReconciler` keeps the layer registered for a hook-enabled Vulkan game, P4 PR-2)* and `cpuTempAvailable` false unelevated; `telemetrySource` is the composite stood up once on the first `Hello` |
|
||||
| `GetStatus` | UI→A | → `StatusAck { state, activeSession?, tier? }` — and `activeSessions[]`, one `{ sessionGuid, gameId, gameName?, pid, tier, startedAt, hold? }` per running session. **`hold` added 2026-09-23, optional:** present on a session held unhooked (Tier 2), with the same words `SessionStarted.hold` carries; a session listed at tier 2 WITHOUT a `hold` has not attached yet — it is starting, not held. The App reads this list on every (re)connect (§Client behavior) |
|
||||
| `SetWatchlist` | UI→A | `{ entries: [{ gameId?, exePath }] }` — ~~full replace~~ **ensure, never remove** (built 2026-09-13, PR-1b): each entry's path is normalised by the Agent, its row ensured with hooking OFF when new, and the ack is `WatchlistAck { games: [{ gameId, exePath, name }], unreadable: [exePath] }`; `gameId` in a request is a hint and never trusted over the path. UI re-sends on connect. **Carries no hooking state** (see §The pipe is not a trust boundary). *Since the App writes `games` rows itself under `06_DATA_MODEL` §Writer ownership (HANDOFF §P3 D15), this is the pipe's way of adding a row, not the only one; the watcher reads the table at 1 Hz either way.* |
|
||||
| `LaunchGame` | UI→A *(the App sends it since beta.21: Play in its Start directly mode, and in the store mode where no store installed the game — `App.Services.GamePlayer`, D59)* | `{ gameId, arguments? }` → ~~suspended-launch~~ launch mode as built ("inject late", `04_CAPTURE` §Launch mode) → `LaunchAck { gameId, accepted, outcome, sessionGuid? }` — `outcome` is `Accepted` · `UnknownGame` · `SessionRunning` (one per game at a time) · `Unavailable` · `RecordingOff` (2026-09-23: the entry's recording switch is off, FR-1.6 — FrameLedger does not start what it will not record). *(Built 2026-09-13, PR-1b: `CaptureOrchestrator.LaunchAsync` over an `ILaunchRecorderFactory` the Agent composes with the Vulkan layer's environment — or none when FR-2.4's switch is on — and the launcher election runs after, as the console's `launch` does; the elected session is not addressable by the launch's guid.)* |
|
||||
| `LaunchGame` | UI→A *(the App sends it since beta.21: Play in its Start directly mode, and in the store mode where no store installed the game — `App.Services.GamePlayer`, D59)* | `{ gameId, arguments? }` → ~~suspended-launch~~ launch mode as built ("inject late", `04_CAPTURE` §Launch mode) → `LaunchAck { gameId, accepted, outcome, sessionGuid? }` — `outcome` is `Accepted` · `UnknownGame` · `SessionRunning` (one per game at a time) · `Unavailable` · `RecordingOff` (2026-09-23: the entry's recording switch is off, FR-1.6 — FrameLedger does not start what it will not record) · `PackagedGame` (beta.33, D80: the executable's install root is a GDK package root — a game the Xbox app or the Microsoft Store installed, which Windows starts through its package and never by its path, `spike-notes` §25; nothing is started, and the App says to start it from the Xbox app or the Start menu. The App hands such a game to Windows itself and sends this only when it found no package record for it. Additive: an older App says the unknown outcome as a failure). *(Built 2026-09-13, PR-1b: `CaptureOrchestrator.LaunchAsync` over an `ILaunchRecorderFactory` the Agent composes with the Vulkan layer's environment — or none when FR-2.4's switch is on — and the launcher election runs after, as the console's `launch` does; the elected session is not addressable by the launch's guid.)* |
|
||||
| `SetHookEnabled` | UI→A | `{ gameId, enabled, disclosureVersion? }` — Agent re-runs the static AC pre-scan and may reply `Refused`. **The Agent stamps the consent timestamp itself.** *(Built 2026-09-13, PR-1b, as far as it can be: `enabled: false` → `RevokeAsync` → `HookEnabledAck { gameId, enabled: false, outcome }`; `enabled: true` → the pre-scan of the executable's directory, a refusal or a "could not verify" recorded through `RecordGuardBlockAsync` and answered `Refused { gameId, reason, family?, signal? }`; a clean scan → ~~**`Error DisclosureUnavailable`, nothing stamped** — the reviewed FR-2.1 text does not exist, and a client's `disclosureVersion` is a claim, not a disclosure shown. PR-4 replaces that last branch with the stamp~~ **since PR-4 (2026-09-13): the client's `disclosureVersion` compared with the Agent's own `SafetyDisclosure.Version`; equal → the stamp from the Agent's clock with `ConsentProvenance.ConsentDialog`, answered `HookEnabledAck { enabled, outcome, prescan: "clean" }`; anything else → `Error DisclosureVersionMismatch`, nothing written (D14). `DisclosureUnavailable` remains for a composition that wired no version, which `--serve` never is.)* **Since beta.8 (2026-09-25):** the pre-scan is of the executable (the guard resolves the install root, PR-2 of that train), and BEFORE it an executable known not to run as x64 is answered `Refused { gameId, reason: "ExecutableNotX64", signal: "x86" | "anycpu32" | "arm64" | "arm" }` with nothing scanned and nothing written — not a guard reason and not a block (`05_DETECTION` §What the files say about themselves). **Since D33 (2026-09-26):** for a blocked game whose user-mode exception is in force for the executable on disk (the option on, a grant made on these bytes, the block naming that family) the pre-scan NAMES the family, and a pass under it is stamped as ever and answered `prescan: "exception"`; a finding about the game under it also ends the exception. |
|
||||
| `SetAntiCheatException` | UI→A | **Added 2026-09-26 (D33).** `{ gameId, enabled, disclosureVersion? }` — grant or withdraw a game's user-mode anti-cheat exception (`19_SAFETY` §The user-mode exception). `enabled: false` → the exception ends (`Withdrawn`), hooking goes off while the block stands → `AntiCheatExceptionAck { gameId, granted: false, outcome, family? }`. `enabled: true` → `Error DisclosureVersionMismatch` unless `disclosureVersion` is the Agent's `AntiCheatExceptionDisclosure.Version`; `Error ExceptionsOff` while `hooking.usermode_ac_exceptions` is off; `Refused { reason: "BlockNotExceptionable" }` for a title list or an unreadable block; then the Agent's OWN facts — ~~the successful Tier-1 sessions (`Refused { reason: "TooFewSessions", signal: <count> }` under two)~~ *(D38, 2026-10-03: no session is needed)*; a game an exception of which ended during its trial is refused before anything is scanned (`Refused { reason: "TrialFailed", family, signal: <unix ms> }`); a tolerant pre-scan of the executable on disk naming the block's family (`Refused { reason, family, signal }` unless the guard let exactly that family through) — and the store writes the grant only over facts that make the game eligible, and never over a failed trial → `AntiCheatExceptionAck { granted, outcome, family }`. **A grant turns nothing on**: hooking is FR-2.1's `SetHookEnabled`, afterwards. Not answered (`UnknownType`) by an Agent composed without the exception. |
|
||||
| `PauseCapture` / `ResumeCapture` | UI→A | global → `PauseAck { paused }`; `StatusAck.paused` reports it. *(Built 2026-09-13, PR-1b: one in-memory flag, `CapturePause`, read by every session loop at its tick and told to the ring once per transition; supervision — the guard scan, the kill switch, the safety stop — never pauses. Not persisted: an Agent that restarts resumes.)* |
|
||||
|
||||
@@ -614,6 +614,8 @@ All screens are `Page`s registered with the navigation page provider and navigat
|
||||
> in the UI, or a fixed rule that Steam's games always go through Steam) and left the choice open; the note was taken
|
||||
> because the rule would cost too much: three of the five Steam games started directly on 2026-10-20 ran and were
|
||||
> measured from their first frame, and a Vulkan game is measured only when FrameLedger starts it (Everhex Demo).
|
||||
>
|
||||
> **beta.33 (D80): a game the Xbox app or the Microsoft Store installed always starts through Windows.** In either mode, and from an App running as administrator too, **Play** runs `explorer.exe shell:AppsFolder\<AUMID>` — the user's shell activates the game's package, unelevated, as its Start-menu tile does (`StoreLaunches`: the AUMID is the record's `<family name>!<application id>`, checked against the shape Windows gives one). Started by its path a GDK game is never the game in its package (`spike-notes` §25), so no mode sends `LaunchGame` for it, and the agent answers `PackagedGame` to one that reaches it anyway (an entry the App found no package record for). The notices: `Play_Xbox_Format` (started), `Play_Xbox_NotStarted_Format` and `Play_PackagedGame_Format` (start it from the Xbox app or the Start menu), all warnings but the first; the *Through the store* and *Start directly* tooltips and Settings ▸ Games ▸ Play button say it. The session is attach mode, `late_attach` (`04_CAPTURE` §Launch mode vs attach mode). Tests: `StoreLaunchesTests`, `GamePlayerTests`, `CaptureOrchestratorTests`.
|
||||
|
||||
### Session summary (secondary `FluentWindow`, also the post-session toast target)
|
||||
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers; **VRAM (this game)** and **RAM (this game)** — beta.12: the median with the peak beneath, both tiers), **Statistics per series** (beta.12: every stored series' mean / median / minimum / peak), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
|
||||
|
||||
@@ -475,6 +475,41 @@ the injection primitive, not a fifth question about the title.
|
||||
|
||||
> **There is no override.** ~~There is one, since 2026-09-21, and it is none of the things this paragraph named~~ *(one day; withdrawn 2026-09-22)*: still no hidden setting, no config-file flag, no CLI switch, no "advanced users" escape hatch, no global form. If a user disagrees with a specific entry, the path is still a GitHub issue against the rules file, reviewed in public. What exists is below — and since 2026-09-26 (D33), one narrow, evidence-bound exception for anti-cheat that is user-mode throughout, which lets a named family through while every check still runs (§The user-mode exception).
|
||||
|
||||
### The target must be able to take the Overlay — beta.33 (D78)
|
||||
|
||||
The last question before the primitive, after checks 1–4 and the payload's identity passed: **can this process take the
|
||||
Overlay at all?** The guard reads it from the target itself (`Sources::TargetIsolationFacts`, one
|
||||
`PROCESS_QUERY_LIMITED_INFORMATION` handle — measured 2026-11-03 to answer both questions, `GetProcessMitigationPolicy`
|
||||
needing no more):
|
||||
|
||||
| Read | Refusal | Why it cannot work |
|
||||
|---|---|---|
|
||||
| `TokenIsAppContainer` | `kTargetAppContainer` | a Microsoft Store app of the UWP kind: the Overlay's shared memory, its `Local\` names and the rules file live in the user's session namespace and profile, which an AppContainer cannot open. D78: GDK games are in, UWP apps are out |
|
||||
| `ProcessSignaturePolicy`: `MicrosoftSignedOnly` or `StoreSignedOnly` | `kTargetMitigation` | the Overlay is neither (CLAUDE.md rule 9: unsigned): the remote `LoadLibraryW` fails |
|
||||
| `ProcessDynamicCodePolicy`: `ProhibitDynamicCode` | `kTargetMitigation` | MinHook's trampolines are dynamic code: the Overlay would load and hook nothing |
|
||||
| `ProcessUserShadowStackPolicy`: strict mode, or `BlockNonCetBinaries` / `BlockNonCetBinariesNonEhcont` | `kTargetMitigation` | the Overlay is not marked CET-compatible: refused at load, or a violation ends the game |
|
||||
| `ProcessControlFlowGuardPolicy`: `StrictMode` | `kTargetMitigation` | `native/CMakeLists.txt` H1: measured safe with strict mode off only; a host in strict mode could still `__fastfail` on the trampolines, which no fault policy can catch (rule 5) |
|
||||
|
||||
**The policy is the signal**, and only the enforcing flags count: an `Audit*` flag refuses nothing, and
|
||||
`SetContextIpValidation` without strict mode is what every CET-compatible process carries (measured: `pwsh.exe`
|
||||
`0x105`). A policy the running Windows does not know answers `ERROR_INVALID_PARAMETER` (measured) and cannot be in
|
||||
effect. **"Could not tell" refuses** — a seam that fails, or none wired — as `kProcessUnreadable`, the module check's word
|
||||
for a process it could not read. ctest `fl_guard` `[isolation]` holds each refusal through fakes, and two of them against
|
||||
Windows itself: a child started under "no dynamic code" and "Microsoft-signed images only".
|
||||
|
||||
**Neither is a finding.** Nothing is written to the game's row and no family is named; the session is Tier 2 with the
|
||||
reason, as for a 32-bit game. **No game that measured before is refused now**: each of these ended as a failed injection,
|
||||
an Overlay that installed no hooks, or a risk of ending the game. It is asked once, before the injection — never by the 30 s
|
||||
re-scan, which runs inside a process the Overlay is already in — and, like the payload check, it is not numbered as a
|
||||
check: it is a precondition of the primitive, not a question about the title.
|
||||
|
||||
**A GDK game's tree, measured (`spike-notes` §25, six titles activated through their packages):** the chain is
|
||||
`GameLaunchHelper.exe` → `gamingservicesui.exe` → `XboxPcTray.exe` → the launch executable (→ an Unreal title's shipping
|
||||
executable), `GameLaunchHelper` exits first, and its parent is the activator — the user's shell when **Play** starts it,
|
||||
which is where the scan set already stops. Every member opened with the guard's rights as a standard user, none is an
|
||||
AppContainer, none runs under any of the policies above, and no member's module matched a fuzzy fragment or a blocklist
|
||||
name. So the scan set needs nothing new for these titles; an Xbox title that ships anti-cheat is unmeasured
|
||||
(`20_OPEN_QUESTIONS` §G).
|
||||
### What a finding does to the game — owner decision 2026-09-22
|
||||
|
||||
**The per-game override of 2026-09-21 is withdrawn.** It shipped in `0.1.0-beta.3` and `beta.4`. Its first real use
|
||||
|
||||
+89
-57
@@ -71,6 +71,7 @@ owner-only items stay below; the history of every train, the passed owner-only i
|
||||
| `§beta.29` | [`handoff/history/0.1.0-beta.29.md`](handoff/history/0.1.0-beta.29.md) |
|
||||
| `§beta.30` | [`handoff/history/0.1.0-beta.30.md`](handoff/history/0.1.0-beta.30.md) |
|
||||
| `§beta.31` | [`handoff/history/0.1.0-beta.31.md`](handoff/history/0.1.0-beta.31.md) |
|
||||
| `§beta.32` | [`handoff/history/0.1.0-beta.32.md`](handoff/history/0.1.0-beta.32.md) |
|
||||
| `§Owner-only`, an open item | [§Owner-only](#owner-only--no-pr-can-close-these) below |
|
||||
| `§Owner-only`, a passed item (3, 12, 14–19) | [`handoff/owner-only-passed.md`](handoff/owner-only-passed.md) |
|
||||
| `§Traps`, `§Two corrections carried forward` | [`handoff/traps.md`](handoff/traps.md) |
|
||||
@@ -78,80 +79,87 @@ owner-only items stay below; the history of every train, the passed owner-only i
|
||||
|
||||
---
|
||||
|
||||
## **START HERE** — 2026-10-31, 0.1.0-beta.32: the alpha line — .NET 11 RC3 / C# 15 beside the betas
|
||||
## **START HERE** — 2026-11-03, 0.1.0-beta.33: games from the Xbox app and the Microsoft Store
|
||||
|
||||
*Status is `docs/changelog/0.1.0-beta.32.md` (and, for the first alpha, `docs/changelog/0.1.0-alpha.1.md`); this is what
|
||||
no other file carries.* The owner: "Bạn có thể phân tích, tìm kiếm sự khác biệt so với .NET 10, đánh giá, lên plan và tạo
|
||||
thêm bản alpha, nơi thử nghiệm các dotnet mới, cập nhật code (nếu cần) cho .NET 11 RC3/c# 15 để chuẩn bị cho .NET 11 ra
|
||||
mắt, thêm cảnh báo đây là bản thử nghiệm, yêu cầu tự chịu trách nhiệm nếu cần nhé." — an analysis of .NET 11 against
|
||||
.NET 10, an evaluation, a plan, and an alpha build where new .NET versions are tried, code updated where needed, with an
|
||||
experimental-build, own-risk warning. #344 (the line's plumbing), #346 (the warning, the backup, the legal text), #345
|
||||
(what .NET 11's SDK asks of the source) and this release; the `alpha` branch and `0.1.0-alpha.1` follow.
|
||||
*Status is `docs/changelog/0.1.0-beta.33.md`; this is what no other file carries.* The owner: "Trong phiên này, ta sẽ tập
|
||||
trung xử lý, đánh giá, phân tích cho các game thuộc MS Store/ Xbox App/Game Pass cho (các) phiên bản tiếp theo nhé. Quy
|
||||
trình vẫn như mọi lần." — handle, evaluate and analyse the games of the Microsoft Store, the Xbox app and Game Pass for the
|
||||
next versions, the usual train; the owner's games are in `C:\XboxGames` and `D:\xbox`. #351 (the library, the install
|
||||
root, detection, the art, Privacy 2.13), #352 (Play, the guard's two refusals, one exe-path reader) and this release;
|
||||
`0.1.0-alpha.2` follows (D82).
|
||||
|
||||
**Decisions (asked while planning, do not re-ask):**
|
||||
|
||||
- **D73 — the alpha line** (`12_BUILD` §The alpha line, `13_CI_CD` §The alpha line, `11_UPDATER` §Channels): the source of a
|
||||
released beta built on a prerelease .NET from the long-lived `alpha` branch, tagged `vX.Y.Z-alpha.N`, packed on
|
||||
Velopack's `alpha` channel. An alpha **replaces** the beta on the PC (same packId, install folder and data folder — the
|
||||
native layer reads that folder by fixed path) and **copies the ledger before it first opens it**, once per alpha
|
||||
version, newest three kept (`06_DATA_MODEL` §Migrations).
|
||||
- **D74 — the warning** (`08_UI` §First-run flow and §Settings, `01_ARCHITECTURE` §Lifecycle): `legal/ALPHA_NOTICE.md`
|
||||
in an alpha's Legal Gate with a tick box of its own that Accept waits for; the alpha's Agent does not serve until it is
|
||||
accepted (exit 8); an ALPHA badge, a banner at every start, the update channel locked.
|
||||
- **D75 — the legal text made true**: EULA 1.6 §2B and Disclaimer 2.12 §0 name alphas beside betas; the owner approved
|
||||
the Alpha notice 1.0 and both sentences with the plan.
|
||||
- **D76 — alpha.1 is a retarget only**: `net11.0`, C# 15 by `LangVersion latest`, the three runtime-serviced packages
|
||||
`11.0.0-rc.3.26522.148`; no preview feature (no runtime-async), no C# 15 syntax — main must keep building as C# 14 on
|
||||
.NET 10.
|
||||
- **D77 — measure first, on the owner's titles**: the launch chain was measured by activating six of the eleven packages
|
||||
with no FrameLedger hook, read-only, each game closed by its window and never killed, with the decision table committed
|
||||
before the run (`spike-notes` §25, its two commits in #351).
|
||||
- **D78 — GDK only**: an app-container (UWP) process is refused with a reason of its own, `TargetAppContainer`, Tier 2
|
||||
(`19_SAFETY` §The target must be able to take the Overlay); `LIMITATIONS.md` says so.
|
||||
- **D79 — the platform is "Xbox"** (id `xbox`), full scope: import, art, Play, Tier-1 capture, detection, docs and legal.
|
||||
- **D80 — Play on an Xbox game always activates its package**, in both D59 modes (`08_UI` §Games): started by its path a
|
||||
GDK game is never the game in its package — the run corrected the plan's premise that `CreateProcess` fails with error 5
|
||||
(it hands the launch executable back to the package, so the game is not the launcher's descendant; an Unreal shipping
|
||||
executable runs outside it). The Agent records such a game in attach mode.
|
||||
- **D81 — title lists stay keyed by Steam id**: an Xbox copy is matched by everything but that entry; the gap is
|
||||
`20_OPEN_QUESTIONS` §G *Xbox app / Microsoft Store titles*.
|
||||
- **D82 — alpha.2 right after beta.33** (the owner runs `0.1.0-alpha.1`, and the alpha's channel is locked): on RC3; if
|
||||
the train reaches the alpha after .NET 11's release on 2026-11-10, the standing rule applies (SDK 11.0.100, packages
|
||||
11.0.0) — no new decision.
|
||||
|
||||
**The evaluation, as given to the owner:** .NET 11 is STS — supported to about 2028-11, no later than .NET 10 LTS
|
||||
(2028-11-14) — so moving the main line buys no support time; Microsoft's supported-OS list for .NET 11 has Windows 10
|
||||
only in its LTSC and IoT editions, against NFR-8's Windows 10 22H2 floor; C# 15's unions and closed hierarchies would suit
|
||||
the tri-states and refusal reasons once the main line compiles C# 15. Recommendation: the main line stays on .NET 10;
|
||||
the alpha line gathers the evidence; `20_OPEN_QUESTIONS` §G *The main line's .NET* holds the decision table.
|
||||
The Privacy Policy 2.13's wording was approved with the plan (D36).
|
||||
|
||||
**Choices made here:**
|
||||
|
||||
- **One alpha per beta, never several in a row**: Velopack's `GithubSource` asks GitHub for one page of ten releases, so
|
||||
ten of one line in a row would hide the other line's newest from its update check (read from Velopack's code).
|
||||
- **Every alpha-only behaviour lives on main, dormant**: `Shared.BuildLine` is composed and injected, so the alpha's
|
||||
gate, banner, hold, Agent wait and backup are tested on main; the branch differs only by `RELEASE_LINE`, `global.json`,
|
||||
the TFM, three package versions and `legal/licenses/nuget/`.
|
||||
- **The App holds the Agent while an alpha's gate is open** on a hold of its own: the connection's first round runs under
|
||||
the first-run window, and a held-back Agent started anyway would exit 8 and be started again every round — under the
|
||||
admin mode a Windows prompt each time.
|
||||
- **The backup has its own lock**, five minutes, not the migration lock: that one gives a waiter 30 s and throws.
|
||||
- **.NET 11's `IHost` rethrow is accepted on the alpha**: a failed background service ends an alpha's Agent through the
|
||||
crash path with a minidump, where .NET 10 exits 0 — said in `LIMITATIONS.md`.
|
||||
- **A GDK package root is an install-root boundary**, for the guard's check 4 and for detection alike, and only where no
|
||||
store boundary matched — so it can only widen what is walked (`19_SAFETY` §Pre-injection checks, amended 2026-11-03).
|
||||
The guard gained `GamesInstalled\<X>` with it, and one case list read by both test suites
|
||||
(`tests/fixtures/install-roots/cases.txt`) holds the two resolvers together.
|
||||
- **`root_file`, a new detection signal**, answered from the install root's own listing, so the `xbox` platform rule —
|
||||
first, because a GDK FINAL FANTASY ships Steam's DLL — is decidable even where a very large install's walk ran short.
|
||||
- **The two refusals read the target once, before the primitive**, never at the 30 s re-scan; "could not tell" refuses as
|
||||
`ProcessUnreadable`, and only enforcing flags count (`SetContextIpValidation` without strict mode is on every
|
||||
CET-compatible process: `pwsh.exe` reads `0x105`).
|
||||
- **`TargetResolver` reads the watcher's spelling** (`ProcessImagePath`) but keeps the guard's rights, so D21's
|
||||
`TargetUnreadable` is unchanged.
|
||||
|
||||
**Measured on the way:** the whole gate on .NET 11 RC3 in a throwaway worktree (`spike-notes` §24): native 32/32, every
|
||||
test suite green with no change of answer, coverage and format clean; 21 analyzer sites in 14 files (CA1307 ×13, MA0002
|
||||
×7, CA2026 ×1), all fixed on main in forms .NET 10 also compiles; license-check red only because `legal/licenses/nuget/`
|
||||
is the beta's package set.
|
||||
**Measured on the way** (`spike-notes` §25): eleven GDK packages, full trust, the user's token, medium integrity, none of
|
||||
the four mitigations; the image path and the loader's main module both in the `Content` spelling; every game `.exe`
|
||||
refuses `FILE_READ_DATA`/`FILE_EXECUTE` outside its package, so no Unreal version and no *Runs as* for these titles;
|
||||
`GetProcessMitigationPolicy` answers through `PROCESS_QUERY_LIMITED_INFORMATION`, and an unknown policy answers
|
||||
`ERROR_INVALID_PARAMETER`.
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **`sed -i` in Git Bash rewrites a CRLF file as LF** (seen on the probe's props files); edit CRLF files with the Edit tool
|
||||
or Python with `newline=''`, and `unix2dos` a file the Write tool created.
|
||||
- **The keyboxd I/O error at signing came back**: `gpgconf --kill keyboxd` (the Windows GnuPG's), then commit again.
|
||||
- **A CMake configure in a fresh worktree works when the gate is started from PowerShell**, whose `git` is
|
||||
`Git\cmd\git.exe`; from Git Bash, CMake caches `ucrt64\bin\git.exe` and the submodule step fails.
|
||||
- **Malwarebytes quarantines `fl_guard_test.exe`** (`Malware.Heuristic.108256`, records in
|
||||
`C:\ProgramData\Malwarebytes\MBAMService\RtpDetections`) on some builds and not others: ctest then reports `fl_guard` as
|
||||
passed in 0.5 s with no output and `fl_prescan` with an empty command. Read `LastTest.log` for the assertion count before
|
||||
believing a native pass; an exclusion for `E:\frameledger\build\` is the owner's to add (a security setting), and CI runs
|
||||
both suites.
|
||||
- **`build.ps1` finds the x64 clang-format; `Get-ChildItem … clang-format.exe` finds the ARM64 one first**, which will not
|
||||
start on this PC.
|
||||
- **SonarCloud's quality gate on #351 was 77.7 % new-code coverage** (≥ 80 % wanted) and one `cpp:S5813` (`wcslen`): both
|
||||
closed in #352 — its own gate 95.4 %, main's after the merge 86.5 % on the code since beta.32 with no open issue. The
|
||||
job is advisory, so a merge on green does not wait for it — read its verdict after each merge.
|
||||
- **FluentAssertions' `OnlyContain` fails an empty collection**: a test of what this PC holds (`GamingRoots.OnThisPc()`)
|
||||
passed here and failed on the hosted runner, which has no `.GamingRoot` (#352's first CI run) — assert that nothing
|
||||
is wrong rather than that everything is right.
|
||||
|
||||
**Owner-only:** item 26 — beta.32 on real hardware.
|
||||
**Owner-only:** item 28 — the Xbox titles on real hardware.
|
||||
|
||||
### 0.1.0-alpha.1 — the first alpha, the same day
|
||||
### 0.1.0-alpha.2 — the second alpha, the same day (D82)
|
||||
|
||||
The `alpha` branch was cut from main at this pull request — `v0.1.0-beta.32` and these notes, no other change — and carries the switch alone (`12_BUILD` §The alpha line): `RELEASE_LINE`,
|
||||
`global.json` (SDK `11.0.100-rc.3.26522.148`), the TFM, three packages at `11.0.0-rc.3.26522.148`, and the NuGet licence
|
||||
texts of that package set (69 packages). Its gate on the 11 SDK passed whole before the pull request into `alpha`; the
|
||||
release ran from the signed tag `v0.1.0-alpha.1` on `alpha`, on Velopack's `alpha` channel. Its notes are
|
||||
`docs/changelog/0.1.0-alpha.1.md`, which open with the experimental-build warning.
|
||||
`alpha` took main at this pull request — `v0.1.0-beta.33` and these notes, no other change — by a merge commit, as
|
||||
`13_CI_CD` §The alpha line says: no file the switch holds had moved on main, so nothing conflicted and the switch is the
|
||||
first alpha's (SDK `11.0.100-rc.3.26522.148`, the three packages at `11.0.0-rc.3.26522.148`, the same NuGet licence
|
||||
texts). Its gate on the 11 SDK must pass before the pull request into `alpha` is merged by hand (the branch has no
|
||||
auto-merge); the release runs from the signed tag `v0.1.0-alpha.2` on `alpha`, and its delta from alpha.1 is the first
|
||||
an alpha's release has to find — #350's lookup, by the name the pack lists. Its notes are
|
||||
`docs/changelog/0.1.0-alpha.2.md`, which open with the experimental-build warning.
|
||||
|
||||
- **The next alpha** follows the next beta: merge main into `alpha` (a merge commit), regenerate `legal/licenses/nuget/`
|
||||
there if it conflicts, then the same steps (`13_CI_CD` §The alpha line). **.NET 11 ships on 2026-11-10**: from then the
|
||||
switch is SDK `11.0.100` and the packages `11.0.0`, and RC3 is out of support — move the alpha even if no beta comes.
|
||||
- **The next alpha moves to .NET 11's release**: from 2026-11-10 the switch is SDK `11.0.100` and the packages `11.0.0`,
|
||||
and RC3 is out of support — move the alpha even if no beta comes.
|
||||
|
||||
**Owner-only:** item 27 — the first alpha on real hardware.
|
||||
**Owner-only:** item 29 — the second alpha on real hardware.
|
||||
|
||||
|
||||
## Owner-only — no PR can close these
|
||||
@@ -342,6 +350,24 @@ release ran from the signed tag `v0.1.0-alpha.1` on `alpha`, on Velopack's `alph
|
||||
.NET 11. (e) **Going back**: the beta's `FrameLedger.App-win-Setup.exe` over it — the beta shows the alpha's session.
|
||||
(f) The `ja` strings marked `review` that only an alpha shows (`Alpha_*`, `FirstRun_Alpha_*`, `FirstRun_Doc_Alpha`,
|
||||
`App_Title_Alpha`, `About_Runtime_Alpha_Format`, `Settings_UpdateChannel_AlphaBody`).
|
||||
28. **beta.33 on real hardware: the Xbox titles** (D77–D81). (a) **The update from beta.32** (or alpha.2's, item 29): the
|
||||
terms window shows the Privacy Policy 2.13 once. (b) **Import library** offers the eleven Xbox titles as *Xbox* — the
|
||||
Unreal titles with their shipping executables (`…-WinGDK-Shipping.exe`, `ValorMortisMSG-Win64-Shipping.exe`), the Unity
|
||||
titles with their players, never `gamelaunchhelper.exe` — each with its package version (*Xbox version 1.3.5124.0*).
|
||||
(c) Each game's page shows its square logo whole in a square slot and its splash image as the banner, captioned
|
||||
*Xbox*. (d) **Play** starts Valor Mortis and FINAL FANTASY through Windows in both Play modes, and from an App run as
|
||||
administrator — the notice says Windows is starting it. (e) With consent given, one hooked session of each: Tier 1,
|
||||
frames, *late attach*, the engine and platform on the game page. (f) The `ja` strings marked `review`: `Store_Xbox_Format`,
|
||||
`Art_Source_Xbox`, `Import_NothingFound`, `FirstRun_Import_Body`, `Settings_GameArt_Body`, `Play_Xbox_Format`,
|
||||
`Play_Xbox_NotStarted_Format`, `Play_PackagedGame_Format`, `Play_ToolTip_Store`, `Play_ToolTip_Direct`,
|
||||
`Settings_PlayMode_Body`, `Guard_TargetAppContainer`, `Guard_TargetMitigation`. Then
|
||||
`docs/LIST_GAME_TESTED.md` gains the Xbox titles from a ledger copy (D35), approved before the commit.
|
||||
29. **0.1.0-alpha.2 on real hardware** (D73, D82). (a) **The update from alpha.1**: Help ▸ Check for updates offers
|
||||
alpha.2 — the first update an alpha's updater has found — and *Restart to update* installs it; say whether it
|
||||
downloaded the delta or the whole package. (b) The terms window shows the Privacy Policy 2.13 and the Alpha notice
|
||||
with its box again, and Accept waits for the tick. (c)
|
||||
`%LOCALAPPDATA%\FrameLedger\backups\ledger-before-0.1.0-alpha.2.db` exists beside alpha.1's, and opens. (d) Item 28's
|
||||
Xbox checks, on the alpha.
|
||||
**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
|
||||
headers **and** `amd64/nvapi64.lib`; Windows 11 is the **measurement scope** only —
|
||||
@@ -432,6 +458,12 @@ Where each owner decision is recorded — the file and its section, and a label
|
||||
| D74 | [`08_UI.md`](08_UI.md) §First-run flow | the alpha's warning: the Alpha notice with its own tick box in the Legal Gate, the alpha's Agent waiting for it, an ALPHA badge and a banner, the update channel locked |
|
||||
| D75 | [`../legal/EULA.md`](../legal/EULA.md) §2B | EULA 1.6 and Disclaimer 2.12 name alphas beside betas; the Alpha notice 1.0 approved with the plan |
|
||||
| D76 | [`12_BUILD.md`](12_BUILD.md) §The alpha line | alpha.1 is a retarget only: `net11.0`, C# 15 by `LangVersion latest`, three runtime-serviced packages; no preview feature, no C# 15 syntax |
|
||||
| D77 | [`spike-notes/25-xbox-gdk.md`](spike-notes/25-xbox-gdk.md) | the Xbox titles measured first, by package activation, read-only, each closed by its window; the decision table before the run |
|
||||
| D78 | [`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) §The target must be able to take the Overlay | GDK games only; an app-container (UWP) process is refused as `TargetAppContainer`, Tier 2 |
|
||||
| D79 | [`05_DETECTION.md`](05_DETECTION.md) §Platform signatures & metadata | the platform is "Xbox" (`xbox`), in full: import, artwork, Play, capture, detection, docs and legal |
|
||||
| D80 | [`08_UI.md`](08_UI.md) §Games | Play on an Xbox game always activates its package, in both modes; the Agent answers `PackagedGame` and records it in attach mode |
|
||||
| D81 | [`20_OPEN_QUESTIONS.md`](20_OPEN_QUESTIONS.md) §G | title lists stay keyed by Steam id; an Xbox copy is matched by everything but that entry |
|
||||
| D82 | [`HANDOFF.md`](HANDOFF.md) §START HERE | alpha.2 right after beta.33; on RC3 unless the train reaches it after .NET 11 ships (then SDK 11.0.100, packages 11.0.0) |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<!-- The second alpha's notes (D73, D82), on main as every release's are; the alpha branch takes them with its sync. CHANGELOG.md lists every release. -->
|
||||
|
||||
## [0.1.0-alpha.2] - 2026-11-03
|
||||
|
||||
> ⚠ **EXPERIMENTAL BUILD — YOU USE IT AT YOUR OWN RISK.** This is an **alpha**: the source of `0.1.0-beta.33` built on
|
||||
> **.NET 11 Release Candidate 3** (SDK `11.0.100-rc.3.26522.148`, runtime `11.0.0-rc.3.26522.148`), a version of .NET
|
||||
> Microsoft has not finished, with the C# 15 compiler. It has not been tested the way a beta is, and it can crash, record
|
||||
> wrongly or fail to update in ways no beta has. **If you want results you can rely on, use the beta.** Before it runs it
|
||||
> shows the *Alpha notice* (`legal/ALPHA_NOTICE.md` 1.0), which you must accept, with its own box to tick.
|
||||
|
||||
**The second alpha: `0.1.0-beta.33` on .NET 11 RC3** — games from the Xbox app and the Microsoft Store (the beta's
|
||||
notes, `docs/changelog/0.1.0-beta.33.md`, say what that brings). What an alpha is and how to go back: the user guide's
|
||||
*Alpha builds* page (`guide/11-alpha-builds.md`), and the *Alpha builds* section of `LIMITATIONS.md`.
|
||||
|
||||
**Updating from `0.1.0-alpha.1`:** Help ▸ Check for updates, then *Restart to update* with no game running — an alpha
|
||||
updates only to newer alphas. Before it first opens your database it copies it to
|
||||
`%LOCALAPPDATA%\FrameLedger\backups\ledger-before-0.1.0-alpha.2.db` (the newest three copies are kept). The terms window
|
||||
shows the **Privacy Policy 2.13** once and, as every time an alpha's terms window opens, waits for the Alpha notice's box
|
||||
to be ticked again; the notice itself stays 1.0. The ledger stays at schema 21; the detection rules move to `2026.11.1`.
|
||||
|
||||
**Installing it over a beta:** download `FrameLedger.App-alpha-Setup.exe` below, verify its hash against
|
||||
`SHA256SUMS.txt`, and let it replace the FrameLedger already installed; the Alpha notice is shown first. **Going back:**
|
||||
install the newest beta's `FrameLedger.App-win-Setup.exe` over it; your database stays where it is.
|
||||
|
||||
**Windows and your PC:** as for the first alpha — Microsoft supports .NET 11 on Windows 11 24H2 and later, and on Windows
|
||||
10 only in its LTSC and IoT editions; it needs a processor with SSE4.2 and POPCNT. .NET 11 RC3 is supported until .NET 11
|
||||
ships (10 November 2026); the next alpha moves to the final release.
|
||||
|
||||
### What differs from 0.1.0-beta.33
|
||||
|
||||
The same as `0.1.0-alpha.1` differed from `0.1.0-beta.32` (`docs/changelog/0.1.0-alpha.1.md`): the runtime and the
|
||||
compiler, the three libraries serviced with the runtime, what .NET 11 itself changes — and the part of FrameLedger loaded
|
||||
into a game is the beta's.
|
||||
@@ -0,0 +1,71 @@
|
||||
<!-- Moved from CHANGELOG.md's [Unreleased] when 0.1.0-beta.33 was cut, 2026-11-03 (D66). CHANGELOG.md lists every release. -->
|
||||
|
||||
## [0.1.0-beta.33] - 2026-11-03
|
||||
|
||||
**The thirty-third pre-release: games from the Xbox app and the Microsoft Store.** PC Game Pass games included: Import
|
||||
library finds the games those apps installed, a game's page shows its own logo and splash image, **Play** starts one
|
||||
through Windows as its Start-menu tile does, and, with your consent, FrameLedger hooks it like any other game. How these
|
||||
games are laid out, how Windows starts them and what it lets another program read were measured first on the owner's
|
||||
eleven titles; a hooked session of one is still to be run. The same unsigned installer: verify its hash against
|
||||
`SHA256SUMS.txt`, then *More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.32`:** Help ▸ Check for updates, then *Restart to update* with no game running. The terms
|
||||
window shows the **Privacy Policy 2.13** once — it names what the Xbox library reads, that Play asks Windows to start
|
||||
such a game, and the two facts read from a game before any injection; the EULA and the Disclaimer do not change. The
|
||||
ledger stays at schema 21; the detection rules move to `2026.11.1`, so every game in the library is read again once.
|
||||
|
||||
### Added
|
||||
|
||||
- **Games from the Xbox app and the Microsoft Store** (the owner's request of 2026-11-03, owner decisions D77–D81; PC Game
|
||||
Pass games included): **Import library** finds the games those apps installed into a games folder — each drive's
|
||||
`.GamingRoot` names the folders, each game's own `MicrosoftGame.config` and `appxmanifest.xml` say what it is, and
|
||||
Windows says whether its package is installed for you — and lists them as **Xbox**, with the process that actually
|
||||
draws (an Unreal title's shipping executable, not the stub its package launches; never the GDK's `gamelaunchhelper.exe`).
|
||||
A game's page shows its own square logo and splash image, read from its folder, and its package version (*Xbox version
|
||||
1.3.5124.0*). Only games built on Microsoft's GDK are listed; an older Store app (UWP) is not (`docs/05_DETECTION.md`
|
||||
§Platform signatures & metadata, `LIMITATIONS.md`, the user guide). Everything was measured first, on the owner's eleven
|
||||
titles: the layout, and what Windows lets another program read there — every game executable refuses to be read, so no
|
||||
Unreal Engine version is shown for these games (`docs/spike-notes/25-xbox-gdk.md`).
|
||||
- **The detection rules know Xbox games** (rules `2026.11.1`, so every game in the library is read again once): an `xbox`
|
||||
platform, first in the list — a GDK FINAL FANTASY ships Steam's DLL and read *Steam* — decided by a new signal,
|
||||
`root_file`, from the install folder's own listing, so a very large install whose deep walk ran short still reads as
|
||||
its store (`docs/05_DETECTION.md`).
|
||||
- **Play starts a game from the Xbox app or the Microsoft Store through Windows** (D80), in either Play mode and from an
|
||||
App running as administrator: the user's shell activates the game's package as its Start-menu tile does
|
||||
(`explorer.exe shell:AppsFolder\<AUMID>`), because started by its path such a game is never the game in its package —
|
||||
measured on the owner's titles (`docs/spike-notes/25-xbox-gdk.md`). The capture agent refuses to start one by its path
|
||||
(`LaunchGame` answers `PackagedGame`), and the game is recorded once it appears, a few seconds after its start
|
||||
(`docs/04_CAPTURE.md`, `docs/08_UI.md`, `LIMITATIONS.md`).
|
||||
- **The anti-cheat guard says when a game cannot take the hook at all** (D78), read from the game's own token and code-protection
|
||||
settings just before the injection: `TargetAppContainer` — an older Microsoft Store app (UWP) — and `TargetMitigation` —
|
||||
only Microsoft- or Store-signed code, no generated code, a strict or non-CET-blocking user shadow stack, or strict Control
|
||||
Flow Guard. Neither is a finding: nothing is written to the game, and the session keeps its duration, the sensors and the
|
||||
reason. Each ended before as a failed injection, a hook that installed nothing, or a risk of ending the game, so no game
|
||||
that measured before is refused now (`docs/19_SAFETY_AND_ANTICHEAT.md`).
|
||||
|
||||
### Changed
|
||||
|
||||
- **The Privacy Policy is 2.13**, shown once at the next start: it names what the Xbox library reads — the games folders
|
||||
`.GamingRoot` names, each game's package files, Windows' answer whether its package is installed for you, and the
|
||||
pictures a game ships in its own folder — that Play asks Windows to start such a game, and that before any injection
|
||||
FrameLedger reads whether a game runs in an app container and which of Windows' code protections it runs under. The
|
||||
EULA and the Disclaimer do not change.
|
||||
- **The capture path reads a game's executable path one way** (for developers): `TargetResolver`, which finds the game again
|
||||
just before the guard, read the loader's spelling (`Process.MainModule`) where the watcher had the kernel's, so a game
|
||||
started through a junction could end `TargetNotRunning` about a process the watcher had just matched. Both read
|
||||
`ProcessImagePath` now, and the resolver still opens a candidate with the guard's own rights, so a process an anti-cheat
|
||||
driver closes stays `TargetUnreadable` (`docs/04_CAPTURE.md` §Process watcher).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **The anti-cheat check saw only part of an Xbox game's folder** (safety): no install-root boundary matched the
|
||||
`<games folder>\<Game>\Content\` layout, so for an Unreal title's executable, three levels down, check 4 walked only its
|
||||
`Binaries\WinGDK` folder, and anti-cheat at the root of `Content` would have read clean. A GDK package root — the folder
|
||||
holding `MicrosoftGame.config` beside `appxmanifest.xml` — is now a boundary for the guard and for detection alike, used
|
||||
only where no store boundary matched, so it can only widen what is walked. The guard also gained `GamesInstalled\<X>`,
|
||||
which detection had had alone since #17; one case list read by both test suites now holds the two resolvers together
|
||||
(`docs/19_SAFETY_AND_ANTICHEAT.md`, `tests/fixtures/install-roots/cases.txt`).
|
||||
- **The second alpha's release would have stopped at its delta check** (for developers): Velopack names a non-default
|
||||
channel's packages with the channel (`FrameLedger.App-<version>-alpha-delta.nupkg`), and `release.yml` looked for the
|
||||
default channel's name. It now takes the delta the pack listed in `assets.<channel>.json`; the betas' packages are named
|
||||
as before (seen on the `0.1.0-alpha.1` rehearsal, which had no delta to make).
|
||||
@@ -0,0 +1,78 @@
|
||||
# HANDOFF history — 0.1.0-beta.32
|
||||
|
||||
*Moved verbatim from `docs/HANDOFF.md` when 0.1.0-beta.33 was cut, 2026-11-03 (owner decision D66); `docs/HANDOFF.md` §How this file is split lists every part. Nothing below was edited, so its "below" and "above" mean HANDOFF.md as it stood.*
|
||||
|
||||
## **START HERE** — 2026-10-31, 0.1.0-beta.32: the alpha line — .NET 11 RC3 / C# 15 beside the betas
|
||||
|
||||
*Status is `docs/changelog/0.1.0-beta.32.md` (and, for the first alpha, `docs/changelog/0.1.0-alpha.1.md`); this is what
|
||||
no other file carries.* The owner: "Bạn có thể phân tích, tìm kiếm sự khác biệt so với .NET 10, đánh giá, lên plan và tạo
|
||||
thêm bản alpha, nơi thử nghiệm các dotnet mới, cập nhật code (nếu cần) cho .NET 11 RC3/c# 15 để chuẩn bị cho .NET 11 ra
|
||||
mắt, thêm cảnh báo đây là bản thử nghiệm, yêu cầu tự chịu trách nhiệm nếu cần nhé." — an analysis of .NET 11 against
|
||||
.NET 10, an evaluation, a plan, and an alpha build where new .NET versions are tried, code updated where needed, with an
|
||||
experimental-build, own-risk warning. #344 (the line's plumbing), #346 (the warning, the backup, the legal text), #345
|
||||
(what .NET 11's SDK asks of the source) and this release; the `alpha` branch and `0.1.0-alpha.1` follow.
|
||||
|
||||
**Decisions (asked while planning, do not re-ask):**
|
||||
|
||||
- **D73 — the alpha line** (`12_BUILD` §The alpha line, `13_CI_CD` §The alpha line, `11_UPDATER` §Channels): the source of a
|
||||
released beta built on a prerelease .NET from the long-lived `alpha` branch, tagged `vX.Y.Z-alpha.N`, packed on
|
||||
Velopack's `alpha` channel. An alpha **replaces** the beta on the PC (same packId, install folder and data folder — the
|
||||
native layer reads that folder by fixed path) and **copies the ledger before it first opens it**, once per alpha
|
||||
version, newest three kept (`06_DATA_MODEL` §Migrations).
|
||||
- **D74 — the warning** (`08_UI` §First-run flow and §Settings, `01_ARCHITECTURE` §Lifecycle): `legal/ALPHA_NOTICE.md`
|
||||
in an alpha's Legal Gate with a tick box of its own that Accept waits for; the alpha's Agent does not serve until it is
|
||||
accepted (exit 8); an ALPHA badge, a banner at every start, the update channel locked.
|
||||
- **D75 — the legal text made true**: EULA 1.6 §2B and Disclaimer 2.12 §0 name alphas beside betas; the owner approved
|
||||
the Alpha notice 1.0 and both sentences with the plan.
|
||||
- **D76 — alpha.1 is a retarget only**: `net11.0`, C# 15 by `LangVersion latest`, the three runtime-serviced packages
|
||||
`11.0.0-rc.3.26522.148`; no preview feature (no runtime-async), no C# 15 syntax — main must keep building as C# 14 on
|
||||
.NET 10.
|
||||
|
||||
**The evaluation, as given to the owner:** .NET 11 is STS — supported to about 2028-11, no later than .NET 10 LTS
|
||||
(2028-11-14) — so moving the main line buys no support time; Microsoft's supported-OS list for .NET 11 has Windows 10
|
||||
only in its LTSC and IoT editions, against NFR-8's Windows 10 22H2 floor; C# 15's unions and closed hierarchies would suit
|
||||
the tri-states and refusal reasons once the main line compiles C# 15. Recommendation: the main line stays on .NET 10;
|
||||
the alpha line gathers the evidence; `20_OPEN_QUESTIONS` §G *The main line's .NET* holds the decision table.
|
||||
|
||||
**Choices made here:**
|
||||
|
||||
- **One alpha per beta, never several in a row**: Velopack's `GithubSource` asks GitHub for one page of ten releases, so
|
||||
ten of one line in a row would hide the other line's newest from its update check (read from Velopack's code).
|
||||
- **Every alpha-only behaviour lives on main, dormant**: `Shared.BuildLine` is composed and injected, so the alpha's
|
||||
gate, banner, hold, Agent wait and backup are tested on main; the branch differs only by `RELEASE_LINE`, `global.json`,
|
||||
the TFM, three package versions and `legal/licenses/nuget/`.
|
||||
- **The App holds the Agent while an alpha's gate is open** on a hold of its own: the connection's first round runs under
|
||||
the first-run window, and a held-back Agent started anyway would exit 8 and be started again every round — under the
|
||||
admin mode a Windows prompt each time.
|
||||
- **The backup has its own lock**, five minutes, not the migration lock: that one gives a waiter 30 s and throws.
|
||||
- **.NET 11's `IHost` rethrow is accepted on the alpha**: a failed background service ends an alpha's Agent through the
|
||||
crash path with a minidump, where .NET 10 exits 0 — said in `LIMITATIONS.md`.
|
||||
|
||||
**Measured on the way:** the whole gate on .NET 11 RC3 in a throwaway worktree (`spike-notes` §24): native 32/32, every
|
||||
test suite green with no change of answer, coverage and format clean; 21 analyzer sites in 14 files (CA1307 ×13, MA0002
|
||||
×7, CA2026 ×1), all fixed on main in forms .NET 10 also compiles; license-check red only because `legal/licenses/nuget/`
|
||||
is the beta's package set.
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **`sed -i` in Git Bash rewrites a CRLF file as LF** (seen on the probe's props files); edit CRLF files with the Edit tool
|
||||
or Python with `newline=''`, and `unix2dos` a file the Write tool created.
|
||||
- **The keyboxd I/O error at signing came back**: `gpgconf --kill keyboxd` (the Windows GnuPG's), then commit again.
|
||||
- **A CMake configure in a fresh worktree works when the gate is started from PowerShell**, whose `git` is
|
||||
`Git\cmd\git.exe`; from Git Bash, CMake caches `ucrt64\bin\git.exe` and the submodule step fails.
|
||||
|
||||
**Owner-only:** item 26 — beta.32 on real hardware.
|
||||
|
||||
### 0.1.0-alpha.1 — the first alpha, the same day
|
||||
|
||||
The `alpha` branch was cut from main at this pull request — `v0.1.0-beta.32` and these notes, no other change — and carries the switch alone (`12_BUILD` §The alpha line): `RELEASE_LINE`,
|
||||
`global.json` (SDK `11.0.100-rc.3.26522.148`), the TFM, three packages at `11.0.0-rc.3.26522.148`, and the NuGet licence
|
||||
texts of that package set (69 packages). Its gate on the 11 SDK passed whole before the pull request into `alpha`; the
|
||||
release ran from the signed tag `v0.1.0-alpha.1` on `alpha`, on Velopack's `alpha` channel. Its notes are
|
||||
`docs/changelog/0.1.0-alpha.1.md`, which open with the experimental-build warning.
|
||||
|
||||
- **The next alpha** follows the next beta: merge main into `alpha` (a merge commit), regenerate `legal/licenses/nuget/`
|
||||
there if it conflicts, then the same steps (`13_CI_CD` §The alpha line). **.NET 11 ships on 2026-11-10**: from then the
|
||||
switch is SDK `11.0.100` and the packages `11.0.0`, and RC3 is out of support — move the alpha even if no beta comes.
|
||||
|
||||
**Owner-only:** item 27 — the first alpha on real hardware.
|
||||
@@ -33,6 +33,8 @@ why it was not measured.
|
||||
- **It found anti-cheat.** FrameLedger then turns hooking off for that game and says why on the game's page.
|
||||
- **The game is 32-bit or uses DirectX 9.**
|
||||
- **It is a Vulkan game** you started yourself.
|
||||
- **It is an older Microsoft Store app (UWP)**, or Windows runs the game under code protection the component cannot
|
||||
live under.
|
||||
- **The game runs as administrator.** Settings ▸ Capture agent ▸ *Run the agent as administrator* can help (off by
|
||||
default; Windows asks every time the agent starts). Read its risk in [Limitations](../LIMITATIONS.md) first.
|
||||
- **The game was already running when FrameLedger was updated** — restart the game once.
|
||||
|
||||
+2
-1
@@ -8,7 +8,8 @@ FrameLedger cannot measure. The session's summary says which. See [Record a game
|
||||
## I switched hooking on, and the game is still not measured.
|
||||
|
||||
FrameLedger refuses a game where it finds anti-cheat, and cannot measure 32-bit games, DirectX 9 games, Vulkan games you
|
||||
start yourself, or a game that runs as administrator (unless the agent does too). A game that was already running when
|
||||
start yourself, or a game that runs as administrator (unless the agent does too). A game from the Xbox app is measured from a few
|
||||
seconds after it starts, because Windows starts it. A game that was already running when
|
||||
FrameLedger updated needs one restart. The game's page and the session's summary say what happened.
|
||||
|
||||
## Why "Presented FPS" and not the game's own frame rate?
|
||||
|
||||
+2
-1
@@ -75,7 +75,8 @@ stopped, hooking turned off — each with one button that only says you have rea
|
||||
splash image an Xbox game ships in its own folder, or the image you chose — in a band that takes the picture's colour; then 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. A game with no picture shows
|
||||
none (**Settings ▸ Games** turns the picture and its colour off). **Play** starts the game: through the store that
|
||||
installed it, or directly — **Settings ▸ Games ▸ Play button** chooses. **Edit…** changes the name, publisher, version
|
||||
installed it, or directly — **Settings ▸ Games ▸ Play button** chooses; a game from the Xbox app always starts through
|
||||
Windows. **Edit…** changes the name, publisher, version
|
||||
and notes, and the picture: **Choose image…** (kept as a copy once you save) or **Use the store's image**. **Change
|
||||
executable…** points the entry at another `.exe` and turns hooking back off; its file dialog opens in the game's own
|
||||
folder. **Remove…** asks whether to keep the game's sessions.
|
||||
|
||||
@@ -50,7 +50,7 @@ The link under them, *Read what the hook does and does not do*, opens the safety
|
||||
|---|---|---|
|
||||
| **Show game artwork** | A game's page shows a picture of the game: the image you chose for it (**Edit…**), or else the cover and banner the Steam or GOG GALAXY app already keeps on your PC, or the logo and splash image an Xbox game ships in its own folder. Nothing is downloaded; a game from another store shows a picture only once you choose one. | On |
|
||||
| **Colour the game page from its artwork** | The band at the top of a game's page takes the picture's main colour — never so strongly that a text on it gets hard to read. Off, the band keeps the plain card colour. | On |
|
||||
| **Play button** | What **Play** does, on a game's page and on each game in the library. *Through the store*: Steam or the Epic Games Launcher starts the game, GOG GALAXY runs it, and the itch app asks which copy to launch — each store's app does what it does when you start a game from it. A game no store installed, and a GOG game without GOG GALAXY, is started by FrameLedger instead; so is every game while FrameLedger itself runs as administrator, so that the game does not. *Start directly*: FrameLedger's agent starts the game, recorded from its first frame, with your standard rights; it does not start a game whose recording is off, or one that asks to run as administrator. Some Steam games hand themselves to Steam when started directly — the game Steam then starts is recorded — and a few will not start outside Steam at all: start those through the store. | Through the store |
|
||||
| **Play button** | What **Play** does, on a game's page and on each game in the library. *Through the store*: Steam or the Epic Games Launcher starts the game, GOG GALAXY runs it, and the itch app asks which copy to launch — each store's app does what it does when you start a game from it. A game no store installed, and a GOG game without GOG GALAXY, is started by FrameLedger instead; so is every game while FrameLedger itself runs as administrator, so that the game does not. *Start directly*: FrameLedger's agent starts the game, recorded from its first frame, with your standard rights; it does not start a game whose recording is off, or one that asks to run as administrator. Some Steam games hand themselves to Steam when started directly — the game Steam then starts is recorded — and a few will not start outside Steam at all: start those through the store. A game from the Xbox app or the Microsoft Store always starts through Windows, as its Start-menu tile does, in either mode. | Through the store |
|
||||
|
||||
## Window
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ While the game runs, a notice may say *hooking refused*.
|
||||
| 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)). |
|
||||
| The game runs in an app container, or Windows protects it in a way the component can neither load into nor hook. | Nothing: an older Microsoft Store app (UWP), or a game under code protection, is recorded, not measured ([Limitations](../LIMITATIONS.md#xbox-app-and-microsoft-store-games)). |
|
||||
| **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. |
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
HTML comments are not part of the block.
|
||||
-->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
|
||||
> **beta is `0.1.0-beta.32`** (2026-10-31), an unsigned installer built from that tag with its
|
||||
> **beta is `0.1.0-beta.33`** (2026-11-03), an unsigned installer built from that tag with its
|
||||
> checksums published beside it (alphas — experimental builds on a prerelease .NET — are published apart). 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
@@ -116,7 +116,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
|
||||
> **beta is `0.1.0-beta.32`** (2026-10-31), an unsigned installer built from that tag with its
|
||||
> **beta is `0.1.0-beta.33`** (2026-11-03), an unsigned installer built from that tag with its
|
||||
> checksums published beside it (alphas — experimental builds on a prerelease .NET — are published apart). 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
|
||||
|
||||
@@ -17,6 +17,7 @@ using FrameLedger.Infrastructure.AntiCheat;
|
||||
using FrameLedger.Infrastructure.Blobs;
|
||||
using FrameLedger.Infrastructure.Capture;
|
||||
using FrameLedger.Infrastructure.Detection;
|
||||
using FrameLedger.Infrastructure.Import;
|
||||
using FrameLedger.Infrastructure.Ipc;
|
||||
using FrameLedger.Infrastructure.Persistence;
|
||||
using FrameLedger.Infrastructure.Recording;
|
||||
@@ -262,7 +263,7 @@ internal static class AgentServices
|
||||
sp.GetRequiredService<IGameRepository>(),
|
||||
sp.GetRequiredService<IProcessSnapshotSource>(),
|
||||
sp.GetRequiredService<IExecutableIdentitySource>(),
|
||||
new OrchestratorOptions { PayloadPath = AgentPaths.Payload },
|
||||
new OrchestratorOptions { PayloadPath = AgentPaths.Payload, IsPackaged = static exe => GdkPackageFiles.IsInPackage(exe) },
|
||||
static line => Serilog.Log.Information("{Line}", line),
|
||||
sp.GetRequiredService<ILaunchRecorderFactory>(),
|
||||
sp.GetRequiredService<ExecutableRelocator>(),
|
||||
|
||||
@@ -518,6 +518,8 @@ public static class Formats
|
||||
"LaunchTargetExited" => Strings.Guard_LaunchTargetExited,
|
||||
"LaunchNoPresentationRuntime" => Strings.Guard_LaunchNoPresentationRuntime,
|
||||
"TargetIsVulkanLayered" => Strings.Guard_TargetIsVulkanLayered,
|
||||
"TargetAppContainer" => Strings.Guard_TargetAppContainer,
|
||||
"TargetMitigation" => Strings.Guard_TargetMitigation,
|
||||
"SuspiciousUnsigned" => Strings.Guard_SuspiciousUnsigned,
|
||||
_ => string.Format(CultureInfo.CurrentCulture, Strings.Guard_Other_Format, reason),
|
||||
};
|
||||
|
||||
@@ -21,7 +21,9 @@ namespace FrameLedger.App.Services;
|
||||
/// instead, and the notice says why. <c>direct</c> has the capture agent start it (<c>LaunchGame</c>, launch mode): recorded
|
||||
/// from its first frame, never as administrator (<c>UnelevatedProcess</c>), hooked only where the gate allows exactly as for any
|
||||
/// start (CLAUDE.md rule 1). FrameLedger itself connects to nothing (rule 8): a store's app does what it does when a game is
|
||||
/// started from it.
|
||||
/// started from it. A game the Xbox app or the Microsoft Store installed (beta.33, D80) is handed to Windows in either mode —
|
||||
/// <c>explorer.exe shell:AppsFolder\<AUMID></c>, as its Start-menu tile starts it — because started by its path it is never
|
||||
/// the game in its package (<c>spike-notes</c> §25).
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
|
||||
public sealed class GamePlayer
|
||||
@@ -52,42 +54,42 @@ public sealed class GamePlayer
|
||||
public async Task<PlayResult> PlayAsync(GameRow game, CancellationToken ct = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(game);
|
||||
StoreGame? record = await OwningAsync(game, ct).ConfigureAwait(false);
|
||||
|
||||
// beta.33 (D80): a game the Xbox app or the Microsoft Store installed starts through Windows in either mode, and from
|
||||
// an elevated App too — the user's shell activates it, unelevated. Started by its path it is never the game in its
|
||||
// package (spike-notes §25: Windows hands the launch executable back to the package; an Unreal shipping binary runs
|
||||
// outside it).
|
||||
if (record is { Platform: "xbox" })
|
||||
{
|
||||
return StoreLaunches.For(record, galaxyClientPath: null) is { } windows ? HandOff(game, windows) : NotActivated(game);
|
||||
}
|
||||
|
||||
PlayFallback fallback = PlayFallback.None;
|
||||
StoreGame? record = null;
|
||||
if (!await IsDirectAsync(ct).ConfigureAwait(false))
|
||||
{
|
||||
if (_elevated())
|
||||
{
|
||||
fallback = PlayFallback.Elevated;
|
||||
}
|
||||
else if (record is null)
|
||||
{
|
||||
fallback = PlayFallback.NoStore;
|
||||
}
|
||||
else
|
||||
{
|
||||
record = await OwningAsync(game, ct).ConfigureAwait(false);
|
||||
if (record is null)
|
||||
string? galaxy = string.Equals(record.Platform, "gog", StringComparison.Ordinal) ? _galaxy.ClientPath() : null;
|
||||
if (StoreLaunches.For(record, galaxy) is { } launch)
|
||||
{
|
||||
fallback = PlayFallback.NoStore;
|
||||
return HandOff(game, launch);
|
||||
}
|
||||
else
|
||||
{
|
||||
string? galaxy = string.Equals(record.Platform, "gog", StringComparison.Ordinal) ? _galaxy.ClientPath() : null;
|
||||
if (StoreLaunches.For(record, galaxy) is { } launch)
|
||||
{
|
||||
return HandOff(game, launch);
|
||||
}
|
||||
|
||||
fallback = WhyNoHandOff(game, record, galaxy);
|
||||
}
|
||||
fallback = WhyNoHandOff(game, record, galaxy);
|
||||
}
|
||||
}
|
||||
|
||||
// beta.27: a game Steam installed may hand itself to Steam when something else starts it (Lies of P, 2026-10-19:
|
||||
// its process left within seconds and Steam started the game again), and the notice says so. No store's records
|
||||
// name a game that fell back for want of one, so they are read only where they were not already.
|
||||
if (fallback is PlayFallback.None or PlayFallback.Elevated)
|
||||
{
|
||||
record = await OwningAsync(game, ct).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
// its process left within seconds and Steam started the game again), and the notice says so.
|
||||
bool steamGame = string.Equals(record?.Platform, "steam", StringComparison.Ordinal);
|
||||
return await StartDirectlyAsync(game, fallback, steamGame, ct).ConfigureAwait(false);
|
||||
}
|
||||
@@ -103,8 +105,12 @@ public sealed class GamePlayer
|
||||
"steam" => string.Format(CultureInfo.CurrentCulture, Strings.Play_Steam_Format, gameName),
|
||||
"epic" => string.Format(CultureInfo.CurrentCulture, Strings.Play_Epic_Format, gameName),
|
||||
"gog" => string.Format(CultureInfo.CurrentCulture, Strings.Play_Gog_Format, gameName),
|
||||
"xbox" => string.Format(CultureInfo.CurrentCulture, Strings.Play_Xbox_Format, gameName),
|
||||
_ => string.Format(CultureInfo.CurrentCulture, Strings.Play_Itch_Format, gameName),
|
||||
}, false),
|
||||
PlayOutcome.Failed when string.Equals(result.Store, "xbox", StringComparison.Ordinal) =>
|
||||
(string.Format(CultureInfo.CurrentCulture, Strings.Play_Xbox_NotStarted_Format, gameName), true),
|
||||
PlayOutcome.PackagedGame => (string.Format(CultureInfo.CurrentCulture, Strings.Play_PackagedGame_Format, gameName), true),
|
||||
PlayOutcome.StartedByAgent => (result.Fallback switch
|
||||
{
|
||||
PlayFallback.NoStore => string.Format(CultureInfo.CurrentCulture, Strings.Play_NoStore_Format, gameName),
|
||||
@@ -138,6 +144,16 @@ public sealed class GamePlayer
|
||||
return handed ? new PlayResult(PlayOutcome.HandedToStore, launch.Platform) : new PlayResult(PlayOutcome.Failed, launch.Platform);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An Xbox game whose package names nothing Windows can activate (no application id of the AUMID's shape): FrameLedger
|
||||
/// cannot start it by its path either (D80), so the notice says to start it from the Xbox app or the Start menu.
|
||||
/// </summary>
|
||||
private static PlayResult NotActivated(GameRow game)
|
||||
{
|
||||
Log.Warning("play: {Game} (id {Id}): its Xbox package names nothing Windows can activate; not started", game.Name, game.Id);
|
||||
return new PlayResult(PlayOutcome.Failed, "xbox");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A store's record with no hand-off: a GOG game without GOG GALAXY, or — never seen, and logged — an id or a folder of a
|
||||
/// shape that store's own never have, which <see cref="StoreLaunches"/> puts in no link.
|
||||
@@ -199,6 +215,7 @@ public sealed class GamePlayer
|
||||
"RecordingOff" => new PlayResult(PlayOutcome.RecordingOff, Fallback: fallback),
|
||||
"SessionRunning" => new PlayResult(PlayOutcome.AlreadyRunning, Fallback: fallback),
|
||||
"UnknownGame" => new PlayResult(PlayOutcome.NotInLibrary, Fallback: fallback),
|
||||
"PackagedGame" => new PlayResult(PlayOutcome.PackagedGame, Fallback: fallback),
|
||||
_ => new PlayResult(PlayOutcome.Failed, Fallback: fallback, Detail: ack.Outcome),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,4 +32,10 @@ public enum PlayOutcome
|
||||
|
||||
/// <summary>Windows would not open the store's app, or the agent refused for another reason (<see cref="PlayResult.Detail"/>).</summary>
|
||||
Failed,
|
||||
|
||||
/// <summary>
|
||||
/// beta.33 (D80): the agent was asked to start a game the Xbox app or the Microsoft Store installed (<c>PackagedGame</c>) —
|
||||
/// reached only when no store's records name its package, since Play hands such a game to Windows itself.
|
||||
/// </summary>
|
||||
PackagedGame,
|
||||
}
|
||||
@@ -8,7 +8,11 @@ using Serilog;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>The shell's own hand-off. The App runs with the user's standard rights; an elevated App never reaches here (<see cref="GamePlayer"/>).</summary>
|
||||
/// <summary>
|
||||
/// The shell's own hand-off. The App runs with the user's standard rights; an elevated App reaches here only for an Xbox game
|
||||
/// (beta.33, D80), whose hand-off is <c>explorer.exe shell:AppsFolder\<AUMID></c>: the running shell activates the package,
|
||||
/// unelevated (<see cref="GamePlayer"/>).
|
||||
/// </summary>
|
||||
public sealed class ShellStarter : IShellStarter
|
||||
{
|
||||
public bool OpenLink(string link)
|
||||
|
||||
Generated
+15
@@ -621,8 +621,10 @@ public static class Strings
|
||||
nameof(Guard_RulesUnreadable),
|
||||
nameof(Guard_ServiceQueryFailed),
|
||||
nameof(Guard_SuspiciousUnsigned),
|
||||
nameof(Guard_TargetAppContainer),
|
||||
nameof(Guard_TargetIsVulkanLayered),
|
||||
nameof(Guard_TargetIsWow64),
|
||||
nameof(Guard_TargetMitigation),
|
||||
nameof(Guide_Title),
|
||||
nameof(Hooking_NotX64_Format),
|
||||
nameof(ImagePicker_Filter),
|
||||
@@ -789,6 +791,7 @@ public static class Strings
|
||||
nameof(Play_NoGalaxy_Format),
|
||||
nameof(Play_NoStore_Format),
|
||||
nameof(Play_NotInLibrary_Format),
|
||||
nameof(Play_PackagedGame_Format),
|
||||
nameof(Play_RecordingOff_Fallback_Format),
|
||||
nameof(Play_RecordingOff_Format),
|
||||
nameof(Play_Started_Format),
|
||||
@@ -797,6 +800,8 @@ public static class Strings
|
||||
nameof(Play_Title),
|
||||
nameof(Play_ToolTip_Direct),
|
||||
nameof(Play_ToolTip_Store),
|
||||
nameof(Play_Xbox_Format),
|
||||
nameof(Play_Xbox_NotStarted_Format),
|
||||
nameof(RemoveGame_Body),
|
||||
nameof(RemoveGame_Delete),
|
||||
nameof(RemoveGame_Keep),
|
||||
@@ -2372,10 +2377,14 @@ public static class Strings
|
||||
|
||||
public static string Guard_SuspiciousUnsigned => ResourceManager.GetString(nameof(Guard_SuspiciousUnsigned), Culture) ?? nameof(Guard_SuspiciousUnsigned);
|
||||
|
||||
public static string Guard_TargetAppContainer => ResourceManager.GetString(nameof(Guard_TargetAppContainer), Culture) ?? nameof(Guard_TargetAppContainer);
|
||||
|
||||
public static string Guard_TargetIsVulkanLayered => ResourceManager.GetString(nameof(Guard_TargetIsVulkanLayered), Culture) ?? nameof(Guard_TargetIsVulkanLayered);
|
||||
|
||||
public static string Guard_TargetIsWow64 => ResourceManager.GetString(nameof(Guard_TargetIsWow64), Culture) ?? nameof(Guard_TargetIsWow64);
|
||||
|
||||
public static string Guard_TargetMitigation => ResourceManager.GetString(nameof(Guard_TargetMitigation), Culture) ?? nameof(Guard_TargetMitigation);
|
||||
|
||||
public static string Guide_Title => ResourceManager.GetString(nameof(Guide_Title), Culture) ?? nameof(Guide_Title);
|
||||
|
||||
public static string Hooking_NotX64_Format => ResourceManager.GetString(nameof(Hooking_NotX64_Format), Culture) ?? nameof(Hooking_NotX64_Format);
|
||||
@@ -2708,6 +2717,8 @@ public static class Strings
|
||||
|
||||
public static string Play_NotInLibrary_Format => ResourceManager.GetString(nameof(Play_NotInLibrary_Format), Culture) ?? nameof(Play_NotInLibrary_Format);
|
||||
|
||||
public static string Play_PackagedGame_Format => ResourceManager.GetString(nameof(Play_PackagedGame_Format), Culture) ?? nameof(Play_PackagedGame_Format);
|
||||
|
||||
public static string Play_RecordingOff_Fallback_Format => ResourceManager.GetString(nameof(Play_RecordingOff_Fallback_Format), Culture) ?? nameof(Play_RecordingOff_Fallback_Format);
|
||||
|
||||
public static string Play_RecordingOff_Format => ResourceManager.GetString(nameof(Play_RecordingOff_Format), Culture) ?? nameof(Play_RecordingOff_Format);
|
||||
@@ -2724,6 +2735,10 @@ public static class Strings
|
||||
|
||||
public static string Play_ToolTip_Store => ResourceManager.GetString(nameof(Play_ToolTip_Store), Culture) ?? nameof(Play_ToolTip_Store);
|
||||
|
||||
public static string Play_Xbox_Format => ResourceManager.GetString(nameof(Play_Xbox_Format), Culture) ?? nameof(Play_Xbox_Format);
|
||||
|
||||
public static string Play_Xbox_NotStarted_Format => ResourceManager.GetString(nameof(Play_Xbox_NotStarted_Format), Culture) ?? nameof(Play_Xbox_NotStarted_Format);
|
||||
|
||||
public static string RemoveGame_Body => ResourceManager.GetString(nameof(RemoveGame_Body), Culture) ?? nameof(RemoveGame_Body);
|
||||
|
||||
public static string RemoveGame_Delete => ResourceManager.GetString(nameof(RemoveGame_Delete), Culture) ?? nameof(RemoveGame_Delete);
|
||||
|
||||
@@ -3333,6 +3333,14 @@
|
||||
<value>ゲームは Vulkan で描画しており、代わりに Vulkan レイヤーが計測します</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Guard_TargetAppContainer" xml:space="preserve">
|
||||
<value>このゲームはアプリ コンテナー内で実行されています (デスクトップ ゲームではなく Microsoft Store アプリ)。FrameLedger はそこには読み込みません</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Guard_TargetMitigation" xml:space="preserve">
|
||||
<value>Windows がこのゲームを、FrameLedger のコンポーネントが読み込みもフックもできない方法で保護しています</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Guard_SuspiciousUnsigned" xml:space="preserve">
|
||||
<value>アンチチートに似た名前の署名のないモジュールが読み込まれていました</value>
|
||||
<comment>review</comment>
|
||||
@@ -4242,11 +4250,11 @@
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Store" xml:space="preserve">
|
||||
<value>ゲームをインストールしたストア経由でプレイします。Steam または Epic Games Launcher が起動し、GOG GALAXY が実行し、itch アプリは先に確認します。どのストアからもインストールされていないゲームは FrameLedger が起動します。</value>
|
||||
<value>ゲームをインストールしたストア経由でプレイします。Steam または Epic Games Launcher が起動し、GOG GALAXY が実行し、itch アプリは先に確認します。Xbox アプリまたは Microsoft Store のゲームは Windows 経由で起動します。どのストアからもインストールされていないゲームは FrameLedger が起動します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Direct" xml:space="preserve">
|
||||
<value>プレイ: FrameLedger がゲームを自分で起動します。最初のフレームから記録し、通常の権限で実行します。Steam のゲームは先に Steam へ起動を引き継ぐことがあります。その場合は Steam が起動したゲームを記録します。</value>
|
||||
<value>プレイ: FrameLedger がゲームを自分で起動します。最初のフレームから記録し、通常の権限で実行します。Steam のゲームは先に Steam へ起動を引き継ぐことがあります。その場合は Steam が起動したゲームを記録します。Xbox アプリまたは Microsoft Store のゲームは代わりに常に Windows 経由で起動します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Started_Steam_Format" xml:space="preserve">
|
||||
@@ -4277,6 +4285,18 @@
|
||||
<value>itch アプリが起動する {0} のコピーを確認します。そちらで確定してください。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Xbox_Format" xml:space="preserve">
|
||||
<value>Windows が {0} をパッケージ経由で起動しています (スタート メニューのタイルと同じ)。Xbox アプリのゲームは常にこの方法で起動します。FrameLedger は表示され次第記録します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Xbox_NotStarted_Format" xml:space="preserve">
|
||||
<value>Windows は {0} をパッケージ経由で起動できませんでした。Xbox アプリまたはスタート メニューから起動してください。FrameLedger は表示され次第記録します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_PackagedGame_Format" xml:space="preserve">
|
||||
<value>{0} は Xbox アプリまたは Microsoft Store のゲームで、Windows 経由でしか起動できません。Xbox アプリまたはスタート メニューから起動してください。FrameLedger は表示され次第記録します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Started_Format" xml:space="preserve">
|
||||
<value>FrameLedger が {0} を起動しています。</value>
|
||||
<comment>review</comment>
|
||||
@@ -4322,7 +4342,7 @@
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Body" xml:space="preserve">
|
||||
<value>ストア経由: Steam と Epic Games Launcher がゲームを起動し、GOG GALAXY が実行し、itch アプリは先に確認します。どのストアからもインストールされていないゲームは FrameLedger が起動します。直接: FrameLedger がゲームを自分で起動します。最初のフレームから記録し、通常の権限で実行します。一部の Steam ゲームは直接起動すると Steam へ起動を引き継ぎます (その後 Steam が起動したゲームを記録します)。Steam 以外からは起動できないゲームもあるため、それらはストア経由で起動してください。</value>
|
||||
<value>ストア経由: Steam と Epic Games Launcher がゲームを起動し、GOG GALAXY が実行し、itch アプリは先に確認します。どのストアからもインストールされていないゲームは FrameLedger が起動します。直接: FrameLedger がゲームを自分で起動します。最初のフレームから記録し、通常の権限で実行します。一部の Steam ゲームは直接起動すると Steam へ起動を引き継ぎます (その後 Steam が起動したゲームを記録します)。Steam 以外からは起動できないゲームもあるため、それらはストア経由で起動してください。Xbox アプリまたは Microsoft Store のゲームは、どちらのモードでも、スタート メニューのタイルと同じく常に Windows 経由で起動します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Store" xml:space="preserve">
|
||||
|
||||
@@ -2510,6 +2510,12 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<data name="Guard_TargetIsVulkanLayered" xml:space="preserve">
|
||||
<value>the game renders with Vulkan, which the Vulkan layer measures instead</value>
|
||||
</data>
|
||||
<data name="Guard_TargetAppContainer" xml:space="preserve">
|
||||
<value>the game runs in an app container (a Microsoft Store app, not a desktop game), which FrameLedger does not load into</value>
|
||||
</data>
|
||||
<data name="Guard_TargetMitigation" xml:space="preserve">
|
||||
<value>Windows protects the game in a way FrameLedger's component can neither load into nor hook</value>
|
||||
</data>
|
||||
<data name="Guard_SuspiciousUnsigned" xml:space="preserve">
|
||||
<value>an unsigned module with an anti-cheat-like name was loaded</value>
|
||||
</data>
|
||||
@@ -3192,10 +3198,10 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Store" xml:space="preserve">
|
||||
<value>Play through the store that installed the game: Steam or the Epic Games Launcher starts it, GOG GALAXY runs it, the itch app asks first. A game no store installed is started by FrameLedger.</value>
|
||||
<value>Play through the store that installed the game: Steam or the Epic Games Launcher starts it, GOG GALAXY runs it, the itch app asks first; a game from the Xbox app or the Microsoft Store starts through Windows. A game no store installed is started by FrameLedger.</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Direct" xml:space="preserve">
|
||||
<value>Play: FrameLedger starts the game itself, recorded from its first frame, with your standard rights. A Steam game may hand itself to Steam first; the game Steam then starts is recorded.</value>
|
||||
<value>Play: FrameLedger starts the game itself, recorded from its first frame, with your standard rights. A Steam game may hand itself to Steam first; the game Steam then starts is recorded. A game from the Xbox app or the Microsoft Store always starts through Windows instead.</value>
|
||||
</data>
|
||||
<data name="Play_Started_Steam_Format" xml:space="preserve">
|
||||
<value>FrameLedger is starting {0}. A Steam game may hand itself to Steam first; the game Steam then starts is recorded.</value>
|
||||
@@ -3218,6 +3224,15 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<data name="Play_Itch_Format" xml:space="preserve">
|
||||
<value>The itch app asks which copy of {0} to launch — confirm there.</value>
|
||||
</data>
|
||||
<data name="Play_Xbox_Format" xml:space="preserve">
|
||||
<value>Windows is starting {0} through its package, as its Start-menu tile does — a game from the Xbox app always starts this way. FrameLedger records it once it appears.</value>
|
||||
</data>
|
||||
<data name="Play_Xbox_NotStarted_Format" xml:space="preserve">
|
||||
<value>Windows could not start {0} through its package. Start it from the Xbox app or the Start menu; FrameLedger records it once it appears.</value>
|
||||
</data>
|
||||
<data name="Play_PackagedGame_Format" xml:space="preserve">
|
||||
<value>{0} is a game from the Xbox app or the Microsoft Store, which starts only through Windows. Start it from the Xbox app or the Start menu; FrameLedger records it once it appears.</value>
|
||||
</data>
|
||||
<data name="Play_Started_Format" xml:space="preserve">
|
||||
<value>FrameLedger is starting {0}.</value>
|
||||
</data>
|
||||
@@ -3252,7 +3267,7 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<value>Play button</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Body" xml:space="preserve">
|
||||
<value>Through the store: Steam and the Epic Games Launcher start the game, GOG GALAXY runs it, the itch app asks first; a game no store installed is started by FrameLedger. Directly: FrameLedger starts the game itself — recorded from its first frame, with your standard rights. Some Steam games hand themselves to Steam when started directly — the game Steam then starts is recorded — and a few will not start outside Steam at all: start those through the store.</value>
|
||||
<value>Through the store: Steam and the Epic Games Launcher start the game, GOG GALAXY runs it, the itch app asks first; a game no store installed is started by FrameLedger. Directly: FrameLedger starts the game itself — recorded from its first frame, with your standard rights. Some Steam games hand themselves to Steam when started directly — the game Steam then starts is recorded — and a few will not start outside Steam at all: start those through the store. A game from the Xbox app or the Microsoft Store always starts through Windows, as its Start-menu tile does, in either mode.</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Store" xml:space="preserve">
|
||||
<value>Through the store</value>
|
||||
|
||||
@@ -2505,6 +2505,12 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<data name="Guard_TargetIsVulkanLayered" xml:space="preserve">
|
||||
<value>game kết xuất bằng Vulkan, thứ mà Vulkan layer đo thay</value>
|
||||
</data>
|
||||
<data name="Guard_TargetAppContainer" xml:space="preserve">
|
||||
<value>game này chạy trong app container (một app Microsoft Store, không phải game desktop), FrameLedger không nạp vào đó</value>
|
||||
</data>
|
||||
<data name="Guard_TargetMitigation" xml:space="preserve">
|
||||
<value>Windows bảo vệ game này theo cách mà thành phần của FrameLedger không thể nạp hay hook</value>
|
||||
</data>
|
||||
<data name="Guard_SuspiciousUnsigned" xml:space="preserve">
|
||||
<value>một mô-đun không ký số có tên giống anti-cheat đã được nạp</value>
|
||||
</data>
|
||||
@@ -3187,10 +3193,10 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<value>Chơi</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Store" xml:space="preserve">
|
||||
<value>Chơi qua store đã cài game: Steam hoặc Epic Games Launcher sẽ chạy game, GOG GALAXY chạy game, app itch hỏi trước. Game không do store nào cài thì FrameLedger tự chạy.</value>
|
||||
<value>Chơi qua store đã cài game: Steam hoặc Epic Games Launcher sẽ chạy game, GOG GALAXY chạy game, app itch hỏi trước; game từ Xbox app hoặc Microsoft Store chạy qua Windows. Game không do store nào cài thì FrameLedger tự chạy.</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Direct" xml:space="preserve">
|
||||
<value>Chơi: FrameLedger tự chạy game, ghi lại từ khung hình đầu tiên, với quyền thường của bạn. Game Steam có thể tự chuyển sang Steam trước; game do Steam chạy sau đó vẫn được ghi lại.</value>
|
||||
<value>Chơi: FrameLedger tự chạy game, ghi lại từ khung hình đầu tiên, với quyền thường của bạn. Game Steam có thể tự chuyển sang Steam trước; game do Steam chạy sau đó vẫn được ghi lại. Game từ Xbox app hoặc Microsoft Store luôn chạy qua Windows thay vào đó.</value>
|
||||
</data>
|
||||
<data name="Play_Started_Steam_Format" xml:space="preserve">
|
||||
<value>FrameLedger đang chạy {0}. Game Steam có thể tự chuyển sang Steam trước; game do Steam chạy sau đó vẫn được ghi lại.</value>
|
||||
@@ -3213,6 +3219,15 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<data name="Play_Itch_Format" xml:space="preserve">
|
||||
<value>App itch sẽ hỏi chạy bản nào của {0} — hãy xác nhận ở đó.</value>
|
||||
</data>
|
||||
<data name="Play_Xbox_Format" xml:space="preserve">
|
||||
<value>Windows đang chạy {0} qua gói của nó, như khi bấm ô của nó trong Start menu — game từ Xbox app luôn chạy theo cách này. FrameLedger ghi lại khi game xuất hiện.</value>
|
||||
</data>
|
||||
<data name="Play_Xbox_NotStarted_Format" xml:space="preserve">
|
||||
<value>Windows không chạy được {0} qua gói của nó. Hãy chạy từ Xbox app hoặc Start menu; FrameLedger ghi lại khi game xuất hiện.</value>
|
||||
</data>
|
||||
<data name="Play_PackagedGame_Format" xml:space="preserve">
|
||||
<value>{0} là game từ Xbox app hoặc Microsoft Store, chỉ chạy được qua Windows. Hãy chạy từ Xbox app hoặc Start menu; FrameLedger ghi lại khi game xuất hiện.</value>
|
||||
</data>
|
||||
<data name="Play_Started_Format" xml:space="preserve">
|
||||
<value>FrameLedger đang chạy {0}.</value>
|
||||
</data>
|
||||
@@ -3247,7 +3262,7 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<value>Nút Chơi</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Body" xml:space="preserve">
|
||||
<value>Qua store: Steam và Epic Games Launcher chạy game, GOG GALAXY chạy game, app itch hỏi trước; game không do store nào cài thì FrameLedger tự chạy. Chạy trực tiếp: FrameLedger tự chạy game — ghi lại từ khung hình đầu tiên, với quyền thường của bạn. Một số game Steam tự chuyển sang Steam khi được chạy trực tiếp — game do Steam chạy sau đó vẫn được ghi lại — và vài game không chạy được ngoài Steam: hãy chạy chúng qua store.</value>
|
||||
<value>Qua store: Steam và Epic Games Launcher chạy game, GOG GALAXY chạy game, app itch hỏi trước; game không do store nào cài thì FrameLedger tự chạy. Chạy trực tiếp: FrameLedger tự chạy game — ghi lại từ khung hình đầu tiên, với quyền thường của bạn. Một số game Steam tự chuyển sang Steam khi được chạy trực tiếp — game do Steam chạy sau đó vẫn được ghi lại — và vài game không chạy được ngoài Steam: hãy chạy chúng qua store. Game từ Xbox app hoặc Microsoft Store luôn chạy qua Windows, như khi bấm ô của nó trong Start menu, ở cả hai chế độ.</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Store" xml:space="preserve">
|
||||
<value>Qua store</value>
|
||||
|
||||
@@ -18,6 +18,9 @@ namespace FrameLedger.Application.Play;
|
||||
/// the game shortcut GALAXY made there; GALAXY starts the game.</item>
|
||||
/// <item><b>itch</b>: <c>itch://install?game_id=<id>&launch</c>, which the itch app (26.22.0, read from its own code)
|
||||
/// answers by asking which installed copy to launch — the user confirms there.</item>
|
||||
/// <item><b>Xbox</b> (beta.33, D80): <c>explorer.exe shell:AppsFolder\<AUMID></c> — Windows activates the game's
|
||||
/// package as its Start-menu tile does, the command measured on FINAL FANTASY (<c>spike-notes</c> §25: GameLaunchHelper's
|
||||
/// parent was the user's shell, the game in its package). Started by its path, a GDK game is never that.</item>
|
||||
/// </list>
|
||||
/// Every id is checked against what that store's ids look like before it is put in a link the shell will open.
|
||||
/// </summary>
|
||||
@@ -40,10 +43,38 @@ public static class StoreLaunches
|
||||
Path.GetDirectoryName(galaxyClientPath)),
|
||||
"itch" when IsDigits(record.StoreId) =>
|
||||
new StoreLaunch("itch", StoreLaunchKind.OpenLink, "itch://install?game_id=" + record.StoreId + "&launch"),
|
||||
"xbox" when record.LaunchKey is { } aumid && IsAumid(aumid) && aumid.StartsWith(record.StoreId + "!", StringComparison.Ordinal) =>
|
||||
new StoreLaunch("xbox", StoreLaunchKind.RunProgram, ExplorerPath, "shell:AppsFolder\\" + aumid),
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>The user's shell, which activates a package for an elevated caller too (it runs unelevated itself).</summary>
|
||||
public static string ExplorerPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "explorer.exe");
|
||||
|
||||
/// <summary>
|
||||
/// An AppUserModelID of the shape Windows gives a packaged app: <c><Name>_<13-character publisher id>!<Application
|
||||
/// Id></c> — the name 3–50 letters, digits, '.' or '-'; the id 1–64 letters, digits or '.', starting with a letter. Nothing
|
||||
/// that could be read as another argument or path.
|
||||
/// </summary>
|
||||
public static bool IsAumid(string aumid)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(aumid);
|
||||
int bang = aumid.IndexOf('!', StringComparison.Ordinal);
|
||||
int underscore = bang < 0 ? -1 : aumid.AsSpan(0, bang).LastIndexOf('_');
|
||||
if (bang < 0 || underscore < 0 || bang - underscore - 1 != 13)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
string name = aumid[..underscore];
|
||||
string publisherId = aumid[(underscore + 1)..bang];
|
||||
string appId = aumid[(bang + 1)..];
|
||||
return name.Length is >= 3 and <= 50 && name.All(static c => char.IsAsciiLetterOrDigit(c) || c is '.' or '-')
|
||||
&& publisherId.All(static c => char.IsAsciiDigit(c) || char.IsAsciiLetterLower(c))
|
||||
&& appId.Length is >= 1 and <= 64 && char.IsAsciiLetter(appId[0]) && appId.All(static c => char.IsAsciiLetterOrDigit(c) || c == '.');
|
||||
}
|
||||
|
||||
private static StoreLaunch? Epic(StoreGame record)
|
||||
{
|
||||
string? key = record.LaunchKey?.Split(':') is [var ns, var item, var app]
|
||||
|
||||
@@ -282,6 +282,13 @@ public sealed class CaptureOrchestrator
|
||||
}
|
||||
|
||||
string path = game.Fingerprint.ExePath;
|
||||
if (_options.IsPackaged?.Invoke(path) == true)
|
||||
{
|
||||
// beta.33 (D80): a GDK game is started by Windows through its package, never by its path (spike-notes §25).
|
||||
_log($"launch: {game.Name} is a game the Xbox app or the Microsoft Store installed; it starts through Windows, not by its path");
|
||||
return LaunchResult.Of(LaunchOutcome.PackagedGame);
|
||||
}
|
||||
|
||||
lock (_table)
|
||||
{
|
||||
if (_running.TryGetValue(path, out Running? current) && !current.Task.IsCompleted)
|
||||
|
||||
@@ -23,4 +23,11 @@ public enum LaunchOutcome
|
||||
|
||||
/// <summary>The entry's recording is switched off (schema 0009, 2026-09-23): FrameLedger does not start what it will not record.</summary>
|
||||
RecordingOff,
|
||||
|
||||
/// <summary>
|
||||
/// The entry's executable is in a game the Xbox app or the Microsoft Store installed (beta.33, D80): started by its path it
|
||||
/// is either handed back to its package by Windows or runs outside it (<c>spike-notes</c> §25), so FrameLedger never starts
|
||||
/// it that way; Windows starts it, from Play or its Start-menu tile, and the watcher records it.
|
||||
/// </summary>
|
||||
PackagedGame,
|
||||
}
|
||||
@@ -11,4 +11,11 @@ public sealed record OrchestratorOptions
|
||||
|
||||
/// <summary>The watcher's cadence; <c>01_ARCHITECTURE</c> §Lifecycle says 1 Hz and ~0 % CPU.</summary>
|
||||
public TimeSpan PollInterval { get; init; } = TimeSpan.FromSeconds(1);
|
||||
|
||||
/// <summary>
|
||||
/// True for an executable whose install root is a GDK package root (beta.33, D80): <c>LaunchGame</c> answers
|
||||
/// <see cref="LaunchOutcome.PackagedGame"/> for it rather than start it by its path — started that way it is never the game
|
||||
/// in its package (<c>spike-notes</c> §25). Null: nothing is treated as packaged (tests, the console's election).
|
||||
/// </summary>
|
||||
public Func<string, bool>? IsPackaged { get; init; }
|
||||
}
|
||||
@@ -225,4 +225,26 @@ public enum AntiCheatRefusalReason
|
||||
/// one (<c>19_SAFETY</c> §The user-mode exception).
|
||||
/// </remarks>
|
||||
AllowedUnderUserModeException = 28,
|
||||
|
||||
/// <summary>
|
||||
/// The game runs in an AppContainer — a Microsoft Store app of the UWP kind, not a desktop game — which the Overlay
|
||||
/// cannot load into (beta.33, owner decision D78). Read from the game's own token just before the injection.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Not a finding: nothing is written to the game, and the session is Tier 2 with this reason. The Overlay's shared
|
||||
/// memory, its <c>Local\</c> names and the rules it reads live where an AppContainer cannot reach. A GDK game from the
|
||||
/// Xbox app is full trust and is not this (<c>spike-notes</c> §25).
|
||||
/// </remarks>
|
||||
TargetAppContainer = 29,
|
||||
|
||||
/// <summary>
|
||||
/// Windows runs the game under a code-protection policy the Overlay cannot live under (beta.33, D78): images signed
|
||||
/// by Microsoft or the Store only, no dynamic code, a strict or non-CET-blocking user shadow stack, or strict Control
|
||||
/// Flow Guard. Read from the game's own mitigation policies just before the injection; the signal names the policy.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Not a finding, and Tier 2 like <see cref="TargetIsWow64"/>. Each of these ended before as a failed injection, an
|
||||
/// Overlay that installed no hooks, or a risk of ending the game that no fault policy can catch.
|
||||
/// </remarks>
|
||||
TargetMitigation = 30,
|
||||
}
|
||||
@@ -31,6 +31,10 @@ namespace FrameLedger.Infrastructure.Capture;
|
||||
/// exactly one candidate carries it (<see cref="ChromiumGpuProcess"/>). Measured on
|
||||
/// <i>Flower in Us</i>: three <c>Game.exe</c>, one path, <c>TargetAmbiguous</c>.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>A candidate's path is the watcher's own spelling</b> (beta.33): <see cref="ProcessImagePath"/>, the kernel's image
|
||||
/// name, which the watcher keys the game on. It was the loader's (<c>Process.MainModule</c>) until then.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public sealed class TargetResolver : ITargetResolver
|
||||
{
|
||||
@@ -146,36 +150,29 @@ public sealed class TargetResolver : ITargetResolver
|
||||
{
|
||||
try
|
||||
{
|
||||
// MainModule needs rights we may not have for another user's or an elevated process.
|
||||
// A process we cannot read is NOT a match — "could not look" must not widen the set —
|
||||
// but it is counted below so it cannot narrow one either.
|
||||
string? image = p.MainModule?.FileName;
|
||||
// THE WATCHER'S OWN SPELLING (beta.33): the kernel's image name, normalised as the watcher normalises
|
||||
// it, where this read the loader's (MainModule) until then and a game started through a junction could
|
||||
// come back spelled differently from the path the watcher had just matched (ProcessImagePath).
|
||||
//
|
||||
// Opened with the guard's rights, which MainModule's open also needed: a process an anti-cheat driver
|
||||
// closes, or an elevated game to an unelevated Agent, is NOT a match -- "could not look" must not widen
|
||||
// the set -- but it is counted below so it cannot narrow one either (D21: TargetUnreadable).
|
||||
string? image = ProcessImagePath.Read(p.Id, ProcessImagePath.GuardRights, out int error);
|
||||
if (image is null)
|
||||
{
|
||||
// A process that is in the snapshot with NO main module yet -- it exists and has
|
||||
// not finished mapping its image. Measured on the hosted runner 2026-09-04, twice
|
||||
// in one hour, on a single freshly started instance: the resolver skipped it here
|
||||
// without counting it and answered TargetNotRunning about a process it had just
|
||||
// enumerated. "Could not look" must not narrow the set, and that includes this
|
||||
// shape; it is counted like a process we lack the rights to read.
|
||||
// Exited between enumeration and the read, not ours to read, or a name that would not
|
||||
// normalise. Either way we did not establish whether it is our target.
|
||||
unreadable++;
|
||||
why.Add($"pid {p.Id}: no main module yet");
|
||||
string because = error == 0 ? "its image path would not normalise" : new System.ComponentModel.Win32Exception(error).Message;
|
||||
why.Add($"pid {p.Id}: {because}");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (string.Equals(ExecutableIdentity.Normalise(image), normalisedExePath,
|
||||
StringComparison.OrdinalIgnoreCase))
|
||||
if (string.Equals(image, normalisedExePath, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
matches.Add(p.Id);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
|
||||
{
|
||||
// Exited between enumeration and the read, or not ours to read. Either way we did not
|
||||
// establish whether it is our target.
|
||||
unreadable++;
|
||||
why.Add($"pid {p.Id}: {ex.Message}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.Dispose();
|
||||
|
||||
@@ -95,6 +95,23 @@ public static class GdkPackageFiles
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// True when <paramref name="exePath"/>'s install root (<c>Detection.InstallRoot</c>) is a GDK package root — a game the
|
||||
/// Xbox app or the Microsoft Store installed, which FrameLedger never starts by its path (beta.33, D80, §25).
|
||||
/// </summary>
|
||||
public static bool IsInPackage(string exePath)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(exePath);
|
||||
try
|
||||
{
|
||||
return IsPackageRoot(Detection.InstallRoot.Resolve(exePath));
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException or NotSupportedException or PathTooLongException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The package <paramref name="contentFolder"/> is the root of, or null when it is not one or its files will not parse.</summary>
|
||||
public static GdkPackage? Read(string contentFolder)
|
||||
{
|
||||
|
||||
@@ -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.Runtime.InteropServices;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
|
||||
namespace FrameLedger.Infrastructure.Io;
|
||||
|
||||
/// <summary>
|
||||
/// A process's image path as the kernel names it — <c>QueryFullProcessImageNameW</c> — normalised the way
|
||||
/// <see cref="ExecutableIdentity"/> normalises a consent record's. The ONE spelling the capture path compares (beta.33,
|
||||
/// D80): the watcher keys a game on it, and <c>TargetResolver</c> re-finds the game by it just before injecting.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The resolver read the LOADER's name until beta.33 (<c>Process.MainModule</c>): the spelling a process was started
|
||||
/// with, where the watcher had the kernel's. For a game started through a junction — a package Windows activates from
|
||||
/// <c>C:\Program Files\WindowsApps\<package></c>, which is a junction to the game's own folder — the two could
|
||||
/// differ, and the session would end <c>TargetNotRunning</c> about a game the watcher had just seen. <c>spike-notes</c>
|
||||
/// §25 measured them equal on the owner's eleven Xbox titles; one source keeps them equal by construction.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Nothing here reads the process's memory: the kernel copies the name into a buffer we own. Null is "could not
|
||||
/// read", never a name — a caller must not let it narrow or widen a set.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static class ProcessImagePath
|
||||
{
|
||||
/// <summary><c>PROCESS_QUERY_LIMITED_INFORMATION</c>: the least right that answers, which the watcher holds on most processes.</summary>
|
||||
public const uint QueryLimited = 0x1000;
|
||||
|
||||
/// <summary>
|
||||
/// <c>PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ</c>: the rights the guard's module check opens a target with
|
||||
/// (<c>fl_guard_sources.cpp</c>). A process that refuses them — one an anti-cheat driver closes, or an elevated game
|
||||
/// to an unelevated Agent — cannot pass the guard, and the resolver says so before asking it (D21).
|
||||
/// </summary>
|
||||
public const uint GuardRights = QueryLimited | 0x0010;
|
||||
|
||||
private const int _maxPath = 32_767;
|
||||
|
||||
/// <summary>The normalised image path of <paramref name="pid"/> opened with <paramref name="access"/>, or null with the Win32 error.</summary>
|
||||
/// <param name="pid">The process.</param>
|
||||
/// <param name="access"><see cref="QueryLimited"/> or <see cref="GuardRights"/>.</param>
|
||||
/// <param name="error">The error that stopped the read; 0 when the name was read and would not normalise.</param>
|
||||
public static string? Read(int pid, uint access, out int error)
|
||||
{
|
||||
error = 0;
|
||||
if (pid <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using SafeProcessHandle handle = OpenProcess(access, false, unchecked((uint)pid));
|
||||
if (handle.IsInvalid)
|
||||
{
|
||||
error = Marshal.GetLastPInvokeError();
|
||||
return null;
|
||||
}
|
||||
|
||||
return Of(handle, out error);
|
||||
}
|
||||
|
||||
/// <summary>The normalised image path of the process <paramref name="handle"/> names, or null with the Win32 error.</summary>
|
||||
public static string? Of(SafeProcessHandle handle, out int error)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(handle);
|
||||
error = 0;
|
||||
char[] buffer = new char[_maxPath];
|
||||
uint size = (uint)buffer.Length;
|
||||
if (!QueryFullProcessImageNameW(handle, 0, buffer, ref size) || size == 0)
|
||||
{
|
||||
error = Marshal.GetLastPInvokeError();
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return ExecutableIdentity.Normalise(new string(buffer, 0, checked((int)size)));
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
private static extern SafeProcessHandle OpenProcess(uint desiredAccess,
|
||||
[MarshalAs(UnmanagedType.Bool)] bool inheritHandle, uint processId);
|
||||
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
|
||||
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool QueryFullProcessImageNameW(SafeProcessHandle process, uint flags,
|
||||
[Out] char[] exeName, ref uint size);
|
||||
}
|
||||
@@ -34,8 +34,6 @@ namespace FrameLedger.Infrastructure.Watch;
|
||||
public sealed class ToolhelpProcessSnapshotSource : IProcessSnapshotSource
|
||||
{
|
||||
private const uint _snapProcess = 0x00000002;
|
||||
private const uint _queryLimitedInformation = 0x1000;
|
||||
private const int _maxPath = 32_767;
|
||||
private static readonly IntPtr _invalidHandle = new(-1);
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -80,39 +78,20 @@ public sealed class ToolhelpProcessSnapshotSource : IProcessSnapshotSource
|
||||
|
||||
private static (string? Path, DateTimeOffset? StartedAt) Describe(int pid)
|
||||
{
|
||||
using SafeProcessHandle handle = OpenProcess(_queryLimitedInformation, false, unchecked((uint)pid));
|
||||
using SafeProcessHandle handle = OpenProcess(ProcessImagePath.QueryLimited, false, unchecked((uint)pid));
|
||||
if (handle.IsInvalid)
|
||||
{
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
string? path = ImagePathOf(handle);
|
||||
// The same reader TargetResolver re-finds the game with (beta.33): one spelling for the whole capture path.
|
||||
string? path = ProcessImagePath.Of(handle, out _);
|
||||
DateTimeOffset? started = GetProcessTimes(handle, out long creation, out _, out _, out _)
|
||||
? DateTimeOffset.FromFileTime(creation)
|
||||
: null;
|
||||
return (path, started);
|
||||
}
|
||||
|
||||
private static string? ImagePathOf(SafeProcessHandle handle)
|
||||
{
|
||||
char[] buffer = new char[_maxPath];
|
||||
uint size = (uint)buffer.Length;
|
||||
if (!QueryFullProcessImageNameW(handle, 0, buffer, ref size) || size == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string raw = new(buffer, 0, checked((int)size));
|
||||
try
|
||||
{
|
||||
return ExecutableIdentity.Normalise(raw);
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
private struct ProcessEntry32W
|
||||
{
|
||||
@@ -154,12 +133,6 @@ public sealed class ToolhelpProcessSnapshotSource : IProcessSnapshotSource
|
||||
private static extern SafeProcessHandle OpenProcess(uint desiredAccess,
|
||||
[MarshalAs(UnmanagedType.Bool)] bool inheritHandle, uint processId);
|
||||
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
|
||||
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool QueryFullProcessImageNameW(SafeProcessHandle process, uint flags,
|
||||
[Out] char[] exeName, ref uint size);
|
||||
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
|
||||
@@ -201,6 +201,25 @@ enum class Reason : std::uint8_t {
|
||||
// checks read exactly as before.
|
||||
kAllowedUserModeException,
|
||||
|
||||
// THE TARGET CANNOT TAKE THE OVERLAY AT ALL (beta.33, owner decision D78; spike-notes §25). Both are read from the
|
||||
// target itself -- its token and its process mitigation policies, through Sources::TargetIsolationFacts -- as the
|
||||
// last question before the primitive, after every check above and the payload's identity passed. Neither is a
|
||||
// finding about anti-cheat: nothing is written to the game's row, and the session is Tier 2 with this reason. Each
|
||||
// ended before as a failed injection, an Overlay that installed no hooks, or a risk of killing the game, and never
|
||||
// as a working session -- so no game that measured before is refused now.
|
||||
//
|
||||
// The token is an AppContainer's: a Microsoft Store app of the UWP kind, not a desktop game. The Overlay's shared
|
||||
// memory, its `Local\` names and the rules file it reads live in the user's session namespace and profile, which an
|
||||
// AppContainer cannot open. GDK games from the Xbox app are full trust and are not this (D78).
|
||||
kTargetAppContainer,
|
||||
|
||||
// Windows runs the target under a code-protection policy the Overlay cannot live under: images signed by Microsoft
|
||||
// or the Store only (the Overlay is neither), no dynamic code (MinHook's trampolines are dynamic code), a user
|
||||
// shadow stack in strict mode or one that refuses images not marked CET-compatible (the Overlay is not), or Control
|
||||
// Flow Guard in strict mode (native/CMakeLists.txt H1: a host in strict mode could still __fastfail on the
|
||||
// trampolines, which no fault policy can catch). The policy is the signal, and an audit-only flag is not one.
|
||||
kTargetMitigation,
|
||||
|
||||
// NOT A REASON. The count, so appending above it updates the exported
|
||||
// FlGuardReasonCount by construction.
|
||||
//
|
||||
@@ -288,6 +307,19 @@ using ModuleSink = bool (*)(void* ctx, const char* name, const wchar_t* path);
|
||||
// the name would be a second, weaker classifier.
|
||||
using DirEntrySink = bool (*)(void* ctx, const char* name, bool isDirectory);
|
||||
|
||||
// What the target's own token and mitigation policies say about loading the Overlay (beta.33, D78) -- read by
|
||||
// Sources::TargetIsolationFacts, judged by the guard (kTargetAppContainer, kTargetMitigation). Each field is one
|
||||
// Windows flag, named as winnt.h names it, so a refusal's signal can say which one it was.
|
||||
struct TargetIsolation {
|
||||
bool appContainer = false; // TokenIsAppContainer
|
||||
bool microsoftSignedOnly = false; // ProcessSignaturePolicy.MicrosoftSignedOnly
|
||||
bool storeSignedOnly = false; // ProcessSignaturePolicy.StoreSignedOnly
|
||||
bool dynamicCodeProhibited = false; // ProcessDynamicCodePolicy.ProhibitDynamicCode
|
||||
bool shadowStackStrict = false; // ProcessUserShadowStackPolicy: enabled, EnableUserShadowStackStrictMode
|
||||
bool shadowStackBlocksNonCet = false; // ProcessUserShadowStackPolicy.BlockNonCetBinaries(NonEhcont)
|
||||
bool cfgStrict = false; // ProcessControlFlowGuardPolicy.StrictMode
|
||||
};
|
||||
|
||||
struct Sources {
|
||||
// Loaded modules of one process, by base name and load path.
|
||||
Collected (*EnumerateModules)(std::uint32_t pid, ModuleSink sink, void* ctx) = nullptr;
|
||||
@@ -455,6 +487,17 @@ struct Sources {
|
||||
// Same trust base as above: that swap needs write access we have already
|
||||
// conceded.
|
||||
Collected (*PayloadIsOurOwn)(const wchar_t* dllPath, bool* isOurs) = nullptr;
|
||||
|
||||
// beta.33 (D78) -- can the target take the Overlay at all? Its token (TokenIsAppContainer) and four of its
|
||||
// process mitigation policies, read through a PROCESS_QUERY_LIMITED_INFORMATION handle, which answers both
|
||||
// (measured 2026-11-03 on Windows 11: GetProcessMitigationPolicy needs no more). A policy this Windows does not
|
||||
// know (ERROR_INVALID_PARAMETER, which is what an unknown policy answers -- measured) cannot be in effect, and
|
||||
// reads as clear; any other failure is kFailed.
|
||||
//
|
||||
// kFailed and a null seam refuse, as kProcessUnreadable: "could not tell" never reads as "clear". Asked by
|
||||
// GuardedInjectImpl only, never by EvaluateImpl -- the 30 s re-scan runs inside a process the Overlay is already
|
||||
// in, where the question has been answered.
|
||||
Collected (*TargetIsolationFacts)(std::uint32_t pid, TargetIsolation* out) = nullptr;
|
||||
};
|
||||
|
||||
// TWO SEAMS, ONE IMPLEMENTATION. SystemSources() wires both ModuleIsOurOwn and
|
||||
|
||||
@@ -594,6 +594,10 @@ const char* ReasonName(Reason r) noexcept {
|
||||
return "KillSwitchEngaged";
|
||||
case Reason::kAllowedUserModeException:
|
||||
return "AllowedUnderUserModeException";
|
||||
case Reason::kTargetAppContainer:
|
||||
return "TargetAppContainer";
|
||||
case Reason::kTargetMitigation:
|
||||
return "TargetMitigation";
|
||||
case Reason::kCount:
|
||||
break; // not a reason; falls through to the guard below
|
||||
}
|
||||
@@ -717,6 +721,50 @@ Verdict EvaluateImpl(std::uint32_t targetPid, const Sources& sources, const char
|
||||
// A refusal returns here, and there is no argument that changes that (the `acknowledged` flag of 2026-09-21 was
|
||||
// withdrawn on 2026-09-22 with the bypass it served). Everything below -- the payload's existence, the payload's
|
||||
// identity, the primitive, the bitness answer -- runs only for a target the full evaluation allowed.
|
||||
// beta.33 (D78) -- the first policy in `facts` the Overlay cannot live under, named for the refusal's signal; null
|
||||
// when there is none. Which one names a refusal changes nothing a user can do, so the order is just winnt.h's.
|
||||
const char* BlockingMitigation(const TargetIsolation& facts) noexcept {
|
||||
if (facts.microsoftSignedOnly) {
|
||||
return "signature policy: Microsoft-signed images only";
|
||||
}
|
||||
if (facts.storeSignedOnly) {
|
||||
return "signature policy: Store-signed images only";
|
||||
}
|
||||
if (facts.dynamicCodeProhibited) {
|
||||
return "dynamic code policy: dynamic code prohibited";
|
||||
}
|
||||
if (facts.shadowStackStrict) {
|
||||
return "user shadow stack policy: strict mode";
|
||||
}
|
||||
if (facts.shadowStackBlocksNonCet) {
|
||||
return "user shadow stack policy: images not marked CET-compatible are blocked";
|
||||
}
|
||||
if (facts.cfgStrict) {
|
||||
return "Control Flow Guard policy: strict mode";
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// beta.33 (D78) -- can the target take the Overlay at all? kAllow, or the refusal. "Could not tell" refuses as
|
||||
// kProcessUnreadable, the module check's own word for a process it could not read: it never reads as "clear".
|
||||
Verdict TargetIsolationVerdict(std::uint32_t targetPid, const Sources& sources) noexcept {
|
||||
if (sources.TargetIsolationFacts == nullptr) {
|
||||
return Refuse(Reason::kProcessUnreadable, nullptr, "no target isolation source");
|
||||
}
|
||||
TargetIsolation facts;
|
||||
if (sources.TargetIsolationFacts(targetPid, &facts) != Collected::kOk) {
|
||||
return Refuse(Reason::kProcessUnreadable, nullptr,
|
||||
"the target's token or code-protection policies could not be read");
|
||||
}
|
||||
if (facts.appContainer) {
|
||||
return Refuse(Reason::kTargetAppContainer, nullptr, "the target's token is an AppContainer's");
|
||||
}
|
||||
if (const char* mitigation = BlockingMitigation(facts); mitigation != nullptr) {
|
||||
return Refuse(Reason::kTargetMitigation, nullptr, mitigation);
|
||||
}
|
||||
return Allow();
|
||||
}
|
||||
|
||||
Verdict GuardedInjectImpl(std::uint32_t targetPid, const wchar_t* dllPath, const Sources& sources,
|
||||
const char* toleratedFamilies) noexcept {
|
||||
const Verdict v = EvaluateImpl(targetPid, sources, toleratedFamilies);
|
||||
@@ -768,6 +816,15 @@ Verdict GuardedInjectImpl(std::uint32_t targetPid, const wchar_t* dllPath, const
|
||||
return Refuse(Reason::kPayloadNotOurs, nullptr, "the payload is not one of FrameLedger's own binaries");
|
||||
}
|
||||
|
||||
// beta.33 (D78) -- the last question before the primitive: can the target take the Overlay at all? Its token and
|
||||
// its mitigation policies answer, and a refusal names which. AFTER the payload checks, so a misuse of the exported
|
||||
// ABI is reported as one whatever the target; BEFORE the primitive, which still answers bitness itself -- a 32-bit
|
||||
// target under none of these policies reaches it and is kTargetIsWow64 as before.
|
||||
const Verdict isolation = TargetIsolationVerdict(targetPid, sources);
|
||||
if (!isolation.Allowed()) {
|
||||
return isolation;
|
||||
}
|
||||
|
||||
// Injection failing is not a guard refusal — the gate passed — but it is
|
||||
// also NOT an allow. Allowed() means "the DLL is loaded in the target",
|
||||
// which is the only reading a caller can act on. The reason says whose
|
||||
|
||||
@@ -938,6 +938,71 @@ Collected ModuleSignerOrganisationImpl(const wchar_t* modulePath, char* out, std
|
||||
return ReadSignerOrganisation(modulePath, out, cap) ? Collected::kOk : Collected::kFailed;
|
||||
}
|
||||
|
||||
// beta.33 (D78) -- one mitigation policy, read into its winnt.h structure. A policy this Windows does not know answers
|
||||
// ERROR_INVALID_PARAMETER (measured 2026-11-03 with a value no Windows defines) and cannot be in effect: the structure
|
||||
// stays zero and the read counts as answered. Every other failure is a failure.
|
||||
template <typename Policy>
|
||||
bool ReadMitigation(HANDLE proc, PROCESS_MITIGATION_POLICY which, Policy* policy) noexcept {
|
||||
*policy = Policy{};
|
||||
if (GetProcessMitigationPolicy(proc, which, policy, sizeof(Policy))) {
|
||||
return true;
|
||||
}
|
||||
return GetLastError() == ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
// beta.33 (D78) -- the target's own token and four of its mitigation policies. spike-notes §25 read them on the owner's
|
||||
// eleven GDK titles and every process of their launch chains: full trust, none of the four. One
|
||||
// PROCESS_QUERY_LIMITED_INFORMATION handle answers both questions (measured: GetProcessMitigationPolicy needs no more,
|
||||
// and OpenProcessToken asks exactly that right).
|
||||
Collected TargetIsolationFactsImpl(std::uint32_t pid, TargetIsolation* out) noexcept {
|
||||
if (out == nullptr) {
|
||||
return Collected::kFailed;
|
||||
}
|
||||
*out = TargetIsolation{};
|
||||
|
||||
HANDLE proc = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
|
||||
if (proc == nullptr) {
|
||||
return Collected::kFailed; // ACCESS_DENIED on a protected target, or gone: cannot determine
|
||||
}
|
||||
|
||||
bool read = false;
|
||||
HANDLE token = nullptr;
|
||||
if (OpenProcessToken(proc, TOKEN_QUERY, &token)) {
|
||||
DWORD isAppContainer = 0;
|
||||
DWORD returned = 0;
|
||||
read = GetTokenInformation(token, TokenIsAppContainer, &isAppContainer, sizeof(isAppContainer), &returned) &&
|
||||
returned == sizeof(isAppContainer);
|
||||
out->appContainer = isAppContainer != 0;
|
||||
CloseHandle(token);
|
||||
}
|
||||
|
||||
PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY signature{};
|
||||
PROCESS_MITIGATION_DYNAMIC_CODE_POLICY dynamicCode{};
|
||||
PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY shadowStack{};
|
||||
PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY cfg{};
|
||||
read = read && ReadMitigation(proc, ProcessSignaturePolicy, &signature) &&
|
||||
ReadMitigation(proc, ProcessDynamicCodePolicy, &dynamicCode) &&
|
||||
ReadMitigation(proc, ProcessUserShadowStackPolicy, &shadowStack) &&
|
||||
ReadMitigation(proc, ProcessControlFlowGuardPolicy, &cfg);
|
||||
CloseHandle(proc);
|
||||
if (!read) {
|
||||
*out = TargetIsolation{};
|
||||
return Collected::kFailed;
|
||||
}
|
||||
|
||||
// The enforcing flags only. Audit* records what WOULD be refused and refuses nothing, and SetContextIpValidation
|
||||
// without strict mode is what every CET-compatible process carries (measured: pwsh.exe 0x105) -- refusing on it
|
||||
// would refuse games that work today.
|
||||
out->microsoftSignedOnly = signature.MicrosoftSignedOnly != 0;
|
||||
out->storeSignedOnly = signature.StoreSignedOnly != 0;
|
||||
out->dynamicCodeProhibited = dynamicCode.ProhibitDynamicCode != 0;
|
||||
out->shadowStackStrict = shadowStack.EnableUserShadowStack != 0 && shadowStack.EnableUserShadowStackStrictMode != 0;
|
||||
out->shadowStackBlocksNonCet =
|
||||
shadowStack.BlockNonCetBinaries != 0 || shadowStack.BlockNonCetBinariesNonEhcont != 0;
|
||||
out->cfgStrict = cfg.StrictMode != 0;
|
||||
return Collected::kOk;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
std::uint64_t ProcessCreatedAt(std::uint32_t pid) noexcept {
|
||||
@@ -975,6 +1040,7 @@ Sources SystemSources() noexcept {
|
||||
// §S19(b), the embedded half only. The catalog half is a deferral with a
|
||||
// written rationale, not a gap nobody noticed.
|
||||
s.ModuleSignerOrganisation = &ModuleSignerOrganisationImpl;
|
||||
s.TargetIsolationFacts = &TargetIsolationFactsImpl;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <fl_prescan.h>
|
||||
#include <string_view>
|
||||
|
||||
namespace fl::guard {
|
||||
namespace {
|
||||
@@ -276,17 +277,17 @@ Verdict PreScanGameWith(const wchar_t* exePath, const Sources& s, const char* to
|
||||
// as files. `folder` is the first `len` characters of a path; the probe path is built on the stack. A probe that fails
|
||||
// — too long, absent, a directory, unreadable — is not a root.
|
||||
bool IsGdkPackageRoot(const wchar_t* folder, std::size_t len) noexcept {
|
||||
static const wchar_t* const kFiles[] = {L"MicrosoftGame.config", L"appxmanifest.xml"};
|
||||
for (const wchar_t* file : kFiles) {
|
||||
wchar_t probe[kMaxPreScanPathLen] = {};
|
||||
const std::size_t fileLen = wcslen(file);
|
||||
if (len + 1 + fileLen + 1 > kMaxPreScanPathLen) {
|
||||
// Lengths known at compile time: no strlen-family call on a name (SonarCloud cpp:S5813, PR-1).
|
||||
static constexpr std::wstring_view kFiles[] = {L"MicrosoftGame.config", L"appxmanifest.xml"};
|
||||
for (const std::wstring_view file : kFiles) {
|
||||
wchar_t probe[kMaxPreScanPathLen] = {};
|
||||
if (len + 1 + file.size() + 1 > kMaxPreScanPathLen) {
|
||||
return false;
|
||||
}
|
||||
std::wmemcpy(probe, folder, len);
|
||||
probe[len] = L'\\';
|
||||
std::wmemcpy(probe + len + 1, file, fileLen);
|
||||
probe[len + 1 + fileLen] = L'\0';
|
||||
std::wmemcpy(probe + len + 1, file.data(), file.size());
|
||||
probe[len + 1 + file.size()] = L'\0';
|
||||
const DWORD attrs = GetFileAttributesW(probe);
|
||||
if (attrs == INVALID_FILE_ATTRIBUTES || (attrs & FILE_ATTRIBUTE_DIRECTORY) != 0) {
|
||||
return false;
|
||||
|
||||
@@ -209,6 +209,15 @@ struct Fake {
|
||||
kCannotTell, // force kFailed
|
||||
};
|
||||
Payload payload = Payload::kReal;
|
||||
|
||||
// beta.33 (D78) — the target isolation seam. DEFAULTS TO THE REAL IMPLEMENTATION, as the payload seam does and for
|
||||
// its reason: every injection case in this file then also proves the real seam reads a plain process — the harness,
|
||||
// a 32-bit cmd, this test — as clear, which is the green direction of kTargetAppContainer and kTargetMitigation for
|
||||
// free. `isolationReal = false` answers with `isolation` and `isolationResult` instead.
|
||||
bool isolationReal = true;
|
||||
TargetIsolation isolation;
|
||||
Collected isolationResult = Collected::kOk;
|
||||
int isolationCalls = 0;
|
||||
};
|
||||
|
||||
Fake g;
|
||||
@@ -432,6 +441,15 @@ Collected FakePayloadIsOurOwn(const wchar_t* dllPath, bool* isOurs) {
|
||||
}
|
||||
}
|
||||
|
||||
Collected FakeTargetIsolationFacts(std::uint32_t pid, TargetIsolation* out) {
|
||||
++g.isolationCalls;
|
||||
if (g.isolationReal) {
|
||||
return SystemSources().TargetIsolationFacts(pid, out);
|
||||
}
|
||||
*out = g.isolation;
|
||||
return g.isolationResult;
|
||||
}
|
||||
|
||||
Sources FakeSources() {
|
||||
Sources s;
|
||||
s.ReadRulesFile = &FakeReadRules;
|
||||
@@ -447,6 +465,7 @@ Sources FakeSources() {
|
||||
s.ModuleIsOurOwn = &FakeModuleIsOurOwn;
|
||||
s.PayloadIsOurOwn = &FakePayloadIsOurOwn;
|
||||
s.ModuleSignerOrganisation = &FakeModuleSignerOrganisation;
|
||||
s.TargetIsolationFacts = &FakeTargetIsolationFacts;
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -3700,6 +3719,205 @@ TEST_CASE("the payload check can PASS — the staged Overlay is accepted", "[gua
|
||||
CHECK(SystemSources().PayloadIsOurOwn(FL_OVERLAY_DLL, nullptr) == Collected::kFailed);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// beta.33 (D78) — can the target take the Overlay at all? Its token and its
|
||||
// mitigation policies, asked as the last question before the primitive
|
||||
// (kTargetAppContainer, kTargetMitigation). Neither is a finding: no family, and
|
||||
// nothing is loaded.
|
||||
// ===========================================================================
|
||||
namespace {
|
||||
|
||||
// A child of this test started under the creation-time mitigation policies in `policy`, suspended and inert. cmd.exe
|
||||
// is Microsoft-signed, so a signature policy lets it start. Child's destructor ends it.
|
||||
bool StartMitigatedChild(Child& child, DWORD64 policy) {
|
||||
SIZE_T size = 0;
|
||||
InitializeProcThreadAttributeList(nullptr, 1, 0, &size);
|
||||
std::vector<unsigned char> buffer(size);
|
||||
auto* list = reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(buffer.data());
|
||||
if (size == 0 || !InitializeProcThreadAttributeList(list, 1, 0, &size)) {
|
||||
return false;
|
||||
}
|
||||
bool started = false;
|
||||
if (UpdateProcThreadAttribute(list, 0, PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY, &policy, sizeof(policy), nullptr,
|
||||
nullptr)) {
|
||||
wchar_t sys[MAX_PATH]{};
|
||||
GetSystemDirectoryW(sys, MAX_PATH);
|
||||
const std::wstring cmd = std::wstring(sys) + L"\\cmd.exe";
|
||||
std::wstring line = L"\"" + cmd + L"\" /c pause";
|
||||
STARTUPINFOEXW si{};
|
||||
si.StartupInfo.cb = sizeof(si);
|
||||
si.lpAttributeList = list;
|
||||
started = CreateProcessW(cmd.c_str(), line.data(), nullptr, nullptr, FALSE,
|
||||
CREATE_SUSPENDED | CREATE_NO_WINDOW | EXTENDED_STARTUPINFO_PRESENT, nullptr, nullptr,
|
||||
&si.StartupInfo, &child.pi) != 0;
|
||||
}
|
||||
DeleteProcThreadAttributeList(list);
|
||||
return started;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST_CASE("an AppContainer target is refused by its own reason, and nothing is loaded", "[guard][inject][isolation]") {
|
||||
Child child;
|
||||
REQUIRE(StartHarness(child));
|
||||
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll"};
|
||||
g.scanSet = {child.pi.dwProcessId};
|
||||
g.isolationReal = false;
|
||||
g.isolation.appContainer = true;
|
||||
|
||||
const Verdict v = GuardedInjectWithSources(child.pi.dwProcessId, FL_OVERLAY_DLL, FakeSources());
|
||||
INFO("reason " << ReasonName(v.reason) << " signal=" << v.signal);
|
||||
CHECK_FALSE(v.Allowed());
|
||||
CHECK(v.reason == Reason::kTargetAppContainer);
|
||||
CHECK(v.family[0] == '\0'); // not an anti-cheat finding: no family, so nothing is written to the game
|
||||
CHECK_FALSE(TargetHasModule(child.pi.dwProcessId, L"FrameLedger.Overlay.dll"));
|
||||
}
|
||||
|
||||
TEST_CASE("each blocking mitigation refuses as kTargetMitigation and names its policy", "[guard][inject][isolation]") {
|
||||
// One target for every case: a refusal here never touches the target, which the last line checks.
|
||||
Child child;
|
||||
REQUIRE(StartHarness(child));
|
||||
|
||||
struct Case {
|
||||
bool TargetIsolation::* flag;
|
||||
const char* named;
|
||||
};
|
||||
const Case cases[] = {
|
||||
{&TargetIsolation::microsoftSignedOnly, "Microsoft-signed"},
|
||||
{&TargetIsolation::storeSignedOnly, "Store-signed"},
|
||||
{&TargetIsolation::dynamicCodeProhibited, "dynamic code prohibited"},
|
||||
{&TargetIsolation::shadowStackStrict, "shadow stack policy: strict mode"},
|
||||
{&TargetIsolation::shadowStackBlocksNonCet, "CET-compatible"},
|
||||
{&TargetIsolation::cfgStrict, "Control Flow Guard policy: strict mode"},
|
||||
};
|
||||
for (const Case& c : cases) {
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll"};
|
||||
g.scanSet = {child.pi.dwProcessId};
|
||||
g.isolationReal = false;
|
||||
g.isolation.*(c.flag) = true;
|
||||
|
||||
const Verdict v = GuardedInjectWithSources(child.pi.dwProcessId, FL_OVERLAY_DLL, FakeSources());
|
||||
INFO("expected '" << c.named << "', got " << ReasonName(v.reason) << " signal=" << v.signal);
|
||||
CHECK(v.reason == Reason::kTargetMitigation);
|
||||
CHECK(std::string(v.signal).find(c.named) != std::string::npos);
|
||||
CHECK(v.family[0] == '\0');
|
||||
}
|
||||
CHECK_FALSE(TargetHasModule(child.pi.dwProcessId, L"FrameLedger.Overlay.dll"));
|
||||
}
|
||||
|
||||
TEST_CASE("an isolation seam that cannot answer refuses, and so does a guard wired without one",
|
||||
"[guard][inject][isolation][failclosed]") {
|
||||
Child child;
|
||||
REQUIRE(StartHarness(child));
|
||||
|
||||
// Every fact clear beside a failed result: the result is what is honoured, never the facts next to it.
|
||||
for (const Collected bad : {Collected::kFailed, Collected::kIncomplete, Collected::kRetry}) {
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll"};
|
||||
g.scanSet = {child.pi.dwProcessId};
|
||||
g.isolationReal = false;
|
||||
g.isolationResult = bad;
|
||||
|
||||
const Verdict v = GuardedInjectWithSources(child.pi.dwProcessId, FL_OVERLAY_DLL, FakeSources());
|
||||
INFO("reason " << ReasonName(v.reason) << " signal=" << v.signal);
|
||||
CHECK(v.reason == Reason::kProcessUnreadable);
|
||||
}
|
||||
|
||||
// Sources members default to nullptr: forgetting to wire this must refuse, never load.
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll"};
|
||||
g.scanSet = {child.pi.dwProcessId};
|
||||
Sources s = FakeSources();
|
||||
s.TargetIsolationFacts = nullptr;
|
||||
const Verdict unwired = GuardedInjectWithSources(child.pi.dwProcessId, FL_OVERLAY_DLL, s);
|
||||
CHECK(unwired.reason == Reason::kProcessUnreadable);
|
||||
CHECK(std::string(unwired.signal) == "no target isolation source");
|
||||
|
||||
CHECK_FALSE(TargetHasModule(child.pi.dwProcessId, L"FrameLedger.Overlay.dll"));
|
||||
}
|
||||
|
||||
TEST_CASE("the isolation check comes after the guard and the payload, and the re-scan never asks it",
|
||||
"[guard][inject][isolation]") {
|
||||
// A blocked target outranks it: anti-cheat in the target is the fact that matters.
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll", "BEClient_x64.dll"};
|
||||
g.scanSet = {GetCurrentProcessId()};
|
||||
g.isolationReal = false;
|
||||
g.isolation.appContainer = true;
|
||||
CHECK(GuardedInjectWithSources(GetCurrentProcessId(), FL_OVERLAY_DLL, FakeSources()).reason ==
|
||||
Reason::kBlockedModule);
|
||||
CHECK(g.isolationCalls == 0);
|
||||
|
||||
// So does a foreign payload: a misuse of the exported ABI is reported as one, whatever the target.
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll"};
|
||||
g.scanSet = {GetCurrentProcessId()};
|
||||
g.payload = Fake::Payload::kForeign;
|
||||
g.isolationReal = false;
|
||||
g.isolation.appContainer = true;
|
||||
CHECK(GuardedInjectWithSources(GetCurrentProcessId(), FL_OVERLAY_DLL, FakeSources()).reason ==
|
||||
Reason::kPayloadNotOurs);
|
||||
CHECK(g.isolationCalls == 0);
|
||||
|
||||
// The 30 s re-scan evaluates a process the Overlay is already in: the question was answered before it loaded.
|
||||
ResetFake();
|
||||
g.isolationReal = false;
|
||||
g.isolation.appContainer = true;
|
||||
CHECK(EvaluateWithSources(1234, FakeSources()).Allowed());
|
||||
CHECK(g.isolationCalls == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("the real isolation seam reads a plain desktop process as clear", "[guard][inject][isolation]") {
|
||||
// This test: full trust, not CET-compatible, Control Flow Guard on but not strict.
|
||||
TargetIsolation facts;
|
||||
facts.appContainer = true; // the seam writes every field, not only the ones it finds set
|
||||
REQUIRE(SystemSources().TargetIsolationFacts(GetCurrentProcessId(), &facts) == Collected::kOk);
|
||||
CHECK_FALSE(facts.appContainer);
|
||||
CHECK_FALSE(facts.microsoftSignedOnly);
|
||||
CHECK_FALSE(facts.storeSignedOnly);
|
||||
CHECK_FALSE(facts.dynamicCodeProhibited);
|
||||
CHECK_FALSE(facts.shadowStackStrict);
|
||||
CHECK_FALSE(facts.shadowStackBlocksNonCet);
|
||||
CHECK_FALSE(facts.cfgStrict);
|
||||
|
||||
// A process that does not exist cannot be answered, and a null out-param is the caller getting it wrong.
|
||||
TargetIsolation none;
|
||||
CHECK(SystemSources().TargetIsolationFacts(0x7FFFFFFCu, &none) == Collected::kFailed);
|
||||
CHECK(SystemSources().TargetIsolationFacts(GetCurrentProcessId(), nullptr) == Collected::kFailed);
|
||||
}
|
||||
|
||||
TEST_CASE("the real isolation seam reads the policies a process was started under", "[guard][inject][isolation]") {
|
||||
// Against Windows, not a fake: a child started with "no dynamic code" and "Microsoft-signed images only" -- two
|
||||
// policies every supported Windows can start a process under, unlike strict CFG or a shadow stack, which need a
|
||||
// newer build or CET hardware -- reads as exactly those two.
|
||||
Child child;
|
||||
REQUIRE(StartMitigatedChild(child, PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_ON |
|
||||
PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON));
|
||||
|
||||
TargetIsolation facts;
|
||||
REQUIRE(SystemSources().TargetIsolationFacts(child.pi.dwProcessId, &facts) == Collected::kOk);
|
||||
CHECK(facts.dynamicCodeProhibited);
|
||||
CHECK(facts.microsoftSignedOnly);
|
||||
CHECK_FALSE(facts.appContainer);
|
||||
CHECK_FALSE(facts.storeSignedOnly);
|
||||
CHECK_FALSE(facts.shadowStackStrict);
|
||||
CHECK_FALSE(facts.shadowStackBlocksNonCet);
|
||||
CHECK_FALSE(facts.cfgStrict);
|
||||
|
||||
// ...and the guard, through the seam it ships with, refuses it by that reason, naming the first policy.
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll"};
|
||||
g.scanSet = {child.pi.dwProcessId};
|
||||
const Verdict v = GuardedInjectWithSources(child.pi.dwProcessId, FL_OVERLAY_DLL, FakeSources());
|
||||
INFO("reason " << ReasonName(v.reason) << " signal=" << v.signal);
|
||||
CHECK(v.reason == Reason::kTargetMitigation);
|
||||
CHECK(std::string(v.signal).find("Microsoft-signed") != std::string::npos);
|
||||
CHECK(v.family[0] == '\0');
|
||||
}
|
||||
|
||||
#endif // FL_HARNESS_EXE && FL_OVERLAY_DLL
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -102,6 +102,21 @@ public sealed class GameArtTests : IDisposable
|
||||
view.Tint!.Value.B.Should().BeGreaterThan(view.Tint.Value.R, "the band takes the logo's colour, the cover slot's image");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AGogGamesArtIsSaidAsGalaxys()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
string install = Path.Combine(_dir, "gog", "A Space for the Unbound");
|
||||
GameRow game = await s.GameAsync("A Space for the Unbound", Path.Combine(install, "A Space for the Unbound.exe"));
|
||||
string cover = TestImages.Write(Path.Combine(_dir, "galaxy", "cover.png"), TestImages.Png(30, 45, Color.FromRgb(40, 160, 40)));
|
||||
var store = new TestImages.Store("gog", new StoreGame("gog", "1125815775", "A Space for the Unbound", install, null, null));
|
||||
|
||||
GameArtView view = (await Art(new MemorySettings(), store, new TestImages.ArtCache("gog", "1125815775", new GameArtFiles(cover, null, null))).ForAsync(game, Ct))!;
|
||||
|
||||
view.Source.Should().Be(Strings.Art_Source_Gog);
|
||||
view.CoverIsSquare.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("C:\\Windows\\Web\\Wallpaper\\img0.jpg")]
|
||||
[InlineData("\\\\server\\share\\x.png")]
|
||||
|
||||
@@ -261,6 +261,76 @@ public sealed class GamePlayerTests
|
||||
.SteamGame.Should().BeFalse("only Steam's games hand themselves to their store");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.33 (D80): a game the Xbox app installed starts through Windows — its package activated as its Start-menu tile
|
||||
/// does — in either mode, and from an App running as administrator too: the user's shell activates it, unelevated. The
|
||||
/// agent is never asked to start it by its path, which is never the game in its package (spike-notes §25).
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task AnXboxGameStartsThroughWindowsInEitherModeAndFromAnAdministrator()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
const string content = @"D:\xbox\FINAL FANTASY\Content";
|
||||
const string family = "39EA002F.FF1DF_n746a19ndrrjg";
|
||||
var xbox = new Stores(new StoreGame("xbox", family, "FINAL FANTASY", content, null, "1.2.3.0", family + "!Game"));
|
||||
GameRow game = Game(content + @"\FINAL FANTASY.exe", family);
|
||||
var agent = new Agent();
|
||||
|
||||
var shell = new Shell();
|
||||
PlayResult result = await Player(s, shell, agent, xbox).PlayAsync(game, Ct);
|
||||
result.Should().Be(new PlayResult(PlayOutcome.HandedToStore, "xbox"));
|
||||
shell.Started.Should().ContainSingle().Which.Should().Be((StoreLaunches.ExplorerPath, @"shell:AppsFolder\" + family + "!Game", (string?)null));
|
||||
GamePlayer.Describe(result, "FINAL FANTASY").Should().Be(
|
||||
("Windows is starting FINAL FANTASY through its package, as its Start-menu tile does — a game from the Xbox app always starts this way. FrameLedger records it once it appears.", false));
|
||||
|
||||
var elevated = new Shell();
|
||||
(await Player(s, elevated, agent, xbox, elevated: true).PlayAsync(game, Ct)).Should().Be(new PlayResult(PlayOutcome.HandedToStore, "xbox"));
|
||||
elevated.Started.Should().ContainSingle();
|
||||
|
||||
await new RegisteredSettings(new SqliteSettingsStore(s.Db)).SetAsync(SettingsRegistry.UiPlayMode, PlayMode.Direct, Ct);
|
||||
var direct = new Shell();
|
||||
(await Player(s, direct, agent, xbox).PlayAsync(game, Ct)).Should().Be(new PlayResult(PlayOutcome.HandedToStore, "xbox"));
|
||||
direct.Started.Should().ContainSingle();
|
||||
agent.Sent.Should().BeEmpty("no mode starts an Xbox game by its path");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AnXboxGameWindowsDidNotStartSaysWhereToStartIt()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
const string content = @"D:\xbox\Valor Mortis\Content";
|
||||
const string family = "LyricalGamesLLC.ValorMortis_72fag5ekhk96y";
|
||||
GameRow game = Game(content + @"\ValorMortis\Binaries\Win64\ValorMortisMSG-Win64-Shipping.exe", family);
|
||||
var agent = new Agent();
|
||||
|
||||
PlayResult refused = await Player(s, new Shell(takes: false), agent,
|
||||
new Stores(new StoreGame("xbox", family, "Valor Mortis", content, null, null, family + "!AppValorMortisShipping"))).PlayAsync(game, Ct);
|
||||
refused.Should().Be(new PlayResult(PlayOutcome.Failed, "xbox"));
|
||||
(string text, bool warning) = GamePlayer.Describe(refused, "Valor Mortis");
|
||||
warning.Should().BeTrue();
|
||||
text.Should().Contain("Valor Mortis").And.Contain("Xbox app");
|
||||
|
||||
PlayResult nothing = await Player(s, new Shell(), agent, new Stores(new StoreGame("xbox", family, "Valor Mortis", content, null, null))).PlayAsync(game, Ct);
|
||||
nothing.Should().Be(new PlayResult(PlayOutcome.Failed, "xbox"), "a package that names no application has nothing to activate, and its path starts nothing");
|
||||
agent.Sent.Should().BeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>beta.33: the agent refuses to start a game in an Xbox package by its path, and says so — reached only when no record named it.</summary>
|
||||
[Fact]
|
||||
public async Task TheAgentsPackagedGameAnswerSaysWhereToStartIt()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
await new RegisteredSettings(new SqliteSettingsStore(s.Db)).SetAsync(SettingsRegistry.UiPlayMode, PlayMode.Direct, Ct);
|
||||
|
||||
PlayResult result = await Player(s, new Shell(), new Agent(outcome: "PackagedGame"), new Stores())
|
||||
.PlayAsync(Game(@"D:\xbox\inKONBINI\Content\inKONBINI.exe", null), Ct);
|
||||
|
||||
result.Should().Be(new PlayResult(PlayOutcome.PackagedGame));
|
||||
(string text, bool warning) = GamePlayer.Describe(result, "inKONBINI");
|
||||
warning.Should().BeTrue();
|
||||
text.Should().Contain("inKONBINI").And.Contain("Xbox app").And.NotContain("PackagedGame");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AStoreAppWindowsWillNotOpenIsAFailureNamedAsSuch()
|
||||
{
|
||||
|
||||
@@ -90,6 +90,17 @@ public sealed class ReasonTextTests
|
||||
return 0;
|
||||
});
|
||||
|
||||
/// <summary>beta.33 (D78): a game the Overlay cannot load into at all is said as that — never as a failure the user could fix.</summary>
|
||||
[Fact]
|
||||
public void AnAppContainerOrAProtectedGameIsSaidAsWhatItIs() => InEnglish(() =>
|
||||
{
|
||||
Formats.Tier2Reason("end=RefusedByGuard; tier2: attach=NotEvaluated; guard=TargetAppContainer||the target's token is an AppContainer's")
|
||||
.Should().Be("The anti-cheat guard did not hook this game: the game runs in an app container (a Microsoft Store app, not a desktop game), which FrameLedger does not load into.");
|
||||
Formats.Tier2Reason("end=RefusedByGuard; tier2: attach=NotEvaluated; guard=TargetMitigation||dynamic code policy: dynamic code prohibited")
|
||||
.Should().Be("The anti-cheat guard did not hook this game: Windows protects the game in a way FrameLedger's component can neither load into nor hook.");
|
||||
return 0;
|
||||
});
|
||||
|
||||
[Fact]
|
||||
public void ACrashNamesItsExceptionAndEndTasksCodeIsAnOrdinaryEnd() => InEnglish(() =>
|
||||
{
|
||||
|
||||
@@ -63,6 +63,47 @@ public sealed class StoreLaunchesTests
|
||||
.Should().Be("itch://install?game_id=5015466&launch");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.33 (D80): an Xbox game is activated through its package, as its Start-menu tile does — the command §25 ran on
|
||||
/// FINAL FANTASY, where the game came up in its package. Started by its path, a GDK game never is.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void XboxActivatesThePackageThroughTheUsersShell()
|
||||
{
|
||||
const string family = "39EA002F.FF1DF_n746a19ndrrjg";
|
||||
StoreGame record = Record("xbox", family, @"D:\xbox\FINAL FANTASY\Content") with { LaunchKey = family + "!Game" };
|
||||
|
||||
StoreLaunch? launch = StoreLaunches.For(record, _galaxy);
|
||||
|
||||
launch.Should().Be(new StoreLaunch("xbox", StoreLaunchKind.RunProgram, StoreLaunches.ExplorerPath, @"shell:AppsFolder\" + family + "!Game"));
|
||||
StoreLaunches.ExplorerPath.Should().EndWith(@"\explorer.exe").And.StartWith(Environment.GetFolderPath(Environment.SpecialFolder.Windows));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AnXboxKeyThatIsNotThisPackagesBuildsNothing()
|
||||
{
|
||||
StoreGame record = Record("xbox", "LyricalGamesLLC.ValorMortis_72fag5ekhk96y", @"D:\xbox\Valor Mortis\Content");
|
||||
|
||||
StoreLaunches.For(record with { LaunchKey = "LyricalGamesLLC.ValorMortis_72fag5ekhk96y!AppValorMortisShipping" }, null).Should().NotBeNull();
|
||||
StoreLaunches.For(record with { LaunchKey = "Another.Game_72fag5ekhk96y!AppValorMortisShipping" }, null).Should().BeNull("the key must activate this record's own package");
|
||||
StoreLaunches.For(record with { LaunchKey = null }, null).Should().BeNull("an entry with no application id has nothing to activate");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("LyricalGamesLLC.ValorMortis_72fag5ekhk96y!AppValorMortisShipping", true)]
|
||||
[InlineData("Microsoft.MicrosoftJewel_8wekyb3d8bbwe!Game", true)]
|
||||
[InlineData("Microsoft.MicrosoftJewel_8wekyb3d8bbwe", false)]
|
||||
[InlineData("Microsoft.MicrosoftJewel_8wekyb3d8bbw!Game", false)]
|
||||
[InlineData("Microsoft.MicrosoftJewel_8WEKYB3D8BBWE!Game", false)]
|
||||
[InlineData("Microsoft.MicrosoftJewel_8wekyb3d8bbwe!1Game", false)]
|
||||
[InlineData("Microsoft.MicrosoftJewel_8wekyb3d8bbwe!Game /x", false)]
|
||||
[InlineData("Microsoft.MicrosoftJewel_8wekyb3d8bbwe!Game\\..", false)]
|
||||
[InlineData("..\\Jewel_8wekyb3d8bbwe!Game", false)]
|
||||
[InlineData("MJ_8wekyb3d8bbwe!Game", false)]
|
||||
[InlineData("!Game", false)]
|
||||
public void AnAumidIsCheckedAgainstTheShapeWindowsGivesOne(string aumid, bool valid) =>
|
||||
StoreLaunches.IsAumid(aumid).Should().Be(valid);
|
||||
|
||||
[Theory]
|
||||
[InlineData("steam", "730&evil=1")]
|
||||
[InlineData("steam", "")]
|
||||
|
||||
@@ -310,6 +310,32 @@ public sealed class CaptureOrchestratorTests
|
||||
(await noLaunch.LaunchAsync(game.Id, "", ct).ConfigureAwait(true)).Outcome.Should().Be(LaunchOutcome.Unavailable);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.33 (D80): a game in an Xbox package is started by Windows through its package, never by its path — started
|
||||
/// that way it is not the game in its package (spike-notes §25) — so the agent answers <c>PackagedGame</c> and starts
|
||||
/// nothing. Reached only when the App found no package record for it; the watcher records it once Windows starts it.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task AGameInAnXboxPackageIsNeverStartedByItsPath()
|
||||
{
|
||||
CancellationToken ct = TestContext.Current.CancellationToken;
|
||||
var games = new FakeGameRepository();
|
||||
GameRow game = await games.EnsureAsync(new ExecutableFingerprint { ExePath = _game, SizeBytes = 1, MtimeUnixMs = 1 }, "Title", ct).ConfigureAwait(true);
|
||||
var launchRecorder = new FakeRecorder();
|
||||
using var launches = new FakeLaunches(launchRecorder);
|
||||
List<string> log = [];
|
||||
var o = new CaptureOrchestrator(new FakeRecorder(), games, new FakeSnapshots(), new FakeIdentity(),
|
||||
new OrchestratorOptions { PayloadPath = @"C:\FL\FrameLedger.Overlay.dll", IsPackaged = exe => string.Equals(exe, _game, StringComparison.OrdinalIgnoreCase) },
|
||||
log.Add, launches);
|
||||
|
||||
LaunchResult result = await o.LaunchAsync(game.Id, "", ct).ConfigureAwait(true);
|
||||
|
||||
result.Outcome.Should().Be(LaunchOutcome.PackagedGame);
|
||||
result.SessionGuid.Should().BeNull();
|
||||
launchRecorder.Requests.Should().BeEmpty("nothing is started by its path");
|
||||
log.Should().ContainSingle(l => l.Contains("starts through Windows", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task RunAsyncPollsUntilCancelledAndThenReportsWhatWasRunning()
|
||||
{
|
||||
|
||||
@@ -128,6 +128,8 @@ public sealed class AntiCheatVerdictTests
|
||||
[InlineData(AntiCheatRefusalReason.PayloadNotOurs, false)]
|
||||
[InlineData(AntiCheatRefusalReason.KillSwitchEngaged, false)]
|
||||
[InlineData(AntiCheatRefusalReason.HookNotEnabled, false)]
|
||||
[InlineData(AntiCheatRefusalReason.TargetAppContainer, false)]
|
||||
[InlineData(AntiCheatRefusalReason.TargetMitigation, false)]
|
||||
public void AFindingAboutTheGameIsWhatTurnsItsHookingOff(AntiCheatRefusalReason reason, bool finding) =>
|
||||
AntiCheatVerdict.Refused(reason, "Easy Anti-Cheat", "EasyAntiCheat_EOS.dll").IsFindingAboutTheGame.Should().Be(finding);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using FluentAssertions;
|
||||
using FrameLedger.Application.Capture;
|
||||
using FrameLedger.Infrastructure.Capture;
|
||||
using FrameLedger.Infrastructure.Io;
|
||||
using FrameLedger.Infrastructure.Watch;
|
||||
|
||||
namespace FrameLedger.Infrastructure.Tests.Capture;
|
||||
|
||||
@@ -162,6 +163,33 @@ public sealed class TargetResolverTests : IDisposable
|
||||
new TargetResolver(latest: new Application.Watch.LatestProcessSnapshot()).IsRunning(ExecutableIdentity.Normalise(_exe)).Should().BeTrue("no snapshot published yet");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.33: the path the watcher keys a game on is the path the resolver re-finds it by — one reader
|
||||
/// (<see cref="ProcessImagePath"/>), so a game started through a junction cannot come back spelled otherwise.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TheWatchersSpellingIsTheOneTheResolverFindsAGameBy()
|
||||
{
|
||||
Process only = Start("/c ping -n 30 127.0.0.1 > nul");
|
||||
WaitUntilAllVisible();
|
||||
|
||||
string? watched = new ToolhelpProcessSnapshotSource().Take().Single(s => s.Pid == only.Id).ImagePath;
|
||||
|
||||
watched.Should().Be(ProcessImagePath.Read(only.Id, ProcessImagePath.GuardRights, out _));
|
||||
watched.Should().Be(ExecutableIdentity.Normalise(_exe));
|
||||
new TargetResolver().Resolve(watched!, out SessionEndReason reason).Should().Be(only.Id);
|
||||
reason.Should().Be(SessionEndReason.Running);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ProcessImagePathCannotBeReadForAProcessThatIsNotThere()
|
||||
{
|
||||
ProcessImagePath.Read(0, ProcessImagePath.QueryLimited, out int none).Should().BeNull();
|
||||
none.Should().Be(0, "no process is opened for a pid that cannot name one");
|
||||
ProcessImagePath.Read(int.MaxValue - 3, ProcessImagePath.QueryLimited, out int error).Should().BeNull();
|
||||
error.Should().NotBe(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OneInstanceResolves()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FluentAssertions;
|
||||
using FrameLedger.Domain.Detection;
|
||||
using FrameLedger.Infrastructure.Detection;
|
||||
using FrameLedger.Infrastructure.Import;
|
||||
|
||||
namespace FrameLedger.Infrastructure.Tests.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// beta.33: what a <c>root_file</c> signal is answered from — the install root's own listing, files only, taken once —
|
||||
/// and a root that cannot be listed is no listing at all, never an empty one (an empty one would read every
|
||||
/// <c>root_file</c> as a miss).
|
||||
/// </summary>
|
||||
public sealed class GameFileProbeRootFilesTests : IDisposable
|
||||
{
|
||||
private static readonly DetectionRuleSet _rules = new()
|
||||
{
|
||||
SchemaVersion = 2,
|
||||
RulesVersion = "t",
|
||||
Engines = [],
|
||||
Platforms = [],
|
||||
Capabilities = [],
|
||||
};
|
||||
|
||||
private readonly string _root = Path.Combine(Path.GetTempPath(), "fl-rootfiles-" + Guid.NewGuid().ToString("N"));
|
||||
|
||||
public GameFileProbeRootFilesTests() => Directory.CreateDirectory(_root);
|
||||
|
||||
public void Dispose() => Directory.Delete(_root, recursive: true);
|
||||
|
||||
private static CancellationToken Ct => TestContext.Current.CancellationToken;
|
||||
|
||||
[Fact]
|
||||
public async Task ThePackageRootsOwnFilesAreListedAndNothingBelowIt()
|
||||
{
|
||||
string content = Path.Combine(_root, "Valor Mortis", "Content");
|
||||
string binaries = Path.Combine(content, "ValorMortis", "Binaries", "Win64");
|
||||
Directory.CreateDirectory(binaries);
|
||||
await File.WriteAllTextAsync(Path.Combine(content, GdkPackageFiles.ConfigFileName), "<Game />", Ct);
|
||||
await File.WriteAllTextAsync(Path.Combine(content, GdkPackageFiles.ManifestFileName), "<Package />", Ct);
|
||||
string exe = Path.Combine(binaries, "ValorMortisMSG-Win64-Shipping.exe");
|
||||
await File.WriteAllBytesAsync(exe, [0x4D, 0x5A], Ct);
|
||||
|
||||
GameFileSnapshot snapshot = await new GameFileProbe().SnapshotAsync(exe, _rules, Ct);
|
||||
|
||||
snapshot.GameDirectory.Should().Be(content.Replace('\\', '/'), "a GDK package root is the install root of an executable three levels down");
|
||||
snapshot.RootFiles.Should().BeEquivalentTo([GdkPackageFiles.ConfigFileName, GdkPackageFiles.ManifestFileName]);
|
||||
snapshot.RootFiles!.Contains("MICROSOFTGAME.CONFIG").Should().BeTrue("a file name is matched as NTFS matches it");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ARootThatCannotBeListedIsNoListing()
|
||||
{
|
||||
GameFileSnapshot snapshot = await new GameFileProbe().SnapshotAsync(Path.Combine(_root, "gone", "game.exe"), _rules, Ct);
|
||||
|
||||
snapshot.RootFiles.Should().BeNull("a folder that is not there answers Unknown, never \"no such file\"");
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public sealed class InstallRootCasesTests : IDisposable
|
||||
foreach (string item in files.Split(';', StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
string path = Path.Combine(_temp, item);
|
||||
if (item.EndsWith('\\'))
|
||||
if (item.AsSpan().EndsWith('\\'))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,15 @@ public sealed class GamingRootsTests
|
||||
return [.. bytes];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This PC's drives, read as the import reads them: whatever they name is a full path, and a PC with no
|
||||
/// <c>.GamingRoot</c> anywhere — the hosted runner — names none, without an error.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ThisPcsGamesFoldersAreFullPathsWhereverThereAreAny() =>
|
||||
// Not OnlyContain: it fails an empty list, which is exactly the hosted runner's answer (seen on #352's first CI run).
|
||||
GamingRoots.OnThisPc().Where(static root => !Path.IsPathFullyQualified(root)).Should().BeEmpty();
|
||||
|
||||
[Fact]
|
||||
public void TheOwnersTwoFilesNameTheirGamesFolders()
|
||||
{
|
||||
|
||||
@@ -161,6 +161,48 @@ public sealed class XboxLibrarySourceTests : IDisposable
|
||||
XboxArtCache.Image(content, @"C:\Windows\System32\shell32.dll").Should().BeNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.33 (D80): the agent's test before a <c>LaunchGame</c> — an executable whose install root is a GDK package root is
|
||||
/// a game Windows starts through its package, never by its path. The Unreal shipping executable three levels down is in
|
||||
/// its package; a Steam game's is not, even beside a stray package file.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnExecutableAnywhereInAPackageIsInItAndAStoresGameIsNot()
|
||||
{
|
||||
string content = Game("Valor Mortis", _valorConfig, _valorManifest);
|
||||
string shipping = Path.Combine(content, "ValorMortis", "Binaries", "Win64", "ValorMortisMSG-Win64-Shipping.exe");
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(shipping)!);
|
||||
|
||||
GdkPackageFiles.IsInPackage(shipping).Should().BeTrue();
|
||||
GdkPackageFiles.IsInPackage(Path.Combine(content, "ValorMortisMSG.exe")).Should().BeTrue();
|
||||
|
||||
string steam = Path.Combine(_root, "steamapps", "common", "FINAL FANTASY");
|
||||
Directory.CreateDirectory(steam);
|
||||
File.WriteAllText(Path.Combine(steam, GdkPackageFiles.ManifestFileName), _valorManifest);
|
||||
GdkPackageFiles.IsInPackage(Path.Combine(steam, "FINAL FANTASY.exe")).Should().BeFalse("a Steam root is the boundary, and it holds no package config");
|
||||
GdkPackageFiles.IsInPackage(Path.Combine(_root, "Loose", "game.exe")).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WhatIsNotAPackageCostsNothing()
|
||||
{
|
||||
GdkPackageFiles.IsPackageRoot(" ").Should().BeFalse();
|
||||
GdkPackageFiles.NearestPackageRoot(" ").Should().BeNull();
|
||||
GdkPackageFiles.NearestPackageRoot(_root).Should().BeNull("no folder at or above it holds a package's two files");
|
||||
GdkPackageFiles.IsInPackage(Path.Combine(_root, "a\0b", "game.exe")).Should().BeFalse("a path that is no path is in no package");
|
||||
|
||||
string big = Game("Big", _valorConfig + new string(' ', (int)GdkPackageFiles.MaxFileBytes), _valorManifest);
|
||||
GdkPackageFiles.Read(big).Should().BeNull("a description file over the cap is not read");
|
||||
|
||||
new XboxLibrarySource([_root], new Packages()).Platform.Should().Be("xbox");
|
||||
var art = new XboxArtCache();
|
||||
art.Platform.Should().Be("xbox");
|
||||
art.Find(new StoreGame("xbox", "Gone.Game_0000000000000", "Gone", Path.Combine(_root, "Gone", "Content"), null, null))
|
||||
.Should().Be(Application.Art.GameArtFiles.None, "a folder that is not a package has no pictures to show");
|
||||
XboxArtCache.Image(_root, " ").Should().BeNull();
|
||||
XboxArtCache.Image(_root, "a\0b.png").Should().BeNull();
|
||||
}
|
||||
|
||||
/// <summary>Windows' package answers, stubbed: the family name is the one listed whose name part matches; installed = listed.</summary>
|
||||
private sealed class Packages(params string[] installed) : IInstalledPackages
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user