Skip to content

Release v0.51.234 — Release HB (stage-q4): duplicate-instance startup guard + remote-terminal workspace paths - #3488

Merged
nesquena-hermes merged 1 commit into
masterfrom
release/stage-q4
Jun 3, 2026
Merged

nesquena-hermes merged 1 commit into
masterfrom
release/stage-q4

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release v0.51.234 — Release HB (stage-q4)

Two medium-risk backend/infra fixes. All gates green.

Fixes

PR Author Fix
#3289 @rodboev Refuse server startup when a live instance already serves the port (Windows/macOS silent port-sharing hazard). Live-listener probe (GET /health, 2s timeout) + Windows SO_EXCLUSIVEADDRUSE — preserves fast restart (POSIX keeps allow_reuse_address=True; a dying socket in the kernel backlog times out → startup proceeds).
#3486 @dso2ng Allow remote/SSH terminal profiles to use target-side workspace paths under terminal.cwd without a server-local stat(). Local profiles unchanged — bypass only fires for remote backends and only for paths contained within terminal.cwd.

History note on #3289

This PR was held earlier this sweep — its original form globally disabled SO_REUSEADDR, which a Codex gate flagged as breaking fast restart (TIME_WAIT bricks rebind for ~60s). The contributor reworked it along the suggested lines (live-listener probe instead of the global disable). This release ships the reworked version. Unheld → full pickup → full gate.

Gate results

  • Full pytest suite: 7458 passed, 8 skipped, 3 xpassed, 0 failed
  • ruff forward gate: CLEAN
  • browser-smoke gate: CLEAN (real server boots fine with the new startup probe)
  • Codex (regression): SAFE TO SHIP (verified fast-rebind preserved + remote bypass gated on backend+containment, local validation unchanged)
  • Opus (correctness + security): SAFE TO SHIP (probe false-positive, _is_within containment, local-profile bypass all hold up; applied its one minor double-call cleanup note)

Closes #3289.

Co-authored-by: rodboev rodboev@users.noreply.github.com
Co-authored-by: dso2ng dso2ng@users.noreply.github.com

Duplicate-instance startup guard + remote-terminal workspace paths.

- #3289 refuse startup when a live instance already serves the port (live-listener
  probe + Windows SO_EXCLUSIVEADDRUSE), preserving fast restart — reworked from the
  original global-SO_REUSEADDR-disable that broke restart (@rodboev, unheld this round)
- #3486 allow remote/SSH terminal profiles to use target-side workspace paths under
  terminal.cwd without a server-local stat (local profiles unchanged) (@dso2ng)

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
Co-authored-by: dso2ng <dso2ng@users.noreply.github.com>
@nesquena-hermes
nesquena-hermes merged commit ed46c65 into master Jun 3, 2026
11 checks passed
@nesquena-hermes
nesquena-hermes deleted the release/stage-q4 branch June 3, 2026 16:54
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
## Release v0.51.234 — Release HB (stage-q4)

Two medium-risk backend/infra fixes. All gates green.

### Fixes
| PR | Author | Fix |
|----|--------|-----|
| nesquena#3289 | @rodboev | Refuse server startup when a live instance already serves the port (Windows/macOS silent port-sharing hazard). Live-listener probe (`GET /health`, 2s timeout) + Windows `SO_EXCLUSIVEADDRUSE` — **preserves fast restart** (POSIX keeps `allow_reuse_address=True`; a dying socket in the kernel backlog times out → startup proceeds). |
| nesquena#3486 | @dso2ng | Allow remote/SSH terminal profiles to use target-side workspace paths under `terminal.cwd` without a server-local `stat()`. Local profiles unchanged — bypass only fires for remote backends and only for paths contained within `terminal.cwd`. |

### History note on nesquena#3289
This PR was **held earlier this sweep** — its original form globally disabled `SO_REUSEADDR`, which a Codex gate flagged as breaking fast restart (TIME_WAIT bricks rebind for ~60s). The contributor reworked it along the suggested lines (live-listener probe instead of the global disable). This release ships the reworked version. Unheld → full pickup → full gate.

### Gate results
- **Full pytest suite**: 7458 passed, 8 skipped, 3 xpassed, **0 failed**
- **ruff forward gate**: CLEAN
- **browser-smoke gate**: CLEAN (real server boots fine with the new startup probe)
- **Codex (regression)**: SAFE TO SHIP (verified fast-rebind preserved + remote bypass gated on backend+containment, local validation unchanged)
- **Opus (correctness + security)**: SAFE TO SHIP (probe false-positive, `_is_within` containment, local-profile bypass all hold up; applied its one minor double-call cleanup note)

Closes nesquena#3289.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
Co-authored-by: dso2ng <dso2ng@users.noreply.github.com>
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.

Bug: duplicate local WebUI start can fight launchd-managed 8787 instance

1 participant