Repository navigation
feat(effects): engine jobs through the outbox - #609
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/15a-effect-jobs
branch
2 times, most recently
from
December 2, 2026 12:07
8fb397a to
e436f38
Compare
This was referenced Dec 2, 2026
internal/service/effects: the effect engine's job arguments (effects.tick at a time, effects.deliver of a generation) and Outcome, which collects the jobs one transaction decides: Persist writes them to the domain event outbox in that transaction (one tick per effect, the earliest, rounded up to the second), Flush enqueues them after commit through a Scheduler and marks the rows processed. When enqueuing fails the rows stay for the outbox dispatcher, so no decided tick or delivery is lost. The state machine that fills an Outcome is the next PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/15a-effect-jobs
branch
from
December 2, 2026 14:45
e436f38 to
e6cc8e7
Compare
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 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 effect engine's jobs and how a transaction hands them over (API LLD, producer: "a new generation is never left without a durable delivery"):
effects.tick({effect_id, at}) andeffects.deliver({effect_id, generation}, stable).Outcomecollects what one transaction decides.Persistwrites the jobs to the domain event outbox (sourceengine) in that transaction (one tick per effect, the earliest, rounded up to the second so re-scheduled ticks deduplicate).Flushenqueues them after commit through aSchedulerand marks the rows processed; when enqueuing fails, the rows stay for the outbox dispatcher (feat(effectors): config and domain event outbox #603) and the caller only logs.The state machine that fills an
Outcomeis the next PR.Why
Plan: stack 2, PR 15 (state machine), split: this part is self-contained and reviewable on its own; the machine (15b) builds on it.
Test evidence
jobs_test.go: tick rounding (and UTC), one tick per effect (the earliest, first-seen order),Empty.jobs_integration_test.go(Postgres): persisted rows and payloads, flush enqueues and marks processed, a failing scheduler (or none) leaves the rows, a rolled-back transaction writes nothing, an empty outcome.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/effects/pass.Size
Counted: 364 lines.
🤖 Generated with Claude Code