fix(creds): never auto is_active=0 on unpaid/ban flaps - #14854
RaviTharuma wants to merge 2 commits into
Conversation
Keep accounts selectable after billing renew without a UI re-enable: writeTerminalStatus no longer defaults isActive=false on terminal testStatus (credits_exhausted stays active). chatCore FORBIDDEN / ACCOUNT_DEACTIVATED go through maybeAutoDisableBannedAccount, and unrecoverable OAuth refresh only sets testStatus=expired. Document the Credentials HARD rule in AGENTS.md and BAN_DETECTION.md.
|
Thank you @RaviTharuma for looking at the unpaid/ban deactivation flaps — that's a real problem worth fixing. We can't take this PR as is, though: it adds new instructions to |
Summary
Fixes #14853
Stops OmniRoute from permanently sidelining accounts on temporary unpaid / ban-looking flaps so influencers can pick them back up after billing renew without a dashboard re-enable.
writeTerminalStatus: no longer defaultsisActive=falseon terminaltestStatus(includingcredits_exhausted). Callers must passisActiveexplicitly.chatCore:FORBIDDEN/ACCOUNT_DEACTIVATEDrecord terminaltestStatusfor selection skip + alerts, and only deactivate viamaybeAutoDisableBannedAccount(autoDisableBannedAccounts+ scope) — same gate asauth.ts.testStatus=expiredonly (keepsis_active=1).AGENTS.md;BAN_DETECTION.mdupdated for unpaid recovery + gatedisActive.Behavior after this PR
testStatusis_activecredits_exhausted1; recovery re-probe can clear after renewFORBIDDEN/ deactivated0only ifautoDisableBannedAccountsallowsexpired1Test plan
isActive: falseon chatCore terminal paths for FORBIDDEN / ACCOUNT_DEACTIVATED / OAuth refresh deathcredits_exhausted/ banned without explicitisActiveomit the field inwriteTerminalStatusNotes
release/v3.8.51from fork tipad05c97560(conflicts resolved against upstreamterminalStatusprobe sanitization + chatCore drift).