Skip to content

feat(agentconfig): effector block and plugin types - #598

Open
ccf-lisa[bot] wants to merge 1 commit into
effectors/06-params-validatefrom
effectors/07-agentconfig-effector
Open

ccf-lisa[bot] wants to merge 1 commit into
effectors/06-params-validatefrom
effectors/07-agentconfig-effector

Conversation

@ccf-lisa

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

Copy link
Copy Markdown
Contributor

What

pkg/agentconfig (the agent config schema the agent imports), part 1 of effector support (effector interface):

  • plugins.<p>.type: collector (the default, also "") or effector, plus the effector plugin fields reconcile_interval, targets_refresh, on_stale, apply_timeout, reconcile_timeout, max_concurrency.
  • The top-level effector block: listen, public_url, tls, stale_after, defaults.
  • Validation: effector is a locked key (O3). Overlays get O12 type checks for the new plugin fields. Validate requires the block and daemon: true when an effector plugin is enabled, checks public_url with targets.NormalizeBaseURL, TLS pairs, durations and on_stale. Effector-only fields are rejected on collectors; schedules and policies on effector plugins.
  • Classification (remote configuration): a type change (including a new effector plugin) is forbidden (plugin-type), re-enabling an effector plugin is forbidden (widens-effector), on_stale is unsafe (effector-behavior), the timings are safe (data-only).
  • Decode, clone, merge (the block always comes from the local file) and redaction (effector.public_url masked by content, in Redact and RedactDocument).
  • docs/agent-remote-config.md: the new locked key and the effector rows of the classification table.

A collector-only config encodes exactly as before (tested), so existing agents and reports are unaffected. Effector actions, targets and params come in the next PR.

Why

The agent validates and classifies its config with this package, and the API validates overlays with it. Plan: stack 1, PR 7.

Test evidence

go test -cover ./pkg/agentconfig: 97.2% of statements; every new function at 100%.

Gate on this branch: go build ./... pass; go vet -tags integration ./... pass; make lint 0 new issues (6 pre-existing on main, untouched files); make test pass; make swag no diff; go mod tidy no diff; go test -tags integration -p 1 ./internal/api/handler/ pass (agent config routes use this package).

Size

Counted: 711 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: addde019-4e6c-48c2-bb3a-5d759af2aca5

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

pkg/agentconfig: plugins.<p>.type (collector or effector), the
effector plugin fields (reconcile_interval, targets_refresh, on_stale,
apply_timeout, reconcile_timeout, max_concurrency) and the top-level
effector block (listen, public_url, tls, stale_after, defaults).

effector is a locked key. Validate checks the block and requires it,
with daemon mode, when an effector plugin is enabled; effector-only
fields are rejected on collectors. Classification: a type change or a
re-enabled effector plugin is forbidden, on_stale unsafe, the timings
safe. effector.public_url is redacted by content.

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