Skip to content

FINERACT-2455: Working Capital - Consistent breach reprocessing & No backdated breach pause before reset - #6436

Merged
adamsaghy merged 3 commits into
apache:developfrom
openMF:FINERACT-2455/working-capital-not-allow-backdated-breach-pause
Sep 23, 2026
Merged

adamsaghy merged 3 commits into
apache:developfrom
openMF:FINERACT-2455/working-capital-not-allow-backdated-breach-pause

Conversation

@alberto-art3ch

@alberto-art3ch alberto-art3ch commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Description

Two related changes to how breach actions reshape the breach schedule.

No backdated breach pause behind an active reset. A reset settles the breach
period it lands on and restarts the evaluation from its own date, while a pause
re-dates every period it precedes. A pause starting before the latest active
reset would therefore re-date periods the reset already settled, so it is now
rejected. Resets that were undone do not block, since the undo restores the
split. The reset's cut also has to survive the pause replay: it is applied after
the pauses, because a pause recorded inside the period before the reset would
otherwise re-open it.

Consistent breach reprocessing. Pause, resume and reschedule now go through
one replay of the recorded actions, in chronological order (start date, then
creation instant). Per period: the natural length of the parameters in force
over it, then the pauses it meets, then the cut of a restart reset landing
inside it. This fixes two defects in the reschedule path:

  • a reschedule no longer re-dates periods that already closed under an earlier
    frequency — the parameters are resolved per period, from the reschedule that
    lands on it, instead of resolving the whole schedule against the latest one;
  • the future periods a reschedule re-dates keep the pauses that fall in them,
    which the previous partial re-dating dropped.

The replay is idempotent, so a later action lands on the same schedule instead
of silently moving it. When the new action is the last one on the timeline only
the period it lands on and the ones after it are replayed; behind an already
recorded action the schedule is rebuilt from the start.

Covered by unit tests, integration tests and e2e scenarios. Breach actions are
replayed on their own timeline, so a pause may be backdated, but no scenario
moves the business date backwards.

FINERACT-2455

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.
  • If merging this PR resolves a JIRA issue, I will mark that issue as resolved and set "Fix Version/s" appropriately.
  • I followed the AI Policy.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@alberto-art3ch
alberto-art3ch marked this pull request as ready for review September 12, 2026 18:02
@alberto-art3ch
alberto-art3ch force-pushed the FINERACT-2455/working-capital-not-allow-backdated-breach-pause branch 2 times, most recently from 569fcda to 6852679 Compare September 19, 2026 23:34
@alberto-art3ch
alberto-art3ch force-pushed the FINERACT-2455/working-capital-not-allow-backdated-breach-pause branch from b545c22 to db24025 Compare September 21, 2026 17:00
@adamsaghy adamsaghy changed the title FINERACT-2455: Working Capital - No backdated breach pause FINERACT-2455: Working Capital - No backdated breach pause before reset Sep 22, 2026
@adamsaghy
adamsaghy force-pushed the FINERACT-2455/working-capital-not-allow-backdated-breach-pause branch from db24025 to 5100559 Compare September 22, 2026 15:33
@adamsaghy adamsaghy changed the title FINERACT-2455: Working Capital - No backdated breach pause before reset FINERACT-2455: Working Capital - Consistent breach reprocessing & No backdated breach pause before reset Sep 22, 2026
@adamsaghy
adamsaghy force-pushed the FINERACT-2455/working-capital-not-allow-backdated-breach-pause branch from 5100559 to 68a05c1 Compare September 23, 2026 09:15
@ruzeynalov
ruzeynalov force-pushed the FINERACT-2455/working-capital-not-allow-backdated-breach-pause branch from 68a05c1 to 095c96a Compare September 23, 2026 10:42

@adamsaghy adamsaghy 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.

LGTM

@adamsaghy
adamsaghy merged commit 0986174 into apache:develop Sep 23, 2026
185 of 186 checks passed
@adamsaghy
adamsaghy deleted the FINERACT-2455/working-capital-not-allow-backdated-breach-pause branch September 23, 2026 14:39
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