Skip to content

fix: reserve $0 server-side while paper trading is off - #532

Merged
FlyM1ss merged 2 commits into
mainfrom
fix/paper-off-zero-sleeves
Sep 25, 2026
Merged

FlyM1ss merged 2 commits into
mainfrom
fix/paper-off-zero-sleeves

Conversation

@FlyM1ss

@FlyM1ss FlyM1ss commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #530 (review findings).

  • Server sleeves: signup starters, marketplace clone, duplicate, and a create that omits cash_allocation still reserved $1,000 each from the ledger feat: disable paper trading UI #530 hides — enough of them refuse a later create with "Insufficient unallocated cash". All now go through new_agent_cash_allocation(), $0 while the new server-side PAPER_TRADING_ENABLED (domain/backtesting/constants.py) is off. An explicit cash_allocation is still honoured; existing sleeves untouched. CreateAgentBody.cash_allocation now defaults to None (resolved at call time).
  • Home: "View my portfolio" ships hidden — its scroll target (My Agents' My Portfolio header) is hidden by feat: disable paper trading UI #530.
  • Ledger tests (test_portfolio_allocate, test_portfolio_scope_sync) now pin paper-on via an autouse fixture; new paper-off tests cover all four paths.

Tests: full backend suite 5419 passed / 165 skipped (pre-rebase); affected files re-run after rebase on main.

Not included: docs/source/lab/getting_started.rst:98 and operating_modes.rst:8 still describe a disabled Run Paper Trading button.

🤖 Generated with Claude Code

Signup starters, marketplace clone, duplicate and a create that omits
cash_allocation all still reserved $1,000 from the now-hidden ledger.
Route them through new_agent_cash_allocation(), gated on a server-side
PAPER_TRADING_ENABLED. Also hide Home's "View my portfolio", whose
scroll target this PR hides.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 25, 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 Sep 25, 2026 8:11pm UTC

Comment thread dashboard/backend/tests/test_portfolio_allocate.py Fixed
…t-from)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@FlyM1ss
FlyM1ss merged commit e1871ba into main Sep 25, 2026
8 checks passed

This branch was successfully deployed

1 active deployment
Preview — caedb145 Deployed Sep 25, 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.

2 participants