Skip to content

exp(collab): keep mergeable state separate from authority - #164

Draft
kvnloo wants to merge 20 commits into
upstream-main-20261008-collab-authorityfrom
exp/collaboration-authority-20261008
Draft

kvnloo wants to merge 20 commits into
upstream-main-20261008-collab-authorityfrom
exp/collaboration-authority-20261008

Conversation

@kvnloo

@kvnloo kvnloo commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Implements the first pure-data slice of #147 on current upstream main@6be25595.

Contract

Keep collaborative convergence separate from authority:

user-authored mergeable state
  -> deterministic convergence

evidence claims
  -> append-only coexistence

authority-bearing transition
  -> exact base revision + audit receipt

Invariants

  • concurrent authored annotation/comment/presentation edits converge deterministically;
  • conflicting evidence interpretations are retained as separate claims rather than merged into one truth;
  • claim status, sensitivity, steward authority, commitments and action approvals are revision-owned;
  • an offline authority op against a superseded base is rejected explicitly;
  • duplicate operation replay is harmless;
  • action approvals additionally require a stable receipt id, so reconnect cannot mint a second authorization under a new transport/op id;
  • remote camera/follow presentation state may merge, but remote layer/media/mic/action side effects require local confirmation;
  • superseded evidence transitions remain in the audit trail;
  • single-user mode has no collaboration service or transport dependency.

Relationship to existing work

This follows the separation already established by #157 / #143: visibility/data responsibility policy is one owner; collaboration transport cannot silently grant operational authority.

The existing #65–#70 collaboration roadmap remains the broader transport/workspace track. This PR deliberately adds no websocket, CRDT dependency, room service, UI, account model, or persistence layer.

Scope

Three files only:

  • src/data/collaborationAuthority.js
  • src/data/collaborationAuthority.test.mjs
  • format-scope registration

Promotion rule

Keep downstream until the collaboration protocol has a concrete upstream consumer. If Yjs/Automerge is benchmarked later, use it only for the merge-friendly authored lane; keep authority transitions on this explicit revision/receipt boundary.

October 27 — locale-independent collaborative convergence (fork-only)

Existing #164 head 25a1c84246b8d507b13c0874a2c820a869934413 replaces browser-locale comparison of equal-counter actor/operation IDs with stable code-unit ordering; claim and audit receipts use the same deterministic order. Two files, one nonforce commit, original collaboration ownership unchanged. Synthetic negative control on the prior exact source returned different winners for English (z) versus Danish (aa) and reordered receipts. Current source returns z and [aa,z] in both. The exact published 8 test bodies passed under a minimal isolated V8 test adapter, not Node's native runner. NOT RUN: supported Node 24.14/26 format/unit/boundaries/build, test:track, actual GEV Scene/Puppeteer/two-tab/device QA. Exact-head Actions and status contexts are MISSING, not green. Downstream #185 and #229 still inherit the previous kernel snapshot and need separate reconciliation; #229 remains an independent native/browser HOLD. No real multiplayer, civic authority, observed data, origin approval or promotion implied.

@kvnloo
kvnloo changed the base branch from upstream-main-20261008-collab-authority to main October 9, 2026 04:19
@kvnloo
kvnloo changed the base branch from main to upstream-main-20261008-collab-authority October 9, 2026 04:19
@kvnloo
kvnloo changed the base branch from upstream-main-20261008-collab-authority to main October 9, 2026 04:22
@kvnloo
kvnloo changed the base branch from main to upstream-main-20261008-collab-authority October 9, 2026 04:24
@kvnloo
kvnloo force-pushed the upstream-main-20261008-collab-authority branch from 80b7324 to 6be2559 Compare October 9, 2026 04:25
@kvnloo kvnloo changed the title exp(collab): keep mergeable state separate from authority exp(collab): keep mergeable state separate from authority [format probe] Oct 9, 2026
@kvnloo kvnloo closed this Oct 9, 2026
@kvnloo kvnloo reopened this Oct 9, 2026
@kvnloo kvnloo closed this Oct 9, 2026
@kvnloo kvnloo changed the title exp(collab): keep mergeable state separate from authority [format probe] exp(collab): keep mergeable state separate from authority Oct 9, 2026
@kvnloo kvnloo reopened this Oct 9, 2026
kvnloo added a commit that referenced this pull request Oct 12, 2026
…ternatives

Build a small co-op/game-mode planning data contract on top of #164's authored state.
Synthetic fixture only; no live multiplayer, authority or modeled impacts.
AI-assisted implementation by ChatGPT under Kevin's direction.
@kvnloo kvnloo added the keep pr-janitor: never auto-close label Oct 17, 2026
@kvnloo

kvnloo commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Re-cut onto main as #291 (Draft, one atomic commit on top of sync #290), per the 2026-11-05 decision that feature PRs go to main. This PR is left open; it is not closed or deleted here.

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

Labels

keep pr-janitor: never auto-close

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant