Skip to content

fix: the 12 confirmed findings of the 2026-09-28 code review - #275

Merged
Maxaubert merged 2 commits into
mainfrom
fix/274-review-findings
Sep 28, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
fix/274-review-findings

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #274. Plan: docs/superpowers/plans/2026-09-28-review-fixes.md. Version 0.10.2.

Fixes

Thread safety (Magnification API)

  • MagThreadInvoke: a call abandoned at the 250 ms timeout never runs later (pending/running/done/abandoned CAS); a caller that loses the race to a servicer already running the call waits one more bounded 250 ms and then returns. The three callers that captured stack references now capture by value (getInputTransform returns through a shared block).
  • MagHost::setSamplingMode is marshalled; recorded as applied only on success, with a bounded retry (3 tries, 1 s apart). Mode 0 reports FALSE on every call on this rig (245/245 log lines) while working, so an unbounded retry would have re-issued it every tick.
  • RenderEngine hide/show system cursor, shutdown and the crash filter are marshalled, with a direct call as fallback.
  • EnsureCompositePulse closes its thread handle.

Transform / hybrid

  • transform->render reveal overlap uses TicksAtHz(3, hz) at both sites.
  • MpoGhost::create destroys the previous window before re-creating on retarget.
  • edgeClip switched off mid-zoom releases the clip at once (gated so an unused edgeClip costs no per-tick syscall).
  • CursorSprite::setScale (dead code) removed.

Settings / config / installer

  • WindConfig checks the setConfig ini write; on failure logs it and the page shows "Couldn't save the setting".
  • The uninstaller removes the signed-in user's %LOCALAPPDATA%\Wind (owner of this session's explorer.exe, installer/user-localappdata.ps1, PSModulePath pinned), not the elevating account's; falls back to $LOCALAPPDATA.
  • LoadConfig returns ParseConfig(DefaultIniText()); a generated test pins all 52 template keys to the struct defaults.

Verification

  • build.bat test: 304 passed (52 new template/default checks). build.bat check clean. Playwright: 57 passed (new save-failure dialog test).
  • tools/release.ps1 elevated through pwsh 7 (CI path): all installer checks passed, including local signing and uninstall with the new data-folder helper.
  • Deployed the signed build: desktop zoom/pan clean; txHookWrite=1 in render and transform (the marshalling paths) clean, no warnings, no crash dumps; sampling apply now 3 tries then accepted.
  • Independent review of this diff (3 area reviewers + adversarial verify): 1 finding (unbounded lost-race wait), fixed in c5fe520; no others.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG

Maxaubert and others added 2 commits September 28, 2026 20:41
Thread safety (Magnification API):
- MagThreadInvoke: a call abandoned at the 250 ms timeout never runs later
  (pending/running/done/abandoned state); the caller waits it out if the
  servicer already started. The three callers that captured stack refs now
  capture by value / return through a shared block.
- MagHost::setSamplingMode is marshalled; the mode is recorded as applied
  only on success, with a bounded retry (3 tries, 1 s apart), because mode 0
  reports FALSE on every call on this rig.
- RenderEngine hide/show system cursor and the crash filter are marshalled,
  with a direct call as fallback.
- EnsureCompositePulse closes its thread handle.

Transform / hybrid:
- transform->render reveal overlap uses TicksAtHz(3, hz), like the other path.
- MpoGhost::create destroys the previous window before re-creating on retarget.
- edgeClip switched off mid-zoom releases the clip at once.
- CursorSprite::setScale (dead code) removed.

Settings / config / installer:
- WindConfig checks the setConfig ini write and shows "Couldn't save the
  setting" on failure (configWriteFailed).
- The uninstaller removes the signed-in user's %LOCALAPPDATA%\Wind (owner of
  this session's explorer.exe via installer/user-localappdata.ps1), not the
  elevating account's.
- LoadConfig returns ParseConfig(DefaultIniText()); a generated test pins the
  template to the struct defaults (52 keys).

Plan: docs/superpowers/plans/2026-09-28-review-fixes.md. Version 0.10.2.

Closes #274

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
The caller that loses the abandon race to a servicer already running the call
waited INFINITE, which could freeze the tick thread or the crash filter if that
call stalled. It now waits one more 250 ms and returns regardless; safe because
every MagThreadInvoke caller captures by value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
@Maxaubert
Maxaubert merged commit 639b5f7 into main Sep 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code review 2026-09-28: fix the 12 confirmed findings

1 participant