fix(cursor): centralize platform-aware Cursor storage path resolution - #740
Open
beruro wants to merge 3 commits into
Open
fix(cursor): centralize platform-aware Cursor storage path resolution#740beruro wants to merge 3 commits into
beruro wants to merge 3 commits into
Conversation
beruro
marked this pull request as ready for review
August 8, 2026 12:53
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
Cursor storage paths were resolved independently in
agent_cliandorgtrack_core. One implementation was macOS-only and fabricated/Users/_unknownwhen home discovery failed; the other had a broader but separate platform matrix. The duplicate ownership produced incorrect Linux/Windows behavior and inconsistent override handling.Solution
app_paths::cursor, and make both consumers delegate to it.ORGII_EXTERNAL_HISTORY_HOMEisolation and keep the Cursor plugin cache home-anchored.CursorEnvplus platform resolver so every platform and override path can be tested on any host.The branch is merged with the current
develop; GitHub reports it mergeable.Potential risks
XDG_CONFIG_HOME, and Windows honors relocated%APPDATA%; this intentionally changes edge configurations to match Cursor/Electron behavior.agent_cliis now isolated byORGII_EXTERNAL_HISTORY_HOME, consistent with other external-history discovery but different from its previous real-home lookup.Noneimmediately instead of probing a fabricated path whose existence check failed; the user-visible result is equivalent.Audit
Architecture review covered path ownership, dependency direction, platform/config precedence, typed failure handling, caller compatibility, and initialization parity. The canonical leaf-crate placement avoids a new
agent_cli -> orgtrack_coredependency edge.Verification
cargo test -p app_paths— PASS, 21 passed / 0 failed, including the 13 Cursor-path matrix tests.cargo check -p agent_cli -p orgtrack_core -p app_paths— PASS.git diff --check— PASS.origin/develop— PASS, no conflicts; checks were run after integration.