Skip to content

ci: auto-trigger argus-test validation on PRs #29

@eFAILution

Description

@eFAILution

Problem

Testing argus feature branches against argus-test is currently manual — someone has to go to argus-test and dispatch test-suite.yml with argus_ref=<branch>. This creates a gap where argus PRs can merge without being validated by the external test suite.

Goal

Automatically trigger argus-test's validation pipeline when an argus PR is opened/updated, and surface the results back on the argus PR — without requiring PATs.

Constraints

  • No PATs — avoid long-lived tokens and the management overhead
  • argus-test is privateGITHUB_TOKEN cross-repo access is limited to the huntridge-labs org context
  • Reusable workflow tests (I1, I3) will always run against @main due to GitHub's static uses: requirement — this is acceptable since unit + action tests cover the core logic
  • Solution should scale if more downstream test repos are added later

Options to Explore

1. repository_dispatch via GITHUB_TOKEN

Argus PR workflow sends a repository_dispatch to argus-test. Since both repos are under huntridge-labs, GITHUB_TOKEN with repo scope may work for dispatching to private repos in the same org — needs validation.

Pros: Simple, no extra tokens
Cons: GITHUB_TOKEN may not have cross-repo dispatch permissions even within the same owner. Reporting status back to the argus PR still requires a mechanism.

2. GitHub App (org-scoped)

Create a lightweight GitHub App installed on both repos. The app token can dispatch workflows cross-repo and post check statuses back.

Pros: Fine-grained permissions, no user-tied credentials, scalable
Cons: Setup overhead (app registration, private key management via secrets)

3. Reusable workflow in argus-test called from argus

Argus CI calls argus-test's test suite as a reusable workflow. Cross-repo reusable workflows work for private repos within the same org when explicitly allowed.

Pros: Native GitHub Actions, no tokens needed, results appear directly on the argus PR
Cons: Reusable workflow uses: requires a static ref — can't dynamically pass argus_ref back to itself. May require argus-test to expose a slimmed-down callable workflow.

4. Workflow artifact + polling pattern

Argus CI creates a dispatch and then polls for the argus-test run result via the GitHub API (using GITHUB_TOKEN if permitted, or actions: read on the org level).

Pros: Decoupled
Cons: Polling is fragile and slow, adds complexity

5. GitHub Actions OIDC + fine-grained token exchange

Use OIDC to mint a short-lived token scoped to argus-test. Requires configuring trust between the repos.

Pros: No long-lived secrets, modern approach
Cons: Significant setup, may be over-engineered for this use case

R&D Tasks

  • Verify whether GITHUB_TOKEN can send repository_dispatch to a private repo under the same owner
  • Evaluate GitHub App approach — estimate setup effort vs. long-term benefit
  • Prototype the reusable workflow approach (Option 3) — test cross-repo workflow_call between argus and argus-test
  • Determine how to report results back to the argus PR (commit status, check run, or PR comment)
  • Consider concurrency — argus-test's cancel-in-progress: true means simultaneous argus PRs could cancel each other's validation runs

Context

  • argus-test already supports argus_ref input on test-suite.yml for targeting feature branches
  • Unit (U1–U5) and action (A1–A5) tests can use dynamic refs via the local checkout pattern
  • Reusable workflow tests (I1, I3) are pinned to @main — this is a known limitation
  • Both repos are owned by huntridge-labs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions