Skip to content

[FEATURE]: Define native and identity path contracts across client/server boundaries #33107

Description

@romanilyin

Feature hasn't been suggested before

  • I have verified this feature request is not a duplicate of an existing proposal.

Describe the enhancement you want to request

OpenCode passes path strings between Desktop, the SDK, the server, SQLite, and filesystem caches, but those values have different jobs:

  • a path usable by the current server process;
  • a stable comparison/storage identity;
  • a user-facing display path.

Mixing those concepts causes recurring failures:

I propose a staged approach:

  1. Validate request directory hints at the HTTP boundary before instance lookup.
  2. Keep native filesystem paths separate from lexical comparison keys and realpath/cache identity.
  3. Add versioned keys only where exact string matching or persistence needs them.
  4. Handle database/App migration and explicit Windows/WSL bridging in later PRs.

I maintain the MIT package @romanilyin/canonicalpath and can keep it behind a small OpenCode wrapper. I already have a narrow first-stage branch with no database or Desktop migration.

Would the maintainers accept this staged contract, and would they prefer the MIT package, an in-tree implementation, or a smaller server-local wrapper first?

Metadata

Metadata

Assignees

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