Skip to content

fix(gateway-windows): atomic write for .cmd and startup launcher scripts#30855

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5be1984f
May 23, 2026
Merged

fix(gateway-windows): atomic write for .cmd and startup launcher scripts#30855
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5be1984f

Conversation

@teknium1

@teknium1 teknium1 commented May 23, 2026

Copy link
Copy Markdown
Contributor

Salvages #30435 onto current main.

Windows scheduled-task .cmd and Startup-folder launcher now write via temp file + atomic rename, so a crash/kill mid-write can no longer leave a truncated script that silently fails on next login.

Changes

  • hermes_cli/gateway_windows.py: _write_task_script() and _install_startup_entry() switch from direct write_text() to with_suffix('.tmp') + tmp.replace(), matching the pattern already used in hermes_cli/profiles.py, hermes_cli/webhook.py, and several gateway adapters.

Authorship preserved via cherry-pick (@sprmn24).

Closes #30435

Infographic

atomic-write-windows-gateway

@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-5be1984f vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8999 on HEAD, 8999 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4777 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@teknium1 teknium1 merged commit b183be9 into main May 23, 2026
22 of 24 checks passed
@teknium1 teknium1 deleted the hermes/hermes-5be1984f branch May 23, 2026 09:30
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants