Repository navigation
feat: add file public prekey directory - #25
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a durable (opt-in) file backend for the Signal public pre-key directory module, including contract/schema updates, persistence/reload behavior, and version bumping for the upcoming release.
Changes:
- Introduces
filebackend support forsignal.public_prekey_directorywithstorage_pathandallow_file_backendcontract fields, plus load/persist logic. - Adds tests and a pipeline fixture covering file-backed publish/resolve and snapshot corruption handling.
- Bumps release metadata/versioning to
v0.16.0across plugin metadata and build tooling.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| testdata/pipelines/signal-public-prekeys.yaml | Adds a file-backed public pre-key directory module and a file-backed publish/resolve pipeline fixture. |
| README.md | Documents the new explicit file backend requirements and production policy behavior. |
| plugin.json | Updates plugin version and release artifact URLs to v0.16.0. |
| Makefile | Bumps VERSION to 0.16.0 for builds and pipeline tests. |
| internal/public_prekey_directory.go | Implements file backend: schema/checksum snapshot persistence, reload on init, and config validation. |
| internal/public_prekey_directory_test.go | Adds persistence/reload, unsafe config, corruption rejection, and temp-file behavior tests for the file backend. |
| internal/contracts/signal.proto | Extends PublicPreKeyDirectoryConfig with storage_path and allow_file_backend. |
| internal/contracts/signal.pb.go | Regenerates Go bindings for the updated contract. |
Files not reviewed (1)
- internal/contracts/signal.pb.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+359
to
+366
| tmp := d.storagePath + ".tmp" | ||
| if err := os.WriteFile(tmp, raw, 0o600); err != nil { | ||
| return fmt.Errorf("write public directory temp file: %w", err) | ||
| } | ||
| if err := os.Rename(tmp, d.storagePath); err != nil { | ||
| return fmt.Errorf("replace public directory file: %w", err) | ||
| } | ||
| return nil |
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
filebackend tosignal.public_prekey_directorywithstorage_pathandallow_file_backendcontract fields.v0.16.0and validates a file-backed public pre-key pipeline fixture.Design
See workspace:
docs/plans/2026-07-03-signal-public-directory-file-design.mdImplementation Plan
See workspace:
docs/plans/2026-07-03-signal-public-directory-file.mdScope Manifest
PR Count: 5
Tasks: 5
Status: Locked 2026-07-03T19:30:23Z
This PR row:
2 | Add Signal public directory file backend and release v0.16.0 | Task 2 | feat/signal-public-directory-fileVerification
go test ./internal -run 'PublicPreKey|ProviderDeclares|PluginJSONCapabilities' -count=1go test ./... -count=1make pipeline-testwfctl plugin validate-contract --for-publish --tag v0.16.0 .goreleaser checkgit diff --check HEAD~1..HEADRegression Proof
With fix reverted:
go test ./internal -run 'PublicPreKey.*File|PublicPreKeyDirectoryRejectsCorrupt' -count=1failed to build becauseStoragePathandAllowFileBackendwere unknown fields onPublicPreKeyDirectoryConfig.With fix restored:
go test ./internal -run 'PublicPreKey.*File|PublicPreKeyDirectoryRejectsCorrupt' -count=1passed.Doc-reconciliation: clean
Runtime launch validation: not triggered; plugin contract/code release path validated by tests and contract checks.
Secret hygiene: checked; no credential literals included.
Generated by the implementing agent.