Skip to content

feat(agentconfig): effector actions and targets - #599

Open
ccf-lisa[bot] wants to merge 3 commits into
effectors/07-agentconfig-effectorfrom
effectors/08-agentconfig-actions
Open

ccf-lisa[bot] wants to merge 3 commits into
effectors/07-agentconfig-effectorfrom
effectors/08-agentconfig-actions

Conversation

@ccf-lisa

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

Copy link
Copy Markdown
Contributor

What

pkg/agentconfig, part 2 of effector support: effector actions (effector interface, effector actions).

  • plugins.<p>.actions.<name>: description, effect (a lowercase slug), targets.include / exclude (patterns in the pkg/effector/targets grammar), rule_kinds, on_clear, on_stale, targets_refresh, publish_targets, config.
  • Validation: action names match ^[a-z0-9][a-z0-9-]{0,62}$ and are unique across the agent; an effector plugin needs at least one action; include is required (targets are an allowlist); every pattern parses; vocabularies for rule_kinds, on_clear, on_stale; overlays are checked strictly (unknown fields, types).
  • Classification (remote configuration): anything that widens an effector is forbidden in every mode (a new action, an added include, a removed exclude, a changed effect, publish_targets on, an added rule kind or cleared rule_kinds); narrowing is safe; on_clear / on_stale are unsafe; action config keys are safe only when listed in the new remote_config.overridable_action_config_flags (<plugin>:<action>:<key>, matched segment by segment, so an existing "*" in overridable_config_flags never opens action config).
  • ${env:NAME} placeholders resolve in action config strings at any depth (and are allowed only there and in plugin config); action config is redacted with the plugin config rules, in Redact and RedactDocument; free-form numbers stay exact.
  • docs/agent-remote-config.md: the action rows of the classification table and the new remote_config setting. docs/swagger.* regenerated: the reported remote_config gains overridable_action_config_flags.

Ported from the PoC. Action params (PoC follow-up 6) come in the next PR, to keep this one under the size limit.

Why

The operator's action definitions are what the agent registers with the API and what limits what rules can do; the API validates overlays with the same code. Plan: stack 1, PR 8. Split as 8a (this) and 8b (params).

Test evidence

go test -cover ./pkg/agentconfig: 97.1% of statements (new action code 95–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; integration: ./internal/api/handler/ and ./internal/service/relational/agentcfg/ pass.

CI's shared golangci-lint config (with unconvert) flagged one needless conversion in Action.clone; fixed in 09951a8 and the branches above rebased. The whole stack passes that config locally (0 new issues).

Size

Counted: 995 lines (the lint fix is a one-line change in place).

🤖 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: 3ad04517-69e0-4d18-8af0-50b8a61593c6

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 Bot and others added 3 commits December 2, 2026 08:34
pkg/agentconfig: plugins.<p>.actions.<name> (description, effect,
targets include/exclude in the pkg/effector/targets grammar, rule_kinds,
on_clear, on_stale, targets_refresh, publish_targets, config) and
remote_config.overridable_action_config_flags.

Action names are unique across the agent and an effector plugin needs at
least one action. Overlays that widen an effector (a new action, an
added include, a removed exclude, a changed effect, publish_targets on,
an added rule kind) are forbidden in every mode; narrowing is safe;
on_clear and on_stale are unsafe; action config keys are safe only
when listed in overridable_action_config_flags (<plugin>:<action>:<key>,
matched segment by segment). ${env:NAME} placeholders resolve in action
config strings at any depth, and action config is redacted like plugin
config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI's shared golangci-lint config enables unconvert.

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