Keep credential discovery off Editor and Session mailboxes - #3388
Merged
Merged
Conversation
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.
TL;DR
Credential status now classifies one local snapshot immediately and runs live Ollama discovery outside Editor and Session mailboxes. Correlated, bounded checks keep interactive processes responsive and prevent delayed results from affecting a replacement session, model, or provider.
Closes #3317
Context
Credential status previously mixed local configuration checks with a synchronous Ollama HTTP probe. A slow local endpoint could therefore delay
/auth, session startup, credential refresh, prompt handling, and model controls.This change separates locally known configuration from live availability. Session owns provider readiness and startup decisions, while Editor owns publication of
/authresults into the session that requested them.Changes
new_session,load_session, and owner shutdown./authavailability publication into a correlated Editor effect that validates both the Session PID and logical session ID before updating UI state.Verification
mix test test/minga_agent/session_recovery_test.exs test/minga_editor/agent/slash_command_test.exs test/minga_editor/commands/agent_commands_test.exs: 140 passed on the final rebased SHA.mix compile --warnings-as-errors: passed on the final rebased SHA.make lint: passed.mix test: 10,958 of 10,959 passed. The only failure was the unrelatedMinga.Extension.CompileCacheTeststderr capture race attest/minga/extension/compile_cache_test.exs:709; its exact rerun passed.Acceptance Criteria Addressed