From a76e856804345e31dd9b408c2144ef4aeb297b6a Mon Sep 17 00:00:00 2001 From: ethernet Date: Mon, 21 Sep 2026 19:18:23 -0400 Subject: [PATCH] docs: fix the platforms() example and drop MERGE-CHECK notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AGENTS.md showed three stacked platforms() decorators as the pattern — exactly what the conftest rejects at collection. Show one marker per test with the any-of form instead, and describe the lane selector as resolving specs (posix reaches the macOS lane) rather than grepping for the literal word, which is no longer how it works. Remove the three MERGE-CHECK notes (AGENTS.md, hermes_cli/web_server.py) left over from the origin/main merge; they were reviewer prompts, not documentation of the code. --- AGENTS.md | 26 +++++++++++++------------- hermes_cli/web_server.py | 7 ------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d2846c1558..b338eaf635 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -403,16 +403,13 @@ is_windows=True)`) and declaration/packaging invariants ("pyproject declares `tz is on another OS to pass, it belongs on that OS.** A test that walks several platforms in sequence is split — host-native arm on Linux, other arms as their own marked tests. -```python -@pytest.mark.platforms("linux") -@pytest.mark.platforms("macos") -@pytest.mark.platforms("windows") -``` - -The `platforms` marker takes any number of spec strings (any-of semantics) -plus optional arch filters, so it can express more than the legacy trio: +One marker per test, with any number of spec strings (any-of semantics) plus +optional arch filters — never stack several `platforms()` decorators on one +test (the conftest rejects that at collection): ```python +@pytest.mark.platforms("windows") # only on native Windows +@pytest.mark.platforms("linux", "macos") # either of the two @pytest.mark.platforms("not macos") # anywhere except macOS @pytest.mark.platforms("windows", arch="arm64") # native Windows on arm64 @pytest.mark.platforms("posix") # linux or macOS @@ -453,19 +450,22 @@ argv, not the direct parent (the venv shim makes every spawn a launcher/worker chain). **Use the marker, never a bare `skipif`.** `scripts/ci/list_os_marked_tests.py` -decides which files the macOS lane imports by grepping for the quoted spec -inside `platforms(...)`, and the lane then selects with `-m platforms` while -the conftest's per-test host skips do the actual gating. A test gated with +decides which files an OS lane imports by resolving the quoted specs inside +`platforms(...)` (`"posix"` reaches the macOS lane, `"not linux"` reaches +both others), and the lane then selects with `-m platforms` while the +conftest's per-test host skips do the actual gating. A test gated with `@pytest.mark.skipif(sys.platform != "win32")` therefore runs on no host at all, silently — it is never imported by the lane that would run it, and the -full-suite lanes skip it. Don't stack a module-level `pytestmark = +full-suite lanes skip it. `skipif(sys.platform == "win32")` becomes +`platforms("posix")`; a non-host condition (`os.geteuid() == 0`) stays a +separate `skipif` beside the marker. A misspelt spec is a collection error, +not a skip. Don't stack a module-level `pytestmark = platforms(...)` on a file whose tests carry their own host marker — the conftest hard-rejects tests carrying two `platforms()` markers (a test skipped on every host, reported green everywhere). Equally, don't `pytest.skip()` the non-host rows of a `@parametrize` over platforms — split it into one marked test per OS, or only the host's row ever executes. - ### Don't write change-detector tests diff --git a/hermes_cli/web_server.py b/hermes_cli/web_server.py index 4ca5dd32c6..fef78785c0 100644 --- a/hermes_cli/web_server.py +++ b/hermes_cli/web_server.py @@ -75,10 +75,6 @@ from hermes_cli.web_server_lifecycle import ( # noqa: E402 _write_machine_sentinel_line, ) -# MERGE-CHECK: upstream moved the parent-start-marker helpers into web_server_lifecycle.py -# (imported above); our branch's in-file copies were dropped with the rest of the -# pre-refactor block below. Parent re-verify no desktop caller needed the old in-file copies. - def _start_desktop_cron_ticker(stop_event: "threading.Event", interval: int = 60) -> None: """Tick the cron scheduler from inside the desktop dashboard backend. @@ -924,9 +920,6 @@ def _voice_list_error_logged_once(signature: Optional[str]) -> bool: return True -# MERGE-CHECK: ours-side of this conflict was ~13k lines of pre-#102117 endpoints -# (elevenlabs voices, themes, plugin discovery, model/config routers) now decomposed by -# upstream into web_routers/*, web_server_dashboard.py and audio.py; ours dropped, upstream kept. _ACTION_LOG_FILES.setdefault("computer-use-grant", "action-computer-use-grant.log") # Cache discovered plugins per-process (refresh on explicit re-scan).