Skip to content

feat(effector): status reports and held set - #616

Open
ccf-lisa[bot] wants to merge 1 commit into
effectors/18-effect-deliveryfrom
effectors/19-effector-status
Open

ccf-lisa[bot] wants to merge 1 commit into
effectors/18-effect-deliveryfrom
effectors/19-effector-status

Conversation

@ccf-lisa

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

Copy link
Copy Markdown
Contributor

What

Wire interface, status and what the agent holds:

  • ReportStatus: status and message replaced, refs merged key by key (null removes), links replaced when present; a lower generation is stale (409), a higher one or an unknown status invalid (422), another agent's effect not found. A final report of the current generation (applied for finished and inactive effects; final statuses for event effects) drops the effect from the held set.
  • PoC follow-up 8 (follow-ups): a link without a rel or an https href (with a host) is dropped, the rest of the report is kept, and the stored message gets dropped N invalid links appended, instead of rejecting the whole report. docs/effectors/wire-interface.md is updated to say so.
  • ListEffects (held effects, keyset paged, by plugin and state) and GetEffect, with documents built now; both need the agent to have registered actions.
  • Heartbeat: stores the held digest, re-checks the agent's rule actions (a fresh instance recovers degraded ones), compares with the desired held set (HeldDigest, the agent's format), answers an admin's resync once, enqueues verification while pending.

Why

Plan: stack 2, PR 19.

Test evidence

  • status_test.go: the held digest against the agent's pinned vector, refs merge, report validation (links never fail it), link filtering (http, no rel, javascript, no host, bad URL, nil vs empty), the dropped-links message.
  • status_integration_test.go (Postgres): no actions, held effects only, filters, paging and bad cursors, another agent's effect; refs and links, one bad link and all bad links (status kept, message noted, links replaced), stale / future generations, unknown status, held set on final reports; heartbeat (digest, resync, admin resync once, verification, stored digest, degraded rule action recovers).

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: 634 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: afedc7da-3b22-4675-a8d3-f2537efeaf4a

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:

- ReportStatus records an agent's status report for one of its effects:
  status and message replaced, refs merged key by key (null removes),
  links replaced when present; a lower generation is stale (409), a
  higher one or an unknown status invalid (422). A link without a rel
  or an https href is dropped and the rest of the report kept, with
  "dropped N invalid links" appended to the message (PoC follow-up 8),
  instead of rejecting the whole report. A final report of the current
  generation (applied, for finished and inactive effects) drops the
  effect from the agent's held set.
- ListEffects (keyset paged, by plugin and state) and GetEffect build
  the documents of the effects the agent holds, now.
- Heartbeat stores the held digest, re-checks the agent's rule actions
  (a fresh instance recovers degraded ones), compares the digest with
  the desired held set, answers an admin's resync once, and enqueues
  verification while it is pending. HeldDigest matches the agent's
  format.

docs/effectors/wire-interface.md: links are dropped, not rejected.

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