fix: make export archives identity-neutral (#155)#164
Merged
Conversation
Clear created_by/modified_by on all notes and set owner_pubkey to None in workspace.json so exported archives are identity-neutral and can be imported by any identity.
Replace owner restoration with identity stamping on import: importer becomes workspace owner and all notes get importer's pubkey as created_by/modified_by. Update obsolete test that asserted old behavior.
careck
added a commit
that referenced
this pull request
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
owner_pubkeyfromworkspace.jsonandcreated_by/modified_byfrom all notes during export, making.krillnotesarchives fully identity-neutralWorkspace::open()set_owner_pubkeyrestoration block that previously overwrote the importer's identity with the archived owner's keyCloses #155
Test Plan
test_export_archive_is_identity_neutral— verifies exported archive has no identity datatest_import_stamps_importer_identity_on_notes— exports as identity A, imports as identity B, asserts B is owner and author of all notestest_export_includes_workspace_json— updated to assertowner_pubkeyis absenttest_import_makes_importer_the_owner— updated from old test that asserted buggy behavior