Skip to content

ci: allow manual test/clippy runs, cover rust-toolchain.toml, drop dead push branch - #898

Merged
lklimek merged 3 commits into
v1.0-devfrom
ci/run-tests-on-all-prs
Jul 18, 2026
Merged

lklimek merged 3 commits into
v1.0-devfrom
ci/run-tests-on-all-prs

Conversation

@lklimek

@lklimek lklimek commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Why this PR exists

  • Problem: Three narrow gaps in the tests.yml / clippy.yml triggers. A draft PR cannot run CI at all. A toolchain bump runs neither tests nor clippy. And the push trigger points at a branch that does not exist.

  • What breaks without it:

    1. A draft PR cannot be tested. Both jobs are gated on github.event.pull_request.draft != true, and neither workflow declared workflow_dispatch — so a draft had zero CI and no manual override. The only way to get a run was to mark the PR ready for review. Since PRs here are opened as drafts by convention, "push it and let CI check" silently did nothing.
    2. A toolchain bump is never tested. rust-toolchain.toml pins the compiler for every build, but matched no path filter. Edit it alone — changing the toolchain the whole workspace compiles against — and neither tests nor clippy fire.
    3. Pushes to the release branch ran nothing. The push trigger listed main, which does not exist in this repo (the branches are master and v1.0-dev), so it matched nothing at all.
  • Blocking relationship: None. Targets v1.0-dev directly.

