Repository navigation
feat(worker): run the effector rule engine - #618
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/20b-effector-runtime
branch
from
December 1, 2026 18:49
51c74e4 to
2b9cb46
Compare
ccf-lisa
Bot
force-pushed
the
effectors/20b-effector-runtime
branch
from
December 2, 2026 12:07
2b9cb46 to
333fe51
Compare
This was referenced Dec 2, 2026
When effectors are on (CCF_EFFECTOR_SIGNING_KEY) and the worker service runs: - the worker service registers the rule engine's workers, adds its queues (rules, effects, and a single-worker rules-sweep) and periodic jobs (outbox dispatch every 2s, retention hourly, now sweep every minute), and enqueues the engine's jobs with its River client; an unreadable signing key fails startup; - ingested evidence (cmd/run.go) and workflow evidence record a subject-changed domain event in their transaction. With effectors off nothing changes: no producer writes the outbox and no effector job is registered. The agent instance prune also deletes the effector registrations of instances gone for the instance retention. Rules, rule actions and agent registrations are only created through the routes of the next stack, so until then the dispatcher marks evidence rows processed without evaluating anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/20b-effector-runtime
branch
from
December 2, 2026 14:45
333fe51 to
8f92f30
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
When effectors are on (
CCF_EFFECTOR_SIGNING_KEY) and the worker service runs:CCF_EFFECTOR_CEL_COST_LIMIT, the agent instance stale-after), loads the signer (an unreadable key fails startup), registers the workers of 20a, adds their queues (rules5,effects10,rules-sweep1) and periodic jobs (outbox dispatch every 2s, retention hourly, now sweep every minute), and gives the scheduler its River client;cmd/run.go, so batch ingest too) and workflow evidence record asubject-changeddomain event in their transaction (cfg.EffectorDomainEvents()): the outbox wiring feat(effectors): config and domain event outbox #603 left for this stack.With effectors off nothing changes: no producer writes the outbox and no effector job is registered. The agent instance prune also deletes the effector registrations of instances gone for the instance retention.
.env.examplesays where deliveries go and what the UI links use.Rules, rule actions and registrations are only created through the routes of stack 3, so until then the dispatcher marks evidence rows processed without evaluating anything.
Why
Plan: stack 2, PR 20. Last PR of stack 2.
Test evidence
effectors_pipeline_integration_test.go(Postgres, River running the registered workers, a fake agent that verifies Standard Webhooks signatures with the published keys): verification makes the agent ready; failing evidence ingested throughEvidenceService→ outbox → dispatch → evaluation → activated → signed delivery received; passing evidence → cleared → delivered aseffect.clear; oneEffectDeliveryper generation with the stable webhook-id; every outbox row processed.agent_instance_prune_integration_test.go: stale effector registrations pruned, heartbeating and recent ones kept.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/effector/ ./cmd/pass.Size
Counted: 464 lines.
🤖 Generated with Claude Code