Repository navigation
Fix Pi research timeouts when runtime or tools are unavailable - #2
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.
Problem\nOn Windows desktop launches, Trail could start a Pi request with an unresolved bunx command. The spawn failure was not cleaned up by the streaming prompt path, so the request could surface as a misleading Pi request timed out after 60000ms. A single unavailable finance tool or missing account scope could also interrupt the research flow instead of leaving an explicit data gap.\n\n## Changes\n- Resolve the installed Windows bunx.exe path when FINAGENT_PI_COMMAND is not set.\n- Settle and remove streaming prompts immediately when Pi cannot spawn.\n- Bound Pi capability calls, return an explicit unavailable result, and continue with later tools.\n- Classify account permission and provider configuration errors as unavailable.\n- Fall back to the local evidence based synthesizer when model synthesis fails, while recording the reason and disclosing the fallback in the report.\n- Preserve user cancellation as cancellation.\n\n## Validation\n- bun test --isolate: 1813 passed, 8 skipped, 0 failed.\n- bun run typecheck: passed for core, i18n, shared, UI, and Electron.\n- Rebuilt the Electron main bundle and Pi extension.\n- Real Electron verification: AAPL.US comprehensive research completed with a saved partial report; 13 of 16 capabilities succeeded, unavailable or failed dimensions were recorded and the run did not time out.\n