Repository navigation
Add Signal envelope delivery lifecycle and SQLite store - #38
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the Signal plugin’s encrypted envelope delivery lifecycle by adding explicit outbox release (retry) and ack (delivered) transitions, and introduces an opt-in SQLite-backed envelope store for local persistence while maintaining ciphertext-only storage.
Changes:
- Added
step.signal_outbox_releaseandstep.signal_outbox_ackplus corresponding provider contracts/manifest updates. - Extended queue metadata with ack/release timestamps, attempt count, and last error reference; updated pipeline E2E coverage.
- Implemented an opt-in
sqlitesignal.envelope_storebackend (guarded by config + production-policy rejection) and added tests for persistence and lifecycle behavior.
Reviewed changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/pipeline/signal_e2e_test.yaml | Adds pipeline coverage for claim → release → reclaim → receive → ack lifecycle. |
| README.md | Documents new outbox lifecycle steps and sqlite envelope store behavior/constraints. |
| proto/signal.proto | Extends protobuf contracts for sqlite opt-in, metadata fields, and ack/release step messages. |
| proto/signal.pb.go | Regenerates protobuf Go bindings to reflect new messages/fields. |
| plugin.json | Bumps plugin version and registers new step types in capabilities. |
| plugin.contracts.json | Adds strict contracts for outbox ack/release steps. |
| Makefile | Updates default VERSION to 0.29.0. |
| internal/provider.go | Registers new step factories and contracts in the provider. |
| internal/provider_contracts_test.go | Updates contract assertion tests to include new step types. |
| internal/key_custody.go | Ensures service test reset closes envelope stores (notably sqlite DB handles). |
| internal/envelope_store.go | Implements outbox ack/release transitions and sqlite-backed persistence. |
| internal/envelope_store_test.go | Adds lifecycle tests and sqlite persistence/corruption/unsafe-config tests. |
| internal/envelope_steps.go | Adds step execution handlers for outbox ack and release. |
| internal/contracts/signal.proto | Mirrors protobuf contract updates for internal generated contracts. |
| go.sum | Updates module checksums for dependency changes (including sqlite driver). |
| go.mod | Adds modernc.org/sqlite dependency for sqlite backend support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+489
to
+496
| func (s *envelopeStore) close() error { | ||
| if s == nil || s.db == nil { | ||
| return nil | ||
| } | ||
| err := s.db.Close() | ||
| s.db = nil | ||
| return err | ||
| } |
Comment on lines
+94
to
+100
| case envelopeStoreBackendSQLite: | ||
| if !cfg.GetAllowSqliteBackend() { | ||
| return nil, fmt.Errorf("signal envelope store: sqlite backend requires explicit opt-in") | ||
| } | ||
| if cfg.GetStoragePath() == "" { | ||
| return nil, fmt.Errorf("signal envelope store: storage_path is required") | ||
| } |
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
Implements locked-plan plugin tasks for Signal encrypted envelope delivery lifecycle and SQLite-backed local envelope-store persistence.
step.signal_outbox_releaseandstep.signal_outbox_ackso claimed envelopes can be released for retry or acknowledged as consumed.sqlitebackend forsignal.envelope_storewith requiredallow_sqlite_backend,storage_path, and production-policy rejection.0.29.0), README, and pipeline coverage for claim/release/reclaim/receive/ack/decrypt.Locked plan
docs/plans/2026-07-05-signal-envelope-delivery-sqlite.mdVerification
go test ./internal -run 'TestEnvelopeStore.*(Ack|Release|Claim)' -count=1go test ./internal -run 'TestEnvelopeStoreSQLite|TestEnvelopeStore.*(Ack|Release|Claim)' -count=1go test ./internal -run 'TestSignalProviderDeclaresStrictPhaseOneContracts|TestPluginJSONCapabilitiesMatchRuntimeProvider|TestEnvelopeStore' -count=1go test ./... -count=1go vet ./...wfctl plugin validate-contract --for-publish --tag v0.29.0 .GOCACHE=/tmp/workflow-plugin-signal-gocache-0.29.0 make pipeline-test VERSION=0.29.0git diff --check HEAD