fix(make): enforce pytest process deadline

Closed
MA
4mo ago
+72-5

Summary by cubic

Enforces a hard wall‑clock deadline for the pytest process to prevent hung test runs. Also adds explicit on/off flags to the make pr command per Linear MRO-99AE.

  • Bug Fixes

    • Wraps pytest with timeout --kill-after=5s using PYTEST_PROCESS_TIMEOUT_SECONDS (default 60s); exits with code 124 on deadline.
    • Prints a clear error when the process deadline is hit and surfaces the failing exit code.
    • Reads process-timeout-seconds from config/tooling.yaml and renders it into generated Makefiles via the renderer.
    • Keeps per-test pytest-timeout at 10s to fail slow tests quickly.
    • Adds tests to verify the variable is rendered and that a stuck run is terminated.
  • New Features

    • make pr now toggles CLI booleans explicitly: --draft/--no-draft, --auto/--no-auto, --delete-branch/--no-delete-branch, --checks-strict/--no-checks-strict, --release-on-merge/--no-release-on-merge.

Summary by CodeRabbit

  • New Features

    • Added configurable process-level timeouts for test runs, with a 60-second default.
    • Timed-out test processes are forcibly stopped and reported with a clear error message.
    • Added pull-request options for automatic handling, branch deletion, strict checks, and release-on-merge behavior.
  • Bug Fixes

    • Improved reliability by ensuring stalled test processes cannot run indefinitely.
  • Tests

    • Added coverage confirming timeout settings are generated and enforced correctly.