Skip to content

fix: make export archives identity-neutral (#155)#164

Merged
careck merged 5 commits intomasterfrom
fix/identity-neutral-export
Apr 25, 2026
Merged

fix: make export archives identity-neutral (#155)#164
careck merged 5 commits intomasterfrom
fix/identity-neutral-export

Conversation

@careck
Copy link
Copy Markdown
Member

@careck careck commented Apr 25, 2026

Summary

  • Strip owner_pubkey from workspace.json and created_by/modified_by from all notes during export, making .krillnotes archives fully identity-neutral
  • On import, stamp the importer's identity pubkey onto all notes as creator/modifier — the importer naturally becomes root owner via Workspace::open()
  • Remove the set_owner_pubkey restoration block that previously overwrote the importer's identity with the archived owner's key

Closes #155

Test Plan

  • test_export_archive_is_identity_neutral — verifies exported archive has no identity data
  • test_import_stamps_importer_identity_on_notes — exports as identity A, imports as identity B, asserts B is owner and author of all notes
  • test_export_includes_workspace_json — updated to assert owner_pubkey is absent
  • test_import_makes_importer_the_owner — updated from old test that asserted buggy behavior
  • Full suite: 628 tests pass

careck added 5 commits April 25, 2026 18:20
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 careck merged commit a9094ad into master Apr 25, 2026
1 of 2 checks passed
@careck careck deleted the fix/identity-neutral-export branch April 28, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exporting a shared workspace as owner creates unusable workspace

1 participant