Skip to content

feat(signal): add transport handoff primitives - #40

Merged
intel352 merged 4 commits into
mainfrom
signal-transport-handoff-plugin
Jul 6, 2026
Merged

intel352 merged 4 commits into
mainfrom
signal-transport-handoff-plugin

Conversation

@intel352

@intel352 intel352 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add typed Signal transport envelope, outbox handoff, and transport admit contracts
  • implement provider-neutral encrypted payload handoff with checksum and optional production HMAC
  • implement admit validation for schema, checksum, HMAC, expiry, route refs, and recipient before inbox write
  • bump plugin metadata/docs to v0.31.0

Verification

  • go test ./... -count=1
  • go vet ./...
  • make build VERSION=0.31.0
  • GOCACHE= make pipeline-test VERSION=0.31.0
  • wfctl plugin validate-contract --for-publish --tag v0.31.0 .
  • HMAC regression check: temporarily bypassing admit HMAC validation makes wrong-secret and missing-HMAC negative tests fail

Copilot AI review requested due to automatic review settings July 6, 2026 01:17
@intel352
intel352 merged commit 77118c7 into main Jul 6, 2026
4 checks passed

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

Adds new Signal transport “handoff” and “admit” primitives to support provider-neutral transport of encrypted envelopes (with checksum + optional HMAC), wiring them into the plugin’s step registry/contracts and bumping the plugin version/docs to v0.31.0.

Changes:

  • Introduce step.signal_outbox_handoff to claim an outbox record and emit a transport JSON/proto envelope with checksum + optional HMAC.
  • Introduce step.signal_transport_admit to validate schema/route/expiry/checksum/HMAC and write ciphertext into the recipient inbox.
  • Update plugin metadata/contracts/provider wiring and add unit tests for positive + negative validation paths.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Documents the new handoff/admit steps and their lifecycle semantics.
plugin.json Bumps plugin version to 0.31.0 and updates release artifact URLs + step list.
plugin.contracts.json Registers the new step contracts in the published contracts list.
Makefile Updates default VERSION to 0.31.0.
internal/provider.go Registers new step types and factories and adds them to the contract registry.
internal/provider_contracts_test.go Extends contract declaration tests to cover the new steps.
internal/envelope_transport.go Implements outbox handoff payload packing and transport admit validation + inbox write.
internal/envelope_transport_test.go Adds coverage for handoff/admit behavior, including negative integrity/route/expiry tests.
internal/contracts/signal.proto Adds new message/step config/input/output contract types for transport handoff/admit.
internal/contracts/signal.pb.go Regenerated protobuf bindings for the updated contracts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +80 to +83
integritySecret, err := resolveTransportIntegritySecret(
firstNonEmpty(in.GetIntegritySecretEnv(), cfg.GetIntegritySecretEnv()),
in.GetProductionPolicy() || cfg.GetProductionPolicy(),
)
Comment on lines +142 to +145
integritySecret, err := resolveTransportIntegritySecret(
firstNonEmpty(in.GetIntegritySecretEnv(), cfg.GetIntegritySecretEnv()),
in.GetProductionPolicy() || cfg.GetProductionPolicy(),
)
Comment on lines +369 to +374
mac := hmac.New(sha256.New, integritySecret)
_, _ = mac.Write(unsignedJSON)
expected := hex.EncodeToString(mac.Sum(nil))
if !hmac.Equal([]byte(payload.PayloadMAC), []byte(expected)) {
return fmt.Errorf("signal transport admit: payload_mac mismatch")
}
Comment on lines +623 to +634
message OutboxHandoffInput {
string store_ref = 1;
string envelope_ref = 2;
string claimant_ref = 3;
string lease_id = 4;
string transport_ref = 5;
string subject_ref = 6;
string delivery_id = 7;
int64 expires_at_unix = 8;
int64 requested_at_unix = 9;
string integrity_secret_env = 10;
bool production_policy = 11;
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