Skip to content

Successful push-induced rename makes cloud backtest report project missing #721

Closed

Description

Problem

A successful push can rename the local project directory, after which the cloud-project resolver reads config.json from the old path. A command such as lean cloud backtest <name> --push then fails even though the project was uploaded successfully. Backtest reports a misleading project-not-found error.

Reproduction

On Linux:

  1. Create a Python project directory named Unsafe:Project.
  2. Run lean cloud backtest 'Unsafe:Project' --push.

The push sanitizes the local name to Unsafe Project, creates/updates the cloud project and writes its cloud ID under the new directory. The resolver subsequently reads the old Unsafe:Project/config.json, finds no cloud ID and raises Something went wrong while pushing the project to the cloud. The backtest command rewrites that RuntimeError into a project-not-found message.

Evidence

A local probe using the real resolver, push manager, project manager and project configuration, with a mocked successful API, reproduced this on master commit f3deb21:

  • projects.create returned project ID 20 named Unsafe Project.
  • projects.update was called once successfully.
  • Unsafe:Project no longer existed.
  • Unsafe Project/config.json contained cloud-id: 20.
  • get_cloud_project("Unsafe:Project", push=True) nevertheless raised Something went wrong while pushing the project to the cloud.

PushManager._push_project updates only its own project_path after a rename; CloudProjectManager.get_cloud_project retains the original local_path when reading the cloud ID. A cloud-assigned replacement name can trigger the same mismatch.

Expected behavior

The resolver should retain the successfully pushed project's identity across a local rename and continue to compilation, rather than reopening the original path. Add regression coverage for name sanitization and a cloud-assigned replacement name.

Workaround: rerun the command using the resulting local directory name. This is limited to pushes that rename the directory; commands whose paths remain unchanged are unaffected.

Activity

  1. added
    kronos:develop:queued
    kronos:develop:working
    and removed
    kronos:develop
    kronos:develop:queued
    on Nov 17, 2026
  2. added a commit that references this issue on Nov 17, 2026
    732fad9
  3. added a commit that references this issue on Nov 20, 2026
    1c919ea
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

    priority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions