Skip to content

Convert wireMessenger to LAVA @artifact_processor (+ forensic fix: stop writing to the source DB)#835

Merged
abrignoni merged 1 commit into
mainfrom
lava-batch-83
Jun 21, 2026
Merged

Convert wireMessenger to LAVA @artifact_processor (+ forensic fix: stop writing to the source DB)#835
abrignoni merged 1 commit into
mainfrom
lava-batch-83

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Converts the three Wire Messenger artifacts (Wire User Profile, Wire Contacts, Wire Messages) to the decorated @artifact_processor pattern.

⚠️ Forensic integrity fix (important): the original get_wire_messages, when MsgDeletion had rows, opened the evidence database in write mode (sqlite3.connect) and ran INSERT INTO Messages + UPDATE Messages to surface deleted messages — i.e. it modified the source evidence. This now reads MsgDeletion read-only and appends the deleted entries (Message Type = Deleted) in Python, never touching the source DB.

Bug fixes

  • _user_id guards a missing com.wire.preferences.xml (the old code could pass None into re.matchTypeError).
  • The SQLite magic-byte check now actually runs — the original tested the lambda object (if is_sqlite3:), which is always truthy, so the validation was dead.

Media migration: the profile picture moves from media_to_html to ('Profile Picture','media') via check_in_media.

Other: timestamps → aware UTC datetime; reserved-word column audit clean. Original author (@cf-eglendye) and dates (2024-04-24) preserved.

…ixes)

Converts the three Wire Messenger artifacts (Profile, Contacts, Messages)
to the decorated pattern.

Forensic fix: the original get_wire_messages opened the evidence database
in WRITE mode and INSERTed/UPDATEd the Messages table to surface deleted
messages. This now reads MsgDeletion read-only and appends the deleted
entries (Message Type 'Deleted') without ever modifying the source DB.

Bug fixes: _user_id now guards against a missing preferences file (the old
code could pass None into re.match -> TypeError), and the SQLite-magic-byte
check actually runs (the original tested the lambda object, always truthy).

Profile picture migrates from media_to_html to ('Profile Picture','media')
via check_in_media. Timestamps become aware UTC datetimes. Reserved-word
column audit run (clean).
@abrignoni abrignoni merged commit 5dd9cf7 into main Jun 21, 2026
1 check passed
@abrignoni abrignoni deleted the lava-batch-83 branch June 21, 2026 20:30
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.

1 participant