Repository navigation
feat(effector): target identities and pattern grammar - #595
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
|
This was referenced Dec 1, 2026
ccf-lisa
Bot
force-pushed
the
effectors/04-targets
branch
from
December 1, 2026 18:49
a35be6b to
72262c9
Compare
pkg/effector/targets: target identities (scheme:value), target patterns (scheme:glob) with include/exclude allowlists, scheme value-pattern checks and effector base-URL normalisation, shared by the API and the agent (docs/effectors/effector-interface.md, Target pattern grammar). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CompileValuePattern compiled only the anchored wrapper, so an expression that balances inside it (a)|(.*) escaped the anchors and matched any value. The expression is now compiled alone first and rejected when it isn't valid RE2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/04-targets
branch
from
December 2, 2026 12:07
72262c9 to
1eb43f3
Compare
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 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
New public package
pkg/effector/targets, the target grammar shared by the API and the agent (effector interface, target pattern grammar):ParseIdentity:scheme:valueidentities (scheme[a-z][a-z0-9-]*, printable value).ParsePattern/Pattern.Match:scheme:globpatterns with*,**,?and\\escapes, matched by a linear dynamic program so a hostile pattern can't backtrack exponentially.Matcher: include/exclude allowlists,Schemes()for the API's scheme check.CompileValuePattern: a scheme's RE2value-pattern, anchored to the whole value.NormalizeBaseURL: the canonical effector base URL used to compare the admin-set URL with the one an instance registers.Ported unchanged from the PoC. Standard library only; nothing in the API calls it yet (the rule engine and registration routes come in later stacks).
Why
Both sides validate targets with the same code, so the API never accepts a target the agent then refuses. Plan: stack 1, PR 4.
Test evidence
go test -cover ./pkg/effector/targets: 98.1% of statements. Table tests follow the grammar doc's examples.Gate on this branch:
go build ./...pass;go vet -tags integration ./...pass;make lint0 new issues (6 pre-existing onmain, untouched files);make testpass;make swagno diff;go mod tidyno diff. No integration tests in this package.Size
Counted: 684 lines.
🤖 Generated with Claude Code