Skip to content

test: harden yolo and kanban signal tests on macOS - #34069

Closed
sunwz1115 wants to merge 1 commit into
NousResearch:mainfrom
sunwz1115:langlang/test-macos-yolo-kanban-20260529
Closed

test: harden yolo and kanban signal tests on macOS#34069
sunwz1115 wants to merge 1 commit into
NousResearch:mainfrom
sunwz1115:langlang/test-macos-yolo-kanban-20260529

Conversation

@sunwz1115

Copy link
Copy Markdown
Contributor

Summary

  • Makes the CLI /yolo regression test hermetic when the parent process already has HERMES_YOLO_MODE=1 frozen at import time.
  • Mirrors the production kanban dispatcher macOS zombie check (ps -o stat) in the SIGTERM regression test helper.
  • Keeps the existing startup-frozen YOLO coverage explicit via targeted monkeypatching.

Test Plan

  • venv/bin/python -m py_compile tests/cli/test_cli_yolo_toggle.py tests/hermes_cli/test_signal_handler_kanban_worker.py
  • venv/bin/python -m pytest tests/cli/test_cli_yolo_toggle.py tests/hermes_cli/test_signal_handler_kanban_worker.py -q

@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 labels May 29, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused test hardening. Current main still freezes HERMES_YOLO_MODE at tools/approval.py:35, while the fixture at tests/cli/test_cli_yolo_toggle.py:39 only clears the environment variable. Current production also has the Darwin ps -o stat= zombie check at hermes_cli/kanban_db.py:6119, which the synthetic helper at tests/hermes_cli/test_signal_handler_kanban_worker.py:81 does not yet mirror. The proposed additions match both behaviors and are limited to their regression tests.

Automated hermes-sweeper review.

@teknium1 teknium1 added the sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users label Jul 13, 2026
teknium1 pushed a commit that referenced this pull request Jul 30, 2026
Autouse fixture also resets approval_module._YOLO_MODE_FROZEN so a
HERMES_YOLO_MODE=1 host env can't poison every case (the one
startup-frozen test still patches it back explicitly). Adds the darwin
'ps -o stat=' zombie branch to _is_alive_like_dispatcher, mirroring
production hermes_cli/kanban_db.py — a no-op on Linux.

Salvaged from PR #34069 by @sunwz1115.

Co-authored-by: sunwz1115 <192549904+sunwz1115@users.noreply.github.com>
@teknium1

Copy link
Copy Markdown
Contributor

Merged via the round-3 stability PR #74576 (commit 19cc560, your authorship preserved). _YOLO_MODE_FROZEN hermeticity + the darwin ps-based zombie branch (Linux no-op, mirrors production kanban_db) landed. Thanks @sunwz1115!

@teknium1 teknium1 closed this Jul 30, 2026
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
Autouse fixture also resets approval_module._YOLO_MODE_FROZEN so a
HERMES_YOLO_MODE=1 host env can't poison every case (the one
startup-frozen test still patches it back explicitly). Adds the darwin
'ps -o stat=' zombie branch to _is_alive_like_dispatcher, mirroring
production hermes_cli/kanban_db.py — a no-op on Linux.

Salvaged from PR NousResearch#34069 by @sunwz1115.

Co-authored-by: sunwz1115 <192549904+sunwz1115@users.noreply.github.com>
33hodl pushed a commit to 33hodl/hermes-agent that referenced this pull request Aug 12, 2026
Autouse fixture also resets approval_module._YOLO_MODE_FROZEN so a
HERMES_YOLO_MODE=1 host env can't poison every case (the one
startup-frozen test still patches it back explicitly). Adds the darwin
'ps -o stat=' zombie branch to _is_alive_like_dispatcher, mirroring
production hermes_cli/kanban_db.py — a no-op on Linux.

Salvaged from PR NousResearch#34069 by @sunwz1115.

Co-authored-by: sunwz1115 <192549904+sunwz1115@users.noreply.github.com>
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 sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants