Repository navigation
feat: add Signal public pre-key directory - #24
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “public pre-key directory” feature to the Signal Workflow plugin, enabling hosts to publish and unauthenticated callers to resolve public pre-key bundles via new strict-typed module/step contracts.
Changes:
- Added
signal.public_prekey_directory(memory backend) plus publish/resolve step implementations and tests. - Extended provider registration, contract registry assertions, and plugin manifest capabilities for the new module/steps.
- Added a pipeline validation fixture and bumped published metadata to
v0.15.0(README,plugin.json,Makefile, pipeline validation script).
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/pipelines/signal-public-prekeys.yaml | New fixture validating publish/resolve contracts via wfctl validate. |
| scripts/run-pipeline-tests.sh | Adds validation of the new pipeline fixture to CI-style pipeline checks. |
| README.md | Documents new step/module types and intended usage/constraints. |
| plugin.json | Bumps plugin version and advertises new step/module capabilities. |
| Makefile | Bumps VERSION to 0.15.0. |
| internal/public_prekey_directory.go | Implements the directory module plus publish/resolve step logic and redaction. |
| internal/public_prekey_directory_test.go | Adds unit tests covering publish/resolve, denials, TTL, max_entries, and redaction. |
| internal/provider.go | Registers the new module and steps; adds contracts to the registry. |
| internal/provider_contracts_test.go | Ensures the provider and plugin.json capabilities stay in sync for the new contracts. |
| internal/contracts/signal.proto | Defines new proto messages for directory + publish/resolve contracts. |
| internal/contracts/signal.pb.go | Regenerated Go protobuf bindings reflecting the new contract types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+62
to
+64
| if strings.ToLower(cfg.GetPolicyMode()) == "production" { | ||
| return fmt.Errorf("signal public pre-key directory: production policy requires a durable backend") | ||
| } |
Comment on lines
+136
to
+142
| directory.mu.Lock() | ||
| if _, ok := directory.entries[intakeRef]; !ok && directory.maxEntries > 0 && uint32(len(directory.entries)) >= directory.maxEntries { | ||
| directory.mu.Unlock() | ||
| return nil, fmt.Errorf("signal public pre-key publish: directory %q max_entries reached", directory.ref) | ||
| } | ||
| directory.entries[intakeRef] = entry | ||
| directory.mu.Unlock() |
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.
Summary
signal.public_prekey_directorywith memory backend, TTL, production-policy rejection, and max-entry guardstep.signal_public_prekey_publishandstep.signal_public_prekey_resolvestrict proto contractsTDD evidence
Red before implementation: