Add expression quote-escaping test & implement server job timeouts an…

Merged
BN
4mo ago
+1564-16

…d runner lease reaper


Summary by cubic

Adds a GitHub App webhook that triggers workflows on push/PR and reports per‑job status to GitHub Checks. Adds server‑side job timeouts and a lease reaper to auto‑cancel/fail stuck jobs, plus a one‑click App registration flow, tests, and docs.

  • New Features

    • Webhook receiver at /api/v1/github/webhooks with HMAC signature verification (requires AKSH_WEBHOOK_SECRET); loads workflows from AKSH_LOCAL_WORKSPACE or GitHub and triggers matching runs.
    • GitHub Checks: create/update per‑job check runs (queued → in_progress → completed); mock mode if AKSH_GITHUB_TOKEN is unset.
    • Background reaper: enforce job timeout (default 360m) and expire runner leases after 120s; enqueue cancellations or mark failed, and clean up sessions.
    • One‑click GitHub App Manifest flow at /api/v1/github/register and /api/v1/github/callback; docs at docs/github-app-webhook.md; tests for webhook flows, manifest conversion, reaper behavior, and escaped single quotes in expressions.
  • Bug Fixes

    • Paginate PR changed files retrieval to handle large pull requests.
    • Do not initialize last_renewed_at in the legacy non‑renewing next_message path to avoid false lease renewals.