Cloud push rejects an identical encryption key supplied from another path

オープン 初心者向け
#766 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@pcbeingused333 がすでに取り組んでいます。

2026年11月23日 から。

  • #771 @pcbeingused333 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
cli, cloud

調査の方向性

lean/components/util/encryption_helper.py の _validate_key_state_for_local_project から始め、クラウドへの push に関するローカルファイル準備のテストを探してください。異なるパスに同じキー内容があるケースを再現し、本当に異なるキーは引き続き拒否されることを確認してください。回帰テストが成功し、コピーしたキーで push が成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

priority:P2

Observed

An encrypted project configured with /keys/original.txt cannot be pushed with --encrypt --key /keys/backup.txt even when the two files have identical contents. Cloud-key validation accepts the matching hash, but local file preparation rejects the different path.

Reproduced on master at 3842533 with real push/encryption helpers and config storage, a fake filesystem, and a mocked API. Both synthetic files had the same contents and hash; the cloud project had that hash. The push returned False, made no project update, and reported:

Registered encryption key /keys/original.txt is different from the one provided /keys/backup.txt

Reproduction

  1. Encrypt a project using a synthetic key and push it successfully.
  2. Copy the key to another filesystem path without changing its contents.
  3. Run lean cloud push --project Example --encrypt --key /path/to/copied-key.txt.

Cause and required result

_validate_key_state_for_local_project in lean/components/util/encryption_helper.py compares filesystem paths rather than key identity. An explicitly supplied identical key should remain usable from another path; genuinely different keys must still be rejected. Add a regression test for identical contents at different paths.

Priority P2: a valid-key operation fails, with a workaround of using the configured path.

主要言語
Python
スター
335
フォーク
172
平均マージ
6時間 54分
マージ済み PR(30日)
37

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/lean-cli のほかの issue

QuantConnect/lean-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。