Repository navigation
Complete WorkBuddy risk controls - #97
Merged
Merged
Conversation
|
Sorry @maiphucgiang, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 2 days and 16 hours by commenting |
Reviewer's GuideThe PR completes WorkBuddy risk controls by scoping 11128 handling to a single request and account, adding a bounded system-to-user retry and DSH Web GUI adaptation, and replacing 11140 account cooldowns with a persisted two-hour restriction that expires or can be released from the credentials UI. Sequence diagram for bounded WorkBuddy channel refusal handlingsequenceDiagram
participant Client
participant Gateway
participant Credential
participant WorkBuddy
Client->>Gateway: Chat request
Gateway->>WorkBuddy: POST chat
WorkBuddy-->>Gateway: 11128 channel refusal
Gateway->>WorkBuddy: Retry same account via /console
WorkBuddy-->>Gateway: 11128 channel refusal
Gateway->>Gateway: system_as_user_body(body)
Gateway->>WorkBuddy: Retry same account with system instructions as user
alt Retry succeeds
WorkBuddy-->>Gateway: 200 stream
Gateway-->>Client: Response
else Final refusal
WorkBuddy-->>Gateway: 11128 refusal
Gateway-->>Client: Upstream refusal
end
Sequence diagram for persisted WorkBuddy account restrictionsequenceDiagram
participant WorkBuddy
participant CredentialPool
participant ControlStore
participant CredentialsUI
participant Maintenance
WorkBuddy-->>CredentialPool: 11140 restriction
CredentialPool->>CredentialPool: note_restriction()
CredentialPool->>ControlStore: _auto_disable(RESTRICTED_REASON)
CredentialPool->>CredentialPool: Set restricted_until = now + 2 hours
CredentialPool-->>CredentialsUI: restricted state and expiry
CredentialsUI-->>CredentialPool: PATCH enabled=true
CredentialPool->>ControlStore: set_credential(enabled=true)
CredentialPool->>CredentialPool: release_restriction()
CredentialPool-->>CredentialsUI: Credential rejoins routing
Maintenance->>CredentialPool: expire_restrictions()
CredentialPool->>CredentialPool: Release expired restrictions
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/consoledetour, but a final refusal no longer cools any credential or triggers cross-account replay.Fixes #92
Summary by Sourcery
Harden WorkBuddy channel and account-risk handling while preserving same-account recovery paths and administrative visibility.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests: