Repository navigation
feat(effects): resume reminders when repeats are raised - #628
Open
ccf-lisa[bot] wants to merge 1 commit into
Open
ccf-lisa[bot] wants to merge 1 commit into
ccf-lisa[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
ccf-lisa
Bot
force-pushed
the
effectors/28-resume-repeats
branch
from
December 2, 2026 12:07
54ed785 to
f618101
Compare
This was referenced Dec 2, 2026
Changing a rule action's repeat or max_repeats resumes its finished effects that have repeats left: active again with the repeat count kept, nothing delivered then, the next repeat one interval after the last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/28-resume-repeats
branch
from
December 2, 2026 14:45
f618101 to
68f3e4d
Compare
This was referenced Dec 2, 2026
This was referenced Dec 2, 2026
gusfcarvalho
approved these changes
Dec 2, 2026
gusfcarvalho
left a comment
Contributor
There was a problem hiding this comment.
ccf-review: APPROVE
no findings.
Stack (gh stack 604): #592 → #593 → #594 → #595 → #596 → #597 → #598 → #599 → #600 → #601 → #602 → #603 → #605 → #606 → #607 → #608 → #609 → #610 → #611 → #612 → #613 → #614 → #615 → #616 → #617 → #618 → #619 → #620 → #621 → #622 → #623 → #624 → #625 → #626 → #627 → #628 → #629 → #630
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Raising a rule action's repeats resumes the reminders of its finished effects (user decision: raising
max_repeats, or changingrepeat, must resume reminders of finished effects).PUT /api/rules/{id}/actions/{actionId}setsRepeatsChangedon theActionChangedchange whenrepeatormax_repeatschanged.Machine.ResumeAction) takes everyfinishedeffect of the action on its current agent and effector action that has repeats left:repeatset andmax_repeatseither unset (0, unlimited) or above the effect'srepeat_count. Each goes back toactivewith its repeat count andlast_repeat_atkept.last_repeat_at + repeat, or now when that has passed. That tick deliversrepeated, orfinishedwhen the count reaches the newmax_repeats.Edge cases (what the code does)
repeatchanged but the effect is still at its max (repeat_count >= max_repeats): stays finished.repeatremoved (0): nothing resumes, whatevermax_repeatssays.max_repeatscleared (unlimited) withrepeatset: resumes, and repeats until the condition clears.max_repeatsto or below an active effect's count delivers nothing at change time: its next repeat finishes it, delivered asfinishedwith the count it reached (for example 2 withmax_repeatslowered to 1).repeatormax_repeats(target, delay, params) leave finished effects alone. A disabled rule's changes don't reach the engine, and a repointed action's effects are cleared and start from scratch, as before.Docs:
user-interface.md("How often an action fires": raising repeats resumes; the action edit table),triggers.md(state diagramfinished --> active: repeats raised, transitions table),lld/poc-followups.md(item 12, decided). The route's swagger description says so too.Tests
effects): finished at max 2 → raise to 4 → active, nothing delivered, tick one interval after the last repeat →repeated(3) →finishedat 4, nothing after; at max, arepeat-only change leaves it finished, then clearingmax_repeatsresumes it with the overdue repeat fired at once; no resume without raised repeats (a change withoutRepeatsChanged, a lowered max); lowering max below an active effect's count finishes it at the next repeat.handler): a repeat change carriesRepeatsChanged.Part of the effectors plan:
docs/effectors/lld/implementation-plan.md.Gate
On this branch:
go build ./...pass;go vet -tags integration ./...pass; golangci-lint v2.15.0 (shared CI config) 0 new issues;make testpass;make swagno diff (regenerateddocs/committed here: the route description);go mod tidyno diff;go test -tags integration -p 1oninternal/service/effectsandinternal/api/handler/...pass.Size
Counted: 230 lines (added + removed, tests included;
docs/docs.goanddocs/swagger.*excluded).🤖 Generated with Claude Code