Compare commits

..
Author SHA1 Message Date
poli0981andClaude Opus 5.5 557d0e8a62 release: 0.1.0-beta.21 - the CHANGELOG section, release lines, HANDOFF's beta.21 section with D57-D59 and owner-only item 17, the Wuthering Waves row of LIST_GAME_TESTED (beta.21 PR-5)
VERSION stays 0.1.0: the tag's numeric core. The owner (2026-10-13), with the
plan: "Làm trọn mạch ngay" - commit, push, CI, auto-fix, merge, bump the
version and release in one go. The release carries #301 (check 4 also walks
the executable's folder; Wuthering Waves on the title list; rules 2026.10.4),
#302 (the four itch "launchers" are malware - the docs corrected, D57; the
Supports card), #303 (the documents' wheel; one render per page) and #304
(Play, D59; Privacy Policy 2.10).

- CHANGELOG: [Unreleased] becomes [0.1.0-beta.21] - 2026-10-13, with its
  summary and "Updating from 0.1.0-beta.20" (Privacy 2.10 shown once; every
  game read and checked for anti-cheat once more under rules 2026.10.4, and
  Wuthering Waves and any game with an anti-cheat beside its executable turned
  off; the four itch downloads pointed at Security); the subsections in Keep a
  Changelog's order (Added, Changed, Fixed, Security); #302's Supports card
  fix, which had no entry, added under Fixed. tools/release-notes.ps1 -Version
  0.1.0-beta.21 extracts it (5,147 characters).
- The accuracy block (legal/ACCURACY.md, embedded in README and the
  Disclaimer): its date moves to 2026-10-13 - #304 changed its Vulkan
  sentence, and the block asks to be dated when it changes - and its release
  line; README's release lines and count ("Twenty-one"); LIMITATIONS' version.
- HANDOFF: beta.20's START HERE struck; the beta.21 section - the owner's
  list, D57-D59, the train, the traps (the pre-scan's depth limit is a reach
  and not a refusal; a long rules note fails rules-validate with a message
  about something else; the owner's older live rules make parallel test hosts
  race; WPF's fixed 48 DIP wheel step; the review of Play after green gates
  that found four defects, fixed in #304, and SessionDeletion's same gap,
  which the owner asked for as its own PR and beta.22; the analyzers met); owner-only item 17
  (Wuthering Waves blocked before any session, NTE and GF2's exception
  unchanged; Play in both modes with a Steam, an Epic, a GOG and an itch game,
  never elevated; the wheel and a touchpad; Privacy 2.10 once; the ja strings).
- docs/LIST_GAME_TESTED.md: the Wuthering Waves row in the anti-cheat table -
  hooked 37 s on 2026-10-12 before the 30 s re-check met ACE's driver, refused
  before any injection since beta.21 - marked as added 2026-10-13 from the
  agent's log (approved with the plan, D35).

Gates run locally on this tree: accuracy-check (self-test and live),
notice-check, wiki-check (self-test and 27 pages), changelog-check and
release-notes (self-tests), release-notes -Version 0.1.0-beta.21. The code is
#304's, whose tree passed ./build.ps1 (292 s) and CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:10:23 +07:00
31 changed files with 45 additions and 355 deletions

No files matched your search

