Following the earlier AdminShell+CollectionCRUD rewrite (PR #14) which already deleted backend/, backend-go/, cloudformation/, helm-charts/, nginx/, sink/, wasm/, upgrade-impact/, e2e/, migration/, package.json and switched the frontend to a 184K Hanzo-first build, complete the cleanup by deleting the remaining Infisical-era residue: - docs/ (1.0G Infisical mintlify docs) - .env.example, .env.dev.example, .env.migration.example, .env.test.example (legacy Postgres/Redis envs; no Go code references them) - .eslintignore, .husky/ (TS toolchain leftovers) - CODE_OF_CONDUCT.md, CONTRIBUTING.md, SECURITY.md (Infisical repo boilerplate) Working tree drops from ~1.0G to <600K of content (1.5G total is .git/ which `git gc --aggressive --prune=now` shrinks locally; the remote keeps its history shape — anyone pulling gets the lean checkout). Build + test verification: go build ./... (4 cmd binaries: green) go test ./... -count=1 -short (all packages: ok) Kept: cmd/, pkg/, sdk/, frontend/ (AdminShell), schema/, examples/, root Go (audit.go, auth.go, consensus.go, embed.go, jwks.go, mount.go, versioning.go + tests), Dockerfile, Dockerfile.kms-fetch, Makefile, LLM.md, CLAUDE.md, DEPRECATED.md, SOVEREIGN-KMS-ARCHITECTURE.md, TFHE-KMS-ARCHITECTURE.md, LICENSE, README.md, VERSION, .github/ (8 Hanzo workflows: build, build-kms-fetch, check-fe-ts-and-lint, ci, pr-preview, release, validate-pr-title, workflow-sanity).
35 lines
1.0 KiB
Go
35 lines
1.0 KiB
Go
package kms
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/luxfi/kms/pkg/zapserver"
|
|
)
|
|
|
|
// TestWireCompatibility_OpcodesMatchLuxfi pins the canonical luxfi/kms ZAP
|
|
// opcodes so any drift in the upstream surface fails this build. The
|
|
// hanzo-kms server registers exactly these opcodes via zapserver.Register —
|
|
// see cmd/kmsd/main.go where we call zs.Register(n).
|
|
//
|
|
// The numeric values here are part of the public wire format. Any change is
|
|
// a breaking client/server compatibility break with luxfi clients, and any
|
|
// such change must land in luxfi/kms first, not here.
|
|
func TestWireCompatibility_OpcodesMatchLuxfi(t *testing.T) {
|
|
cases := []struct {
|
|
name string
|
|
got uint16
|
|
want uint16
|
|
}{
|
|
{"OpSecretGet", zapserver.OpSecretGet, 0x0040},
|
|
{"OpSecretPut", zapserver.OpSecretPut, 0x0041},
|
|
{"OpSecretList", zapserver.OpSecretList, 0x0042},
|
|
{"OpSecretDelete", zapserver.OpSecretDelete, 0x0043},
|
|
}
|
|
for _, c := range cases {
|
|
if c.got != c.want {
|
|
t.Errorf("%s opcode drifted from canonical luxfi/kms: got 0x%04X want 0x%04X",
|
|
c.name, c.got, c.want)
|
|
}
|
|
}
|
|
}
|