fix: reserve $0 server-side while paper trading is off - #532
Merged
Merged
Conversation
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>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…t-from) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #530 (review findings).
cash_allocationstill 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 throughnew_agent_cash_allocation(), $0 while the new server-sidePAPER_TRADING_ENABLED(domain/backtesting/constants.py) is off. An explicitcash_allocationis still honoured; existing sleeves untouched.CreateAgentBody.cash_allocationnow defaults toNone(resolved at call time).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:98andoperating_modes.rst:8still describe a disabled Run Paper Trading button.🤖 Generated with Claude Code