Skip to content

feat: add Signal public pre-key directory - #24

Merged
intel352 merged 1 commit into
mainfrom
feat/signal-public-prekey-directory
Jul 3, 2026
Merged

intel352 merged 1 commit into
mainfrom
feat/signal-public-prekey-directory

Conversation

@intel352

@intel352 intel352 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adds signal.public_prekey_directory with memory backend, TTL, production-policy rejection, and max-entry guard
  • adds step.signal_public_prekey_publish and step.signal_public_prekey_resolve strict proto contracts
  • publishes plugin metadata for v0.15.0 and adds a public-prekey pipeline validation fixture

TDD evidence

Red before implementation:

go test ./internal -run 'PublicPreKey|ProviderDeclares|PluginJSONCapabilities' -count=1\nFAIL: missing signal.public_prekey_directory / missing public pre-key functions\n```\n\nGreen after implementation:\n```\ngo test ./internal -run 'PublicPreKey|ProviderDeclares|PluginJSONCapabilities' -count=1\nok github.com/GoCodeAlone/workflow-plugin-signal/internal\n```\n\n## Verification\n- go test ./... -count=1\n- make pipeline-test\n- wfctl plugin validate-contract --for-publish --tag v0.15.0 .\n- goreleaser check\n- git diff --check\n\nTask: 2 / 5 from docs/plans/2026-07-03-signal-public-intake.md

Copilot AI review requested due to automatic review settings July 3, 2026 18:00
@intel352
intel352 merged commit a2c7cbd into main Jul 3, 2026
4 checks passed
@intel352
intel352 deleted the feat/signal-public-prekey-directory branch July 3, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
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.

2 participants