Repository navigation
fix(pi): keep refused prompts and time out stalled uploads for 0.1.0 - #5
Merged
Merged
Conversation
A message Leverage refused after Pi stopped waiting for it was dropped, with only a notice. It now goes back into the composer, above whatever was typed since, both for a session's messages and for the first message that creates one. An attachment's upload to storage was the one Leverage call with no timeout, so a stalled one blocked Pi's input. It now gives up after 30 seconds like the others, and the message goes back to the composer. A login file kept with a looser mode was tightened only after the tokens were written to it. It is tightened first.
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.
Purpose
This prepares 0.1.0. It adds
CHANGELOG.mdand fixes what a failure audit confirmed. The audit asked: when Leverage fails partway through, does Pi fall back to running anything locally? It doesn't. Leverage's tool calls never reach Pi's tools, and a failed prompt never falls through to a local model. It did find these:refusedhook onSessionView.recreate).PUTto storage was the one Leverage call with no timeout, so a stalled upload blocked Pi's input.chmodtightened it. It's now tightened first.Not fixed here. The audit found three likely issues without tracing them end to end:
/namerename that Leverage refuses isn't reverted in Pi./compactand dequeue report success without waiting for Leverage to confirm.Publishing. The package still has
publishConfig: public, but@leverage/piisn't on npm and the README installs from git. Whether to publish is still your call. After merging, tag and release:git tag v0.1.0 && git push origin v0.1.0 gh release create v0.1.0 --notes-file CHANGELOG.mdVerification
All with Bun 1.4.2 from the Nix shell:
bun run checkpasses: Biome, ESLint,tsc, 123 of 123 tests, and the build.stallUploadsmakes storage hang. The test expects the timeout notice, the text back in the composer, and no message sent.main: the first never gets the text back, and the second hangs until the test times out.