docs: Phase 61 GUILD_SYNC history on join (v0.8.26)
Document sync payload, push triggers, ingest path, and smoke-guild-sync. Roadmap Phase 61 complete; next: contacts mesh polish. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# GUILD_SYNC history on join (v0.8.26)
|
||||
|
||||
When a member joins a guild over an invite, they may have **no local message history**. Existing peers push a **`GUILD_SYNC`** gossip bundle (RPC `8`) after mesh connect or `MEMBER_JOIN`.
|
||||
|
||||
## Payload
|
||||
|
||||
```json
|
||||
{
|
||||
"guildId": "...",
|
||||
"channels": [ /* text / announcement / forum channels */ ],
|
||||
"messages": [ /* up to 50 per channel, 200 total */ ],
|
||||
"attachments": [ /* metadata for linked message attachments */ ]
|
||||
}
|
||||
```
|
||||
|
||||
## When sync is sent
|
||||
|
||||
| Trigger | Who pushes |
|
||||
|---------|------------|
|
||||
| `peer` mesh `join` | Existing member (~900ms debounce) |
|
||||
| `MEMBER_JOIN` gossip | Peers other than the new member (~500ms) |
|
||||
|
||||
Skipped when the local peer has no messages to share.
|
||||
|
||||
## Ingest
|
||||
|
||||
`PearcordPlatform._ingestGuildSync`:
|
||||
|
||||
1. `ingestChannel` for each channel in the bundle
|
||||
2. `attachments.ingestGossip` for attachment metadata
|
||||
3. Insert messages not already in HyperDB (dedupe by `channelId` + `id`)
|
||||
|
||||
## Tests
|
||||
|
||||
| Script | Marker |
|
||||
|--------|--------|
|
||||
| `npm run test:guild-sync` | `GUILD_SYNC_SMOKE_OK` |
|
||||
|
||||
Host sends five messages before invite; guest joins, mesh connects, and receives full history without manual replay.
|
||||
+2
-1
@@ -140,8 +140,9 @@ Phases **0–2** and **4** are largely complete; **3** (live audio) and **5** (n
|
||||
|
||||
| P59-1 | Server-wide emoji slots UI + boost tiers (v0.8.24) | [x] |
|
||||
| P60-1 | Pear attach preview mesh path + `fetchSource` (v0.8.25) | [x] |
|
||||
| P61-1 | GUILD_SYNC history on join (v0.8.26) | [x] |
|
||||
|
||||
**Next tranches:** GUILD_SYNC history on join · contacts mesh polish · role emoji manage UI.
|
||||
**Next tranches:** Contacts mesh polish · role emoji manage UI · discovery sync extensions.
|
||||
|
||||
When Phase 5 checklist is `[x]`, copy open items here into tracked rows in `PLATFORM_ROADMAP.md`.
|
||||
|
||||
|
||||
+15
-1
@@ -249,6 +249,19 @@ When completing work, change `[ ]` → `[x]` and add a one-line note under **Cha
|
||||
|
||||
---
|
||||
|
||||
### Phase 61 — GUILD_SYNC history on join (v0.8.26)
|
||||
|
||||
| ID | Item | Status |
|
||||
|----|------|--------|
|
||||
| P61-1 | `gossipGuildSync` + `GUILD_SYNC` mesh handler | [x] |
|
||||
| P61-2 | `_buildGuildSyncBundle` / `_ingestGuildSync` on platform | [x] |
|
||||
| P61-3 | Push on peer join + remote `MEMBER_JOIN` | [x] |
|
||||
| P61-4 | smoke-guild-sync + GUILD_SYNC.md | [x] |
|
||||
|
||||
**Next:** Contacts mesh polish · role emoji manage UI · discovery sync extensions.
|
||||
|
||||
---
|
||||
|
||||
### Phase 60 — Pear attach preview mesh path (v0.8.25)
|
||||
|
||||
| ID | Item | Status |
|
||||
@@ -259,7 +272,7 @@ When completing work, change `[ ]` → `[x]` and add a one-line note under **Cha
|
||||
| P60-4 | UI P2P mesh tag on image previews | [x] |
|
||||
| P60-5 | smoke-attachment-preview-mesh + ATTACHMENT_PREVIEW_MESH.md | [x] |
|
||||
|
||||
**Next:** GUILD_SYNC history on join · contacts mesh polish · role emoji manage UI.
|
||||
**Next:** ~~GUILD_SYNC history on join~~ (Phase 61) · contacts mesh polish · role emoji manage UI.
|
||||
|
||||
---
|
||||
|
||||
@@ -742,6 +755,7 @@ When completing work, change `[ ]` → `[x]` and add a one-line note under **Cha
|
||||
|
||||
### Changelog
|
||||
|
||||
- **2026-05-22** — v0.8.26: GUILD_SYNC history on join (`gossipGuildSync`, peer/member triggers, `test:guild-sync`, GUILD_SYNC.md).
|
||||
- **2026-05-22** — v0.8.25: Pear attach preview mesh path (`readAttachmentBytesWithSource`, preview `fetchSource`, UI P2P mesh tag, `test:attachment-preview-mesh`, ATTACHMENT_PREVIEW_MESH.md).
|
||||
- **2026-05-22** — v0.8.24: server-wide emoji slots (`pearcord-emoji/slots.js`, boost-tier limits, server settings UI, `test:emoji-slots`, EMOJI_SLOTS.md).
|
||||
- **2026-05-22** — v0.8.23: onboarding mesh E2E (`runOnboardingHostScenario`/`GuestJoin`, `test:onboarding-mesh`, live gossip after join-invite, ONBOARDING_MESH_E2E.md).
|
||||
|
||||
Reference in New Issue
Block a user