Add --publish flag for Render publish-only deployment#52
Add --publish flag for Render publish-only deployment#52IamJasonBian wants to merge 3 commits intomainfrom
Conversation
Allows running the engine in dry-run mode (no Robinhood orders) while still uploading state to Netlify Blobs, enabling the dashboard at 5thstreetcapital.org/trade. Includes render.yaml for Render deployment.
When --publish is used without --live, the engine only needs market data and blob uploads — no Robinhood credentials required. Guards all trading_bot calls in run_once() so the service can run without RH_AUTOMATED_ACCOUNT_NUMBER.
Code Review — PR #52Overall: Clean implementation of publish-only mode. The broker skip logic and null guards are well-placed. Issues
Nits
Generated by Claude Code |
Follow-up Review — PR #52Additional observations not covered in the initial review:
Generated by Claude Code |
|
Stale PR notice — This PR has been open for 18 days with no new commits since Mar 24. Two code reviews flagged a latent bug (broker init not skipped without Generated by Claude Code |
|
Stale — 4 weeks, no activity since Mar 24. Two prior reviews flagged a latent bug (broker init not actually skipped without Generated by Claude Code |
In publish-only/headless Render deploys, trading_bot is None when RH credentials are absent. _send_oncall_summary called .get_pdt_status() unconditionally, raising AttributeError after every successful blob upload. The existing 'PDT: unavailable' branch already handles None, so the fix is a single ternary guard. Co-authored-by: jasonzb <jason.bian75@gmail.com>
Summary
--publishflag to decouple blob uploads from live trading, enabling Render deployments that update the site without placing tradesrender.yamlconfiguration forallocation-engine-2.0Background WorkerChanges
--publishparameter, skip broker init when publish-only, decouple blob upload from--liveflag--publish --dashboard --continuousBlob uploads now gated by
live=not self.dry_run or self.publish, allowing site updates without live trading.