Skip to content

test(effectors): end to end through the routes - #626

Open
ccf-lisa[bot] wants to merge 2 commits into
effectors/25-agent-effector-adminfrom
effectors/26-effectors-e2e
Open

ccf-lisa[bot] wants to merge 2 commits into
effectors/25-agent-effector-adminfrom
effectors/26-effectors-e2e

Conversation

@ccf-lisa

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

Copy link
Copy Markdown
Contributor

What

The end-to-end test through the routes, ported from the PoC (effectors_e2e_integration_test.go): the API with effectors on, River running the registered effector workers, and a fake agent listener that verifies Standard Webhooks signatures with the keys from the registration.

  1. The admin creates the agent and sets its base URL (PUT /api/admin/agents/{id}/effector).
  2. The agent registers through the SDK; effector.verify makes it ready.
  3. A rule is created through POST /api/rules.
  4. Failing evidence: a signed effect.apply arrives with the whole document (rule, action, target, subject with its document and UI link, /admin/rules/{rule}/effects/{effect} link).
  5. The agent reports applied with refs and links; its heartbeat's held digest matches (no resync).
  6. Passing evidence: effect.clear carrying what the agent reported; once applied the effect leaves the held set.

The test lives in worker_test (handler imports worker), with StartEffectorsForTest in an integration-only export_integration_test.go, so the runtime stays unexported and the test uses the real EffectsEngine() / EffectorJobs() accessors.

Why

Plan: stack 3: the PoC's e2e test through the routes. Last PR of stack 3.

Gate on this branch: go build ./... pass; go vet -tags integration ./... pass; golangci-lint v2.15.0 (shared CI config, incl. unconvert) 0 new issues; make test pass; make swag no diff (regenerated docs/ committed here); go mod tidy no diff; go test -tags integration -p 1 on ./internal/api/handler/..., ./internal/service/worker/..., ./internal/service/effector/..., ./internal/service/rules/... pass.

Size

Counted: 391 lines (added + removed, tests included; docs/docs.go and docs/swagger.* excluded).

🤖 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: a2c29a8e-5cfb-4312-9750-6ffa254c053b

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

@ccf-lisa
ccf-lisa Bot added this pull request to stack #604 December 1, 2026 20:11
@ccf-lisa
ccf-lisa Bot force-pushed the effectors/26-effectors-e2e branch from 80ac338 to ab735b7 Compare December 2, 2026 12:07
ccf-lisa Bot added a commit that referenced this pull request Dec 2, 2026
Stack 3 as built (#619-#626) with counted lines, #613's count, and the
two decided follow-ups (#627 closed streams, #628 resumed repeats).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa Bot and others added 2 commits December 2, 2026 11:04
The admin sets the agent's base URL, the agent registers through the
SDK, verification makes it ready, a rule created through the API turns
failing evidence into a signed effect.apply and passing evidence into
effect.clear, and status reports and heartbeats keep the held set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follows the subject url fix on #610: an evidence subject links to
/evidence/history/{stream-uuid}, the UI's page for the stream.

@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