Repository navigation
feat(effects): effect document and signing - #608
Open
ccf-lisa[bot] wants to merge 1 commit into
Open
ccf-lisa[bot] wants to merge 1 commit into
ccf-lisa[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
ccf-lisa
Bot
force-pushed
the
effectors/14-effect-document
branch
from
December 1, 2026 18:49
9116ed9 to
fc8a85f
Compare
ccf-lisa
Bot
force-pushed
the
effectors/14-effect-document
branch
from
December 2, 2026 12:07
fc8a85f to
51c80bc
Compare
This was referenced Dec 2, 2026
internal/service/effects: the effect document (wire-interface.md) built
from an effect, its rule and rule action (max_repeats, params as {}
when unset), its entered subjects with the documents the rule saw, the
current generation's entered and left subjects, the agent's last status
report, subject links to the UI's evidence pages and the effect's UI
link at /admin/rules/{rule}/effects/{effect}; its webhook envelope
(effect.apply, or effect.clear for cleared, disabled and removed);
LoadWebhook builds it from the database, also for a soft-deleted rule.
internal/service/effector: the delivery signer: Ed25519 keys from
CCF_EFFECTOR_SIGNING_KEY(_NEXT) (PKCS#8 PEM), kid, Standard Webhooks v1a
signatures over {id}.{timestamp}.{body}, the signed headers, and the
published delivery keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/14-effect-document
branch
from
December 2, 2026 14:45
51c80bc to
e567235
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
Effect document (wire interface, the effect document), new package
internal/service/effects:Document(in): id, generation, transition, state (pending shown as inactive), repeat count, rule, action (effector-action, registeredeffect,max-repeats,paramsas{}when the rule set none), target split into scheme and value, entered subjects with the documents the rule saw and links to the UI's evidence pages, the current generation'sentered/left, the agent's last report (applied: status, message, links, refs), and the UI link{CCF_WEB_BASE_URL}/admin/rules/{rule}/effects/{effect}(the plan's/admin/ruleslink).Webhook(in): the envelope,effect.apply, oreffect.clearfor cleared, disabled and removed.LoadWebhook/LoadDocumentInput: build it from the database now, also for a soft-deleted rule and action.Signing, new package
internal/service/effector(wire interface, headers and signing): Ed25519 keys fromCCF_EFFECTOR_SIGNING_KEYandCCF_EFFECTOR_SIGNING_KEY_NEXT(PKCS#8 PEM),kid(first 16 hex chars of SHA-256 of the public key), Standard Webhooksv1asignatures over{id}.{timestamp}.{body}, the signed headers (with the protocol version), and the published delivery keys (current, and next during a rotation).Why
Plan: stack 2, PR 14.
Test evidence
document_test.go: every document field, params, the/admin/ruleslink, applied block, the clear envelope, event types per transition.load_integration_test.go(Postgres): the document from rule, action (params, max repeats), registration, entered subjects (pending ones left out) in entry order with their documents and titles, the current generation's changes; a deleted rule and action still build aseffect.clear; not found.signer_test.go: signatures verify with the agent's algorithm (and fail when the id, timestamp or body change, or with only the next key), kid and key encoding, loading keys from files (missing, invalid, wrong key type, bad next key), no signer → no keys.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/effects/ ./internal/service/effector/pass.Size
Counted: 782 lines.
🤖 Generated with Claude Code