mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 19:28:25 +00:00
Six new harness tests against MDK, all green in one clean run: 20 avatar-url amy->wn 21 avatar-url wn->amy 22 edit amy->wn 23 deletion amy->wn 24 media-v2 amy->wn 25 media-v2 wn->amy The media pair needed a blob store, so the harness now runs a loopback Blossom server of its own (`blossom-server.py`, PUT /upload + GET /<sha256>). It holds nothing but ciphertext — the file key comes from each group's MLS exporter — so a download that hashes back to the original bytes is proof both implementations derived the same key. That is the whole point of tests 24 and 25, and they pass in both directions. Test 20 sends a URL that is deliberately NOT normalized (`https://Example.COM:443/a/./avatars/../pic.png`) and asserts both what we store and what wn reads back. Normalization is the wire format for this component — a decoder rejects bytes that differ from its own serialization — so a disagreement here is a group the other side cannot read at all, not a cosmetic difference. Tests 22 and 23 assert what the protocol actually says rather than what a renderer happens to do. For the edit that means a well-formed kind:1009 reaching wn (one `e` tag naming the target, the replacement as its body, the right author) plus our own reader applying the overlay — MDK's storage deliberately leaves the original row's body alone and lets the client compute the chain, so asserting on painted text would be testing its TUI. For the deletion it means the `deleted` flag on wn's materialized timeline, which is its user-visible truth. Two harness bugs surfaced while getting there, both of the kind that make a failure unreadable rather than wrong. `run.env` — where tests hand each other group ids — survived the per-run state wipe, so a `--tests` subset that consumed without re-creating failed on "not a member" for a group id from a previous run. And `amy_json` read `$?` inside `if ! cmd`, where it is the status of the negation, so every failure reported "exit 0". Push (kind 451) has no cross-implementation test here and cannot: the owner proof is an UNPUBLISHED event handed to a push service, the reference CLI exposes no command that emits one, and the harness runs no push service. There is nothing for two implementations to disagree about on the wire. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016kCuA6tc4JQzHPCDd39GHq