Skip to content

Add Signal envelope delivery lifecycle and SQLite store - #38

Merged
intel352 merged 1 commit into
mainfrom
signal-envelope-delivery-sqlite-plugin
Jul 5, 2026
Merged

intel352 merged 1 commit into
mainfrom
signal-envelope-delivery-sqlite-plugin

Conversation

@intel352

@intel352 intel352 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements locked-plan plugin tasks for Signal encrypted envelope delivery lifecycle and SQLite-backed local envelope-store persistence.

  • Adds step.signal_outbox_release and step.signal_outbox_ack so claimed envelopes can be released for retry or acknowledged as consumed.
  • Extends queue metadata with ack/release timestamps, attempt count, and last error reference.
  • Adds opt-in sqlite backend for signal.envelope_store with required allow_sqlite_backend, storage_path, and production-policy rejection.
  • Updates provider contracts, plugin manifest/version (0.29.0), README, and pipeline coverage for claim/release/reclaim/receive/ack/decrypt.

Locked plan

  • Workspace plan: docs/plans/2026-07-05-signal-envelope-delivery-sqlite.md
  • PR group: plugin lifecycle + sqlite

Verification

  • go test ./internal -run 'TestEnvelopeStore.*(Ack|Release|Claim)' -count=1
  • go test ./internal -run 'TestEnvelopeStoreSQLite|TestEnvelopeStore.*(Ack|Release|Claim)' -count=1
  • go test ./internal -run 'TestSignalProviderDeclaresStrictPhaseOneContracts|TestPluginJSONCapabilitiesMatchRuntimeProvider|TestEnvelopeStore' -count=1
  • go test ./... -count=1
  • go 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.0
  • git diff --check HEAD

Copilot AI review requested due to automatic review settings July 5, 2026 22:29
@intel352
intel352 merged commit 2d4f110 into main Jul 5, 2026
4 checks passed
@intel352
intel352 deleted the signal-envelope-delivery-sqlite-plugin branch July 5, 2026 22:31

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 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_release and step.signal_outbox_ack plus 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 sqlite signal.envelope_store backend (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")
}
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