agent-review agent review: pass
Adds the pitfalls v1 hit (GUI-host output encoding, init-only JSON defaults, Windows replace vs. readers, Stream Deck environment inheritance, the app/CLI name clash, plugin version bumps, missing local midnights) and the checks and review notes still open after PR #2. Refs #3
2.4 KiB
2.4 KiB
Gotchas
- [2026-10-14]
claude -p "/usage"writes a transcript into the working directory's project folder unless--no-session-persistenceis passed; that transcript would show up in Claude token history. - [2026-10-14] Git Bash rewrites an argument that starts with
/(/usagebecomesC:/Program Files/Git/usage). Run CLI probes from PowerShell, or setMSYS_NO_PATHCONV=1. The app itself starts processes with an argument list, so it is not affected. - [2026-10-14] A GUI-subsystem host (
WinExe) has no console and no console code page, so .NET decoded child output with code page 0 and Claude's·separators broke the/usageparser: Claude was "unavailable" in the app but fine in the CLI. Child pipes are always UTF-8 and every child gets its own handles (D6). Test process code from a GUI host (tests/FinalToken.ProcessHost), not only from a console. - [2026-10-14] With source-generated System.Text.Json, an
init-only property missing from the JSON getsdefault, not its initializer. A partialsettings.jsonthen failed validation and reset every setting. Types read back from disk use settable properties so defaults survive (CoreAGENTS.md). Test with partial files, not only round trips. - [2026-10-14] On Windows, replacing a file fails while another process holds it open without delete sharing. Readers of atomically replaced files open them with
FileShare.ReadWrite | FileShare.Delete, and the replace retries briefly (D5). - [2026-10-14] A Stream Deck host started by the app (or a test harness) inherits that process's environment,
FINALTOKEN_DATA_DIRincluded, and so does the plugin. To return a machine to normal after a test, restart Stream Deck from Explorer:explorer.exe "C:\Program Files\Elgato\StreamDeck\StreamDeck.exe". - [2026-10-14] Windows file names ignore case:
FinalToken.exe(app) andfinaltoken.exewould collide in one folder, so the CLI isfinaltoken-clieverywhere. - [2026-10-14] The installer updates the plugin only when the shipped manifest
Versionis higher (D11).tools/publish.pystamps it from<Version>inDirectory.Build.props; bump that for every release that changes the plugin or Core, or installed plugins stay stale. - [2026-10-14] Converting a local midnight with
TimeZoneInfo.ConvertTimeToUtcthrows where midnight does not exist (Cairo, Santiago, Beirut at DST changes). UseCalendarDaysfor every local day boundary.