Skip to content

Add presence heartbeat liveness guard#389

Open
zergzorg wants to merge 1 commit into
SCIBASE-AI:mainfrom
zergzorg:codex/presence-heartbeat-liveness-12
Open

Add presence heartbeat liveness guard#389
zergzorg wants to merge 1 commit into
SCIBASE-AI:mainfrom
zergzorg:codex/presence-heartbeat-liveness-12

Conversation

@zergzorg
Copy link
Copy Markdown

/claim #12

Summary

  • Adds collab-presence-heartbeat-liveness-guard, a focused Real-Time Collaborative Editor slice for live cursor and presence fanout safety.
  • Evaluates synthetic collaboration rooms before broadcast, detecting stale heartbeats, ghost sessions, reconnect-grace sessions, duplicate tabs, orphaned cursors, expired typing indicators, expired presence fanout leases, and heartbeat clock skew.
  • Emits sanitized presence snapshots, cleanup queues, recovery queues, fanout events, deterministic JSON/Markdown/SVG reports, and a short H.264 MP4 demo artifact.

Why this solves part of #12

Issue #12 asks for Google Docs-style multi-user editing, live cursor tracking, user presence indicators, and activity status. Those features need a liveness gate before every presence fanout; otherwise stale tabs and broken reconnects can leave ghost collaborators, old cursors, or expired typing state visible to active authors.

This PR adds that pre-broadcast liveness layer without implementing editor UI, transport, privacy redaction, notebook execution, or section-lock recovery.

Sponsor decision packet

  • What the bounty poster gets: a complete room-level presence cleanup packet with publish/suppress decisions, cleanup and reconnect queues, fanout-ready snapshots, and stable audit digests.
  • How to verify it: run the listed Node checks and inspect reports/presence-liveness-packet.json, reports/presence-liveness-report.md, reports/summary.svg, and reports/demo.mp4.
  • Expected synthetic result: 2 rooms reviewed, 8 sessions reviewed, 3 sessions published, 5 sessions suppressed, 7 cleanup actions, 1 reconnect recovery action, and 3 presence fanout events.

Non-overlap audit

This is separate from the existing #12 work on broad editor foundations, operation replay, offline conflict, notebook workbench and kernel leases, reference formatting and merging, authorship/submission governance, freeze/lock/checkpoint recovery, review lanes, discussion/sidebar audit, autosave recovery, round-trip fidelity, review decision, task dependency, equation/figure anchors, presence privacy, accessibility parity, evidence binding, embargo release, notification visibility, and data availability.

Scope is limited to heartbeat-based liveness and cleanup immediately before cursor/presence snapshots are broadcast.

Scope boundaries

  • Does not implement production editor UI, CRDT/OT operations, section locks, notebook execution, privacy redaction, notification fanout, release/export guards, storage, or realtime network transport.
  • Uses synthetic fixtures only: no live users, private manuscripts, identity data, credentials, external services, or institutional systems.

Validation

  • cd collab-presence-heartbeat-liveness-guard && npm run check
  • cd collab-presence-heartbeat-liveness-guard && npm test
  • cd collab-presence-heartbeat-liveness-guard && npm run demo
  • ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,width,height,duration,avg_frame_rate -show_entries format=size,duration -of default=noprint_wrappers=1 collab-presence-heartbeat-liveness-guard/reports/demo.mp4 -> H.264, 960x540, 5s, 15 fps
  • git diff --check
  • git diff --cached --check
  • disclosure scan over the new module showed only expected node:crypto references

Demo and artifacts

  • Short demo video: collab-presence-heartbeat-liveness-guard/reports/demo.mp4
  • Review packet: collab-presence-heartbeat-liveness-guard/reports/presence-liveness-packet.json
  • Reviewer report: collab-presence-heartbeat-liveness-guard/reports/presence-liveness-report.md
  • Visual summary: collab-presence-heartbeat-liveness-guard/reports/summary.svg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant