Commit 99ea99d
Hanzo AI
fix(api,policy): restore Server.approval + bump tfhe to v1.6.4 (#234)
Two more 4f14931-pattern orphans surfaced after the merge of
kms-nonce-bind-2026-04-28: server.go lost the `approval` field that
handlers_approval.go references, and pkg/policy still references the
canonical-tfhe surface that wasn't in luxfi/threshold v1.6.0.
Three fixes, all small:
pkg/api/server.go
- Add `approval *ApprovalRegistry` field. SetApproval / handler call
sites unchanged. Optional — when nil, /v1/approval/* returns 503.
- Add `tieredWallets wallet.Registry` field, mirror of the same
pattern (handlers_wallet.go references s.tieredWallets via
SetTieredWalletRegistry / tieredWalletsRegistry()).
go.mod / go.sum
- Bump github.com/luxfi/threshold v1.6.0 → v1.6.4. v1.6.4 ships the
committee.go surface (FHECiphertext, FHEThresholdShare, KeyShare,
ShareAggregator, PartialDecrypter, StatusOK, ...) that
pkg/policy/fhe_threshold_decryptor.go canonical-imports.
- Refresh edwards25519 sums (re-tagged upstream).
pkg/policy/fhe_threshold_decryptor_test.go
- TestMain sets LUX_ALLOW_FAKE_TFHE_FOR_TESTING_ONLY=1. v1.6.4 added
a guardUnsafe() panic on every fake-threshold entry point so the
real-threshold cutover is unmissable in production. Stub party
tests are by definition the fake path; opt-in is correct.
Verify:
go build ./pkg/api/... ./pkg/policy/... PASS
go vet ./pkg/api/... ./pkg/policy/... PASS
CGO_ENABLED=1 go test -tags json1 ./pkg/api/ ./pkg/policy/ -short -race
PASS (4.0s + 1.4s)
Out of scope (#222 stage 1, separate orphan):
cc/attest/sev.go and pkg/attestation/composite.go reference
go-sev-guest and luxfi/lattice/v7/types — those need their own fix.
Refs: #208 (airgap), #227 (buildHSMSignerConfig), #234.1 parent 900c7c8 commit 99ea99d
5 files changed
Lines changed: 33 additions & 67 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
| 373 | + | |
| 374 | + | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | | - | |
| 399 | + | |
| 400 | + | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| |||
0 commit comments