Environment variable operation policy (EvoSpikeNet)
[!NOTE] For the latest implementation status, please refer to Functional Implementation Status (Remaining Functionality).
This document defines the meaning of operationally important environment variables used in the EvoSpikeNet repository and recommends settings for each environment (CI/development/staging/production).
Purpose: - Prevent misuse of mocks/stubs - Clarify data sources (mock vs real) and prevent deceptive data from being mixed into production - Provide consistent operational procedures between CI and production
Target environment variable
EVOSPIKENET_ALLOW_STUBS
- Description: Flag to explicitly allow in-process stub/mock implementations (e.g. in-memory Zenoh stubs, CARLA mocks, etc.).
- Received values:
0|1,false|true,no|yes,off|on(case does not matter) - Default:
0(disabled) - Behavior: If
1, the code is allowed to "start successfully with mocks" when dependent libraries are not present. If0, mocks are not allowed and many integration points will fail on connection failure.
Recommended settings
- CI (unit tests):
1(for using stubs in unit tests) - Development local:
1(permitted for development efficiency) - Staging:
0(disallowing is recommended to perform verification close to actual production) - Production:
0(must be disabled)
Operation caution
- Please check the pre-deployment checklist that
EVOSPIKENET_ALLOW_STUBSis0before the production image/production deployment. - Enabling
1incorrectly in production hides the absence of dependent services and poses a significant operational risk.
EVOSPIKENET_DATA_STRICT_REAL
- Description: Flag to enforce strictness of data provenance. If
1, a component that receives data withsource_typeofmockwill throw an exception/handle it as an error. - Received values:
0|1,false|true,no|yes,off|on - Default:
0(disabled)
Recommended settings
- CI (unit test):
0(unit test uses mock data) - Development local:
0(Local development uses mocks a lot) - Staging:
1(recommended for verifying production approximation) - Production:
1(required. Prevents mock inclusion)
Operation caution
- Enabling
EVOSPIKENET_DATA_STRICT_REAL=1may cause test jobs to fail, so it is recommended to run "mock permission job" and "strict real data verification job" separately in the CI test matrix.
EVOSPIKENET_FAIL_ON_COMM_FALLBACK
- Description: Controls behavior when real Zenoh backend is not available in the communication layer.
- Received values:
0|1,false|true,no|yes,off|on - Default:
0(disabled) - Operation:
1: Disables communication fallback (SDK relay / in-memory stub) and stops exception with fail-closed.0: Allow fallback under the condition ofEVOSPIKENET_ALLOW_STUBS.
Recommended settings
- CI (Unit Test):
0 - Development local:
0 - Staging:
1 - Production:
1
EVOSPIKENET_ALLOW_COMPAT_FALLBACKS
- Description: Allow synthetic fallback responses for the compatibility API (
/datasets,/images,/audio,/state,/training). - Received values:
0|1,false|true,no|yes,off|on - Default:
1in development environment,0when determiningproduction/staging. - Behavior: If
0, return503andcompat_fallback_disabled.
Recommended settings
- CI (Unit Test):
1 - Development local:
1 - Staging:
0 - Production:
0
EVOSPIKENET_ALLOW_MEDIA_PLACEHOLDERS
- Description: Allow placeholder response when video analysis cannot generate a transcript/narrative.
- Received values:
0|1,false|true,no|yes,off|on - Default:
1in development environment,0when determiningproduction/staging. - Operation:
1: Returns a transcript/narrative synthetic response.0: The job is terminated as failed (fail-closed).
Recommended settings
- CI (Unit Test):
1 - Development local:
1 - Staging:
0 - Production:
0
EVOSPIKENET_ALLOW_DUMMY_SERVICES
- Description: Allows an alternative dummy service implementation to be activated on import failure.
- Received values:
0|1,false|true,no|yes,off|on - Default:
1in development environment,0when determiningproduction/staging. - Behavior: If
0, the dummy implementation does not return a synthetic response and raises an exception.
Recommended settings
- CI (Unit Test):
1 - Development local:
1 - Staging:
0 - Production:
0
Configuration example (.env)```bash
Example: For production
EVOSPIKENET_ALLOW_STUBS=0 EVOSPIKENET_DATA_STRICT_REAL=1 EVOSPIKENET_FAIL_ON_COMM_FALLBACK=1 EVOSPIKENET_ALLOW_COMPAT_FALLBACKS=0 EVOSPIKENET_ALLOW_MEDIA_PLACEHOLDERS=0 EVOSPIKENET_ALLOW_DUMMY_SERVICES=0
Example: CI/Development
EVOSPIKENET_ALLOW_STUBS=1 EVOSPIKENET_DATA_STRICT_REAL=0 EVOSPIKENET_FAIL_ON_COMM_FALLBACK=0 EVOSPIKENET_ALLOW_COMPAT_FALLBACKS=1 EVOSPIKENET_ALLOW_MEDIA_PLACEHOLDERS=1 EVOSPIKENET_ALLOW_DUMMY_SERVICES=1
## Configuration example with Docker Compose```yaml
services:
api:
environment:
- EVOSPIKENET_ALLOW_STUBS=0
- EVOSPIKENET_DATA_STRICT_REAL=1
- EVOSPIKENET_FAIL_ON_COMM_FALLBACK=1
- EVOSPIKENET_ALLOW_COMPAT_FALLBACKS=0
- EVOSPIKENET_ALLOW_MEDIA_PLACEHOLDERS=0
- EVOSPIKENET_ALLOW_DUMMY_SERVICES=0
Pre-deployment checklist (recommended)
- Before production deployment:
- Check that
EVOSPIKENET_ALLOW_STUBSis0 - Check that
EVOSPIKENET_DATA_STRICT_REALis1 - Check that
EVOSPIKENET_FAIL_ON_COMM_FALLBACKis1 - Check that
EVOSPIKENET_ALLOW_COMPAT_FALLBACKSis0 - Check that
EVOSPIKENET_ALLOW_MEDIA_PLACEHOLDERSis0 - Check that
EVOSPIKENET_ALLOW_DUMMY_SERVICESis0 - Run smoke tests to ensure successful connections to external dependencies (DB, API, CARLA, etc.)
Related code (see implementation)
future_apps/smart_city_infrastructure/src/urban_data_api.py— UsesEVOSPIKENET_DATA_STRICT_REALfuture_apps/climate_change_prediction/src/climate_data_api.py— UsesEVOSPIKENET_DATA_STRICT_REALfuture_apps/brain_machine_interface/src/services/distributed_connector.py— UsesEVOSPIKENET_ALLOW_STUBS(allow in-memory stub)EvoSpikeNet-Core/evospikenet/communication.py— UsesEVOSPIKENET_FAIL_ON_COMM_FALLBACKEvoSpikeNet-Core/evospikenet/api_modules/future_apps_compat_api.py— UsesEVOSPIKENET_ALLOW_COMPAT_FALLBACKSEvoSpikeNet-Core/evospikenet/video_scene_service.py— UsesEVOSPIKENET_ALLOW_MEDIA_PLACEHOLDERSEvoSpikeNet-Core/evospikenet/services/__init__.py— UsesEVOSPIKENET_ALLOW_DUMMY_SERVICES
Audit method
- See how settings are used across repositories:
grep -R "EVOSPIKENET_ALLOW_STUBS\|EVOSPIKENET_DATA_STRICT_REAL\|EVOSPIKENET_FAIL_ON_COMM_FALLBACK\|EVOSPIKENET_ALLOW_COMPAT_FALLBACKS\|EVOSPIKENET_ALLOW_MEDIA_PLACEHOLDERS\|EVOSPIKENET_ALLOW_DUMMY_SERVICES" -n || true
In closing: This policy is a minimum guideline to improve security and operational health. Tailor it to your organization's operational rules and CI/CD policies.