The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(e2e): pin the fresh-output rule and document the shared-uid SIGTERM trap
Teknium6b01039c0983
diff --git a/tests/e2e/core/cli_tmux/_classic.py b/tests/e2e/core/cli_tmux/_classic.pyindex 86c6920d3d6..a31cf86fd71 100644--- a/tests/e2e/core/cli_tmux/_classic.py+++ b/tests/e2e/core/cli_tmux/_classic.py@@ -16,6 +16,12 @@ Stale output never counts: every ``submit``/``keys``/``launch`` snapshots the sctranscript (a no-op command) therefore fails the step instead of matching old output.Linux only: process discovery and cleanup read ``/proc/<pid>/environ``.++Run environment: the CLI catches SIGTERM/SIGHUP and exits cleanly ("Shutting down…", "Goodbye!",+status 0), so a signal from outside the test looks like the CLI quitting on its own. A container+run with the host user's uid shares that uid with every host process, and a host-side same-uid+process sweep can reach the container's CLIs (observed: SIGTERM with ``si_pid=0``, i.e. from+outside the container's pid namespace). Run containers under a uid of their own."""from __future__ import annotationsdiff --git a/tests/e2e/core/cli_tmux/test_classic_cli_live_session.py b/tests/e2e/core/cli_tmux/test_classic_cli_live_session.pyindex f2c1af4bfd5..bc55ec7bef4 100644--- a/tests/e2e/core/cli_tmux/test_classic_cli_live_session.py+++ b/tests/e2e/core/cli_tmux/test_classic_cli_live_session.py@@ -29,7 +29,7 @@ from typing import Any, Callableimport pytest-from tests.e2e.core.cli_tmux._classic import ClassicHome, Pane, last_user, text_of+from tests.e2e.core.cli_tmux._classic import ClassicHome, Pane, last_user, new_needle, text_offrom tests.fakes.fake_llm_provider import FakeLLMServer, Text, ToolCall# Process discovery, cleanup and the witness's pid accounting read /proc.@@ -154,6 +154,13 @@ def check_witness_coverage(events: list[dict[str, Any]], spawned: list[tuple[int"no gateway daemon attested: its tool/agent/state.db events cannot be trusted"+def test_a_step_needs_output_produced_after_its_input() -> None:+ """A no-op /history (transcript unchanged) must not pass on "LIVE01" left from the markdown turn."""+ before = "\u276f LIVE01 show markdown\n# LIVE01 heading\nLIVE01 end.\n\u276f /history\n"+ assert new_needle(["LIVE01"], before, before) is None+ assert new_needle(["LIVE01"], before, before + " 1. user: LIVE01 show markdown\n") == "LIVE01"++def test_witness_coverage_rejects_an_uninstrumented_cli() -> None:"""The negative ownership checks are not vacuous: a silent, unattested CLI fails coverage."""gateway = {"pid": 2, "ppid": 1, "role": "gateway", "kind": "startup", "detail": "-m gateway run"}