Add strategy-aware Firstrade session check policy#62
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e567ea5e60
ℹ️ 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_selector = str(env("FIRSTRADE_ACCOUNT", "") or "").strip() | ||
| account_key = _safe_key(mask_account_id(account_selector)) if account_selector else "auto" |
There was a problem hiding this comment.
Scope auto session-check markers per account identity
When FIRSTRADE_ACCOUNT is unset (which is a supported single-account setup), every deployment for the same strategy writes and reads session-checks/auto/.... If two Firstrade credentials share the same GCS bucket/prefix and strategy, the first account's monthly marker causes the other account's /session-check to skip without ever connecting, so its session/account maintenance is suppressed for the rest of the period. Include a stable credential/account scope in the key even for the auto account case, or avoid skipping when the account scope is ambiguous.
Useful? React with 👍 / 👎.
Summary
Validation