Skip to content

feat(effector): webhook delivery - #615

Open
ccf-lisa[bot] wants to merge 1 commit into
effectors/17b-effector-verifyfrom
effectors/18-effect-delivery
Open

ccf-lisa[bot] wants to merge 1 commit into
effectors/17b-effector-verifyfrom
effectors/18-effect-delivery

Conversation

@ccf-lisa

@ccf-lisa ccf-lisa Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

What

Deliverer.Deliver(effect, generation, attempt, createdAt, last): one delivery attempt (wire interface, responses and retries; API LLD, effects.deliver):

  • superseded generations, gone effects and gone agents are done; while the agent's effector isn't ready (or failing) the job snoozes; past 24h it gives up;
  • the document is built now and signed with webhook-id dlv_<effect>_<generation>, the same on every attempt;
  • every attempt is recorded (EffectDelivery: status code or error, response cut on a UTF-8 boundary);
  • 2xx, 409: delivered (a failing effector turns ready); 410: the rule action is degraded; 401: the effector is failing; 403: the refused target is recorded as an error of the rule action (the agent stays ready); 429, 5xx, timeouts: retried until the last attempt or 24h, then the generation's applied status is unknown and the effector failing; anything else: not retried.

The River worker and its backoff come in PR 20a.

Why

Plan: stack 2, PR 18.

Test evidence

  • deliver_integration_test.go (Postgres, an httptest agent checking signatures): the signed document, superseded and not ready (snooze, give-up after 24h, verification), every response class with the effector and rule action status and rule error it leaves, the same webhook-id on every attempt, timeouts, a gone effect, a failing effector, no effector row.
  • deliver_test.go: webhook IDs, rejection reasons, UTF-8 truncation.

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 test pass; make swag no diff; go mod tidy no diff; go test -tags integration -p 1 on ./internal/service/effector/ pass.

Size

Counted: 524 lines.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f15f5bc9-0fab-4186-a20a-8cecd264d1e3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

internal/service/effector: Deliverer.Deliver makes one attempt at
delivering an effect generation (wire-interface.md, Responses and
retries): the effect document is built now and signed with a webhook-id
that is the same on every attempt; superseded generations and gone
effects or agents are done; a delivery waits while the agent's effector
isn't ready or failing; each attempt is recorded. 2xx and 409 are
delivered (a failing effector turns ready again); 410 degrades the rule
action; 401 marks the effector failing; 403 records the refused target
as an error of the rule action; 429, 5xx and transport errors are
retried until the last attempt or 24h, after which the generation's
applied status is unknown and the effector failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

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

No deployments
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.

1 participant