fix(opencode): use the configured resolver in ConversationProvider::load_conversation#122
Open
akesling wants to merge 1 commit into
Open
fix(opencode): use the configured resolver in ConversationProvider::load_conversation#122akesling wants to merge 1 commit into
akesling wants to merge 1 commit into
Conversation
|
🔍 Preview deployed: https://fa451051.toolpath.pages.dev |
akesling
added a commit
that referenced
this pull request
Jul 8, 2026
Behavior-adding changes on this branch (pi metadata entries via events; opencode user model + snapshot-SHA events). The .1 patch numbers are claimed by sibling PRs #121/#122 currently in flight, so both crates skip to .2. All five sites updated: crate Cargo.toml, root workspace dependency, site/_data/crates.json, CHANGELOG top section, Cargo.lock. No path-cli / toolpath-cli / toolpath-convo bumps.
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.
Root cause
OpencodeConvo::load_conversation(theConversationProvidertrait path) calledto_view(&s), which constructs a fresh defaultPathResolverinstead of using the instance's configured one. With any non-default data dir, the snapshot bare git repo is never found, and every file diff silently degrades to the structural-only tool-input fallback — norawperspective, no error, no warning.Fix
load_conversationnow callsto_view_with_resolver(&s, self.resolver()). The other trait methods (list_conversations,load_metadata,list_metadata) never build views, so this was the only affected call site.Tests
New trait-path integration test (TDD; red before the fix): builds a real bare snapshot repo at the exact path
resolver.snapshot_gitdir(...)computes (git2init_bare, real blob/tree/commits wired into the session'sstep-start/step-finishsnapshot fields) and assertsload_conversationyields aFileMutationwithraw_diff.is_some()— a fresh default resolver misses the temp gitdir and fails this.Full workspace suite + clippy green.
toolpath-opencodebumped 0.5.0 → 0.5.1 (crate, workspace dep, crates.json, CHANGELOG, Cargo.lock).Notes
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.