What was done

  • Added workflow_dispatch to both workflows, so a draft PR can be exercised from the Actions tab or via gh workflow run tests.yml --ref <branch>. The existing draft guard already permits this: for a workflow_dispatch event github.event.pull_request is null, so draft != true evaluates true. A manual run tests the branch head, not the PR merge commit, so it does not prove the merged result is green.
  • Added rust-toolchain.toml to the path filters. **/*.rs already covers build.rs and every crate's sources, so the filters now fire on any Rust code change and on no documentation change — which is the intent.
  • Reduced the push branches to v*-dev. main does not exist; master is release-only and needs no push-triggered run.
  • Shared the path lists between the push and pull_request triggers via a YAML anchor, so the two lists cannot silently drift apart. GitHub Actions has supported anchors since 2025-09-18, and path filters are a documented use case. (Merge keys remain unsupported; none are used here.)

The paths filters are deliberately kept — documentation-only changes should not spend CI minutes.

Testing

Both files parse, and the triggers resolve as intended:

Workflow Triggers push branches rust-toolchain.toml filtered anchor resolves push == PR workflow_dispatch
tests.yml push, pull_request, workflow_dispatch v*-dev yes yes yes
clippy.yml push, pull_request, workflow_dispatch v*-dev yes yes yes

This PR edits both workflow files, and each filter lists its own workflow file, so both gates run against it here.

Breaking changes

None. Behaviour only widens: workflow_dispatch is additive, rust-toolchain.toml adds a trigger path, and the dropped push branches (main, master) triggered nothing useful — main does not exist, and master receives no development pushes.

🤖 Co-authored by Claudius the Magnificent AI Agent

Summary by CodeRabbit

  • Chores
    • Updated automated checks to run only for development branch pushes and relevant code changes.
    • Added manual options to run linting and tests on demand.
    • Improved workflow coverage for changes to CI configuration and toolchain settings.

The `pull_request` triggers for both gates were path-filtered, so a PR that
touched no Rust source got no test, clippy, or fmt run at all — and reported
green anyway. A skipped gate and a passing gate are indistinguishable at the
merge button, which makes "CI is green" mean "green, or it never ran".

Drop the `paths` filter from both `pull_request` triggers so every non-draft PR
runs the full gate. Pushes to master / v*-dev stay path-filtered, where the
filter is a pure cost saving and nothing gates on the result.

Add `workflow_dispatch` to both. Draft PRs are suppressed by the existing
`draft != true` guard and previously had no way to run CI at all; a manual run
now covers them (against the branch head, not the PR merge commit).

Fix the push trigger's dead `main` branch entry — this repo's release branch is
`master`, so pushes to it matched nothing and ran no tests.

Document the resulting local-vs-CI split in CLAUDE.md: CI owns the full sweep,
so local runs should stay narrowly scoped to the change rather than duplicating
what CI is about to do.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_018m6b2TRP1e6S3uQHcaq3Cq
@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@lklimek, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6ef163a4-9b3f-46ab-b90c-80a58719604a

📥 Commits

Reviewing files that changed from the base of the PR and between 957acac and 7396587.

📒 Files selected for processing (3)
  • .github/workflows/clippy.yml
  • .github/workflows/tests.yml
  • rust-toolchain.toml
📝 Walkthrough

Walkthrough

GitHub Actions trigger configurations were updated for Clippy and test workflows. Push events now target v*-dev branches, shared path filters are reused across push and pull requests, and both workflows support manual execution.

Changes

Workflow trigger updates

Layer / File(s) Summary
Shared workflow trigger configuration
.github/workflows/clippy.yml, .github/workflows/tests.yml
Both workflows centralize path filters, restrict push triggers to v*-dev, and add workflow_dispatch; the test workflow also includes the workflow file and rust-toolchain.toml in its paths.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main workflow changes: manual runs, toolchain path coverage, and removing the inactive push branch.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/run-tests-on-all-prs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread .github/workflows/clippy.yml Resolved
Address review feedback on the previous commit: keep the `paths` filters
(documentation changes should not spend CI minutes) and take CLAUDE.md out of
this PR entirely — it collides with PR #860, which rewrites the same section of
that file, so it ships separately against #860's branch.

Three changes remain, all narrow:

- Add `workflow_dispatch` to both workflows. Draft PRs are suppressed by the
  existing `draft != true` guard and previously had no way to run CI at all —
  the only route to a green check was marking the PR ready for review. A manual
  run now covers them; it tests the branch head rather than the PR merge commit.

- Add `rust-toolchain.toml` to the path filters. The file pins the toolchain for
  every build, but matched no filter, so a toolchain bump triggered neither
  tests nor clippy. `**/*.rs` already covers build.rs and all crate sources, so
  the filters otherwise fire on any Rust code change and on no documentation
  change, which is the intent.

- Drop the push branch list down to `v*-dev`. It previously listed `main`, which
  does not exist in this repo, and `master` is release-only — neither needs a
  push-triggered run.

The path lists are shared between the `push` and `pull_request` triggers via a
YAML anchor so the two cannot drift apart; GitHub Actions has supported anchors
since 2025-09-18, and path filters are a documented use case.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_018m6b2TRP1e6S3uQHcaq3Cq
@lklimek lklimek changed the title ci: run tests and clippy on every non-draft pull request ci: allow manual test/clippy runs, cover rust-toolchain.toml, drop dead push branch Jul 16, 2026
@lklimek
lklimek marked this pull request as ready for review July 16, 2026 11:50
@lklimek
lklimek requested a review from Copilot July 16, 2026 11:50
@thepastaclaw

thepastaclaw commented Jul 16, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 7396587)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR widens and corrects GitHub Actions workflow triggers so CI can be run manually (including for draft PR branches), toolchain file changes can trigger CI, and the push trigger no longer targets a non-existent branch.

Changes:

  • Add workflow_dispatch to both tests.yml and clippy.yml to allow manual runs.
  • Include rust-toolchain.toml in the paths filters and deduplicate push/pull_request path lists via a YAML anchor.
  • Remove the dead main push branch trigger and scope push triggers to v*-dev.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/tests.yml Adds manual dispatch + shared path filters; adjusts push branch trigger.
.github/workflows/clippy.yml Adds manual dispatch + shared path filters; adjusts push branch trigger.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/tests.yml Resolved
Comment thread .github/workflows/clippy.yml Resolved

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preliminary review — Codex only

The manual dispatch and shared path filters are structurally sound. However, the new toolchain-file trigger does not test the selected toolchain because both jobs replace it with explicit rustup overrides, leaving a stated goal of this PR unmet.

Validated blockers were found in the Codex precheck. Sonnet is deferred until a fresh Codex revalidation clears the blocker gate.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet: not run (deferred by blocker gate)

🔴 1 blocking

🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `.github/workflows/tests.yml`:
- [BLOCKING] .github/workflows/tests.yml:15: Toolchain-file changes still are not tested
  Adding `rust-toolchain.toml` to the path filter makes both workflows run when the file changes, but neither job uses its selected compiler. The test job sets `toolchain: stable` with `override: true` at lines 54-58, while `.github/workflows/clippy.yml` sets `toolchain: 1.92` with `override: true` at lines 53-58. These directory overrides determine which toolchain runs instead of `rust-toolchain.toml`; the test job may coincide with the file only when its version happens to be the current stable release, and clippy remains fixed at 1.92. A toolchain bump can therefore pass without testing or linting the version being introduced. Derive both action inputs from `rust-toolchain.toml`, or otherwise install and run the file's exact channel.

Comment thread .github/workflows/tests.yml Resolved
Review feedback: the previous commit added rust-toolchain.toml to the path
filters, but neither job used the file's compiler, so the trigger proved
nothing. Both installed a toolchain by name with `override: true`, and a rustup
directory override takes precedence over rust-toolchain.toml.

Worse than a hollow trigger, the test job named `stable` while the project pins
1.92 — so the suite has never run on the pinned toolchain at all. Clippy named
1.92, matching only because the number was duplicated by hand; the next bump
would have silently kept linting the old compiler.

Install via actions-rust-lang/setup-rust-toolchain with no toolchain input, so
both jobs take the channel and components straight from rust-toolchain.toml.
That file becomes the single source of truth, and — since a change to it now
triggers both workflows — a toolchain bump is tested and linted by the compiler
it introduces. Clippy's components move into the file for the same reason.

Two of the action's defaults are pinned rather than inherited: it defaults
RUSTFLAGS to `-D warnings`, which would newly fail the test job on any warning
(Clippy owns that gate, and its own step already passes the flag), and it
defaults to its own cargo cache, which the existing actions/cache step already
covers.

Also drops actions-rs/toolchain from both jobs; the action is archived, and
dtolnay/rust-toolchain would not fix this because it takes its toolchain from
its @ref rather than reading rust-toolchain.toml.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_018m6b2TRP1e6S3uQHcaq3Cq

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Codex + Sonnet

This PR adds CI for the project across three commits: enabling tests/clippy on non-draft PRs, adding workflow_dispatch plus path-filter coverage for the toolchain file and dropping the dead main push branch, and finally replacing the hardcoded/overridden toolchain install with actions-rust-lang/setup-rust-toolchain reading the pin directly from rust-toolchain.toml. No new findings in the latest delta. The one carried-forward prior finding (toolchain-file changes not actually tested) is fixed at this head: both tests.yml and clippy.yml install via setup-rust-toolchain@v1 with no toolchain/override input, so they run whatever rust-toolchain.toml pins, and that file is in both workflows' path filters, so a bump both triggers and is tested by the toolchain it introduces.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: claude-sonnet-5 — verifier
  • Sonnet reviewers: claude-sonnet-5 — general (completed), claude-sonnet-5 — general (failed)

lklimek added a commit that referenced this pull request Jul 18, 2026
…899)

* docs: record the local-vs-CI split so local runs stop duplicating CI

CI already runs the full `--all-features --workspace` suite, doc tests, clippy
and the fmt check on every non-draft PR that touches Rust code, but nothing said
so — leaving "run the tests" to mean a full local workspace run that CI then
repeats verbatim minutes later.

State what CI covers, and scope local runs to the narrowest thing that covers
the change. Record the two places CI does not cover: draft PRs, whose
pull_request runs are suppressed by the draft guard and need either
ready-for-review or a manual workflow_dispatch run; and the backend E2E suite,
which is commented out in tests.yml and #[ignore]d.

Also note that a green cargo run proves nothing on its own: `cargo test` with a
filter matching no test exits 0 and prints "test result: ok", so a run must be
confirmed by finding the expected test names in its log.

Describes CI as of PR #898 (workflow_dispatch on both workflows,
rust-toolchain.toml in the path filters, push limited to v*-dev).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_018m6b2TRP1e6S3uQHcaq3Cq

* docs: fix CI-policy path filters and drop unsupported workflow_dispatch claim

Reconcile CLAUDE.md's local-vs-CI section with the actual tests.yml/clippy.yml
triggers: path filters are per-workflow (each watches its own workflow file),
tests.yml also watches tests/backend-e2e/**, rust-toolchain.toml is not an
actual trigger path, and neither workflow declares workflow_dispatch so the
manual-dispatch guidance is removed rather than left half-working.

Co-Authored-By: Claude <[email protected]>

* docs: fix nightly/pinned-toolchain fmt mismatch and other CI-doc gaps

Addresses live review findings on this PR:
- Local fmt guidance said `cargo +nightly fmt`, but clippy.yml checks
  formatting on the rust-toolchain.toml-pinned 1.92, not nightly —
  switched to plain `cargo fmt --all` in both places it appeared.
- `-p <crate>` clippy-scoping advice doesn't apply: this repo has no
  [workspace], so there is exactly one crate. Replaced with
  target-based scoping guidance.
- Cross-referenced the "CI: Safe Cargo Wrapper" section so an agent
  running inside the Claude Code review GitHub Action isn't misled by
  the "locally" framing.
- Softened "complete gate"/"full sweep" wording (a #[ignore]d unit
  test stays manual even on green CI) and pointed at a concrete
  example plus a pass-status check, not just log presence.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
@lklimek
lklimek merged commit 8cdc3e6 into v1.0-dev Jul 18, 2026
4 checks passed
@lklimek
lklimek deleted the ci/run-tests-on-all-prs branch July 18, 2026 09:14
orchardpaytl pushed a commit to orchardpaytl/orchardpay that referenced this pull request Jul 21, 2026
…#903, dashpay#904)

Pulled in 4 new upstream commits since the last sync (3b32bed):

- dashpay#903 feat(ui): redesign welcome-screen experience-level selector as
  cards, with radio-button accessibility semantics. Only real conflict
  in this merge: tests/kittest/welcome_screen.rs, where both sides
  added tests — kept our create_wallet_path_shows_and_clears_onboarding_stepper
  test and pulled in upstream's 4 new card-accessibility tests
  (rebranded dash_evo_tool:: -> orchardpay:: in the process).
- dashpay#904 fix(wallet): surface DAPI endpoint exhaustion — pins the exact
  Sdk generation a backend task ran against for error classification,
  fixing errors misattributed to a since-reloaded SDK. Touches
  backend_task/mod.rs, which our own pub mod orchardpay; addition also
  lives in; merged cleanly with no conflict.
- dashpay#898 ci: allow manual test/clippy runs, cover rust-toolchain.toml.
- dashpay#899 docs: record the local-vs-CI split in CLAUDE.md. Also corrects
  local fmt guidance from `cargo +nightly fmt` to plain `cargo fmt
  --all` (CI checks against the rust-toolchain.toml-pinned compiler,
  not nightly) — worth adopting going forward. One rebrand miss caught
  in the merged prose (`--bin dash-evo-tool` -> `--bin orchardpay`).

All other files (CLAUDE.md, src/app.rs, src/backend_task/error.rs,
src/model/user_role.rs, src/ui/dpns/dpns_contested_names_screen.rs,
src/ui/welcome_screen.rs) auto-merged cleanly — none needed manual
reconciliation beyond the one branding fix above.

Verified: cargo build (both --all-features and default features),
clippy -D warnings, cargo fmt --all -- --check, and the full test
suite all green.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants