Repository navigation
feat(worker): effector job workers - #617
Open
ccf-lisa[bot] wants to merge 2 commits into
Open
ccf-lisa[bot] wants to merge 2 commits into
ccf-lisa[bot] wants to merge 2 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
ccf-lisa
Bot
force-pushed
the
effectors/20a-effector-workers
branch
2 times, most recently
from
December 2, 2026 12:07
ad6bc80 to
6963b6c
Compare
This was referenced Dec 2, 2026
internal/service/worker: the River workers of the effector rule engine (LLD Dispatcher, Timers and backfill, Delivery), not registered yet: - domain-events.dispatch claims outbox batches in a transaction and inserts their jobs in it: one rules.evaluate-subject per subject (unique while queued or running; a change to a subject whose evaluation is running stays in the outbox for the next dispatch), and the engine's own ticks, deliveries and backfills; - rules.evaluate-subject, rules.backfill, effects.tick (snoozes when it runs early), effects.deliver (snoozes while the agent isn't ready, retries 429/5xx/timeouts with capped exponential backoff and jitter), effector.verify, effects.prune (24h retention, including the outbox) and rules.sweep (skipping rules with a backfill queued or running); - the scheduler the engine and registration enqueue through: one tick per (effect, time), one delivery per (effect, generation), at most one verification per agent per minute. The next PR registers them and turns the producers on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/20a-effector-workers
branch
from
December 2, 2026 14:45
6963b6c to
5bd246a
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 was referenced Dec 2, 2026
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
The River workers of the effector rule engine (API LLD, dispatcher, timers, delivery), not registered yet:
domain-events.dispatchrules.evaluate-subjectper subject (unique while queued or running; a change to a subject whose evaluation is running stays in the outbox for the next dispatch), and the engine's ticks, deliveries and backfillsrules.evaluate-subject,rules.backfilleffects.tickeffects.delivereffector.verifyeffects.prunerules.sweepriverEffectSchedulerenqueues the engine's jobs (one tick per effect and time, one delivery per generation) and registration's verifications (one per agent per minute); it implementseffects.Schedulerandeffector.Jobs.rules.EvaluateSubjectArgsandrules.BackfillArgsare the jobs' args.No
domain-events.pruneworker:effects.prunealready prunes processed outbox rows.Why
Plan: stack 2, PR 20, split: the workers here, tested directly; registering them and turning the producers on in 20b, so no job is enqueued before its worker exists.
Test evidence
effectors_test.go: tick wait and early snooze, delivery backoff bounds, verify retry, bad engine job rows.effectors_dispatch_integration_test.go(Postgres, River): folding per subject, sources without enabled rules, engine job rows to jobs (tick scheduled at its time), changes kept while an evaluation runs, active backfills; the scheduler's uniqueness; every worker run against the engine (evaluation, backfill, tick, delivery snoozing until the verify worker makes the agent ready, then delivered, retry on 502, prune, sweep).Gate on this branch:
go build ./...pass;go vet -tags integration ./...pass;make lint(golangci-lint v2.15.0, CI config) 0 new issues;make testpass;make swagno diff;go mod tidyno diff;go test -tags integration -p 1on./internal/service/worker/ ./internal/service/rules/pass.Size
Counted: 961 lines.
🤖 Generated with Claude Code