Repository navigation
feat(signal): add transport handoff primitives - #40
Merged
Merged
Conversation
There was a problem hiding this comment.
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_handoffto claim an outbox record and emit a transport JSON/proto envelope with checksum + optional HMAC. - Introduce
step.signal_transport_admitto 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; |
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
Verification