fix: recover invalid session models and publish commit previews - #161
Merged
Merged
Conversation
commit: |
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.
Resuming a session whose saved provider, model ID, or reasoning level is no longer valid leaves the user at a prompt and fails on the next message with
Model creation failed.Inspect the decoded saved selection on both
--resumeand/resumeand open the model picker with the specific problem. Selecting a replacement persists it through the native session API. Cancelling preserves the original selection and unsent input; an empty catalog points to provider setup. Headless prompts exit with code 1 before model creation, identify the affected model, and explain how to recover interactively. Shared defaults and conversation history are preserved.No blanket provider remapping, lowercasing, retired-model substitution, or bulk SQLite rewrite is added. Existing upstream migrations remain in place; the recovery path handles selections that are still invalid afterward.
The reproduction uses a real persisted SQLite session and runtime with a local mock model endpoint:
Also adds commit previews using the lockfile-pinned
pkg-pr-newpublisher and Bun 1.4.1. The workflow builds and tests the locked runtime, audits and install-tests the package, and publishes that exact tarball with a commit-specific executable URL.Local validation against Desktop 3.14.0 / runtime 0.16.9: full
release:buildandrelease:pack, including TypeScript, 642 unit tests, 43 TUI component/end-to-end tests, 30 real-runtime integration tests, 5 real Node SQLite tests, runtime/PTY smoke checks, and an isolated installed-package test. Recovery coverage includes invalid providers/models/reasoning, cancellation with an unsent draft, persistence across another restart, valid selections, an empty catalog, and headless diagnostics. CI additionally validates the packaged runtime across Linux Node 22.19.0/24/26 and macOS Node 24.Refs #160.