refactor: rename customer-facing surface from "protect" to "encryption"#7
Open
calvinbrewer wants to merge 1 commit into
Open
refactor: rename customer-facing surface from "protect" to "encryption"#7calvinbrewer wants to merge 1 commit into
calvinbrewer wants to merge 1 commit into
Conversation
Brand change: this is the CipherStash Stack's Go Encryption SDK, no longer "Protect". Renames every customer-facing use of "protect": - Module path: github.com/cipherstash/protectgo -> github.com/cipherstash/goencryption - Go package: pkg/protect (package protect) -> pkg/encryption (package encryption) so the public API reads encryption.NewClient, encryption.Encrypt, etc. - Error namespace: "protect: ..." -> "encryption: ..." across all messages and sentinels - Renamed protect.go/protect_test.go -> encryption.go/encryption_test.go - Docs, examples, and CI paths updated to the new package location The FFI internals are intentionally left unchanged, per scope: the Rust crate (protect-ffi-c), library (protect_ffi / libprotect_ffi_*.a), C ABI symbols (protect_new_client, ...), the generated header (protect_ffi.h), and the cgo bridge (protectgoGetToken) are implementation details users never see. The GitHub repo must be renamed to `goencryption` for `go get` to resolve the new module path. Verified: gofmt clean, go build/test green, and a live encrypt/decrypt round trip against ZeroKMS under the new import path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Brand alignment: this is the CipherStash Stack's Go Encryption SDK — not "Protect" anymore. This PR renames every customer-facing use of
protecttoencryption, and intentionally leaves the FFI internals unchanged (per agreed scope).Note
Stacked on
feat/client-0.40-eql-v3(PR #6) so the diff is a clean, mechanical rename. Base retargets tomainautomatically when #6 merges. Review #6 first.What changed (customer-facing)
github.com/cipherstash/protectgogithub.com/cipherstash/goencryptionpkg/protectpkg/encryptionpackage protectpackage encryptionprotect.NewClient(...)encryption.NewClient(...)"protect: ...""encryption: ..."(all messages + sentinels)protect.go,protect_test.goencryption.go,encryption_test.goDocs (README, DEVELOPMENT, CONTRIBUTE), the example, and the CI copy/test paths were updated to match.
What was deliberately NOT renamed (FFI internals)
These are implementation details users never import or call, so they keep the
protectname to avoid a rebuild-all-binaries + four-way-filename-sync churn for zero user-visible benefit:protect-ffi-cand libraryprotect_ffi/libprotect_ffi_*.aprotect_new_client,protect_encrypt, …) and the generated headerprotect_ffi.hprotectgoGetTokenand shimsprotectNewClient*build.rsand the CI workflow were updated only where they reference the package directory path (nowpkg/encryption/), not the library names.Guardrails applied during the rename
protect.+ uppercase (all Go exported identifiers), so the license badge URL@cipherstash/protect.svgand the FFI symbols (protect_,protectgo…) were never touched.protectremains (module path, package selector, error namespace, doc paths); FFI internals confirmed intact (crate name, 8 C symbols in the header, 6 static libs with original names, cgo linkage).Verification
gofmtclean;go build ./...andgo test ./...green under the new module path.encryption.NewClient— model, bulk, query, andIsEncryptedflows all pass.Follow-up required (outside this PR)
The GitHub repo must be renamed to
goencryptionforgo get github.com/cipherstash/goencryption/pkg/encryptionto resolve. GitHub 301-redirects the oldprotectgoURL, so existing clones keep working. I left this as a manual step since it's an org-level action — say the word and I'll do it viagh repo rename.🤖 Generated with Claude Code