Skip to content

[FEATURE]: V2 canonical path contracts across runtime, storage and clients #54615

Closed as not planned

Description

@romanilyin

Feature hasn't been suggested before.

Describe the enhancement you want to request

OpenCode needs separate contracts for a server-native filesystem path, a comparison/storage key, and physical realpath identity. Equivalent Windows spellings such as C:\Work\Repo and C:/Work/Repo should compare consistently, while API requests must use paths native to the selected server.

I propose these v2 stages:

I have prepared the narrow boundary fix on v2. For the following stages, I can prepare focused changes with Windows/WSL fixtures and migration/collision tests. I maintain the MIT package @romanilyin/canonicalpath and can adapt the wrapper to an in-tree implementation if preferred.

Before opening broader implementation PRs, I would like feedback on dependency/wrapper placement, identity and case rules, and whether this staged scope is acceptable.

The first stage is prepared on canonicalpath-dev. Previous v1 PRs #34256 and #40857 were closed without merging. This umbrella tracks the remaining integration rather than claiming that the boundary fix completes it.

Activity

  1. opencode-agent commented on Oct 11, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed proposal and for carrying it over to v2. To restate it: you're proposing separate v2 rules for three things. First, the native path a server uses. Second, a versioned key for comparing and storing paths. Third, the real path on disk. These would be rolled out in stages across the HTTP boundary, Location/Project/Worktree identity, stored data and saved client state, and Windows/WSL bridging. Maintainers will consider the staged scope and your questions about where the code should live and how identity and letter case should work.

    Related issues that this work would touch:

  2. romanilyin commented on Oct 26, 2026

    @romanilyin
    Author

    Following up on the v2 design proposal: the narrow HTTP boundary fix in #59414 is now ready for review.

    Before extending this to persistent identity and client state, could a maintainer confirm whether the staged approach is acceptable and whether you prefer the server-local wrapper around @romanilyin/canonicalpath or an in-tree implementation? I can adapt the implementation to either choice. I would like to settle identity and case rules before preparing the migration changes.

  3. neriousy commented on Nov 12, 2026

    @neriousy
    Member

    Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions