Files
pearcord-platform/mixins
Raven ScottandCursor f818f54f06 feat(phase967): guild mesh churn stats extract + peer join/leave keys (v0.8.934)
Non-breaking refactor — Phase 967 of the Guild Mesh Production Hardening Track.

New module:
- guild-mesh-churn-stats-build.js: centralises all churn event payload construction.
  Exports key registries (meshChurnLogBaseFieldKeys, meshChurnPeerJoinLeaveFieldKeys,
  meshChurnStaleEvictFieldKeys, meshChurnPushPeerSlotFieldKeys, meshChurnGossipFlushFieldKeys),
  corresponding listers, and five snapshot builders (buildMeshChurnPeerJoinSnapshot,
  buildMeshChurnPeerLeaveSnapshot, buildMeshChurnStaleEvictSnapshot,
  buildMeshChurnPushPeerSlotSnapshot, buildMeshChurnGossipFlushSnapshot).

Call-site wiring (zero behavior change):
- platform-guild-wire-mixin.js: peer-join and peer-leave logs delegate to builders
- platform-guild-mesh-peer-mixin.js: stale-peer-evict log delegates to builder
- platform-guild-gossip-outbox-mixin.js: gossip-outbox-flush logs delegate to builder
- platform-guild-sync-export-mixin.js: push-peer-slot log delegates to builder

All public APIs, event payloads, and observable behavior are identical to before.

Co-authored-by: Cursor <[email protected]>
2026-06-05 03:29:22 -04:00
..

Pearcord platform mixins

Prototype mixins merged onto PearcordPlatform in manifest order (platform-mixin-assign-manifest.js). Do not reorder rows without a regression pass (npm run test:phase730-mixin-manifest).

Layout

Folder Contents Manifest rows (approx.)
domain/ Legacy feature mixins (permissions-mixin, user-settings, …) 116
json-export/ Signed JSON mesh export mixins (*-json-mixin.js) 1759
runtime/core/ Hyperswarm, session, capabilities, diagnostics 6065
runtime/mesh/ Guild mesh peers, auto-heal, federation view 6674
runtime/guild-sync/ Sync watermarks, gossip outbox, wire, ingest/export 7588
runtime/search-discovery/ Search index, discovery listings, forum search 89103
runtime/partition-heal/ Partition heal state + domain heal mixins 72, 104112
runtime/view/ view(), caches, unread audit 97, 109111, 126
runtime/voice-dm/ DM session, voice mesh state, contacts presence 9293, 129130
runtime/features/ Messaging, permissions, channels, bots, settings prefs, … remainder

Path map: mixin-paths.json. Regenerate after adding a mixin:

python3 apps/pearcord/scripts/generate-mixin-paths-json.py
# edit map / categorize() if needed
python3 apps/pearcord/scripts/migrate-platform-mixin-dirs.py --manifest-only  # after manual mv
cd modules/pearcord-platform && python3 ../../apps/pearcord/scripts/regenerate-apply-platform-mixins.py
cd modules/pearcord-platform && python3 ../../apps/pearcord/scripts/regenerate-runtime-mixin-registry.py

Adding a new platform-* mixin

  1. Add file under the correct runtime/<category>/ folder.
  2. Append a row to platform-mixin-assign-manifest.js (usually near related mixins).
  3. Run both regenerate scripts and npm run test:phase730-mixin-manifest.

See PLATFORM_MIXINS.md for architecture context.