Documentation Fix Report¶
Date: 2026-04-01 Based on: VALIDATION-REPORT.md (static analysis + devcontainer runtime validation)
How to Read This Report¶
Each fix has: - File: which doc to edit - Line(s): where the issue is - Current: what's there now (abbreviated) - Fix: exact replacement text or instruction - Severity: BUG (breaks user) / STALE (outdated) / GAP (missing info) / MISLEADING
Fixes are grouped by file. Within each file, fixes are ordered by line number.
quickstarts/01-your-first-backtest.md¶
Fix 1: Replace non-existent tradai strategy backtest command¶
- Lines 28-33
- Severity: BUG
- Current:
tradai strategy backtest --strategy YourStrategy --start 2024-01-01 --end 2024-01-31 --symbol BTC/USDT:USDT --experiment "my-first-backtest" - Fix: Replace with: Also update surrounding text to describe
tradai backtest quick(uses backend by default, add--localfor local execution).
Fix 2: Add prerequisite note for tradai data¶
- Line 54
- Severity: GAP
- Fix: Add note after the
tradai data synccommand:
quickstarts/02-create-new-strategy.md¶
Fix 3: Remove strategies/ prefix from output path¶
- Line 19
- Severity: MISLEADING
- Current:
strategies/mymomentstrategy/ - Fix: Change to
mymomentstrategy/(the command outputs to CWD). Add note:
Fix 4: Update generated directory tree to match actual output¶
- Lines 19-33
- Severity: GAP
- Fix: Replace directory tree with actual structure:
mymomentstrategy/ ├── MyMomentumStrategy.py # Root-level strategy (Freqtrade discovery) ├── Dockerfile # Container build ├── README.md ├── .pre-commit-config.yaml ├── pyproject.toml ├── tradai.yaml # Strategy configuration ├── configs/ │ ├── backtest.json # Backtest configuration │ └── freqai_training.json # FreqAI training config ├── src/mymomentumstrategy/ │ ├── __init__.py │ ├── strategy.py # Main strategy implementation │ ├── constants.py │ ├── entities.py │ └── exceptions.py └── tests/ ├── __init__.py ├── conftest.py └── test_strategy.py
Fix 5: Add TRADAI_ROOT prerequisite¶
- Line 9 (before the command)
- Severity: GAP
- Fix: Add:
Fix 6: Fix test path¶
- Line 71
- Severity: MISLEADING
- Current:
uv run pytest strategies/mymomentstrategy/tests/ -v - Fix:
uv run pytest mymomentstrategy/tests/ -v
quickstarts/03-collect-market-data.md¶
Fix 7: Fix exchange JSON field name¶
- Lines 19-25
- Severity: BUG
- Current:
"type": "futures" - Fix: Change to
"trading_mode": "futures"
Fix 8: Fix ArcticDB library name (3 occurrences)¶
- Line 30: Change
DATA_COLLECTION_ARCTIC_LIBRARY="futures"toDATA_COLLECTION_ARCTIC_LIBRARY="ohlcv" - Line 164: Change
Library: "futures"toLibrary: "ohlcv"in the diagram - Line 181: Change default value from
futurestoohlcvin the config table - Severity: STALE
developer-guides/01-setup.md¶
Fix 9: Fix just setup output messages¶
- Lines 42-46
- Severity: STALE
- Fix: Replace the entire output block with actual output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚀 TradAI Setup ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📍 Step 1/4: Installing Python 3.11... 📦 Step 2/4: Syncing all workspace packages + dev tools... 🔧 Step 3/4: Installing pre-commit hooks... 📋 Step 4/4: Checking environment files... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅ Setup complete! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Fix 10: Fix just doctor expected output¶
- Lines 59-78
- Severity: STALE
- Fix: Replace entire output block with actual Rich table output: Add note: "Service checks (backend, data-collection, etc.) show
TradAI Doctor ┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Check ┃ Status ┃ Message ┃ ┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ Docker │ ✔ │ Docker version 28.x │ │ Docker Compose │ ✔ │ Docker Compose version v2.x │ │ Python │ ✔ │ Python 3.11.x │ │ UV │ ✔ │ uv 0.x.x │ │ Just │ ✔ │ just 1.x.x │ │ .env file │ ✔ │ Found │ │ docker-compose.yaml │ ✔ │ Valid │ │ pyproject.toml │ ✔ │ Found │ │ backend │ ✔ │ HTTP 200 │ │ data-collection │ ✔ │ HTTP 200 │ │ strategy-service │ ✔ │ HTTP 200 │ │ mlflow │ ✔ │ HTTP 200 │ │ Git │ ✔ │ Clean │ │ Pre-commit hooks │ ✔ │ Installed │ │ Dependencies │ ✔ │ uv.lock and .venv present │ └─────────────────────┴────────┴─────────────────────────────────┘! Not runningif Docker services are not started yet."
Fix 11: Fix .env exchange config description¶
- Lines 143-147
- Severity: BUG
- Current: Shows
BINANCE_API_KEYandBINANCE_SECRET_KEY - Fix: Replace with actual exchange config pattern:
Fix 12: Fix .env URL description¶
- Line 149
- Severity: MISLEADING
- Current: Claims
BACKEND_URLandTRADAI_UI_URLare for Docker container-to-container communication - Fix: Clarify that
.envURLs are for CLI/host usage. Docker internal URLs are indocker-compose.yaml.
Fix 13: Add core.hooksPath troubleshooting¶
- After line 173 (Troubleshooting section)
- Severity: GAP
- Fix: Add: ```
developer-guides/docker-setup.md¶
Fix 14: Add .env.docker to Quick Start¶
- Lines 24-26
- Severity: BUG
- Current: Only copies per-service
.env.examplefiles - Fix: Add before
just up: Remove per-servicecpcommands (they are not required --just setuphandles.envand.env.dockerautomatically).
Fix 15: Fix Postgres port¶
- Line 59
- Severity: MISLEADING
- Current:
postgres | 5432 - Fix: Change to
postgres | 5433 (host) → 5432 (container)and add note: "Postgres is not exposed to host in base compose. Port 5433 mapping is indocker-compose.override.yaml(dev only)."
Fix 16: Fix MLflow env var names¶
- Lines 79-84
- Severity: MISLEADING
- Current:
MLFLOW_TRACKING_URI=http://mlflow:5000 - Fix: Replace with actual var names from docker-compose.yaml:
Fix 17: Update Dockerfile example¶
- Lines 107-120
- Severity: STALE
- Fix: Replace with a simplified version of the actual multi-stage build pattern:
# Stage 1: Build wheel FROM python:3.11-slim AS builder COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv WORKDIR /build COPY . . RUN uv build --wheel # Stage 2: Runtime FROM python:3.11-slim AS runtime COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv COPY --from=builder /build/dist/*.whl /wheels/ RUN uv pip install --system /wheels/*.whl CMD ["backend", "serve"]
Fix 18: Fix dev volume mounts section¶
- Lines 141-144
- Severity: MISLEADING
- Fix: Replace with note: "Hot-reloading is not done via Docker volume mounts. For development, use
uv runlocally instead of Docker. Seedocker-compose.override.yamlfor dev-specific mounts (user_data, strategies, AWS credentials)."
Fix 19: Clarify volume profiles¶
- Lines 149-155
- Severity: GAP
- Fix: Split into base and optional:
Fix 20: Fix LocalStack config location¶
- Lines 183-189
- Severity: STALE
- Fix: Change text to say these vars are set in
docker-compose.override.yamlenvironment blocks, not inservices/data-collection/.env.
Fix 21: Fix port override env var¶
- Line 299
- Severity: WRONG-CMD
- Current:
BACKEND_PORT=8080 docker compose up backend - Fix:
HOST_BACKEND_PORT=8080 docker compose up backend
developer-guides/documentation.md¶
Fix 22: Fix dead nav link¶
- mkdocs.yml (not documentation.md itself)
- Severity: BUG
- Fix: Either create
docs/templates/dryrun-signoff-checklist.mdor remove the nav entry from mkdocs.yml.
Fix 23: Clarify deployment targets¶
- Lines 12, 229-233
- Severity: GAP
- Fix: Add clarification:
> **Note:** `just docs-deploy` uses `mkdocs gh-deploy` (GitHub Pages) and is **not the production deployment**. Production docs are deployed automatically to **Cloudflare Pages** via CI (`.github/workflows/docs.yml` using `cloudflare/pages-action@v1`). Use `just docs-deploy` only for preview/testing.
Fix 24: Add service DESIGN.md symlinks to table¶
- Lines 37-42
- Severity: GAP
- Fix: Add row to "Symlinked Content" table:
Fix 25: Add workflow file to trigger paths¶
- Lines 220-227
- Severity: GAP
- Fix: Add
.github/workflows/docs.ymlto the trigger paths list.
developer-guides/02-create-strategy.md¶
Fix 26: Fix generated structure tree¶
- Lines 99-121
- Severity: BUG
- Fix: Move
tradai.yamlfromconfigs/tradai.yamlto root. Add missing files:Dockerfile,README.md,.pre-commit-config.yaml,MyStrategyName.py(root-level),configs/freqai_training.json,tests/__init__.py,src/.../exceptions.py.
Fix 27: Fix TA library to talib¶
- Lines 188-198
- Severity: MISLEADING
- Fix: Replace
import pandas_ta as tawithimport talib. Changeta.ema()totalib.EMA(),ta.rsi()totalib.RSI(). The project standard istalib(TA-Lib). Add note:
Fix 28: Fix tradai strategy lint syntax¶
- Line 286 and line 405
- Severity: BUG
- Current:
tradai strategy lint MyMomentumStrategy/tradai strategy lint NAME - Fix:
tradai strategy lint ./my_momentum_strategy//tradai strategy lint PATH
Fix 29: Fix test assertion¶
- Line 335
- Severity: BUG
- Current:
assert metadata.category.value == "momentum" - Fix:
assert metadata.category == "momentum"
developer-guides/03-develop.md¶
Fix 30: Add TA library clarification note¶
- Near line 12
- Severity: MISLEADING
- Fix: Add at the top of the indicator section:
developer-guides/04-backtest.md¶
Fix 31: Replace non-existent tradai strategy backtest¶
- Lines 93-98
- Severity: WRONG-CMD
- Current:
tradai strategy backtest --strategy MyStrategy --start ... --end ... - Fix: Replace with:
developer-guides/05-validate.md¶
Fix 32: Fix SanityCheckResult usage example¶
- Lines 367-382
- Severity: MISLEADING (not a bug -- mixin works via
warningsattr) - Fix: Update the example to show constructing
BacktestMetricsproperly:
Fix 33: Fix CIBacktestGate example¶
- Lines 384-392
- Severity: MISLEADING
- Fix: Show constructing
CIBacktestThresholdsbefore passing toCIBacktestGate:
developer-guides/06-optimize.md¶
Fix 34: Fix freqtrade install recommendation¶
- Lines 401-405
- Severity: MISLEADING
- Current:
uv pip install freqtrade - Fix:
just setuporuv sync --all-packages
developer-guides/strategy-lifecycle.md¶
Fix 35: Fix just test usage¶
- Lines 143-151
- Severity: WRONG-CMD
- Current:
just test momentum-strategy/just test momentum-strategy -k "test_metadata" - Fix:
Fix 36: Fix just lint usage¶
- Lines 190-191
- Severity: WRONG-CMD
- Current:
just lint momentum-strategy - Fix:
Fix 37: Remove non-existent just recipes¶
- Lines 205, 211-213
- Severity: WRONG-CMD
- Current:
just backtest-smoke momentum-strategy/just backtest-full momentum-strategy - Fix: Replace with:
Fix 38: Fix tradai strategy register signature¶
- Line 280
- Severity: BUG
- Current:
tradai strategy register MomentumStrategy --backtest-run-id ... --docker-image-uri ... - Fix:
tradai strategy register ./momentum-strategy --env dev --count 1
Fix 39: Fix tradai strategy promote to set-version¶
- Line 360
- Severity: WRONG-CMD
- Current:
tradai strategy promote MomentumStrategy --version 2 - Fix:
tradai strategy set-version MomentumStrategy 2 --stage Production
Fix 40: Fix tradai strategy rollback to deploy rollback¶
- Line 460
- Severity: WRONG-CMD
- Current:
tradai strategy rollback MomentumStrategy --version 1 - Fix:
tradai deploy rollback MomentumStrategy --env dev
strategy-templates.md¶
Fix 41: Add strategy service prerequisite note¶
- Line 315
- Severity: MISLEADING
- Fix: Add note: "> Requires strategy service to be running (
just up)."
Fix 42: Add note about --structure option¶
- Line 334
- Severity: GAP
- Fix: Change "Use
simplestructure first" to: "Thesimplevsadvancedstructure is chosen viatradai strategy wizard(interactive) or direct cookiecutter invocation."
developer-guides/07-deploy.md¶
Fix 43: Document missing CLI options¶
- Line 31
- Severity: GAP
- Fix: Add a complete options table:
| Option | Description | |--------|-------------| | `--mode` / `-m` | Operating mode: `live` or `dry-run` [default: live] | | `--exchange-secret` | AWS Secrets Manager secret name for exchange credentials | | `--skip-tests` | Skip pre-deploy tests | | `--skip-checks` | Skip all pre-deploy checks | | `--skip-live-checks` | Skip live deployment validation gates | | `--skip-build` | Skip Docker build (use existing image) | | `--dry-run` | Show what would be deployed | | `--force` / `-f` | Force deploy without confirmation |
developer-guides/08-pulumi-deployment.md¶
Fix 44: Fix DynamoDB table count¶
- Line 142
- Severity: STALE
- Current: "8 DynamoDB tables"
- Fix: "12 DynamoDB tables"
Fix 45: Fix ECR repository count¶
- Line 143
- Severity: STALE
- Current: "12 ECR repositories"
- Fix: "24 ECR repositories (6 service + 18 lambda)"
Fix 46: Fix staging RDS instance size¶
- Line 114
- Severity: STALE
- Current: "t4g.small" for staging
- Fix: "db.t4g.micro" for dev/staging, "db.t4g.small" for prod only
developer-guides/pulumi-modules.md¶
Fix 47: Fix Lambda count and classification¶
- Line 47
- Severity: STALE
- Current: "18 container-image Lambdas"
- Fix: "17 container-image Lambdas (compute stack) + 1 inline runtime Lambda (foundation stack:
update-nat-routes)"
Fix 48: Fix update-nat-routes classification¶
- Line 297
- Severity: MISLEADING
- Fix: Move
update-nat-routesout of the compute stack Lambda list. Add a separate note: "update-nat-routesis an inline runtime Lambda in the foundation stack (infra/foundation/modules/nat_instance.py), not a container-image Lambda."
Fix 49: Fix staging RDS size¶
- Line 364
- Severity: STALE
- Same fix as Fix 46:
db.t4g.microfor non-prod.
developer-guides/strategy-cicd.md¶
Fix 50: Add docs-freshness.yml to workflows table¶
- Line 196
- Severity: GAP
- Fix: Add row:
| docs-freshness.yml | Documentation freshness checks | schedule |
developer-guides/production-checklist.md¶
Fix 51: Fix bare Pulumi commands¶
- Lines 147, 150, 153, 189
- Severity: WRONG-CMD
- Current:
cd infra && pulumi preview/pulumi up/pulumi stack output - Fix: Replace with justfile recipes: Or if specific stacks needed:
Fix 52: Clarify secrets injection¶
- Line 77
- Severity: MISLEADING
- Fix: Change "No secrets in environment variables" to "Secrets are injected from AWS Secrets Manager into container environment variables at runtime -- never stored as plaintext in config files or
.env."
developer-guides/performance-tuning.md¶
Fix 53: Fix tradai data sync flag syntax¶
- Line 18
- Severity: GAP
- Current:
tradai data sync --symbols BTC/USDT:USDT --timeframe 1h --days 365 - Fix:
tradai data sync BTC/USDT:USDT --timeframe 1h --days 365(symbols are positional arguments, not--symbolsflag)
Fix 54: Fix parallel backtest example¶
- Line 68
- Severity: GAP
- Current:
tradai backtest --strategy {} - Fix:
tradai backtest quick {} --local(strategy is a positional arg)
Fix 55: Fix ArcticAdapter.append() reference¶
- Line 108
- Severity: BUG
- Current:
adapter.append(new_data, symbol) - Fix:
adapter.save(new_data, symbols, latest_query_date)-- use the actualsave()method signature.
Fix 56: Fix ArcticAdapter.save() signature¶
- Line 114
- Severity: BUG
- Current:
adapter.save(data, symbols, datetime.now(UTC), dedup=True) - Fix:
adapter.save(data, symbols, datetime.now(UTC), timeframe="1h")-- there is nodedupparameter. Deduplication is handled internally via upsert semantics.
Fix 57: Remove fastapi-cache example¶
- Lines 125-131
- Severity: STALE
- Fix: Remove the
fastapi-cachecode block entirely, or replace with a note: "Caching is not currently implemented. Consider addingfastapi-cacheif response caching is needed." Better: remove entirely since this is not implemented.
Fix 58: Remove SQLALCHEMY pool env vars¶
- Lines 139-143
- Severity: STALE
- Fix: Remove the
SQLALCHEMY_POOL_SIZE,SQLALCHEMY_MAX_OVERFLOW,SQLALCHEMY_POOL_TIMEOUTsection. These env vars are not used.
Fix 59: Remove tradai benchmark command¶
- Lines 370-378
- Severity: WRONG-CMD
- Fix: Remove the
tradai benchmarksection. Replace with note about usingpytest-benchmarkfor performance testing:
contributing.md¶
Fix 60: Fix cd after git clone¶
- Lines 19-21
- Severity: BUG
- Current:
git clone https://github.com/tradai-bot/tradai.gitthencd tradai-uv - Fix: Change to
cd tradai(the clone creates atradaidirectory matching the repo name)
Fix 61: Fix Python version spec¶
- Line 13
- Severity: MISLEADING
- Current: "Python 3.11+ (required)"
- Fix: "Python 3.11 (required, strictly 3.11.x -- 3.12+ is not supported)"
Fix 62: Fix raw pytest commands¶
- Lines 188-189
- Severity: MISLEADING
- Current:
uv run pytest -m unit/uv run pytest -m integration - Fix: Replace with
justcommands:
Fix 63: Complete test markers table¶
- Lines 195-199
- Severity: GAP
- Fix: Replace 3-marker table with full list:
| Marker | Purpose | |--------|---------| | `unit` | Fast, isolated unit tests | | `integration` | Tests requiring external services | | `slow` | Long-running tests (requires `RUN_SLOW_TESTS=1`) | | `smoke` | Quick sanity checks | | `financial` | Financial calculation accuracy | | `backtest_validation` | Backtest result validation | | `e2e` | End-to-end workflow tests | | `contract` | API contract tests | | `security` | Security-related tests | | `data_quality` | Data integrity tests | | `resilience` | Failure/recovery tests | | `concurrency` | Thread/async safety tests | | `regression` | Bug regression tests | | `performance` | Performance benchmark tests |
Fix 64: Fix DateRange import¶
- Lines 304-314
- Severity: BUG
- Current:
from tradai.common.entities import DateRange, ExchangeConfig - Fix:
from tradai.common.entities import ExchangeConfig(removeDateRange). IfDateRangeis needed in the example, use:from tradai.data.core.entities import DateRange
Fix 65: Deduplicate "Session Management" sections¶
- Lines 397-431
- Severity: GAP
- Fix: Remove the duplicate "Session Management" subsection (keep one, delete the other).
Fix 66: Fix Background Task Management code language¶
- Lines 379-393
- Severity: MISLEADING
- Fix: Change the code block language from
pythontotextorpseudocode. Add note: "These are OpenCode-specific functions, not standard Python."
Cross-Cutting Fix: Strategy Repo Coupling¶
Problem¶
By design, strategies live in a separate repository (tradai-strategies), not inside tradai-uv:
tradai/ # Platform repo (this repo)
tradai-strategies/ # Strategy repo (separate)
└── strategies/
├── pascal-strategy/
├── stochrsi-strategy/
└── ...
But 13 docs use strategies/NAME/ paths as if they exist inside the platform repo. This misleads new developers into thinking strategies belong here.
The platform justfile does have a test-strategy recipe that references strategies/NAME, but this is meant to be used when strategies are symlinked or copied into the workspace for testing -- not the normal development flow.
Affected Docs and Fixes¶
Each occurrence should either: - (A) Clarify the path is inside tradai-strategies repo with a note - (B) Use ./my-strategy/ (relative to CWD, applicable after tradai strategy new) - (C) Use --strategy-dir ../tradai-strategies flag where available
quickstarts/02-create-new-strategy.md¶
- Line 19:
strategies/mymomentstrategy/→mymomentstrategy/(Fix B -- output oftradai strategy newgoes to CWD) - Line 71:
uv run pytest strategies/mymomentstrategy/tests/→cd mymomentstrategy && uv run pytest tests/ -v(Fix B)
developer-guides/02-create-strategy.md¶
- Line 360:
just test-package strategies/my_momentum_strategy→ Add note: "If developing in thetradai-strategiesrepo, usejust test my-momentum-strategyfrom that repo. For standalone strategies created viatradai strategy new, usecd my_momentum_strategy && uv run pytest." (Fix A) - Line 363:
uv run pytest strategies/my_momentum_strategy/tests/→cd my_momentum_strategy && uv run pytest tests/ -v(Fix B)
developer-guides/03-develop.md¶
- Lines 163, 169:
strategies/my_strategy/strategy.py:45in lint output examples → Change tomy_strategy/strategy.py:45(Fix B -- lint output shows relative path from CWD) - Line 200:
just test-package strategies/my_strategy→ Add callout:
developer-guides/04-backtest.md¶
- Line 297:
code strategies/momentum_v2/src/momentum_v2/strategy.py→ Add context: "In thetradai-strategiesrepo:" before the command.
developer-guides/05-validate.md¶
- Lines 203, 206, 225-229, 235:
./strategies/my-strategy/→./my-strategy/(Fix B -- thetradai strategy checkcommand takes any path). Add note at top of section: - Lines 258, 261, 264: Lint output paths
strategies/my_strategy/strategy.py→my_strategy/strategy.py(Fix B)
developer-guides/06-optimize.md¶
- Line 251:
strategies/momentum-v2/tradai.yaml→ Add prefix: "Intradai-strategiesrepo:"
developer-guides/07-deploy.md¶
- Lines 9, 12, 15:
./strategies/my-strategy→./my-strategy(Fix B). Add note:
developer-guides/strategy-lifecycle.md¶
- All
strategies/filesystem refs already addressed by other fixes (promote/rollback/register commands). No additional coupling beyond the API URL paths (which are correct).
developer-guides/strategy-cicd.md¶
- Lines 305, 324, 340, 392, 482: These
strategies/**paths are in GitHub Actions YAML describing thetradai-strategiesCI pipeline, not the platform repo. This is CORRECT -- add a callout at the top of that section:
strategy-templates.md¶
- Lines 23, 328:
just test-package strategies/NAME→ Change to:
developer-guides/05-e2e-backtest-aws.md¶
- Lines 112-113, 125: These reference strategy paths in the context of Docker builds. These are CORRECT for the e2e workflow (building from
tradai-strategies). Add a clarifying note: "These paths refer to thetradai-strategiesrepository."
developer-guides/strategy-repo.md¶
- Line 80:
strategies/my-strategy/pyproject.toml-- CORRECT (this doc is about the strategy repo). No fix needed.
Summary¶
| Category | Count | Action |
|---|---|---|
| Wrong path (should be CWD-relative) | 14 | Change strategies/NAME/ to ./NAME/ or NAME/ |
| Needs "in tradai-strategies" callout | 8 | Add note clarifying which repo |
| Already correct (strategy-repo, e2e, cicd) | 6 | Just add clarifying note |
Architecture + Design Doc Fixes¶
index.md (Home)¶
Fix 67: Fix just setup description¶
- Line 125
- Severity: MISLEADING
- Current: "Install Python 3.11, UV, deps, pre-commit hooks"
- Fix: "Install Python 3.11, deps, pre-commit hooks" (UV must already be installed)
architecture/overview.md¶
Fix 68: Fix ALB routing diagram¶
- Lines 12-15
- Severity: MISLEADING
- Current: Mermaid diagram shows
ALB --> Strategy["Strategy Service"]andALB --> DataCol["Data Collection"] - Fix: Change to
Backend --> StrategyandBackend --> DataCol. Both services have emptyALB_PATH_PATTERNS-- they are internal-only via Service Discovery. The detailed diagram in02-ARCHITECTURE-OVERVIEW.mdalready shows this correctly.
architecture/03-VPC-NETWORKING.md¶
Fix 69: Fix VPC endpoint count¶
- Line 5
- Severity: STALE
- Current: "9 VPC endpoints"
- Fix: "11 VPC endpoints (2 gateway + 9 interface)"
architecture/06-STEP-FUNCTIONS.md¶
Fix 70: Fix cross-reference section number¶
- Line 12
- Severity: BUG
- Current: "see 05-SERVICES.md Section 6"
- Fix: "see 05-SERVICES.md Section 4" (Section 4 is Backtest Execution; Section 6 is Docker Compose)
architecture/07-COST-ANALYSIS.md¶
Fix 71: Fix VPC endpoint cost in TL;DR¶
- Lines 10, 157-158
- Severity: MISLEADING
- Current: "add $28 for 4 interface endpoints"
- Fix: "add ~$65.70 for 9 interface endpoints" (matching the body in Optimization 2 section which correctly lists 9 endpoints)
architecture/09-PULUMI-CODE.md¶
Fix 72: Fix AWS_PROFILE guidance¶
- Lines 428-429
- Severity: STALE
- Current: Says
infra/.envshould containAWS_PROFILE=tradai - Fix: Change to: "AWS profile is set via Pulumi config (
pulumi config set aws:profile tradai), not as an environment variable. Seeinfra/.env.examplefor required variables."
architecture/10-CANONICAL-CONFIG.md¶
Fix 73: Complete Service Discovery table¶
- Lines 125-131
- Severity: GAP
- Current: Lists only 3 services (backend-api, data-collection, mlflow)
- Fix: Add all services that have SD enabled. At minimum add:
strategy-service(port 8003),live-trading(port 8004),dry-run-trading(port 8005).
Fix 74: Fix update-nat-routes Lambda timeout¶
- Line 379
- Severity: BUG
- Current: Timeout listed as
30s - Fix: Change to
120s(pernat_instance.pytimeout=120)
architecture/11-LIVE-TRADING.md¶
Fix 75: Fix health check example¶
- Line 755
- Severity: MISLEADING
- Fix: Change
curl -f http://localhost:8004/api/v1/health || exit 1topython -c "import httpx; httpx.get('http://localhost:8004/api/v1/health').raise_for_status()"to match ECS health check pattern (Alpine images lack curl). Or add note that this section is aspirational.
architecture/13-DATA-FLOW-ARCHITECTURE.md¶
Fix 76: Fix class name conflation¶
- Line 66
- Severity: MISLEADING
- Fix: Clarify that
BacktestJobSubmitteris the Protocol with implementations (LocalBacktestJobSubmitter,SQSBacktestJobSubmitter,ECSBacktestJobSubmitter), andExecutorStrategyis a separate pattern (LocalExecutorStrategy,ECSExecutorStrategy, etc.) inExecutorFactory. These are two distinct abstractions.
Fix 77: Fix data collection class names¶
- Line 167
- Severity: WRONG
- Current:
LibraryDataCollectionServiceandLibraryAsyncDataCollectionService - Fix:
DataCollectionServiceandAsyncDataCollectionService(noLibraryprefix). Located inlibs/tradai-data/src/tradai/data/core/services.py.
architecture/18-CI-CD-PIPELINE.md¶
Fix 78: Fix CI schedule day¶
- Line 18
- Severity: WRONG
- Current: "Weekly / Sunday"
- Fix: "Weekly / Monday 06:00 UTC" (cron:
0 6 * * 1)
Fix 79: Remove Bitbucket references¶
- Workflow files (
docker-build.yml,publish-libs.yml) - Severity: STALE
- Fix: Remove "Equivalent to Bitbucket Pipelines" comments from these workflow files. Bitbucket is deprecated.
architecture/19-TESTING-STRATEGY.md¶
Fix 80: Fix coverage threshold claims¶
- Lines 107, 196-199
- Severity: WRONG
- Current: Claims "80% minimum (enforced in
just test-strictvia--cov-fail-under)" and "fails if < 80%" - Fix: Change to "60% minimum (enforced via
pyproject.tomlfail_under = 60). Target: 80% (roadmap)." The 80% is aspirational, not enforced.
architecture/adr/index.md¶
Fix 81: Note missing ADR files¶
- Line 8
- Severity: GAP
- Fix: ADR-002 through ADR-007 are listed in the table but have no corresponding
.mdfiles. Either create stub files or add a note: "ADRs 002-007 are documented in architecture docs, not as standalone files."
architecture/adr/001-nat-instance.md¶
Fix 82: Fix savings estimate¶
- Line 34
- Severity: MISLEADING
- Current: "saving ~$64/month"
- Fix: Align with code docstring: "saving ~$32/month" (or clarify the different baselines)
design/index.md¶
Fix 83: Fix DESIGN doc line count claims¶
- Lines 6, 11-13
- Severity: WRONG
- Current: Claims "10k-15k lines each"
- Fix: Actual counts: tradai-common ~756 lines, tradai-data ~809 lines, tradai-strategy ~660 lines. Change to "600-800 lines each".
design/tradai-common-design.md¶
Fix 84: Fix settings filename¶
- Line 258
- Severity: WRONG-PATH
- Current:
settings.py - Fix:
base_settings.py
Fix 85: Update module tree¶
- Lines 254-392
- Severity: GAP
- Fix: Add missing files to module tree:
_optional.py,base_service.py,cli.py,events.py,factories.py,runtime.py, and missingaws/files (ecr.py,ecs_env_builder.py,ecs_executor.py,errors.py,execution_stopper.py,s3_config_repository.py,secrets_manager.py,sns_utils.py,validation.py).
Fix 86: Fix catalog.py description¶
- Line 334
- Severity: MISLEADING
- Current:
config/catalog.pydescribed as "StrategyConfig schema" - Fix:
config/catalog.pycontainsConfigKey.StrategyConfigis inconfig/loader.py.
design/tradai-data-design.md¶
Fix 87: Replace ABC with Protocol (6 occurrences)¶
- Lines 17, 127, 141, 503, 601, 725
- Severity: STALE
- Fix: Replace all "ABC" references with "Protocol". The codebase uses
Protocol(notABC) forDataRepositoryandDataAdapter.
Fix 88: Remove "Future" label from ArcticAdapter¶
- Lines 466-475
- Severity: STALE
- Current: "ArcticAdapter (Future)" with note about missing macOS ARM wheels
- Fix: Remove "Future" label and macOS note. ArcticAdapter is fully implemented (233+ lines in
arctic_adapter.py).
Fix 89: Fix ArcticAdapter constructor params¶
- Line 678
- Severity: BUG
- Current:
ArcticAdapter(bucket_name="my-bucket", library="futures") - Fix:
ArcticAdapter(bucket="my-bucket", library_name="ohlcv")
design/tradai-strategy-design.md¶
Fix 90: Add missing module to tree¶
- Lines 96-141
- Severity: GAP
- Fix: Add
checks.pyto the module tree.
design/backend-design.md¶
Fix 91: Fix service class name¶
- Line 24
- Severity: WRONG
- Current:
BacktestService - Fix:
BackendService
Fix 92: Fix env var names¶
- Line 98
- Severity: WRONG
- Current:
BACKEND_SQS_QUEUE_URL - Fix:
BACKEND_BACKTEST_QUEUE_URL
Fix 93: Fix env var name¶
- Line 99
- Severity: WRONG
- Current:
BACKEND_DYNAMODB_TABLE - Fix:
BACKEND_DYNAMODB_TABLE_NAME
design/data-collection-design.md¶
Fix 94: Remove non-existent entities¶
- Lines 35-36
- Severity: STALE
- Current: Lists
FreshnessCheckandFreshnessStatusas entities - Fix: Remove both -- neither exists in the codebase.
Fix 95: Add missing endpoint¶
- Line 32
- Severity: GAP
- Fix: Add
/exportendpoint to the routes listing.
design/strategy-service-design.md¶
Fix 96: Fix service class name¶
- Line 25
- Severity: WRONG
- Current:
StrategyService - Fix:
StrategyServiceService
Fix 97: Fix MLflow URI default¶
- Line 86
- Severity: WRONG
- Current:
http://localhost:5000 - Fix:
http://localhost:5001(MLflow host port is 5001, not 5000)
Fix 98: Fix strategies dir env var¶
- Line 87
- Severity: WRONG
- Current:
STRATEGY_SERVICE_STRATEGIES_DIRwith defaultstrategies/ - Fix:
STRATEGY_SERVICE_STRATEGY_PATHwith default""(empty string)
Reference Section Fixes¶
reference/index.md¶
Fix 99: Fix non-existent class reference¶
- Line 31
- Severity: BUG
- Current:
from tradai.data import OHLCVRepository - Fix:
from tradai.data.core.repositories import DataRepository(the actual Protocol name)
libs/index.md¶
Fix 100: Fix misleading directory structure¶
- Lines 17-26
- Severity: MISLEADING
- Fix: Add note: "> Note: The 3-layer structure (
api/,core/,infrastructure/) applies to services. Libraries have varied structures -- see individual library docs for details."
libs/tradai-data.md¶
Fix 101: Fix ArcticAdapter constructor (README)¶
- Line 33
- Severity: BUG
- Current:
ArcticAdapter(bucket_name="my-bucket", library="futures") - Fix:
ArcticAdapter(bucket="my-bucket", library_name="ohlcv")
services/backend.md¶
Fix 102: Fix executor mode default description¶
- Line 195
- Severity: BUG
- Current:
BACKEND_EXECUTOR_MODEdefault documented aslocal - Fix: "Code default:
sqs. Dev override in.env.example:local. Options:local | sqs | ecs | stepfunctions"
Fix 103: Fix non-existent infrastructure files¶
- Lines 240-241
- Severity: WRONG-PATH
- Current:
infrastructure/dynamodb_repository.py,infrastructure/sqs_executor.py - Fix: Replace with actual files:
infrastructure/executor_factory.py,infrastructure/local.py,infrastructure/memory.py,infrastructure/sqs.py
Fix 104: Add note about incomplete architecture listing¶
- Lines 229-245
- Severity: GAP
- Fix: Add at end of architecture section: "> Note: This is a simplified overview. See the full source tree at
services/backend/src/tradai/backend/for all modules."
services/strategy-service.md¶
Fix 105: Fix CLI entry point name¶
- Lines 24-27
- Severity: WRONG-CMD
- Current:
strategy-service serve(hyphen) - Fix:
strategy_service serve(underscore) -- matches pyproject.toml[project.scripts]
Fix 106: Fix coverage target¶
- Line 249
- Severity: BUG
- Current:
--cov=strategy_service - Fix:
--cov=tradai.strategy_service
Fix 107: Fix test file path¶
- Line 252
- Severity: WRONG-PATH
- Current:
tests/unit/test_service.py - Fix:
tests/unit/test_core_service.py
Fix 108: Fix BacktestHandler location and enum¶
- Lines 277-295
- Severity: STALE
- Current: Claims
BacktestHandleris in strategy-service, usesTradingMode.BACKTEST - Fix:
BacktestHandleris intradai.common.entrypoint.handlers. Enum isExecutionMode.BACKTEST(fromtradai.common.entrypoint.settings). Update import and description.
Fix 109: Add note about incomplete architecture listing¶
- Lines 260-272
- Severity: GAP
- Fix: Add: "> Note: This is a simplified overview. See
services/strategy-service/src/tradai/strategy_service/for all modules including challenge, hyperopt, promotion, registration, and shadow trading services."
services/mlflow.md¶
Fix 110: Fix MLflowAdapter import path¶
- Line 73
- Severity: WRONG-PATH
- Current:
from tradai.common.mlflow_adapter import MLflowAdapter - Fix:
from tradai.common.mlflow.adapter import MLflowAdapter
Fix 111: Fix MLflow health URL¶
- Line 91
- Severity: MISLEADING
- Current:
curl http://localhost:5001/mlflow/health - Fix:
curl http://localhost:5001/health(the/mlflowprefix only applies behind ALB, not from host)
reference/lambdas/index.md¶
Fix 112: Fix lambda_handler usage example¶
- Line 10
- Severity: BUG
- Current:
@lambda_handler(bare decorator) - Fix:
@lambda_handler(MySettings)(requires settings class argument)
Fix 113: Fix infrastructure paths¶
- Line 127:
infra/modules/lambda_funcs.py->infra/compute/modules/lambda_funcs.py - Line 148:
infra/modules/iam.py-> IAM policy is ininfra/compute/modules/lambda_funcs.py
Lambda timeout/memory/schedule fixes (Fixes 114-126)¶
All values below should be updated in their respective docs/reference/lambdas/<name>.md files to match LAMBDA_CONFIGS in infra/compute/modules/lambda_funcs.py and LAMBDA_SCHEDULES in infra/shared/tradai_infra_shared/config.py:
| Fix # | Lambda | Field | Doc value | Correct value |
|---|---|---|---|---|
| 114 | backtest-consumer | timeout | 300s | 30s |
| 115 | check-retraining-needed | timeout | 60s | 30s |
| 116 | cleanup-resources | timeout | 120s | 60s |
| 117 | compare-models | memory | 256MB | 512MB |
| 118 | data-collection-proxy | timeout | 60s | 180s |
| 118 | data-collection-proxy | memory | 128MB | 256MB |
| 119 | drift-monitor | timeout | 300s | 120s |
| 119 | drift-monitor | schedule | rate(6 hours) | rate(12 hours) |
| 120 | health-check | schedule | rate(5 minutes) | rate(2 minutes) |
| 121 | model-rollback | timeout | 120s | 60s |
| 121 | model-rollback | env var | ALERT_SNS_TOPIC_ARN | SNS_ALERTS_TOPIC_ARN |
| 122 | notify-completion | env var | ALERT_SNS_TOPIC_ARN | SNS_ALERTS_TOPIC_ARN |
| 123 | orphan-scanner | timeout | 300s | 60s |
| 123 | orphan-scanner | memory | 256MB | 128MB |
| 123 | orphan-scanner | schedule | rate(6 hours) | rate(5 minutes) |
| 124 | promote-model | timeout | 120s | 60s |
| 125 | retraining-scheduler | timeout | 300s | 60s |
| 125 | retraining-scheduler | memory | 512MB | 256MB |
| 126 | sqs-consumer | timeout | 300s | 30s |
| 127 | trading-heartbeat-check | schedule | rate(1 minute) | rate(5 minutes) |
| 128 | validate-strategy | timeout | 60s | 30s |
reference/sdk/tradai-common.md¶
Fix 129: Fix MLflowAdapter constructor param¶
- Line 270
- Severity: BUG
- Current:
MLflowAdapter(tracking_uri="http://localhost:5001") - Fix:
MLflowAdapter(base_url="http://localhost:5001")
reference/sdk/tradai-data.md¶
Fix 130: Fix ArcticAdapter library_name default (3 occurrences)¶
- Lines 229, 303, 434
- Severity: STALE
- Current:
library_name="futures" - Fix:
library_name="ohlcv"
reference/sdk/tradai-strategy.md¶
Fix 131: Fix gate command¶
- Line 436
- Severity: WRONG-CMD
- Current:
tradai strategy gate MyStrategy --min-sharpe 1.0 - Fix:
tradai validate gate MyStrategy --min-sharpe 1.0
reference/cli.md¶
Fix 132: Add lazy-loading note for tradai data commands¶
- Lines 578-658
- Severity: GAP
- Fix: Add note at top of the
tradai datasection: "> Note: Thetradai datacommands are lazy-loaded from thetradai-data-collectionpackage. They are available after runningjust setuporuv sync --all-packages."
reference/environment.md¶
Fix 133: Fix exchange JSON field name¶
- Line 237
- Severity: MISLEADING
- Current:
"market_type": "futures" - Fix:
"trading_mode": "futures"(matching theExchangeConfigPydantic field name)
Summary of All Fixes¶
| Priority | Count | Description |
|---|---|---|
| Critical (BUG/WRONG-CMD -- breaks user) | 48 | Non-existent commands, wrong signatures, wrong class/env names, wrong Lambda configs |
| High (STALE -- outdated info) | 30 | Wrong counts, ABC->Protocol, old output formats, wrong schedules |
| Medium (GAP -- missing info) | 24 | Missing modules in trees, incomplete tables, lazy-load notes |
| Low (MISLEADING -- technically works) | 21 | ALB diagrams, cost estimates, path assumptions, lib structure |
| Cross-cutting (strategy repo coupling) | 28 | strategies/ paths pointing to wrong repo |
Total: 133 fixes across ~50 files - Guides: 66 fixes (APPLIED) - Strategy coupling: 28 fixes (APPLIED) - Architecture/Design: 32 fixes (APPLIED) - Reference: 35 fixes (Fixes 99-133, PENDING)
Recommended Fix Order¶
Fix all BUG/WRONG-CMD items (guides)-- DONEFix strategy repo coupling-- DONEFix architecture/design docs (Fixes 67-98)-- DONE- Next: Fix Reference docs (Fixes 99-133)
- Validate + fix Operations section