Skip to content

docs: fix architecture drift in CLAUDE.md and user docs - #652

Merged
FlyM1ss merged 4 commits into
mainfrom
docs/architecture-drift
Oct 22, 2026
Merged

FlyM1ss merged 4 commits into
mainfrom
docs/architecture-drift

Conversation

@FlyM1ss

@FlyM1ss FlyM1ss commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Every correction below was checked against the code at d3cfc33d.

CLAUDE.md

  • LLM safety boundary. validate_llm_response runs only in llm_integration_example.py and tests. The section now names what actually holds: no LLM request sends tools, non-text blocks are dropped, parsing is strict, and the portfolio manager caps orders. It also names the Robinhood gates.
  • Store twins. There are 13 pairs, 12 of which own DDL. A backtest child now also constructs the trace twin. The research store keeps an inline Postgres class that sits outside _TWINS.
  • Database variables. USERS_DATABASE_URL also carries Credits (purchases included), provider keys and analytics. CONTENT_DATABASE_URL also carries agent credentials and research runs. The broker store reads both.
  • Architecture. domain/trading is the backtest fill and valuation helpers, not live trading. The missing pieces are added: credits, model_providers, analytics, traces and brokers; the Robinhood live path; and the Trading Algo, research and iFinD surfaces.
  • Billing and limits. The billing section now lists the LLM spend that bypasses Credits. MAX_ACTIVE_DASHBOARD_BACKTESTS does not count the Trading Algo subprocess.
  • Anchors. Line anchors that had drifted in the billing and backtest-worker bullets are replaced with function names.

User docs

  • Paper trading. The "paper trading is coming" promises are removed from README, index.rst, lab/{index,overview,operating_modes,live_trading,accounts,marketplace,getting_started}.rst and the SDK README. The 2026-10-14 direction puts broker paper trading out of scope.
  • README. It no longer claims a PyPI SDK, an "open leaderboard" or live news (the feed is frozen).
  • lab/architecture.rst. The diagram is redrawn as Vercel → API → worker → stores. The page adds a storage section and the research and Robinhood routes.
  • Robinhood. Live trading is no longer advertised: it is removed from the README key features, key_features.rst, the lab/index.rst lead and getting started, since real capital is out of scope. live_trading.rst, the operating_modes entry (P7's rename text points at it) and the API table row stay as reference, because the agent editor still shows the panel. CLAUDE.md records the rule.

Left alone on purpose

Review follow-up (f4aa2aad, after merging main)

  • Code fix. execute_algo now holds its single-flight check under _launch_lock. The route is a sync def, so two concurrent POSTs could both pass the unlocked check and each start a subprocess on the platform key. test_concurrent_executes_start_one_run fails without the lock.
  • Safety boundary. A billed run aborts on its first unparseable reply; strikes are for strict runs without a handoff. The section now names the post-trade prompt-patch channel and the Trading Algo backtest, which skips the shared parser and MAX_ORDER_SHARES. SECURITY.md holds the one constraint table, now current.
  • Worker census. Re-counted with a recording fake pool: 7 twins, 117 statements, 7 checkouts.
  • Docs and UI. architecture.rst adds API→storage, Yahoo Finance and where stored secrets live. The README drops the hidden portfolio feature. /app says paper trading is "not available" instead of "coming soon". CLAUDE.md lists the five Robinhood references that stay.
  • Local backend suite: 6930 passed, 7 failed, all in test_report_pdf (reportlab is not installed locally).

🤖 Generated with Claude Code

CLAUDE.md: correct the LLM safety boundary (validate_llm_response is on
no production path), the store-twin counts (13 pairs, trace twin now
built in a backtest child), what USERS_/CONTENT_DATABASE_URL carry, the
domain/trading label, missing surfaces (Robinhood, Trading Algo,
research, iFinD), LLM spend that bypasses Credits, and drifted line
anchors (now function names).

User docs: drop "paper trading is coming" promises, the PyPI SDK and
"open leaderboard" claims and the live-news claim; redraw
lab/architecture.rst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agentic-trading-lab Ready Ready Preview Oct 22, 2026 10:52pm UTC

Real capital is out of scope (2026-10-14 direction). Drop it from the README
key features, key_features.rst, the docs index lead and getting started.
live_trading.rst stays as the reference for the agent editor's panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FlyM1ss and others added 2 commits October 22, 2026 18:31
- LLM safety boundary: a billed (fail_closed) run aborts on the first
  unparseable reply; strikes apply to strict runs without a handoff. Name
  the post-trade prompt-patch channel and the Trading Algo backtest loop,
  which bypasses extract_response_text, parse_llm_response and
  MAX_ORDER_SHARES. Point the limits at SECURITY.md as the one table and
  bring that table up to date.
- Operator-billed LLM list: add the Trading Algo backtest's per-bar calls
  and the Discord bot's chat.
- ATL_BACKTEST_WORKER: re-measure the child's twins (7 twins, 117
  statements over 7 checkouts) and add the trace store's run-time route.
- Robinhood: list the five places that stay as reference, and fix the
  claim that the docs index leaves it out.
- architecture.rst: storage reached from the API too, Yahoo Finance as a
  data source, and which settings hold stored secrets.
- README and /app: drop the hidden portfolio feature and the paper
  trading "coming soon" promise.

fix(algo): hold execute_algo's single-flight check under a lock. The route
is a sync def, so two concurrent POSTs could both pass the unlocked check
and each start a subprocess on the platform key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@FlyM1ss
FlyM1ss merged commit 3d45203 into main Oct 22, 2026
8 checks passed
FlyM1ss added a commit that referenced this pull request Oct 23, 2026
Resolves the CLAUDE.md conflict with #652's last commit (f4aa2aa):
main's billing and LLM-safety text, the PR's execution/ bullet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — f4aa2aad Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant