test: the suites write nothing outside their own folders and send nothing anywhere #162

Merged
james.maes merged 2 commits from test/161-test-safety into main 2026-11-10 23:02:43 +00:00
Owner

What

The test suites write nothing outside their own folders and send nothing anywhere:

  • Settings tests name a folder (AppSettings.Load / Save take an optional directory) instead of setting the process-wide GCLO_DATA_DIR. Only GcloPathsTests, whose subject is that variable, still sets it.
  • Vault tests use names of their own in Credential Manager (gclo:tests-…:account:…), never the names the installed app uses. One read-only test keeps the default constructor covered.
  • The UI smoke test types a text too short to be a token, so nothing is looked up. The made-up token of plausible length it typed before was sent to the real API.
  • The synchronous progress double reports one at a time, as the UI thread does, in all three test classes that use it.
  • Every temp folder a workspace test asks for is removed, also when the view model was pointed elsewhere afterwards or never tracked.
  • An assertion for the test that had none; time limits for two awaits.

Why

Closes #161

How it was tested

  • Local gates: locked zero-warning x64 build, 913 engine and 164 CLI tests, 100% line coverage on the three gated assemblies, dotnet format --verify-no-changes.
  • Temp folders: before this change the workspace tests left three empty folders per run; after it, at most one appeared in my runs while other test runs were using the same temp folder, so that one may not be this suite's.

Notes for the reviewer

  • Product code change: only the optional directory parameter on AppSettings.Load and Save. Callers in the app are unchanged.
  • The UI suite has not been run on this branch yet (the smoke test changed); it will be before merge.

Checklist

  • Commits are signed and signed off (git commit -S -s)
  • Zero build warnings; format and lint are clean
  • Tests added or updated; the 100% coverage gate still passes
  • Docs updated for user-visible changes; threat model updated if the attack surface changed (nothing user-visible)
  • No secrets, credentials, or personal data
  • New dependencies are justified below, or none were added (none)
  • Substantial AI assistance, if any, is noted here: written with Claude Code, reviewed by an independent read-only agent before merge

🤖 Generated with Claude Code

## What The test suites write nothing outside their own folders and send nothing anywhere: - **Settings tests name a folder** (`AppSettings.Load` / `Save` take an optional `directory`) instead of setting the process-wide `GCLO_DATA_DIR`. Only `GcloPathsTests`, whose subject is that variable, still sets it. - **Vault tests use names of their own** in Credential Manager (`gclo:tests-…:account:…`), never the names the installed app uses. One read-only test keeps the default constructor covered. - **The UI smoke test types a text too short to be a token**, so nothing is looked up. The made-up token of plausible length it typed before was sent to the real API. - **The synchronous progress double reports one at a time**, as the UI thread does, in all three test classes that use it. - **Every temp folder a workspace test asks for is removed**, also when the view model was pointed elsewhere afterwards or never tracked. - An assertion for the test that had none; time limits for two awaits. ## Why Closes #161 ## How it was tested - Local gates: locked zero-warning x64 build, 913 engine and 164 CLI tests, 100% line coverage on the three gated assemblies, `dotnet format --verify-no-changes`. - Temp folders: before this change the workspace tests left three empty folders per run; after it, at most one appeared in my runs while other test runs were using the same temp folder, so that one may not be this suite's. ## Notes for the reviewer - Product code change: only the optional `directory` parameter on `AppSettings.Load` and `Save`. Callers in the app are unchanged. - The UI suite has not been run on this branch yet (the smoke test changed); it will be before merge. ## Checklist - [x] Commits are signed and signed off (`git commit -S -s`) - [x] Zero build warnings; format and lint are clean - [x] Tests added or updated; the 100% coverage gate still passes - [x] Docs updated for user-visible changes; threat model updated if the attack surface changed (nothing user-visible) - [x] No secrets, credentials, or personal data - [x] New dependencies are justified below, or none were added (none) - [x] Substantial AI assistance, if any, is noted here: written with Claude Code, reviewed by an independent read-only agent before merge 🤖 Generated with [Claude Code](https://claude.com/claude-code)
james.maes added 2 commits 2026-11-10 23:02:41 +00:00
- Settings tests name a folder (AppSettings.Load and Save take an optional
  directory) instead of setting GCLO_DATA_DIR for the whole process, where
  a save could land in the developer's real settings.json.
- The Credential Manager vault tests use entry names of their own, never
  the names the installed app uses.
- The UI smoke test types a text too short to be taken for a token; the
  made-up token it typed before was sent to the real API to be refused.
- The synchronous progress double reports one at a time, as the UI thread
  does; several workers could enter the view model's handler at once.
- Every temp folder a workspace test asks for is removed afterwards.
- An assertion for the test that had none; time limits for two awaits.

Closes #161

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
Refs #161

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
james.maes force-pushed test/161-test-safety from 894ec9622c to 01668e9590 2026-11-10 23:02:41 +00:00 Compare
Author
Owner

Rebased onto current main. All local gates pass on the rebased branch, including the UI suite (the smoke test that changed): 1002 engine, 212 CLI and 12 UI tests, 100% line coverage on the three gated assemblies, zero warnings, format clean. A full run of the engine suite now leaves no folder behind under the temp folder (it left three before). This change is test code plus one optional parameter on the settings store; it was not given a separate independent review.

Rebased onto current main. All local gates pass on the rebased branch, including the UI suite (the smoke test that changed): 1002 engine, 212 CLI and 12 UI tests, 100% line coverage on the three gated assemblies, zero warnings, format clean. A full run of the engine suite now leaves no folder behind under the temp folder (it left three before). This change is test code plus one optional parameter on the settings store; it was not given a separate independent review.
james.maes merged commit c85aa23ce4 into main 2026-11-10 23:02:43 +00:00
Sign in to join this conversation.