[codex] fix Schwab strategy account equity#115
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c91bc2e5b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| account_state["total_strategy_equity"] = float(account_state["available_cash"]) + sum( | ||
| float(value) for value in dict(account_state["market_values"]).values() | ||
| ) |
There was a problem hiding this comment.
Update the scoped-equity regression test
With managed symbols configured, this override now returns available_cash + sum(filtered market_values); the existing RequestHandlingTests.test_build_account_state_from_snapshot_uses_strategy_symbols fixture has $8,000 cash and $6,000 in managed holdings, but still asserts total_strategy_equity == 50000.0, so CI will fail once the pinned dependencies are installed. Please update that regression test to the new scoped-equity expectation (or add an equivalent test here) with this behavior change.
Useful? React with 👍 / 👎.
Summary
total_strategy_equityin Schwab account-state conversion to use filtered strategy market value plus available cash.Root Cause
The platform consumes shared account-state conversion, and old pinned shared-kit versions can still copy full broker snapshot equity.
Validation
python3 -m py_compile application/runtime_strategy_adapters.py