Skip to content

test(gateway): isolate runtime PID identity fallback - #72237

Closed
egilewski wants to merge 1 commit into
NousResearch:mainfrom
egilewski:codex/test-gateway-runtime-pid-isolation
Closed

test(gateway): isolate runtime PID identity fallback#72237
egilewski wants to merge 1 commit into
NousResearch:mainfrom
egilewski:codex/test-gateway-runtime-pid-isolation

Conversation

@egilewski

Copy link
Copy Markdown
Contributor

Summary

  • isolate the unreadable-PID fallback test from the host process table
  • stub the command-line probe explicitly when exercising the missing-inspection path
  • add a separate regression case for rejecting an unrelated live process

Why

The fallback test previously supplied a live PID without controlling its
command line. A coincidental host process could therefore make the test depend
on external process state. This test-only change was discovered while
refocusing closed PR #70016 and is intentionally published separately from the
security implementation.

Validation

  • tests/hermes_cli/test_gateway_runtime_health.py: 8 passed
  • Ruff passes for the changed test file
  • current-main merge-tree and diff checks pass

The account owner loosely reviews Codex actions and receives the usual GitHub
notifications.

Agent Disclosure

  • Created by: GPT-5.6-sol with xhigh reasoning in Codex Desktop
  • Human manually signed the commit

@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery labels Jul 26, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for tightening this regression coverage. On current main, tests/hermes_cli/test_gateway_runtime_health.py:79 stubs _looks_like_gateway_process, but the exercised runtime-status path reads the live command line directly through gateway/status.py:557. The test can therefore depend on host PID 12345. The PR's explicit unreadable-command-line stub correctly reaches the persisted-record fallback at gateway/status.py:566; its new unrelated-process case exercises the rejection branch at gateway/status.py:557-565.

This is an automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 30, 2026
Stub the command-line probe in the unreadable-inspection fallback test so a
coincidental live PID cannot make it depend on the host process table. Add a
separate case that pins rejection of an unrelated live process.
@egilewski
egilewski force-pushed the codex/test-gateway-runtime-pid-isolation branch from a8bae3f to 287cf94 Compare August 1, 2026 21:35
@egilewski

Copy link
Copy Markdown
Contributor Author

Closing this PR because its documented purpose is a test-only isolation change discovered while refocusing closed issue #70016. The PR body does not identify an independent open issue or current product/security defect beyond that closed target, and #70016 is closed (GitHub provides no state reason). Recommendation: close rather than merge or redo as-is. The branch is left intact.

@egilewski egilewski closed this Aug 11, 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 comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants