Skip to content

Warehouse connection registry is shared across projects served by one process #1566

Closed

Description

@anandgupta42

Description

The warehouse connection registry (packages/opencode/src/altimate/native/connections/registry.ts) is process-global, but one server process serves several project directories (each request carries its own Instance.directory). As a result:

  • The first project to load decides the connections for every project: project B sees project A's project-local .altimate-code/connections.json entries, and B's own file is ignored.
  • Two projects that use the same connection name share one cached connector and one SSH tunnel. Reloading or removing in one project closes the other project's connector or tunnel.

#1559 stopped an empty-registry re-read from loading another project's file into the shared registry, but the registry itself is still shared.

Expected

Registry state (configs, connectors, in-flight connects, SSH tunnels) is kept per project directory. The global file and ALTIMATE_CODE_CONN_* env vars stay shared sources, merged into each project's state. A populated registry is still never replaced automatically.

Steps to reproduce

  1. Run one server and open two projects, A and B, each with its own .altimate-code/connections.json.
  2. List warehouses in A, then in B.
  3. B lists A's connections.

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