Skip to content

Verification and evidence ​

Run the checks appropriate to the changed surface. A passing fixture is evidence for its stated scope, not production conformance. Architecture and its runtime and fixture supplements define those boundaries. CI requires all local gates below before an image is published. Publishing an image produces an immutable commit/digest receipt and does not deploy it.

Current check matrix ​

Use Go 1.24.2. The Redis-enabled suite needs an isolated, disposable writable Redis; its tests use separate namespaces. Do not point failure-injection tests at production.

CheckCommand / prerequisiteEvidence
Native dependency pinpython3 scripts/verify_dependency.pyExact consolidated source/tree checksums and provenance; no edit to pinned snapshot.
Standalone protocol contractpython3 scripts/verify_control_schema.pySchema and generated-binding hashes recorded in this repository.
Reproducible protocol generationnpm ci --prefix tools/protocol, python3 scripts/verify_control_schema.py --regenerate, npm test --prefix tools/protocol; pinned compiler toolsLocally owned schema, Go/TypeScript output and shared strict JSON fixtures, without an external checkout.
Private retained codecpython3 scripts/verify_storage_schema.py; PROTOC=/path/to/protoc-3.21.12 python3 scripts/gen-state-storage.py --check with protoc-gen-go 1.36.12Separate storage-only schema, stable field numbers and generated typed adapters; clean temporary-copy reproduction.
Formatting / vettest -z "$(gofmt -l cmd internal)" and go vet ./...This module's formatting/static checks; separate from upstream baseline warnings.
Service, state, control, capture and fixture testsSIPBRIDGE_STATE_TEST_REDIS=127.0.0.1:6379 go test -race ./...Includes real-client Redis integration, native CAS/lease/command admission, service subprocess/socket tests and explicitly historical reducer fixtures.
Redis/Sentinel restartCommand below; local redis-server executableTests own all processes they stop; run-ID change, total loss, retained promotion and verified TLS/scoped credentials.
Pinned native reducerssh scripts/test-native.shNative branch regressions in a disposable copy, including generated TLS certificates; pinned tree stays immutable.
Independent TLS wire fixturego build -race -o bin/sipbridge-fixture ./cmd/sipbridge-fixture then python3 test/run.py; Python/OpenSSLReal two-ingress TLS/library wire behavior and source/binary hashes. Separate resident stdio fixture, not service Redis execution.
Service binarygo build -o bin/sipbridge ./cmd/sipbridgeService builds; image CI additionally verifies version/receipt/digest.
Two-legged call capacityCall capacity testVerifies 512 simultaneous two-legged TLS calls per instance with Redis and a test controller.

Memory state, shared backend contracts and default-memory service startup run without Redis. The shared contract suite runs both adapters when the disposable endpoint is set. Native completion/CANCEL and public BYE write-reservation scenarios also run against both stores. These are local contract/service checks, not production qualification. Shared-state deployment tests must explicitly select Redis.

Without SIPBRIDGE_STATE_TEST_REDIS, state/engine/startup integration tests may skip. An unconfigured go test -race ./... is useful locally but is not the Redis-enabled qualification gate. CI supplies volatile Redis with noeviction and explicitly sets the variable. Tests with native 1/1 leases/admission provide current service-path evidence; historical 1/7 assertions remain separately named test-only fixture coverage, never an alternative service setting.

sh
go test -race -tags=redis_restart ./internal/state \
  -run '^TestState(StandaloneRedisRestartTotalLoss|SentinelDiscoveryAuthority|RetainedAuthoritySurvivesRealSentinelPromotion|ScopedTLSAuthoritySurvivesRealSentinelPromotion)$' \
  -count=1 -timeout=180s

CI builds the tagged test binary and runs it inside the pinned Redis image. These tests never restart the shared integration Redis endpoint. Detailed process barriers, physical evidence and test limits are in Redis process qualification.

External acceptance ​

Application integration tests should cover real controller/service mTLS interoperability, two-SIP/two-controller routing and complete media flows. README records the service binary, image and schema-receipt entry points. Verify schema and generated consumers together; checking only one side's hashes does not prove interoperability.

Synthetic controllers cannot qualify account mutation, trusted-directory policy, media/CDR, handset/carrier behavior, full version skew, shared load or SIP-core drain. Redis/Sentinel fault tests make no exactly-once or rollback-survival guarantee.

Performance and load ​

Call capacity test ​

Run the optional test:call-capacity job on a merge request, or use a disposable local Redis with this command.

sh
SIPBRIDGE_CAPACITY_WIRE=1 SIPBRIDGE_STATE_TEST_REDIS=127.0.0.1:6379 \
  go test ./cmd/sipbridge -run '^TestBinaryRedisTwoLeggedCallCapacity$' -v

The test holds 512 two-legged TLS calls on one sipbridge instance, then holds 512 on each of two instances sharing Redis. It checks that a new caller gets 503 when the limit for waiting requests is full, while a call already accepted can still open its outbound leg. It also replaces and hangs up calls. The log shows how much Redis memory the call records use and how much room is still reserved for future writes.

Use separate tests for production traffic mixes, latency under load, CPU use and long-running calls.

Storage benchmark ​

The private codec benchmark compares complete storage codec layers on synthetic records.

bash
go test ./internal/engine -run '^$' -bench '^BenchmarkRetainedRecordCodec$' -benchtime=300ms -count=3

Rerun the current gates for any changed build; earlier test totals, artifacts or dated observations are not present readiness. Environment-opt-in upstream network suites are never implied by other passing gates.

sipbridge holds SIP connections and runs the protocol; your application decides what happens on each call.