From 781ab723afb1a55748405f91447a40d69c5442f7 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Wed, 15 Jul 2026 19:24:31 +0100 Subject: [PATCH 1/2] ci: Fix workflow launch on matrix-unrelated labels (#7812) --- .github/workflows/on-pr.yml | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index bbf6f8c39e..442a202a44 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -25,18 +25,11 @@ on: - unlabeled concurrency: - # Use a per-ref group so a newer run (a push, or a change to a label below) - # supersedes the in-progress one for that ref. Label events we don't act on get - # their own unique group (per run id) instead, keeping them out of the shared - # group so real builds keep running. Keep this list in sync with `should-run`. - group: >- - ${{ github.workflow }}-${{ github.ref }}${{ - ((github.event.action == 'labeled' || github.event.action == 'unlabeled') - && github.event.label.name != 'Ready to merge' - && github.event.label.name != 'DraftRunCI' - && github.event.label.name != 'Full CI build') - && format('-{0}', github.run_id) || '' - }} + # A single per-ref group with cancel-in-progress means any newer run (a push + # or a label change) supersedes the in-progress one for that ref. Keeping + # exactly one authoritative run per ref ensures a fast do-nothing run can never + # mask a real build's checks. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true defaults: @@ -44,21 +37,17 @@ defaults: shell: bash jobs: - # This job determines whether the rest of the workflow should run. It runs - # when the PR is not a draft (which should also cover merge-group) or has the - # 'DraftRunCI' or 'Full CI build' label. For label events it only runs when the - # label added or removed is one we act on ('Ready to merge', 'DraftRunCI' or - # 'Full CI build'), so unrelated label changes do not trigger a redundant run. + # This job determines whether the rest of the workflow should run at all, + # based on the current set of labels: it runs when the PR is not a draft + # (which should also cover merge-group) or has the 'DraftRunCI' or + # 'Full CI build' label. Whether a build then happens, and whether it is the + # minimal or full matrix, is decided further below and in the strategy matrix. should-run: if: >- ${{ - ((github.event.action != 'labeled' && github.event.action != 'unlabeled') - || github.event.label.name == 'Ready to merge' - || github.event.label.name == 'DraftRunCI' - || github.event.label.name == 'Full CI build') - && (!github.event.pull_request.draft - || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') - || contains(github.event.pull_request.labels.*.name, 'Full CI build')) + !github.event.pull_request.draft + || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') + || contains(github.event.pull_request.labels.*.name, 'Full CI build') }} runs-on: ubuntu-latest steps: From 433e5f68968ea295abaae4948676e9be3879a0e2 Mon Sep 17 00:00:00 2001 From: Vlad <129996061+vvysokikh1@users.noreply.github.com> Date: Wed, 15 Jul 2026 23:08:45 +0100 Subject: [PATCH 2/2] fix: Reject zero CheckID in CheckCancel and CheckCash (#7685) --- src/libxrpl/tx/transactors/check/CheckCancel.cpp | 5 +++++ src/libxrpl/tx/transactors/check/CheckCash.cpp | 4 ++++ src/test/app/Check_test.cpp | 14 ++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/src/libxrpl/tx/transactors/check/CheckCancel.cpp b/src/libxrpl/tx/transactors/check/CheckCancel.cpp index ed60817224..f4602f98c6 100644 --- a/src/libxrpl/tx/transactors/check/CheckCancel.cpp +++ b/src/libxrpl/tx/transactors/check/CheckCancel.cpp @@ -1,10 +1,12 @@ #include #include +#include #include #include #include #include +#include #include #include #include @@ -19,6 +21,9 @@ namespace xrpl { NotTEC CheckCancel::preflight(PreflightContext const& ctx) { + if (ctx.rules.enabled(fixCleanup3_3_0) && ctx.tx[sfCheckID] == beast::kZero) + return temMALFORMED; + return tesSUCCESS; } diff --git a/src/libxrpl/tx/transactors/check/CheckCash.cpp b/src/libxrpl/tx/transactors/check/CheckCash.cpp index 4e810d94cf..a8c989f4df 100644 --- a/src/libxrpl/tx/transactors/check/CheckCash.cpp +++ b/src/libxrpl/tx/transactors/check/CheckCash.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -51,6 +52,9 @@ CheckCash::checkExtraFeatures(xrpl::PreflightContext const& ctx) NotTEC CheckCash::preflight(PreflightContext const& ctx) { + if (ctx.rules.enabled(fixCleanup3_3_0) && ctx.tx[sfCheckID] == beast::kZero) + return temMALFORMED; + // Exactly one of Amount or DeliverMin must be present. auto const optAmount = ctx.tx[~sfAmount]; auto const optDeliverMin = ctx.tx[~sfDeliverMin]; diff --git a/src/test/app/Check_test.cpp b/src/test/app/Check_test.cpp index b19a9f6894..840c06bd84 100644 --- a/src/test/app/Check_test.cpp +++ b/src/test/app/Check_test.cpp @@ -1257,6 +1257,13 @@ class Check_test : public beast::unit_test::Suite env.close(); } + // Can't run pre-amendment behavior due to assertion failure. + if (features[fixCleanup3_3_0]) + { + env(check::cash(bob, uint256{}, usd(20)), Ter(temMALFORMED)); + env.close(); + } + // alice creates her checks ahead of time. uint256 const chkIdU{getCheckIndex(alice, env.seq(alice))}; env(check::create(alice, bob, usd(20))); @@ -1704,6 +1711,13 @@ class Check_test : public beast::unit_test::Suite // Non-existent check. env(check::cancel(bob, getCheckIndex(alice, env.seq(alice))), Ter(tecNO_ENTRY)); env.close(); + + // Can't run pre-amendment behavior due to assertion failure. + if (features[fixCleanup3_3_0]) + { + env(check::cancel(bob, uint256{}), Ter(temMALFORMED)); + env.close(); + } } void