Repository navigation
fix(chat): resolve local home paths before history reload - #379
Conversation
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
APPROVE. The exact three-dot comparison safely resolves home-relative working directories only for local session history loads, preserves remote-backend path ownership, and includes discriminating coverage for local path sources, timeout, detachment, failure, and compaction replay. No publishable findings or escalations remain. The supplied GitHub evidence reports all 11 check runs completed successfully at the reviewed head SHA; required checks still independently govern merge readiness.
Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
Pending checks: 1 check(s) are not complete.
This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.
Summary
An attached local workspace such as
~/goose artifactscan override the saved absolute directory after compaction. The agent backend rejects the literal~, so Berd keeps the old transcript and warns that refreshed history was not received.Resolve the local home prefix before any history load. Preserve the rest of the path, including filename spaces, and leave remote paths unchanged. Home resolution uses the existing timeout and connection guards; history replay remains unbounded.
Add regression coverage for the attached artifacts workspace, local path sources, Windows home prefixes, remote backend ownership, resolution failures, timeouts, and detached connections. Session creation and forks are unchanged.
Affected laws:
LAWS/CHAT.mdandLAWS/AGENTS.md. The fix preserves serialized session operations and provider/model requirements; no law changes are needed.Related issue
Follow-up to #376, which recovers missing or blank directories but leaves explicit home-relative paths unchanged.
Testing
No manual testing. No visible UI changes.
Generated with Goose