feat: override trade tab — manual order entry with auto-registration
Backend: - OverrideOrderRequest/Response Pydantic models with ticker, quantity, price validators - POST /api/trading/override/order endpoint (enqueue to Redis broker queue) - auto_register_symbol() module for untracked ticker registration via Symbol Registry - Unit tests (17) and property-based tests (3 x 100 examples) Frontend: - OverrideTradePanel component (order form + positions display) - Override tab in TradingEngine page with URL search param navigation - Override Trade button on Trading Controls page - useSubmitOverrideOrder mutation hook - MSW handler and 13 component/integration tests Steering: - Updated steering docs for Ubuntu dev machine with nvm/Node 24
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
# Development Process — Test-Develop-Debug
|
||||
|
||||
## Local Environment
|
||||
- Python 3.12 via NixOS, virtualenv at `.venv/`
|
||||
- Ubuntu dev machine, Python 3.12, virtualenv at `.venv/`
|
||||
- Always use `.venv/bin/python` or activate with `source .venv/bin/activate` before running Python commands
|
||||
- For tools not available in `.venv/` (ruff, gh, etc.), use `nix-shell -p <pkg> --run "<cmd>"`
|
||||
- Node.js 24 for frontend; `frontend/` has its own `node_modules/`
|
||||
- Frontend tests: `cd frontend && npx vitest --run`
|
||||
- Python tests: `nix-shell -p ruff --run "ruff check services/"` then `python -m pytest tests/ -x --tb=short -q`
|
||||
- Node.js 24 via nvm — always load nvm before running Node/npm/npx commands:
|
||||
`export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm use 24`
|
||||
- For tools not available in `.venv/` (ruff, gh, etc.), install via pip or apt as needed
|
||||
- Frontend tests: load nvm first, then `cd frontend && npx vitest --run`
|
||||
- Python tests: `.venv/bin/ruff check services/` then `.venv/bin/python -m pytest tests/ -x --tb=short -q`
|
||||
|
||||
## Workflow
|
||||
1. Write or update tests for the target behavior
|
||||
@@ -22,7 +23,7 @@
|
||||
- Frontend: Vitest + MSW (Mock Service Worker) for deterministic API mocking, tests in `frontend/src/test/`
|
||||
- Run Python tests: `python -m pytest tests/ -x --tb=short -q`
|
||||
- Run frontend tests: `cd frontend && npx vitest --run`
|
||||
- Lint Python: `nix-shell -p ruff --run "ruff check services/"` (or `.venv/bin/ruff check services/`)
|
||||
- Lint Python: `.venv/bin/ruff check services/`
|
||||
- Ruff is pinned to `ruff==0.15.10` in `requirements.txt` — CI uses the same version
|
||||
- Ruff config: `ruff.toml` with `known-first-party = ["services"]` for consistent import sorting
|
||||
- Pre-existing test failures (not regressions): `test_extractor_prompts.py`, `test_extractor_schemas.py`, `test_filings_adapter.py`, `test_ollama_client.py`
|
||||
@@ -36,8 +37,8 @@
|
||||
- `build-dashboard`: frontend/Dockerfile → GHCR (TypeScript strict mode — catches unused imports)
|
||||
- `build-superset`: docker/Dockerfile.superset → GHCR
|
||||
- CI handles all image builds and pushes — do NOT manually docker push
|
||||
- Check CI: `nix-shell -p gh --run "gh run list -L 3"` or `gh run list -L 3`
|
||||
- Re-run failed: `nix-shell -p gh --run "gh run rerun <id> --failed"`
|
||||
- Check CI: `gh run list -L 3`
|
||||
- Re-run failed: `gh run rerun <id> --failed`
|
||||
- View failure logs: `gh run view <id> --log-failed`
|
||||
|
||||
## Deploy
|
||||
|
||||
Reference in New Issue
Block a user