Skip to content

Release: develop -> main#4340

Merged
TaprootFreak merged 1 commit into
mainfrom
develop
Jul 23, 2026
Merged

Release: develop -> main#4340
TaprootFreak merged 1 commit into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

* fix(liquidity): keep activation debounce across drain chunks

verifyRule cleared the rule's activation-debounce timer (ruleActivations)
unconditionally right before executeRule. After each pipeline completed and
the rule returned to Active, the next cron cycle re-armed the timer and had
to wait the full lmActivationDelay again before the next chunk. For a
redundancy rule whose orders are liquidity-capped (best-price chunk, e.g. an
exchange sell), this serialized the drain to one chunk per delay, turning a
large offload into a multi-hour trickle.

Arm the timer once when the condition first appears and clear it only when
the condition resolves (else branch); follow-up chunks then fire at the
normal every-minute cadence. Also clear the timer when a rule is Paused so a
rule paused by a failed pipeline re-debounces on reactivation — deliberately
not for other non-active states, notably Processing (occurs between chunks).

* test(liquidity): cover the activation-debounce invariant

Regression tests for verifyRule's ruleActivations behaviour: the timer
persists across a drain chunk (Active + ongoing condition), is cleared on
Paused so a failed-then-reactivated rule re-debounces, and is kept while
Processing between chunks. Verified to fail if either fix is reverted.

* fix(liquidity): clear activation timer at pause transition, not in verifyRule

The earlier verifyRule guard cleared the activation-debounce timer only when
the every-minute cron observed the rule Paused. A manual reactivation
(reactivateRule) can flip Paused -> Active in a different service before that
tick, letting a just-failed rule skip the debounce with a stale timestamp.

Move the reset to the actual pause transition: handlePipelineFail now calls a
new resetActivation(ruleId) on the liquidity service right after rule.pause().
Revert the verifyRule non-active guard to its original form. Covers manual and
cron reactivation alike. Tests updated; adds a handlePipelineFail spec.

* style(liquidity): apply prettier formatting to pipeline spec
@TaprootFreak
TaprootFreak merged commit 63f0399 into main Jul 23, 2026
11 checks passed
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.

1 participant