Repository navigation
fix(auth): scope provider credentials and relocate OAuth ownership - #8373
Conversation
Session expiry events now carry the credential fingerprint captured before dispatch, so a backend 401 that arrives after a credential replacement can no longer clear the newly stored session. The publisher suppresses both the bus event and the RPC auth-expired marker when the fingerprint no longer matches the current credential. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinyagents submodule to the latest upstream commit. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add sha2 to the tinyinference dependency set and pin tinyjuice-module back to 0.11.3, while advancing the vendored tinyvoice submodule to its new revision. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper review
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c76952e60
ℹ️ 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".
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a287e38b58
ℹ️ 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".
| result = Err( | ||
| "Backend request failed; credential provenance could not be verified" | ||
| .to_string(), | ||
| ); |
There was a problem hiding this comment.
Migrate hosted clients before suppressing their expiry signals
When a still-locally-valid session is revoked server-side, hosted RPCs such as billing balance and current-plan requests now lose their reauthentication flow. hosted/client.rs::map_error still only returns a SESSION_EXPIRED: string, and neither HostedClient nor BackendClient publishes a fingerprinted expiry event. Because request_credential_fingerprint is always None here, dispatch replaces that string with this generic error without publishing anything, leaving the rejected credential installed and preventing the renderer's auth classifier from requesting sign-in. Move expiry publication into those request-owning clients before disabling their existing dispatcher-based recovery.
Useful? React with 👍 / 👎.
Summary
Fix the five credential regressions in #636. Session expiry events now carry the opaque fingerprint of the credential used by the failed request, so stale 401s cannot invalidate a replacement session. Failed credential-scope rebinding rolls back the active-user marker and profile; TinyHumans OAuth refresh runs safely from current-thread runtimes and serializes token rotation; disconnect errors preserve profile consistency.
Move OAuth obtain, refresh, import, pending-state handling, and controller wiring into
openhuman-tinyhumansbehind the coreProviderCredentialSourceport and embed host facade. Existing RPC method names remain unchanged. The TinyAgents gitlink update supplies request-time credential fingerprints through TinyInference. The TinyVoice gitlink and Cargo.lock changes are required for this dependency update: base TinyVoice 0.4 requires TinyAgents 2.x, while the compatible canonical TinyVoice main commit26c72d599ae516c43ac77c883031b5173ec687e4requires TinyAgents 3.x and includes TinyInference'ssha2dependency.Verification
Focused regression tests pass for stale session expiry, credential-scope rollback, concurrent refresh metadata rotation, disconnect with pending-state failure, current-thread OAuth refresh, request-time fingerprint propagation, and the RPC expiry bridge. The TinyHumans
provider_oauthsuite passes (9 tests). Earlier gates on the implementation branch also passed core/provider OAuth tests, crate-chain/layout checks, app/core checks, and the auth E2E test. The full Rust layout gate still reports 14 storage-schema naming violations in locally aligned TinyChannels source. The hosted Markdown check reports two pre-existing broken links inagent-harness.mdto files removed by #8319; those same links are present on bothmainand the epic base.Closes senamakel#636
Part of #8369