refactor: remove unnecessary RUNTIME_ENV_PATH environment variable

Simplifies deployment configuration by removing the RUNTIME_ENV_PATH
environment variable, which is no longer needed for API mode.

Changes:
- Remove RUNTIME_ENV_PATH from docker-compose.yml
- Remove RUNTIME_ENV_PATH from .env.example
- Update CLAUDE.md to reflect API-managed runtime configs
- Update README.md to remove RUNTIME_ENV_PATH from config examples
- Update CHANGELOG.md with this simplification

Technical details:
- API mode dynamically creates isolated runtime config files via
  RuntimeConfigManager (data/runtime_env_{job_id}_{model}_{date}.json)
- tools/general_tools.py already handles missing RUNTIME_ENV_PATH
  gracefully, returning empty dict and warning on writes
- No functional impact - all tests pass without this variable set
- Reduces configuration complexity for new deployments

Breaking change: None - variable was vestigial from batch mode era
This commit is contained in:
2025-10-31 14:37:00 -04:00
parent c17b3db29d
commit 849e7bffa2
5 changed files with 14 additions and 15 deletions

View File

@@ -13,9 +13,6 @@ OPENAI_API_KEY=your_openai_key_here # https://platform.openai.com/api-keys
ALPHAADVANTAGE_API_KEY=your_alphavantage_key_here # https://www.alphavantage.co/support/#api-key
JINA_API_KEY=your_jina_key_here # https://jina.ai/
# System Configuration (Docker default paths)
RUNTIME_ENV_PATH=/app/data/runtime_env.json
# MCP Service Host Ports (exposed on host machine)
# Container always uses 8000-8003 internally
# Change these if you need different ports on your host

View File

@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- **Simplified Configuration** - Removed `RUNTIME_ENV_PATH` environment variable
- No longer needed in docker-compose.yml or .env.example
- API mode dynamically manages runtime configs via `RuntimeConfigManager`
- Legacy tools gracefully handle missing `RUNTIME_ENV_PATH`
- Reduces configuration complexity for new deployments
## [0.3.0] - 2025-10-31
### Added - API Service Transformation

View File

@@ -20,7 +20,6 @@ cp .env.example .env
# Edit .env and set:
# - OPENAI_API_BASE, OPENAI_API_KEY
# - ALPHAADVANTAGE_API_KEY, JINA_API_KEY
# - RUNTIME_ENV_PATH (recommended: absolute path to runtime_env.json)
# - MCP service ports (default: 8000-8003)
# - AGENT_MAX_STEP (default: 30)
```
@@ -163,8 +162,10 @@ bash main.sh
3. JSON config file
4. Default values (lowest)
**Runtime configuration** (`runtime_env.json` at `RUNTIME_ENV_PATH`):
- Dynamic state: `TODAY_DATE`, `SIGNATURE`, `IF_TRADE`
**Runtime configuration** (API mode only):
- Dynamically created per model-day execution via `RuntimeConfigManager`
- Isolated config files prevent concurrent execution conflicts
- Contains: `TODAY_DATE`, `SIGNATURE`, `IF_TRADE`, `JOB_ID`
- Written by `write_config_value()`, read by `get_config_value()`
### Agent System
@@ -319,9 +320,9 @@ When modifying agent behavior or adding tools:
- Check Alpha Vantage API key is valid
**Runtime Config Issues:**
- Set `RUNTIME_ENV_PATH` to absolute path in `.env`
- Ensure directory is writable
- File gets created automatically on first run
- Runtime configs are automatically managed by the API
- Configs are created per model-day execution in `data/` directory
- Ensure `data/` directory is writable
**Agent Doesn't Stop Trading:**
- Agent must output `<FINISH_SIGNAL>` within `max_steps`

View File

@@ -291,9 +291,6 @@ OPENAI_API_KEY=your_openai_key
ALPHAADVANTAGE_API_KEY=your_alpha_vantage_key
JINA_API_KEY=your_jina_api_key
# ⚙️ System Configuration
RUNTIME_ENV_PATH=./runtime_env.json # Recommended to use absolute path
# 🌐 Service Port Configuration
MATH_HTTP_PORT=8000
SEARCH_HTTP_PORT=8001

View File

@@ -18,9 +18,6 @@ services:
- ALPHAADVANTAGE_API_KEY=${ALPHAADVANTAGE_API_KEY}
- JINA_API_KEY=${JINA_API_KEY}
# System Configuration
- RUNTIME_ENV_PATH=/app/data/runtime_env.json
# MCP Service Ports (fixed internally)
- MATH_HTTP_PORT=8000
- SEARCH_HTTP_PORT=8001