Contributions should keep the Gateway, management platform, Web client, and TradingAgents boundary independently understandable and testable.
- Create a focused branch from
main. - Add or update tests before changing behavior.
- Regenerate
web/src/api/schema.d.tsafter an API contract change. - Run the relevant focused tests, then the complete offline gate.
- Keep commits small and describe the observable change in imperative form.
Useful commands:
PYTHONPATH=platform/src:gateway/src:TradingAgents .venv/bin/pytest \
gateway/tests platform/tests/unit integration_tests -q
.venv/bin/ruff check gateway/src gateway/tests platform/src platform/tests scripts
.venv/bin/ruff format --check gateway/src gateway/tests platform/src platform/tests scripts
npm --prefix web run lint
npm --prefix web run typecheck
npm --prefix web run test -- --run
npm --prefix web run buildDatabase integration tests truncate their configured database. Point
TRADINGNG_TEST_DATABASE_URL only at a disposable test database.
After changing FastAPI routes or Pydantic contracts, run:
PYTHONPATH=platform/src .venv/bin/python scripts/export_openapi.py
npm --prefix web run api:generateCommit the resulting web/src/api/schema.d.ts update with the API change.
Never commit:
.env,.env.platform, credentials, cookies, private keys, or bearer tokens;reports/,var/, databases, backups, Gateway audits, or assessment artifacts;- Codex authentication/configuration directories or browser profiles;
- proprietary prompts, private market data, or user-entered portfolio details.
Use synthetic values in tests. A placeholder should be obviously fake and must
not share a prefix or length pattern with a live credential. Before submitting,
inspect git diff --cached and run a secret scanner with redacted output.
Do not edit the pinned TradingAgents source as part of an unrelated platform change. Keep integration behavior in the Gateway or MarketQuorum platform when possible. Changes that require a new TradingAgents commit must be isolated, tested, attributed to the upstream project, and explained in the pull request.