Skip to content

Circuit-sweep (program-plonky2) in CI vs manual pre-release — decide + implement #50

Description

@TaprootFreak

Background

The full cyclic-recursion sweep for program-plonky2 (cargo test -p zkcoins-program-plonky2 --release --lib -- --test-threads=1) is not in CI today. It was deliberately kept out of the issue #40 migration: at production parameters (MAX_IN_COINS = 8) the sweep wallclocks in hours, single-runner serialization on dfx01 means running it on every push would saturate the M3 Ultra and starve normal PR-tests + Coverage Gate jobs.

The current convention (documented in CONTRIBUTING.md § Setup and scripts/ci-runner/README.md) is: run it manually before any release-PR-to-main.

This issue tracks the decision on whether / how to formalize that.

Options

A. Stay manual

Pros: zero runner load. Status quo.
Cons: easy to forget. No record of what was verified for each release.

B. Dedicated ci:circuit-sweep PR label

Same pattern as #48 (ci:full). Authors opt in; CI runs the sweep as an extra job when the label is set. Required only on the release-PR-to-main, enforced by a checklist item or a separate gate.

Pros: explicit opt-in, leaves a CI record, can be required on release PRs only.
Cons: each release PR pays the multi-hour wall-time as a blocker.

C. Scheduled run on develop

schedule: trigger (e.g. nightly or weekly). Sweep runs out-of-band on the latest develop. Result published as a status check / commit status.

Pros: catches regressions automatically; doesn't block PRs.
Cons: scheduled runs on develop don't gate PR merges by default — drift between "develop sweep last ran at SHA X" and the PR's HEAD.

D. Path-filter on program-plonky2/**

Sweep runs only when the PR touches circuit code (program-plonky2/**). Most PRs (server/docs/CI) skip it entirely.

Pros: targeted; circuit-code PRs get the sweep automatically without manual opt-in.
Cons: still blocks circuit-code PRs for hours. Server-side changes that interact with circuit behaviour at the witness layer wouldn't trigger it.

E. Combination

E.g. D + C: path-filter on program-plonky2/** for circuit PRs + nightly scheduled on develop as backstop. Or B + C: opt-in label + nightly schedule.

Recommendation needed on

  1. Which option(s)?
  2. If B or D: blocking (required check) or advisory (informational)?
  3. If C: cadence + alert path on failure?

Implementation surface (whichever option lands)

  • .github/workflows/ci.yaml: add a circuit-sweep job behind the chosen trigger (label / path-filter / schedule).
  • runs-on: [self-hosted, m3-ultra], --test-threads=1, timeout-minutes bumped to ~360 to be safe.
  • scripts/ci-runner/README.md § "Operations": document the new job + its expected wallclock.
  • CONTRIBUTING.md § Setup: drop the "manual sweep before release-PR" instruction (or refine it depending on option).

Refs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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