mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
`amy marmot group create` now builds a current-profile group; `--legacy` keeps the MIP-era path for reproducing groups already on disk. The difference is what a group REQUIRES of a joining leaf — the account identity proof, which every conformant peer's KeyPackage carries, versus `0xF2EE`, which none of them do. With this, `group add` accepts an MDK KeyPackage where it previously failed the capability gate outright. Making that work surfaced two bugs that would each have been fatal on their own. `MarmotManager.groupRelays` read only the legacy `0xF2EE` extension, but a current-profile group routes through `NostrRoutingV1` (`0x8004`). Every current-profile group therefore had an EMPTY recipient scope — so under publish-before-apply no commit could ever be acknowledged, and no such group could ever advance past epoch 0. It now reads both. And the local-network relay filter turned up a third time, in NIP-65: `parseReadNorm`/`parseWriteNorm` dropped loopback entries, so our own outbox and inbox read as empty while `nip65` showed the relay. Everything then published to the default relay set — which is why commits and Welcomes were going to public relays instead of the harness's loopback. Same split as before: filtered for someone else's list (it is attacker-supplied input, and it is what exempts a relay from Tor), unfiltered for reading back our own. Two conformance fixes came with it. The Welcome rumor carried an `encoding` tag, which the binding forbids outright for every event shape it defines — a receiver that switched decoders on one could be steered into a different parse of the same bytes. And we implemented encrypted-media v2 last commit but never advertised `0x800b` in the leaf, so a group requiring it would refuse us; the advertised list now carries it, with a note that an id belongs there only when the component is actually implemented. `MarmotMipBehaviorTest` asserted the MIP-era rule that a rumor MUST carry an encoding tag. The adopted binding reverses it, so the test now asserts the current rule. Interop test 01 still passes. Test 02 (invite MDK into our group) reaches MDK but is not yet ingested; a control run confirms MDK->MDK invites work in this harness, so the remaining defect is ours, in the Welcome. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016kCuA6tc4JQzHPCDd39GHq