Intelligence, Advanced Charting & Trading Platform
docs(state): record tested paper-only position manager and remaining live-data gates
davoodmehraban89 committed
Oct 14, 2026 at 22:45 UTC
13a76583ba3d30bdbd85dda521ef83e6f5179fc4
1 file changed
+14
PROJECT_STATE.md
+14
@@ -140,3 +140,17 @@ With explicit user approval, the unused overprivileged Neon role `chartnova_hist
140
- Real **localhost-only** WSS smoke passed: HTTP 101 WebSocket handshake, `stream.subscribe` → `session.ready`, test-only private publisher HTTP 200, `market.update` delivered to 1 client with monotonic `sequence=1`. The event contained fictional TEST-ONLY values, never persisted to Neon or production systems. Local Worker and child `workerd` process were stopped.
141
- Repeatable smoke script: `scripts/smoke-local-stream.mjs`. Evidence: `docs/operations/chartnova-ci-local-ws-smoke-2026-10-12.md`.
142
- No live provider entitlement, operational secret, production DO, public market data, or code deployment has been enabled. Existing dirty Windows worktree stays untouched. PR #24 remains Draft, blocked on runner allocation, security and data licenses.
143
+
144
+
145
+## 2026-10-14 — Paper-only position risk manager (PR #27; isolated feature)
146
+
147
+- **User intent:** build professional stop-loss, take-profit, trailing stop, hypothetical P&L and position event tracking in VELYQOR/ChartNova. Explicit user instruction: **no real buying/selling or order submission**.
148
+- **Source added:** `packages/market-domain/src/paper-position.mjs` — pure deterministic memory-only, manual scenario LONG/SHORT position creation, SL/TP, trailing, net P&L with hypothetical commission/slippage and once-only bracket-style exit; no network, broker, DB or API side effects.
149
+- **UI added:** `apps/market-terminal/src/PaperTradingPanel.jsx` with form, hypothetical event timeline, manual scenario updates, close/restart and explicit **PAPER ONLY** status. `main.jsx` integrates on the right side; price-line overlays show entry, stop and take-profit on the existing chart. Responsive CSS added.
150
+- **Independent CI:** `.github/workflows/paper-trading-ci.yml` tests 14 engine scenarios, performs broker/network import check, `npm ci` and builds actual terminal with Vite.
151
+- **Verified GitHub Actions for commit `9bfe8891ecf204b5e19c5a6aea61affdec21d77c`:** simulation job **SUCCESS** (all four steps), main `verify` **SUCCESS**, `postgres-invariants` **SUCCESS** on 2026-10-14. First run failed due JavaScript negative-zero P&L; logic normalized -0 and rerun passed.
152
+- **Docs:** `docs/trading/paper-trading-stage1.md`. PR: https://github.com/davoodmehraban89/VELYQOR/pull/27 (Draft). Based on #24, which is based on #23; no merge into main or deployment.
153
+- **Real trading status: PROHIBITED.** No exchange/broker API, no capital movement, no scheduled execution. ECB history points are not executable quotes and cannot trigger simulated fills. User must manually enter a fictional market price per scenario step.
154
+- **Remaining:** actual licensed, tradable bid/ask with trusted live quote contract and staleness/sequence filters; server-owned paper portfolio persistence and concurrency-safe audit; reconciliation/reconnection; backtest, risk limits, graph trading UX tests; staged deployment only after explicit approval and stacked PR acceptance.
155
+- **Separate repository main:** PR #25 (P0 safety) and PR #26 (live-proof test portability) were explicitly authorized and merged 2026-10-14, reaching `main` SHA `0fadaf7dc7df96dbd7aadf0bf9eaf7bbc83ce257` at verification. This stacked PR branch has not been rebased onto that main and must be reconciled before merge.
156
+- **Local PC:** Desktop Commander was offline at the latest October 14 check. Existing modified and untracked user worktrees untouched.