Repository navigation
feat(effector): registration - #613
Open
ccf-lisa[bot] wants to merge 2 commits into
Open
ccf-lisa[bot] wants to merge 2 commits into
ccf-lisa[bot] wants to merge 2 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
ccf-lisa
Bot
force-pushed
the
effectors/17-effector-registration
branch
from
December 1, 2026 18:49
2ebc4da to
bab5da9
Compare
This was referenced Dec 1, 2026
ccf-lisa
Bot
force-pushed
the
effectors/17-effector-registration
branch
from
December 2, 2026 12:07
bab5da9 to
1ef1440
Compare
This was referenced Dec 2, 2026
internal/service/effector: Service.Register stores an agent instance's effector registration (wire-interface.md, Registration): - the body is validated (action names, plugin, effect labels, rule kinds, on-clear, unique names, schemes, value patterns as RE2, target patterns using declared schemes, and params: a schema inside the supported subset, defaults that match it, locked paths it has) into field errors; - the instance is recorded in the agent instance registry (failing at the per-agent cap, unlike heartbeats), its revision bumps when the body changes, and its actions (with params schema, defaults and locks) replace the previous ones; - the agent's rule actions are re-checked: ok when a fresh instance registers the effector action and the rule action's params still pass its schema and locks, degraded otherwise; - the base URL must match the one an admin set; verification is enqueued while it is pending or was verified with another key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CheckParams treats a stored lock list that doesn't decode as "*", so a corrupt row locks every parameter instead of none (and ParamsMatch marks the rule action degraded). Tests for CheckParams and ParamsMatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/17-effector-registration
branch
from
December 2, 2026 14:45
1ef1440 to
6f3927f
Compare
This was referenced Dec 2, 2026
This was referenced Dec 2, 2026
gusfcarvalho
approved these changes
Dec 2, 2026
gusfcarvalho
left a comment
Contributor
There was a problem hiding this comment.
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 was referenced Dec 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
effector.Service.Registerstores an agent instance's effector registration (wire interface, registration; API LLD, agent-facing routes); the route comes in stack 3.ValidateRegistration, field errors): action names, plugin, effect labels, rule kinds,on-clear, unique names, scheme names, value patterns (RE2), include/exclude patterns using declared schemes, and params: a schema inside the supported subset, defaults that match it, locked paths it has (*always).agentcfg.TouchFromEffectorRegistration), failing at the per-agent cap instead of being skipped like a heartbeat; the registration revision bumps when the body changes; the instance's actions (with params schema, defaults and locks) replace its previous ones.RecheckRuleActions):okwhen a fresh instance registers the effector action and the rule action's params still pass its schema and locks (rules.CheckParams),degradedotherwise.ErrBaseURLMismatch, actions still stored); verification is enqueued (Jobs) while it is pending or was verified with another key.Why
Plan: stack 2, PR 17, split: registration here, verification next (17b).
Test evidence
validate_test.go: every validation error path, params included.registration_integration_test.go(Postgres): base URL missing / different / matching after normalisation, revision (idempotent, bumped on change), verification enqueued only when needed (and after a key rotation), invalid bodies store nothing, the instance cap; params stored (and null without); rule actions degrade when the schema or locks stop matching and recover; re-check with fresh, missing and stale registrations.agentcfg:TestTouchFromEffectorRegistration(upsert, cap).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 testpass;make swagno diff;go mod tidyno diff;go test -tags integration -p 1on./internal/service/effector/ ./internal/service/relational/agentcfg/ ./internal/service/rules/pass.Size
Counted: 845 lines.
🤖 Generated with Claude Code