Skip to content

AFS sole-account fallback when runtime selector is not a broker id - #394

Merged
Pigbibi merged 1 commit into
mainfrom
fix/ft-afs-sole-account-fallback
Oct 9, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/ft-afs-sole-account-fallback

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

/account-facts-sync still failed after auth with account_identity_mismatch expected=*****rade — the runtime target account_selector is the platform label firstrade, not a Firstrade broker account number. Session/probe is healthy and the broker returns account(s).

This PR (AFS path only):

  • If the selector is missing from account_numbers() and exactly one broker account exists, bind that sole account for read-only facts publish
  • Log accounts_len on remaining collect failures
  • Endpoint regression test

Follow-up for SiYi: fix RUNTIME_TARGET_JSON.account_selector to the real Firstrade account number (trading path uses the same selector).

No trading-mode / strategy change.

RUNTIME_TARGET account_selector is the platform label "firstrade", so
collect failed with account_identity_mismatch despite a healthy session.
When the selector is absent from the broker account list and exactly one
account is returned, bind that sole account for read-only facts publish
only. Log accounts_len on remaining collect failures.
@Pigbibi
Pigbibi merged commit 5f0540a into main Oct 9, 2026
@Pigbibi
Pigbibi deleted the fix/ft-afs-sole-account-fallback branch October 9, 2026 08:04
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.

1 participant