-17
View File
@@ -28,23 +28,6 @@ numeric core and does not move; the heading is the full version — corrected 20
## [Unreleased]
## [0.1.0-beta.22] - 2026-10-13
**The twenty-second pre-release: a request the capture agent never answered is said as such, never as a crash.** The
same unsigned installer: verify its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
**Updating from `0.1.0-beta.21`:** Help ▸ Check for updates, then *Restart to update* with no game running. Nothing is
shown to accept and no game is read again: the legal documents and the detection rules (`2026.10.4`) are beta.21's.
### Fixed
- **A request the capture agent never answered is said as such, never as a crash.** When the agent stopped, or restarted
for an update, while FrameLedger was asking it something, deleting sessions ended in the crash dialog, and turning a
game's hooking on or off or making or withdrawing an anti-cheat exception showed *IOException* or *TimeoutException* as
its notice. Each now says that the agent did not answer and that whether it was done is not known, and the page shows
what is stored; Play says the same (it said the agent was not running). A request that could not be sent because the
agent was already gone still says that nothing was changed (`docs/07_IPC.md` §Client behavior).
## [0.1.0-beta.21] - 2026-10-13
**The twenty-first pre-release: an anti-cheat kept beside a game's executable found before anything is injected, four
+1 -1
View File
@@ -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.22.*
*Beta software: this page describes version 0.1.0-beta.21.*
## Games it will not measure
+3 -3
View File
@@ -12,7 +12,7 @@ pages.
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-13.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.22`** (2026-10-13), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.21`** (2026-10-13), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -167,7 +167,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest pre-release is `v0.1.0-beta.22` (2026-10-13); before it `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 `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
> **The latest pre-release is `v0.1.0-beta.21` (2026-10-13); before it `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 `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
@@ -216,4 +216,4 @@ GPU telemetry is layered so the project never depends on a proprietary vendor li
---
**Status:** pre-release (beta). Twenty-two tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
**Status:** pre-release (beta). Twenty-one tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
-9
View File
@@ -482,15 +482,6 @@ message, and that message always re-scans.
and SYSTEM) each carry an explicit descriptor. The instance lock and the elevation marker are only ever probed, and a
probe that is refused reads as "held".
- Treat the pipe as unreliable: library, history and charts must all work with the Agent offline. Only live status degrades.
- **A request the Agent never answered is neither a failure nor a refusal (beta.22).** `IAgentRequests.RequestAsync` fails
in one of four ways: `InvalidOperationException` — not connected, nothing was sent; `IpcRequestException` — the Agent
answered `Error`; `TimeoutException`; and `IOException` — the connection closed before the answer, whatever closed it
(`AgentConnection.AnsweredAsync` turns the `IpcFramingException` and `ObjectDisposedException` that `PipeClient` can fail a
request in flight with into it, so a caller handles one). The last two mean *whether it was carried out is not known*
(`AgentAnswers.IsUnanswered`): the caller says so in words (`Agent_Unanswered`) and reads what is stored again — deleting
sessions, the hooking switch, the anti-cheat exception and Play alike. Until beta.22 deleting sessions caught no
`IOException` (the App's crash dialog) and showed a timeout's own message, and the hooking switch and the exception
showed `IOException` or `TimeoutException` as their notice.
- SQLite is the source of truth for anything persisted; pipe events are refresh signals (except `SessionProgress`, which is live-only by design).
- `CaptureRefused`, `SafetyUnhook` and (since 2026-09-25) `HookingTurnedOff` are **never** collapsed into a generic error toast — they get dedicated, explanatory UI (`08_UI` §Notifications).
+1 -26
View File
@@ -2218,7 +2218,7 @@ game's engine" — was shown to the owner with #299 and released on their word.
**Owner-only, added to the list below:** item 16.
## ~~**START HERE**~~ — 2026-10-13, 0.1.0-beta.21: an anti-cheat beside the executable, four itch downloads that are malware, documents that scroll, Play *(struck 2026-10-13: the head is §beta.22 below)*
## **START HERE** — 2026-10-13, 0.1.0-beta.21: an anti-cheat beside the executable, four itch downloads that are malware, documents that scroll, Play
*Status is `CHANGELOG.md` `[0.1.0-beta.21]`; this is what no other file carries. The owner's list (2026-10-13, four items,
with screenshots of two game pages): HELLO, HELLO WORLD!'s RPG Maker path is wrong; no anti-cheat is found for Wuthering
@@ -2277,28 +2277,6 @@ Privacy Policy 2.10 — then the release.*
**Owner-only, added to the list below:** item 17.
## **START HERE** — 2026-10-13, 0.1.0-beta.22: a request the capture agent never answered
*Status is `CHANGELOG.md` `[0.1.0-beta.22]`; this is what no other file carries.* The owner, during the beta.21
train: "Bạn xử lý chip thành 1 pr mới sau release và thành 1 phiên bản mới nhé" — the chip beta.21's review of Play
left (§beta.21's traps): every caller of the pipe, not only Play, as its own PR and its own pre-release. One PR — #306,
`AgentConnection.AnsweredAsync` and `AgentAnswers.IsUnanswered`, with deleting sessions, the hooking switch, the anti-cheat
exception and Play telling *not sent* from *not answered* — then the release.
**Decisions:** none new. *Not answered* is said as not known (`Agent_Unanswered`) and never as the old words for *not
sent* ("nothing was deleted", "nothing changed"): a request the connection closed under may have been carried out.
**Traps met on the way:**
- **VSTHRD003 rejects awaiting a `Task` a method was handed** ("work that was not started within your context"): a helper
that wraps a request's exceptions takes a `Func<Task<T>>` and starts it itself — which also catches what the request
throws before it returns a task.
- **`ObjectDisposedException` derives from `InvalidOperationException`**: a `catch (InvalidOperationException)` for "not
connected" would read a disposed pipe as "nothing was sent". `AgentConnection` turns it into the `IOException` first,
so the callers' split holds.
**Owner-only, added to the list below:** item 18.
## Owner-only — no PR can close these
1. **§S23-2 — branch protection.** `Rules / validate` is not a required status check on
@@ -2428,9 +2406,6 @@ sent* ("nothing was deleted", "nothing changed"): a request the connection close
wheel and a touchpad** in Help ▸ User guide, the licence in Help ▸ About and the Legal Gate: about three lines a
notch, gliding; at the end of the update notes the window scrolls instead. (d) The Legal Gate shows the Privacy
Policy 2.10 once. (e) The `ja` strings marked `review` (Play, Settings ▸ Games, `GameDetail_Supports_None`).
18. **beta.22 on real hardware.** (a) The `ja` string marked `review` (`Agent_Unanswered`). (b) Nothing else to run: the
change answers a request the agent drops mid-way, which the tests make happen and a person can only meet by chance —
if a notice ever says the capture agent did not answer, the page beside it shows what was stored.
**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
+1 -1
View File
@@ -12,7 +12,7 @@
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-10-13.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.22`** (2026-10-13), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.21`** (2026-10-13), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
+1 -1
View File
@@ -114,7 +114,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-13.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.22`** (2026-10-13), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.21`** (2026-10-13), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -1,18 +0,0 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.IO;
namespace FrameLedger.App.Services;
/// <summary>
/// beta.22: a request the capture agent never answered, told apart from one it refused and from one never sent. The
/// connection closed under it (<see cref="IOException"/>, <see cref="AgentConnection.AnsweredAsync"/>) or no answer came in
/// time (<see cref="TimeoutException"/>): whether it was carried out is not known, so a caller says so
/// (<c>Agent_Unanswered</c>) and reads what is stored again rather than assuming either way (<c>07_IPC</c> §Client behavior).
/// An <see cref="InvalidOperationException"/> from the request is the connection gone before it was sent: nothing was asked.
/// </summary>
public static class AgentAnswers
{
public static bool IsUnanswered(Exception ex) => ex is IOException or TimeoutException;
}
@@ -108,27 +108,7 @@ public sealed class AgentConnection : IAgentLink, IAsyncDisposable
throw new InvalidOperationException("the Agent is not connected");
}
return AnsweredAsync(() => client.RequestEnvelopeAsync(type, payload, _options.RequestTimeout, ct));
}
/// <summary>
/// beta.22: a request's answer, with every way the pipe can close under it said as ONE <see cref="IOException"/>.
/// <see cref="PipeClient"/> fails a request in flight with what ended its reader — an <see cref="IOException"/>, an
/// <see cref="IpcFramingException"/> or an <see cref="ObjectDisposedException"/> — and a client this connection disposed
/// between the check above and the write throws the last; a caller that knew only the first ended in the App's crash
/// dialog (beta.21's review of Play). <see cref="IAgentRequests.RequestAsync{TRequest}"/> names what is left.
/// </summary>
internal static async Task<IpcEnvelope> AnsweredAsync(Func<Task<IpcEnvelope>> request)
{
ArgumentNullException.ThrowIfNull(request);
try
{
return await request().ConfigureAwait(false);
}
catch (Exception ex) when (ex is ObjectDisposedException or IpcFramingException)
{
throw new IOException("the connection to the Agent closed before it answered", ex);
}
return client.RequestEnvelopeAsync(type, payload, _options.RequestTimeout, ct);
}
/// <summary>Ask the Agent for its status now; null when not connected or when the request failed.</summary>
@@ -146,7 +126,7 @@ public sealed class AgentConnection : IAgentLink, IAsyncDisposable
Set(AgentConnectionState.Connected, Hello, status);
return status;
}
catch (Exception ex) when (ex is IOException or TimeoutException or IpcRequestException or ObjectDisposedException or IpcFramingException)
catch (Exception ex) when (ex is IOException or TimeoutException or IpcRequestException or ObjectDisposedException)
{
return null;
}
@@ -27,9 +27,6 @@ public enum AntiCheatExceptionOutcome
/// <summary>No connected Agent; nothing was sent.</summary>
AgentUnavailable,
/// <summary>The Agent answered and did not grant (a store outcome, an <c>Error</c>); <c>Detail</c> says which.</summary>
/// <summary>The Agent answered and did not grant (a store outcome, an <c>Error</c>, a timeout); <c>Detail</c> says which.</summary>
Failed,
/// <summary>beta.22: the Agent did not answer (<see cref="AgentAnswers.IsUnanswered"/>): whether it granted or withdrew is not known.</summary>
Unanswered,
}
@@ -27,7 +27,6 @@ public sealed record AntiCheatExceptionResult(AntiCheatExceptionOutcome Outcome,
// A grant and a withdrawal alike (beta.18): "Nothing was enabled." was the hooking consent's words, untrue for a withdrawal.
AntiCheatExceptionOutcome.AgentUnavailable => Strings.Agent_NotConnected_NothingChanged,
AntiCheatExceptionOutcome.Failed => Detail ?? Strings.Common_NotAvailable,
AntiCheatExceptionOutcome.Unanswered => Strings.Agent_Unanswered,
_ => null,
};
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.IO;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Shared.Ipc;
using FrameLedger.Shared.Safety;
@@ -65,28 +66,17 @@ public sealed class AntiCheatExceptions
IpcEnvelope ack = await _agent.RequestAsync(IpcMessageType.SetAntiCheatException, request, ct).ConfigureAwait(true);
return Interpret(ack, request.Enabled);
}
catch (IpcRequestException ex)
catch (Exception ex) when (ex is IpcRequestException or TimeoutException or IOException or InvalidOperationException)
{
Log.Warning(ex, "exception: SetAntiCheatException(game {GameId}, {Enabled}) did not complete", request.GameId, request.Enabled);
AntiCheatExceptionOutcome outcome = ex.Code switch
string? code = (ex as IpcRequestException)?.Code;
AntiCheatExceptionOutcome outcome = code switch
{
IpcErrorCode.DisclosureVersionMismatch => AntiCheatExceptionOutcome.VersionMismatch,
IpcErrorCode.ExceptionsOff => AntiCheatExceptionOutcome.OptionOff,
_ => AntiCheatExceptionOutcome.Failed,
};
return new AntiCheatExceptionResult(outcome, ex.Code ?? IpcMessageType.Error);
}
catch (InvalidOperationException ex)
{
// The connection went between the caller's check and the request: nothing was sent.
Log.Warning("exception: SetAntiCheatException(game {GameId}, {Enabled}) was not sent ({Message})", request.GameId, request.Enabled, ex.Message);
return AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable);
}
catch (Exception ex) when (AgentAnswers.IsUnanswered(ex))
{
// beta.22: whether the exception was made or withdrawn is not known — never the exception's type name as the notice.
Log.Warning(ex, "exception: SetAntiCheatException(game {GameId}, {Enabled}) had no answer", request.GameId, request.Enabled);
return AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.Unanswered);
return new AntiCheatExceptionResult(outcome, code ?? ex.GetType().Name);
}
}
+5 -11
View File
@@ -2,6 +2,7 @@
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.IO;
using System.Text.Json;
using FrameLedger.Application.Import;
using FrameLedger.Application.Persistence;
@@ -103,7 +104,6 @@ public sealed class GamePlayer
_ => string.Format(CultureInfo.CurrentCulture, Strings.Play_Started_Format, gameName),
}, false),
PlayOutcome.AgentUnavailable => (string.Format(CultureInfo.CurrentCulture, Strings.Play_AgentUnavailable_Format, gameName), true),
PlayOutcome.Unanswered => (Strings.Agent_Unanswered, true),
// "Set Play to go through the store" only where Play was not already going through it.
PlayOutcome.RecordingOff => (string.Format(CultureInfo.CurrentCulture,
result.Fallback == PlayFallback.None ? Strings.Play_RecordingOff_Format : Strings.Play_RecordingOff_Fallback_Format, gameName), true),
@@ -171,18 +171,12 @@ public sealed class GamePlayer
IpcEnvelope envelope = await _agent.RequestAsync(IpcMessageType.LaunchGame, new LaunchGameRequest(game.Id, null), ct).ConfigureAwait(false);
ack = IpcCodec.Payload<LaunchAck>(envelope);
}
catch (InvalidOperationException ex)
catch (Exception ex) when (ex is InvalidOperationException or TimeoutException or IOException or ObjectDisposedException or IpcFramingException)
{
// The connection went between the check above and the request: nothing was sent.
Log.Warning("play: LaunchGame for {Game} (id {Id}) was not sent ({Message})", game.Name, game.Id, ex.Message);
return new PlayResult(PlayOutcome.AgentUnavailable, Fallback: fallback);
}
catch (Exception ex) when (AgentAnswers.IsUnanswered(ex))
{
// The agent stopping or restarting under the request, or no answer in time (beta.22): whether the game is starting
// is not known — and a press never ends in an unhandled exception (beta.21's review).
// The connection went between the check above and the answer — the agent stopping, or restarting for an update:
// the pipe fails a request in flight with these (PipeClient), and a press never ends in an unhandled exception.
Log.Warning("play: LaunchGame for {Game} (id {Id}) had no answer ({Kind}: {Message})", game.Name, game.Id, ex.GetType().Name, ex.Message);
return new PlayResult(PlayOutcome.Unanswered, Fallback: fallback);
return new PlayResult(PlayOutcome.AgentUnavailable, Fallback: fallback);
}
catch (Exception ex) when (ex is IpcRequestException or JsonException)
{
+3 -14
View File
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.IO;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Shared.Ipc;
using FrameLedger.Shared.Safety;
@@ -64,26 +65,14 @@ public sealed class HookingConsent
IpcEnvelope ack = await _agent.RequestAsync(IpcMessageType.SetHookEnabled, request, ct).ConfigureAwait(true);
return Interpret(ack, request.Enabled, onWritten);
}
catch (IpcRequestException ex)
catch (Exception ex) when (ex is IpcRequestException or TimeoutException or IOException or InvalidOperationException)
{
Log.Warning(ex, "consent: SetHookEnabled(game {GameId}, {Enabled}) did not complete", request.GameId, request.Enabled);
string detail = ex.Code ?? IpcMessageType.Error;
string detail = ex is IpcRequestException ipc ? ipc.Code ?? IpcMessageType.Error : ex.GetType().Name;
return new HookingConsentResult(
string.Equals(detail, IpcErrorCode.DisclosureVersionMismatch, StringComparison.Ordinal) ? HookingConsentOutcome.VersionMismatch : HookingConsentOutcome.Failed,
detail);
}
catch (InvalidOperationException ex)
{
// The connection went between the caller's check and the request: nothing was sent.
Log.Warning("consent: SetHookEnabled(game {GameId}, {Enabled}) was not sent ({Message})", request.GameId, request.Enabled, ex.Message);
return HookingConsentResult.Of(HookingConsentOutcome.AgentUnavailable);
}
catch (Exception ex) when (AgentAnswers.IsUnanswered(ex))
{
// beta.22: whether the Agent stamped or revoked is not known — never the exception's type name as the notice.
Log.Warning(ex, "consent: SetHookEnabled(game {GameId}, {Enabled}) had no answer", request.GameId, request.Enabled);
return HookingConsentResult.Of(HookingConsentOutcome.Unanswered);
}
}
private static HookingConsentResult Interpret(IpcEnvelope ack, bool enabling, HookingConsentOutcome onWritten)
@@ -24,9 +24,6 @@ public enum HookingConsentOutcome
/// <summary>No connected Agent; nothing was sent.</summary>
AgentUnavailable,
/// <summary>The Agent answered but did not stamp (a store outcome other than <c>Written</c>, an <c>Error</c>); <c>Detail</c> says which.</summary>
/// <summary>The Agent answered but did not stamp (a store outcome other than <c>Written</c>, an <c>Error</c>, a timeout); <c>Detail</c> says which.</summary>
Failed,
/// <summary>beta.22: the Agent did not answer (<see cref="AgentAnswers.IsUnanswered"/>): whether it stamped or revoked is not known.</summary>
Unanswered,
}
@@ -21,14 +21,9 @@ public interface IAgentRequests
/// Sends <paramref name="payload"/> as <paramref name="type"/> and returns whatever non-<c>Error</c> envelope
/// answers it — the caller distinguishes the acks (a <c>HookEnabledAck</c> from a <c>Refused</c>).
/// </summary>
/// <exception cref="InvalidOperationException">Not connected: nothing was sent.</exception>
/// <exception cref="InvalidOperationException">Not connected.</exception>
/// <exception cref="Infrastructure.Ipc.IpcRequestException">The Agent answered <c>Error</c>.</exception>
/// <exception cref="TimeoutException">No answer within the request timeout: whether it was carried out is not known.</exception>
/// <exception cref="System.IO.IOException">
/// The connection closed before the Agent answered — it stopped, or restarted for an update (beta.22: every way the pipe
/// closes is this one exception, <see cref="AgentConnection.AnsweredAsync"/>): whether it was carried out is not known.
/// <see cref="AgentAnswers.IsUnanswered"/> names this and the timeout.
/// </exception>
/// <exception cref="TimeoutException">No answer within the request timeout.</exception>
Task<IpcEnvelope> RequestAsync<TRequest>(string type, TRequest payload, CancellationToken ct = default)
where TRequest : class;
}
+1 -4
View File
@@ -15,12 +15,9 @@ public enum PlayOutcome
/// <summary>The capture agent accepted the launch (<c>LaunchGame</c>).</summary>
StartedByAgent,
/// <summary>Direct, and no capture agent is connected: nothing was sent.</summary>
/// <summary>Direct, and no capture agent is connected.</summary>
AgentUnavailable,
/// <summary>beta.22: the agent did not answer (<see cref="AgentAnswers.IsUnanswered"/>): whether the game is starting is not known.</summary>
Unanswered,
/// <summary>Direct, and the entry's recording is off: FrameLedger starts only what it records (schema 0009).</summary>
RecordingOff,
@@ -39,10 +39,13 @@ public sealed class SessionDeletion
return new(SessionDeletionOutcome.AgentUnavailable);
}
IpcEnvelope envelope;
try
{
envelope = await _agent.RequestAsync(IpcMessageType.DeleteSessions, new DeleteSessionsRequest(gameId), ct).ConfigureAwait(true);
IpcEnvelope envelope = await _agent.RequestAsync(IpcMessageType.DeleteSessions, new DeleteSessionsRequest(gameId), ct).ConfigureAwait(true);
DeleteSessionsAck ack = IpcCodec.Payload<DeleteSessionsAck>(envelope) ?? throw new InvalidOperationException("DeleteSessions answered without a payload");
Log.Information("sessions: deleted {Sessions} session(s) of {Games} game(s) ({Scope})", ack.Sessions, ack.Games, gameId is null ? "every game" : "game " + gameId);
await ForgetDeletedAsync(ct).ConfigureAwait(true);
return new(SessionDeletionOutcome.Deleted, ack.Games, ack.Sessions);
}
catch (IpcRequestException ex) when (string.Equals(ex.Code, IpcErrorCode.SessionRunning, StringComparison.Ordinal))
{
@@ -53,39 +56,14 @@ public sealed class SessionDeletion
Log.Warning("sessions: the Agent does not know DeleteSessions ({Message})", ex.Message);
return new(SessionDeletionOutcome.AgentTooOld);
}
catch (IpcRequestException ex)
catch (Exception ex) when (ex is IpcRequestException or InvalidOperationException or TimeoutException)
{
Log.Warning("sessions: DeleteSessions failed ({Code}: {Message})", ex.Code, ex.Message);
Log.Warning("sessions: DeleteSessions failed ({Message})", ex.Message);
return new(SessionDeletionOutcome.Failed, Detail: ex.Message);
}
catch (InvalidOperationException ex)
{
// The connection went between the check above and the request: nothing was sent.
Log.Warning("sessions: DeleteSessions was not sent ({Message})", ex.Message);
return new(SessionDeletionOutcome.AgentUnavailable);
}
catch (Exception ex) when (AgentAnswers.IsUnanswered(ex))
{
// beta.22: the delete may have run before the connection went — it caught no IOException before, and its exception
// was the App's crash dialog. What named a deleted session lets go of it, and the page reads what is stored.
Log.Warning("sessions: DeleteSessions had no answer ({Kind}: {Message})", ex.GetType().Name, ex.Message);
await ForgetDeletedAsync(ct).ConfigureAwait(true);
return new(SessionDeletionOutcome.Unanswered);
}
if (IpcCodec.Payload<DeleteSessionsAck>(envelope) is not { } ack)
{
Log.Warning("sessions: DeleteSessions was answered without a payload");
await ForgetDeletedAsync(ct).ConfigureAwait(true);
return new(SessionDeletionOutcome.Unanswered);
}
Log.Information("sessions: deleted {Sessions} session(s) of {Games} game(s) ({Scope})", ack.Sessions, ack.Games, gameId is null ? "every game" : "game " + gameId);
await ForgetDeletedAsync(ct).ConfigureAwait(true);
return new(SessionDeletionOutcome.Deleted, ack.Games, ack.Sessions);
}
/// <summary>The delete happened, or may have (beta.22): what still names a deleted session lets go of it. A failure here is logged, not the delete's.</summary>
/// <summary>The delete happened: what still names a deleted session lets go of it. A failure here is logged, not the delete's.</summary>
private async Task ForgetDeletedAsync(CancellationToken ct)
{
try
@@ -20,10 +20,4 @@ public enum SessionDeletionOutcome
/// <summary>Anything else; the detail says what.</summary>
Failed,
/// <summary>
/// beta.22: the capture agent did not answer (<see cref="AgentAnswers.IsUnanswered"/>), or answered without saying what it
/// did: whether anything was deleted is not known, and the page reads what is stored.
/// </summary>
Unanswered,
}
@@ -17,7 +17,6 @@ public sealed record SessionDeletionResult(SessionDeletionOutcome Outcome, int G
SessionDeletionOutcome.SessionRunning => Strings.DeleteSessions_Running,
SessionDeletionOutcome.AgentUnavailable => Strings.DeleteSessions_NoAgent,
SessionDeletionOutcome.AgentTooOld => Strings.DeleteSessions_AgentTooOld,
SessionDeletionOutcome.Unanswered => Strings.Agent_Unanswered,
_ => Detail ?? Strings.Common_NotAvailable,
};
}
-3
View File
@@ -70,7 +70,6 @@ public static class Strings
nameof(Agent_State_Offline),
nameof(Agent_State_Starting),
nameof(Agent_State_Viewer),
nameof(Agent_Unanswered),
nameof(App_Title),
nameof(Arch_AnyCpu),
nameof(Arch_AnyCpu32),
@@ -1185,8 +1184,6 @@ public static class Strings
public static string Agent_State_Viewer => ResourceManager.GetString(nameof(Agent_State_Viewer), Culture) ?? nameof(Agent_State_Viewer);
public static string Agent_Unanswered => ResourceManager.GetString(nameof(Agent_Unanswered), Culture) ?? nameof(Agent_Unanswered);
public static string App_Title => ResourceManager.GetString(nameof(App_Title), Culture) ?? nameof(App_Title);
public static string Arch_AnyCpu => ResourceManager.GetString(nameof(Arch_AnyCpu), Culture) ?? nameof(Arch_AnyCpu);
-4
View File
@@ -4317,8 +4317,4 @@
<value>{0} はもうライブラリにないため、起動しませんでした。</value>
<comment>review</comment>
</data>
<data name="Agent_Unanswered" xml:space="preserve">
<value>キャプチャ エージェントが応答しなかったため、この操作が行われたかどうかは分かりません。エージェントが接続してから、もう一度確認してください。</value>
<comment>review</comment>
</data>
</root>
-3
View File
@@ -3248,7 +3248,4 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Play_NotInLibrary_Format" xml:space="preserve">
<value>{0} is no longer in the library, so it was not started.</value>
</data>
<data name="Agent_Unanswered" xml:space="preserve">
<value>The capture agent did not answer, so whether this was done is not known. Check again once it is connected.</value>
</data>
</root>
-3
View File
@@ -3243,7 +3243,4 @@ 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_NotInLibrary_Format" xml:space="preserve">
<value>{0} không còn trong thư viện, nên không được chạy.</value>
</data>
<data name="Agent_Unanswered" xml:space="preserve">
<value>Capture agent không trả lời, nên không biết việc này đã được thực hiện hay chưa. Hãy kiểm tra lại khi agent đã kết nối.</value>
</data>
</root>
@@ -910,12 +910,6 @@ public sealed partial class GameDetailViewModel : ObservableObject
if (!result.Succeeded)
{
_strip.Warn(Game.Name, result.Message);
if (result.Outcome == SessionDeletionOutcome.Unanswered)
{
// beta.22: the delete may have run — the page shows what is stored, not what it held before the ask.
await LoadAsync().ConfigureAwait(true);
}
return;
}
@@ -1015,8 +1009,6 @@ public sealed partial class GameDetailViewModel : ObservableObject
HookingConsentOutcome.Refused => (result.RefusalText(), InfoBarSeverity.Error),
HookingConsentOutcome.VersionMismatch => (Shared.Strings.Safety_Consent_VersionMismatch, InfoBarSeverity.Warning),
HookingConsentOutcome.AgentUnavailable => (turningOff ? Strings.Agent_NotConnected_NothingChanged : Shared.Strings.Safety_Consent_AgentUnavailable, InfoBarSeverity.Warning),
// beta.22: the page reads what is stored after every ask, so whether hooking changed is shown beside this.
HookingConsentOutcome.Unanswered => (Strings.Agent_Unanswered, InfoBarSeverity.Warning),
// The Agent could not read the executable (beta.8): say whether its drive or the file is missing, not the IPC code.
HookingConsentOutcome.Failed when string.Equals(result.Detail, Shared.Ipc.IpcErrorCode.ExecutableUnreadable, StringComparison.Ordinal) && Game is not null
=> (Formats.ExecutableMissingText(Game.Fingerprint.ExePath), InfoBarSeverity.Warning),
@@ -736,14 +736,6 @@ public sealed partial class SettingsViewModel : ObservableObject
return;
}
if (result.Outcome == HookingConsentOutcome.Unanswered)
{
// beta.22: whether hooking was turned off is not known — the list is read again from what is stored.
_strip.Warn(game.Name, Strings.Agent_Unanswered);
await RefreshCoreAsync().ConfigureAwait(true);
return;
}
// Turning off with no Agent changed nothing (beta.18): it said the enable path's "Nothing was enabled."
string body = result.Outcome == HookingConsentOutcome.AgentUnavailable ? Strings.Agent_NotConnected_NothingChanged : result.Detail ?? Strings.Common_NotAvailable;
_strip.Warn(game.Name, body);
@@ -316,33 +316,6 @@ public sealed class AgentConnectionTests : IAsyncDisposable
}
/// <summary>beta.10 (the admin mode): a start that asks Windows for administrator rights says so on the pill while it waits.</summary>
/// <summary>
/// beta.22: every way the pipe can close under a request reaches a caller as ONE exception, an IOException. PipeClient fails a
/// request in flight with what ended its reader — an IpcFramingException or an ObjectDisposedException among them — and a
/// caller that knew only IOException ended in the App's crash dialog (beta.21's review of Play). What is not a closed pipe
/// passes through as it was, and an answer is the answer.
/// </summary>
[Fact]
public async Task EveryWayThePipeClosesUnderARequestIsOneIOException()
{
foreach (Exception closed in new Exception[] { new ObjectDisposedException("pipe"), new IpcFramingException("the frame ended early") })
{
Func<Task> request = () => AgentConnection.AnsweredAsync(() => Task.FromException<IpcEnvelope>(closed));
IOException said = (await request.Should().ThrowAsync<IOException>()).Which;
said.InnerException.Should().BeSameAs(closed, closed.GetType().Name);
}
Exception[] kept = [new IOException("the pipe closed before the Agent answered"), new TimeoutException(), new IpcRequestException(IpcErrorCode.SessionRunning, "running")];
foreach (Exception ex in kept)
{
Func<Task> request = () => AgentConnection.AnsweredAsync(() => Task.FromException<IpcEnvelope>(ex));
(await request.Should().ThrowAsync<Exception>()).Which.Should().BeSameAs(ex, ex.GetType().Name);
}
IpcEnvelope answer = IpcCodec.Decode(IpcCodec.Encode(IpcMessageType.DeleteSessionsAck, "1", new DeleteSessionsAck(null, 0, 0)));
(await AgentConnection.AnsweredAsync(() => Task.FromResult(answer))).Should().BeSameAs(answer);
}
[Fact]
public async Task AStartThatAsksForAdministratorRightsSaysSoOnThePill()
{
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.IO;
using FluentAssertions;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
@@ -122,31 +121,6 @@ public sealed class AntiCheatExceptionsTests
(await exceptions.GrantAsync(56, _gf2, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.VersionMismatch);
}
/// <summary>
/// beta.22: an ask the Agent never answered is not known, and its notice says so in words — it read "IOException"; one the
/// connection was gone before is "no agent", which changed nothing.
/// </summary>
[Fact]
public async Task AnAskTheAgentNeverAnsweredIsNotKnownAndSaidInWords()
{
var agent = new FakeAgent
{
Hello = Hello(AntiCheatExceptionDisclosure.Version),
Answer = static _ => throw new IOException("the connection to the Agent closed before it answered"),
};
var exceptions = new AntiCheatExceptions(agent, new FakePrompt { Accepts = true });
AntiCheatExceptionResult closed = await exceptions.GrantAsync(56, _gf2, Ct);
closed.Outcome.Should().Be(AntiCheatExceptionOutcome.Unanswered);
closed.MessageFor("GIRLS' FRONTLINE 2").Should().Be(Strings.Agent_Unanswered);
agent.Answer = static _ => throw new TimeoutException();
(await exceptions.WithdrawAsync(56, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.Unanswered);
agent.Answer = static _ => throw new InvalidOperationException("the Agent is not connected");
(await exceptions.WithdrawAsync(56, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.AgentUnavailable, "nothing was sent");
}
[Fact]
public async Task AWithdrawalNeedsNoDialog()
{
+10 -10
View File
@@ -179,26 +179,26 @@ public sealed class GamePlayerTests
}
/// <summary>
/// The pipe fails a request in flight when the agent stops, and a command's unhandled exception is the App's crash dialog
/// (beta.21's review). Since beta.22 an answer that never came — the connection closed (one IOException, AgentConnection) or no
/// answer in time — is "not known": the game may be starting. The connection gone before the request is "not running".
/// From the review before the merge: the pipe fails a request in flight with an IOException when the agent stops (PipeClient),
/// and a command's unhandled exception is the App's crash dialog. Each way the connection can go mid-request is "not running".
/// </summary>
[Fact]
public async Task AnAnswerThatNeverCameIsNotKnownAndARequestNeverSentIsNotRunning()
public async Task AConnectionThatGoesMidRequestIsTheAgentNotRunningNeverAnException()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
await new RegisteredSettings(new SqliteSettingsStore(s.Db)).SetAsync(SettingsRegistry.UiPlayMode, PlayMode.Direct, Ct);
GameRow game = Game(@"D:\Games\Loose\game.exe", null);
foreach (Exception ex in new Exception[] { new IOException("the connection to the Agent closed before it answered"), new TimeoutException() })
Exception[] gone =
[
new IOException("the pipe closed before the Agent answered"), new ObjectDisposedException("pipe"), new TimeoutException(),
new InvalidOperationException("the Agent is not connected"), new IpcFramingException("truncated frame"),
];
foreach (Exception ex in gone)
{
PlayResult result = await Player(s, new Shell(), new Agent(fails: ex), new Stores()).PlayAsync(game, Ct);
result.Should().Be(new PlayResult(PlayOutcome.Unanswered), ex.GetType().Name);
GamePlayer.Describe(result, "W").Should().Be((Strings.Agent_Unanswered, true));
result.Should().Be(new PlayResult(PlayOutcome.AgentUnavailable), ex.GetType().Name);
}
(await Player(s, new Shell(), new Agent(fails: new InvalidOperationException("the Agent is not connected")), new Stores()).PlayAsync(game, Ct))
.Should().Be(new PlayResult(PlayOutcome.AgentUnavailable), "nothing was sent");
PlayResult refused = await Player(s, new Shell(), new Agent(fails: new IpcRequestException("UnknownType", "no such command")), new Stores())
.PlayAsync(game, Ct);
refused.Should().Be(new PlayResult(PlayOutcome.Failed, Detail: "UnknownType"));
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.IO;
using FluentAssertions;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
@@ -149,28 +148,6 @@ public sealed class HookingConsentTests
agent.Sent.Last().Payload.Should().Be(new SetHookEnabledRequest(7, false, null), "a revoke names no disclosure");
}
/// <summary>
/// beta.22: an ask the Agent never answered — the connection closed under it, or no answer in time — is not known, never the
/// exception's type name as the notice (it read "IOException"); one the connection was gone before is "no agent".
/// </summary>
[Fact]
public async Task AnAskTheAgentNeverAnsweredIsNotKnownAndOneNeverSentIsNoAgent()
{
var agent = new FakeAgent { Hello = Hello(SafetyDisclosure.Version) };
var consent = new HookingConsent(agent, new FakePrompt { Accepts = true });
agent.Answer = static _ => throw new IOException("the connection to the Agent closed before it answered");
HookingConsentResult closed = await consent.EnableAsync(7, "Title", Ct);
closed.Outcome.Should().Be(HookingConsentOutcome.Unanswered);
closed.Detail.Should().BeNull("no exception's name is a notice");
agent.Answer = static _ => throw new TimeoutException();
(await consent.DisableAsync(7, Ct)).Outcome.Should().Be(HookingConsentOutcome.Unanswered);
agent.Answer = static _ => throw new InvalidOperationException("the Agent is not connected");
(await consent.DisableAsync(7, Ct)).Outcome.Should().Be(HookingConsentOutcome.AgentUnavailable, "nothing was sent");
}
[Theory]
[InlineData("I ACCEPT THE INJECTION RISK", true)]
[InlineData(" I ACCEPT THE INJECTION RISK ", true)]
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.IO;
using FluentAssertions;
using FrameLedger.App.Charts;
using FrameLedger.App.Services;
@@ -222,50 +221,6 @@ public sealed class SessionDeletionAndOverviewTests
windows.Asked.Should().Be(2, "nothing was deleted");
}
/// <summary>
/// beta.22: a delete the Agent never answered — the connection closed under it, or no answer in time — is said as not known;
/// what named a deleted session lets go of it (the delete may have run), and the game page reads what is stored. It caught
/// no IOException before, and that exception was the App's crash dialog. The connection gone before the ask deleted nothing.
/// </summary>
[Fact]
public async Task ADeleteTheAgentNeverAnsweredIsSaidAsNotKnownAndThePageReadsWhatIsStored()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
long gone = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-2));
var windows = new Windows();
var selection = new SessionSelection();
selection.Set(gone);
var agent = new ScriptedAgent { Answer = static _ => Task.FromException<IpcEnvelope>(new TimeoutException()) };
var deletion = new SessionDeletion(agent, s.Sessions, selection, windows);
SessionDeletionResult timedOut = await deletion.DeleteAsync(game.Id, Ct);
timedOut.Outcome.Should().Be(SessionDeletionOutcome.Unanswered);
timedOut.Message.Should().Be(Strings.Agent_Unanswered);
windows.Asked.Should().Be(1, "the delete may have run: what named a deleted session lets go of it");
selection.SessionId.Should().Be(gone, "the session is still stored, so it stays selected");
agent.Answer = static _ => throw new InvalidOperationException("the Agent is not connected");
(await deletion.DeleteAsync(game.Id, Ct)).Outcome.Should().Be(SessionDeletionOutcome.AgentUnavailable, "nothing was sent");
windows.Asked.Should().Be(1, "nothing was asked, so nothing can be gone");
// The delete ran and its answer was lost on the way back: the page says it is not known and shows what is stored.
agent.Answer = async r =>
{
await DeletesFrom(s)(r).ConfigureAwait(false);
throw new IOException("the connection to the Agent closed before it answered");
};
var strip = new Strip();
GameDetailViewModel page = await PageAsync(s, game.Id, new Confirm(true), deletion, strip, selection);
page.Sessions.Should().ContainSingle();
await page.DeleteAllSessionsCommand.ExecuteAsync(null);
strip.Lines.Should().Equal("warn:" + Strings.Agent_Unanswered);
page.Sessions.Should().BeEmpty("the page read what is stored after an answer that never came");
selection.SessionId.Should().BeNull("the selected session is gone, and its id can be reused");
}
/// <summary>
/// D39: the overview draws every hooked session's rate and lows; the Trend draws a ticked metric beside the selected
/// one, a second unit on the right, and offers no third unit.