WIP: Narrow block identity CRDT prototype (#671) #720

Closed
kayg wants to merge 2 commits from proto/block-identity-2 into dev
Owner

Tasks and blocks referenced by links need stable targets through edits, joins, deletion and sync. The previous every-block prototype could retarget aliases and resurrect deleted IDs. This draft uses explicit logical ownership, per-ID retirement and stable character addresses in an operation-set CRDT. A small format-policy interface keeps task syntax out of the generic identity engine.

The first commit amends ADR 0056. The second adds an isolated runnable prototype and ports F1–F10 and the identity-related round 7 probes. Code and table IDs name whole Markdown blocks. Cold ambiguous duplicates preserve both texts and receive fresh IDs; a revision-checked outside insertion keeps the known original and rekeys the copy.

Inline suffixes remain the usual disk form. Linked code and tables use a standalone marker paragraph. An opening or unterminated fence can make both forms impossible without changing text, so the proposal includes a checksum-guarded range map for identified ranges only. This exception to inline-only storage is explained in the ADR and covered by shared TS/Rust vectors. Stale maps preserve the file as a conflict instead of relocating an ID.

Validation and verbatim gate output are posted on issue #671. The gates include 100,000 three-client semantic seeds, the shared vectors in TS and Rust, touched-crate tests and strict clippy, typecheck, formatting and operation counts for 1,000/10,000-line notes and a million-character ordinary line. The generator varies actor ordering and deletion endpoints. Its twelve semantic families have target-text oracles in addition to convergence checks; this is bounded regression coverage, not an arbitrary-history proof.

This is a candidate for the independent break round, not production integration. The prototype has no production editor binding or native CRDT room admission. Concurrent short-ID allocation admission, general outside-file reconciliation, indexed editor offsets, durable room integration and atomic cross-note receipts remain adoption work listed in ADR 0056. The new tests exercise the model and format interface; they do not claim that unchanged production browser or native-room probes now pass.

Related to #671. No merge or deployment.

Tasks and blocks referenced by links need stable targets through edits, joins, deletion and sync. The previous every-block prototype could retarget aliases and resurrect deleted IDs. This draft uses explicit logical ownership, per-ID retirement and stable character addresses in an operation-set CRDT. A small format-policy interface keeps task syntax out of the generic identity engine. The first commit amends ADR 0056. The second adds an isolated runnable prototype and ports F1–F10 and the identity-related round 7 probes. Code and table IDs name whole Markdown blocks. Cold ambiguous duplicates preserve both texts and receive fresh IDs; a revision-checked outside insertion keeps the known original and rekeys the copy. Inline suffixes remain the usual disk form. Linked code and tables use a standalone marker paragraph. An opening or unterminated fence can make both forms impossible without changing text, so the proposal includes a checksum-guarded range map for identified ranges only. This exception to inline-only storage is explained in the ADR and covered by shared TS/Rust vectors. Stale maps preserve the file as a conflict instead of relocating an ID. Validation and verbatim gate output are posted on issue #671. The gates include 100,000 three-client semantic seeds, the shared vectors in TS and Rust, touched-crate tests and strict clippy, typecheck, formatting and operation counts for 1,000/10,000-line notes and a million-character ordinary line. The generator varies actor ordering and deletion endpoints. Its twelve semantic families have target-text oracles in addition to convergence checks; this is bounded regression coverage, not an arbitrary-history proof. This is a candidate for the independent break round, not production integration. The prototype has no production editor binding or native CRDT room admission. Concurrent short-ID allocation admission, general outside-file reconciliation, indexed editor offsets, durable room integration and atomic cross-note receipts remain adoption work listed in ADR 0056. The new tests exercise the model and format interface; they do not claim that unchanged production browser or native-room probes now pass. Related to #671. No merge or deployment.
Prototype narrow logical block identity and port independent regressions
Some checks failed
CI / server (pull_request) Successful in 1m12s
CI / rust (pull_request) Successful in 13m51s
CI / web (pull_request) Failing after 1h0m2s
14f9a187c4
Author
Owner

Closing per #931: #758 is the surviving block identity implementation.

Closing per #931: #758 is the surviving block identity implementation.
kayg closed this pull request 2026-11-04 17:37:21 +00:00
Some checks failed
CI / server (pull_request) Successful in 1m12s
CI / rust (pull_request) Successful in 13m51s
CI / web (pull_request) Failing after 1h0m2s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!720
No description provided.