fix(HEL-560): verify tools provide a non-mutating --help path

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
总工
2026-09-16 12:00:55 +08:00
co-authored by multica-agent
parent b402b3b2a8
commit fbcab3064c
2 changed files with 8 additions and 2 deletions
+3
View File
@@ -150,6 +150,9 @@ def start_hub(workdir: Path, port: int, review_port: int) -> None:
def main() -> int: def main() -> int:
if any(argument in {"-h", "--help"} for argument in sys.argv[1:]):
print(__doc__.strip())
return 0
workdir = Path(tempfile.mkdtemp(prefix="hel560-smoke-")) workdir = Path(tempfile.mkdtemp(prefix="hel560-smoke-"))
review_port, hub_port = free_port(), free_port() review_port, hub_port = free_port(), free_port()
review = f"http://127.0.0.1:{review_port}" review = f"http://127.0.0.1:{review_port}"
+5 -2
View File
@@ -11,8 +11,6 @@ import os
import sys import sys
from pathlib import Path from pathlib import Path
from playwright.sync_api import sync_playwright
import verify_datahub_console as backend import verify_datahub_console as backend
ROOT = Path(__file__).resolve().parents[1] ROOT = Path(__file__).resolve().parents[1]
@@ -42,6 +40,11 @@ def check(label: str, ok: bool, detail: str = "") -> None:
def main() -> int: def main() -> int:
if any(argument in {"-h", "--help"} for argument in sys.argv[1:]):
print(__doc__.strip())
return 0
from playwright.sync_api import sync_playwright
shots = Path(sys.argv[sys.argv.index("--shots") + 1]) if "--shots" in sys.argv else None shots = Path(sys.argv[sys.argv.index("--shots") + 1]) if "--shots" in sys.argv else None
if shots: if shots:
shots.mkdir(parents=True, exist_ok=True) shots.mkdir(parents=True, exist_ok=True)