Skip to content

feat(agentconfig): effector action params - #600

Open
ccf-lisa[bot] wants to merge 1 commit into
effectors/08-agentconfig-actionsfrom
effectors/08b-agentconfig-params
Open

ccf-lisa[bot] wants to merge 1 commit into
effectors/08-agentconfig-actionsfrom
effectors/08b-agentconfig-params

Conversation

@ccf-lisa

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

Copy link
Copy Markdown
Contributor

What

pkg/agentconfig: plugins.<p>.actions.<a>.params, the operator's control over an action's rule parameters (action parameters, operator controls). This is PoC follow-up 6 (PoC follow-ups): the PoC's agentconfig.Action had no Params, so the agent smuggled them through the action config as config._params. With this field the agent can drop that workaround.

params:
  defaults: {layout: short}     # over the plugin schema's defaults
  locked: [layout]              # rules can't set these; "*" locks every parameter
  • Action.Params *ActionParams (defaults, locked); omitted when unset, so existing configs encode as before.

  • Validation (shape only: only the agent knows the plugin's schema and checks defaults and paths against it): overlays get strict checks (object, known members, defaults an object, locked an array); locked entries are * or dotted paths of non-empty segments, without duplicates; ${env:} placeholders aren't allowed in params (O9).

  • Classification in the overlay check:

    Change Class
    a params.locked entry added safe, reduces-scope
    a params.locked entry removed, or a params.defaults value changed unsafe, action-params (new reason)
  • Decode keeps exact numbers in defaults, mis-cased defaults/locked keys are dropped, parameter names are kept as written, clones are deep. Params are not redacted: they are rule-facing and the agent registers them with the API.

  • docs/agent-remote-config.md: the two params rows.

Why

Rule actions carry params validated against the plugin's schema and the operator's locks; the operator's side needs a real config field the API and the agent agree on. Plan: stack 1, PR 8 (split as 8a and this PR, 8b).

Decision for reviewers

The design doesn't say how a remote overlay changing params is classified. I chose: no params change is forbidden (params never widen the actions, effects or targets the operator allowed), tightening a lock is safe, and loosening a lock or changing a default is unsafe (apply_all only), like on_clear. The PoC classified _params as an ordinary action config key (unsafe unless listed in overridable_action_config_flags); a dedicated reason keeps overridable_action_config_flags about config keys only.

Test evidence

go test -cover ./pkg/agentconfig: 97.4% of statements; the new params functions 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; integration: ./internal/api/handler/ and ./internal/service/relational/agentcfg/ pass.

Size

Counted: 234 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: 7d041294-4ff7-486d-a8aa-306cefe252a4

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>.actions.<a>.params, the operator's
defaults for the rule parameters a plugin declares and the parameters
rules can't set (locked: dotted paths or "*"). PoC follow-up 6: the
agent no longer needs to carry them as config._params.

Overlays are checked strictly; locked entries must be "*" or dotted
paths without duplicates. Classification: adding a lock is safe
(reduces-scope); removing a lock or changing a default is unsafe
(action-params). Defaults keep exact numbers and parameter names as
written; params are not redacted (they are rule-facing).

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