Repository navigation
Conversation
import_payload saved each snippet first and checked its locked value afterwards. An invalid value made it delete the snippet again, which also removed a snippet of the same name that existed before the import. The value is now checked first and such entries are skipped untouched. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01THB2F2DbFt7kDuUx3ZdWAr
|
Welcome! 👋 Thanks for your first pull request in this repository. A maintainer will review it soon. Please make sure:
Thanks for contributing! |
lukisch
left a comment
There was a problem hiding this comment.
Second-model review: no blocking findings, ready to merge. (Posted as a comment because the bot account is also the PR author and cannot approve.)
Checked on head 709e5ea, Linux, Python 3.11, PySide6 6.11.3, offscreen:
pytest: 122 passed. All 10 CI checks are green.- Negative control: with
PythonBox_v8.pyfrommasterand the tests from this PR, the new test fails (1 failed, 121 passed). So the test does cover the data loss. - The change only moves the
lockedcheck ahead ofsave_snippet; valid imports take the same path as before.
Merge order: this PR and #1 both add a test at the same place in tests/test_pythonbox_regressions.py and conflict there (the PR description only mentions the changelog). The source changes do not overlap. Whichever is merged second needs a rebase, and the tests badge should then read 127.
Generated by Claude Code
Keeps this branch mergeable alongside the open path-traversal PR, which appends tests at the same place in LibraryExportRegressionTests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01THB2F2DbFt7kDuUx3ZdWAr
lukisch
left a comment
There was a problem hiding this comment.
Zweitprüfung (Cloud-Bot, 2026-11-11) auf 95475e3: freigabefähig, keine Blocker. Eine formale Approval ist nicht möglich, weil der Bot unter demselben Konto läuft wie der PR-Autor.
- Die Änderung verschiebt nur die
locked-Prüfung vorsave_snippet; der Rest vonimport_payloadbleibt gleich. Ein ungültiger Wert führt jetzt zuskipped, ohne dass geschrieben oder gelöscht wird. pytestlokal: 122 passed (Linux, Python 3.11, PySide6 6.11.3, offscreen). CI: alle 9 Checks grün.- Zusammen mit #1 gemergt: kein Konflikt, 127 passed. Das Tests-Badge muss danach auf 127.
Generated by Claude Code
lukisch
left a comment
There was a problem hiding this comment.
Zweitprüfung auf 95475e3: inhaltlich freigegeben, keine Einwände. (Als Kommentar, weil GitHub eine formale Freigabe des eigenen PRs nicht zulässt.)
- Die Reihenfolge stimmt jetzt:
_coerce_portable_bool(locked)läuft vorsave_snippet, ein ungültigerlocked-Wert fasst die Bibliothek nicht mehr an. Der alte Pfad (speichern, danndelete_item) hat ein vorhandenes gleichnamiges Snippet tatsächlich überschrieben und gelöscht. - Der neue Test deckt beide Fälle ab (vorhandenes Snippet bleibt, neues wird nicht angelegt).
- CI auf dem Head ist grün (Regression 3.10–3.13, Smoke Ubuntu/macOS, CodeQL). Lokal konnte ich die Suite nicht ausführen (kein
libEGLim Container), die Prüfung stützt sich auf Diff und CI. - Lässt sich konfliktfrei mit #1 zusammenführen (
git merge-treegeprüft).
Kleinigkeit, nicht blockierend: Der Test-Badge in README.md/README_de.md wird hier nicht angehoben. #1 setzt ihn auf 126; nach beiden Merges sind es 127 Tests.
Generated by Claude Code
Found while reviewing #1; independent of it and based on
master.Problem
LibraryManager.import_payloadsaved each snippet first and checked itslockedvalue afterwards. If the value was invalid (for example"locked": "maybe"), it deleted the snippet again. A snippet of the same name that existed before the import was overwritten and then deleted, so the user lost it.Fix
The
lockedvalue is checked before anything is written. Entries with an invalid value are skipped and counted asskipped; the library is not touched.Verification
pytest: 122 passed (121 before, 1 new), Linux, Python 3.11, PySide6 6.11.3, offscreen.masterwithout the source change.ruff check tests: clean.Not changed
README.md/README_de.mdstays at 121. fix(library,editor): block snippet path traversal, preserve line endings on save #1 already changes that line to 126; after both are merged it should read 127.CHANGELOG.mdgets one line under[Unreleased], placed after the existing entry so it does not collide with the lines fix(library,editor): block snippet path traversal, preserve line endings on save #1 adds.Generated by Claude Code