mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
Renames: - LUX_ALLOW_FAKE_TFHE_FOR_TESTING_ONLY -> ALLOW_FAKE_TFHE_FOR_TESTING_ONLY (test opt-in for the placeholder UNSAFE TFHE primitive) - LUX_MPC_CONFIG -> MPC_CONFIG (docs/compose env) - LUX_MPC_MODE -> MODE (Viper config key 'mode' override) The brand prefix was noise; the env var names speak for themselves. README/LLM/config docs updated to reflect that Viper has no env prefix configured (AutomaticEnv reads uppercased config keys directly), so the prior 'LUX_MPC_*' documentation was inaccurate. Note: file format magic in pkg/kvstore/zap_backup.go remains "LUX_MPC_BACKUP" — that's an on-disk format identifier, not an env var. Renaming it would invalidate every existing backup file. BREAKING: external callers/operators must update their environment variable names. Per CLAUDE.md no-backwards-compatibility rule, the old forms are removed.
30 lines
1.1 KiB
Go
30 lines
1.1 KiB
Go
// Copyright (c) 2026, Lux Industries Inc.
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
//
|
|
// TestMain opts the policy-package tests that touch
|
|
// luxfi/threshold/protocols/tfhe (RealThresholdDecryptor wires its
|
|
// PartialDecrypter / ShareAggregator) into the placeholder UNSAFE primitive
|
|
// by setting ALLOW_FAKE_TFHE_FOR_TESTING_ONLY=1 for the duration of the
|
|
// test binary. Production paths in luxfi/threshold/protocols/tfhe are
|
|
// guarded by guardUnsafe() and panic when this env var is unset (by design).
|
|
//
|
|
// These tests verify dispatcher fan-out and aggregator wiring shape only —
|
|
// they do NOT verify any threshold security property because the
|
|
// underlying scheme has none. Real-threshold wiring (luxfi/lattice
|
|
// Shamir/LWE) is tracked as a separate multi-week task per
|
|
// lps/LP-137-TFHE-REAL-THRESHOLD-SPEC.md §2.6.
|
|
|
|
package policy
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
if err := os.Setenv("ALLOW_FAKE_TFHE_FOR_TESTING_ONLY", "1"); err != nil {
|
|
panic("policy test setup: cannot set ALLOW_FAKE_TFHE_FOR_TESTING_ONLY: " + err.Error())
|
|
}
|
|
os.Exit(m.Run())
|
|
}
|