Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/design/09-robustness.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ Both session ends that morning, the shutdown and a restart at 11:31,
carried `ENDSESSION_CLOSEAPP` and were logged as an installer's request;
corrected above.

**Explained 2026-10-17:** the vanishing here on 2026-10-11 matches Office
Click-to-Run's update, which ended every process started by a logon task at
19:30:33; recorded in [Lot 19](19-startup-list.md), with the same event the
next time on 2026-10-17.

**Not done, on purpose.**

- A marker for the watcher's whole life, so a vanishing between games is
Expand Down
1 change: 1 addition & 0 deletions docs/design/16-footprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ at once, at the maintainer's request.
- [x] What the watcher costs, written for the people who use it in [How it works](../how-it-works.md), from those figures — 2026-09-23
- [x] Verified in the field: a session whose refinement reads the counters, on the maintainer's machine — 2026-09-23, Battlefield 6, below: *bf6.exe (75% of the rendering)* through PerfLib, 18 handles and 0.24 MB for the read
- [x] The menu opened a second and a third time, to tell a cost paid once from a leak — 2026-09-23, 18:00 and 18:01: nothing more, below
- [ ] Memory at rest, measured again against 0.3.0 at the same uptime. On 2026-10-17 the installed build read 214 handles and 2.6–2.75 MB after twenty idle minutes, flat over four, where *How it works* says about 2 MB, a figure taken at start; the page is corrected with whichever figure holds

**Done when** a session, a reload and each entry of the menu leave the
watcher holding no more than a figure written here over what it held just
Expand Down
41 changes: 41 additions & 0 deletions docs/design/19-startup-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Lot 19 — Starting from Windows' Startup list

**Status: proposed 2026-10-17, a spike first.** The maintainer wants
GameModeExecutor in *Settings → Apps → Startup*, with its switch, instead of
a logon task that page does not show; to be taken soon unless another lot
comes first.

## Why

- **Transparency.** The Startup page, and Task Manager's, list three sources:
the `Run` keys (`HKCU` and `HKLM\...\CurrentVersion\Run`), the Startup
folders, and packaged apps' startup tasks. Their switch writes to
`HKCU\...\Explorer\StartupApproved` and deletes nothing. Scheduled tasks are
not listed, so today the watcher is invisible there.
- **Robustness, to be measured.** At Office Click-to-Run's updates of
2026-10-11 and 2026-10-17, every process started by a logon task on the
maintainer's machine died — the watcher, FanControl, Samsung Magician — with
exit code 1 and no trace, and every `Run`-key program survived. Office's
service log names the step: `TaskUpdateApply::ShutdownStaleProcesses`, with
`ForceAppShutdown (true)`, at 19:30:33 and 12:12:39. What makes a process
"stale" is not documented, and the watcher loads none of the Office files
that step watches. The second machine runs the same Office.

## The spike

1. **Survival.** At the next Office update, a long-lived dummy started by a
logon task beside one started from `Run`; the Office service log and
Task Scheduler's result say which ended. Set up on the maintainer's
machine on 2026-10-17, with approval: two copies of one script writing a
line a minute, so each log dates its death.
2. **What a `Run` entry gives.** The delay after logon (Explorer staggers
startup entries), the switch's effect on a running watcher and at the next
logon, the name and icon the page shows.
3. **The cost of the change** across the setup commands' three callers: the
package (a per-user `Registry` row, as the Start menu shortcut already
has), the zip's after-exit shell, `purge`; an upgrade that removes the old
task; `status`; the documentation.
4. **What is lost.** The task's 15 s delay and its restart on failure, which
did not fire when the watcher was killed.

**Done when** is written after the spike, if the lot is decided.
52 changes: 52 additions & 0 deletions docs/design/20-build-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Lot 20 — The build chain, official and kept current

**Status: proposed and decided 2026-10-17, to take next**, while Lot 19's
spike waits for an Office update. Two parts, in this order: Dependabot keeps
current whatever the first part settles on.

## 1. Official actions, current practice

Read on 2026-10-17: CI uses `actions/checkout@v7`, `actions/upload-artifact@v7`
(GitHub's), `dtolnay/rust-toolchain@stable` and `Swatinem/rust-cache@v2`
(community); the release publishes with `gh`.

- Rust from `rustup`, already on GitHub's Windows runners, with the toolchain
named in `rust-toolchain.toml`, which pins it on the developer's machine too,
instead of `dtolnay/rust-toolchain`.
- The cache: `Swatinem/rust-cache` or `actions/cache` with an explicit key,
decided on CI time measured with each.
- Actions named by version tag, not by commit — the maintainer's choice on
2026-10-17: a tag is a release its publisher calls stable, and Dependabot
moves it.
- Least privilege: `contents: read` for CI; the release keeps
`contents: write` and adds what the attestation needs.
- `timeout-minutes`, and a `concurrency` group that cancels a superseded run.
- The release's files attested with `actions/attest-build-provenance`: GitHub
signs, for each file, that this workflow built it from this commit, and
`gh attestation verify <file> --repo geeooff/GameModeExecutor` checks it.
Not a code signature — SmartScreen still warns — but proof the installer
was built from the public source, which `SHA256SUMS.txt`, published on the
same page as the files, cannot give.

## 2. Dependabot and automatic merges

- `.github/dependabot.yml` for `cargo` and `github-actions`, weekly, compatible
updates grouped in one PR per ecosystem.
- Merged automatically only when Cargo calls the update compatible: a patch,
or a minor for a crate at 1.0 or later. A 0.x minor — the `windows` crate's
0.62 to 0.63 — or a major stays a PR for the maintainer.
`dependabot/fetch-metadata` reads the update type; a workflow asks
`gh pr merge --auto`.
- `main` protected by a rule requiring the CI check, without which an
automatic merge does not wait for it: `allow_auto_merge` is on and `main`
unprotected, read on 2026-10-17. A change to the repository's settings, so
with approval.
- An audit of `Cargo.lock` against RustSec's advisories in CI, so a vulnerable
crate fails the build without waiting for an update.
- `AGENTS.md`: an automatic merge is a standing approval for that class of
update and nothing else.

**Done when** CI and the release use official actions or justified ones, by
tag, with least privilege; a release's files carry a verifiable attestation;
Dependabot opens grouped PRs for crates and actions, the compatible ones
merging themselves after a green CI; the audit runs in CI.
4 changes: 3 additions & 1 deletion docs/design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ the pages keep the history.
| 13 | [Updating](13-updating.md) | done 2026-09-23 |
| 14 | [Release notes people can read](14-release-notes.md) | done 2026-09-18 |
| 15 | [Games Windows knows only from you](15-marked-games.md) | done 2026-09-23 |
| 16 | [What the watcher keeps](16-footprint.md) | done 2026-09-23 |
| 16 | [What the watcher keeps](16-footprint.md) | done 2026-09-23; memory at rest to measure again against 0.3.0 |
| 17 | [A log that turns over each day](17-log-rotation.md) | done 2026-09-26; the zip's update path to see at the next release |
| 18 | [When the game is gone and nobody is there](18-game-gone-nobody-there.md) | proposed, not decided |
| 19 | [Starting from Windows' Startup list](19-startup-list.md) | proposed; a spike first |
| 20 | [The build chain, official and kept current](20-build-chain.md) | decided, to take next |

Logging came before the icon, so the icon was written in the final log
vocabulary; the windowless build came before it too, so the window and message
Expand Down