Cloud push rejects an identical encryption key supplied from another path

Offen Anfängerfreundlich
#766 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@pcbeingused333 arbeitet bereits daran.

Seit 23.11.2026.

  • #771 von @pcbeingused333 — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
76/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
cli, cloud

Rechercherichtung

Beginne in lean/components/util/encryption_helper.py bei _validate_key_state_for_local_project und suche dann die Tests zur Vorbereitung lokaler Dateien für den Cloud-Push. Reproduziere den Fall mit identischem Schlüsselinhalt an verschiedenen Pfaden und prüfe, dass ein tatsächlich anderer Schlüssel weiterhin abgelehnt wird. Erledigt ist die Aufgabe, wenn der Regressionstest besteht und der Push mit dem kopierten Schlüssel erfolgreich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
335
Forks
172
Ø Merge
6 Std. 54 Min.
Gemergte PRs (30 T.)
37

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus QuantConnect/lean-cli

Alle Issues in QuantConnect/lean-cli

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.