Causal delivery in coln-js-runtime - #131
Open
incipit0 wants to merge 3 commits into
Open
Conversation
Allow automerge-repo to construct a store from scratch with a chunk of bytes, assuming they contain the root commit.
Previously when calling `Store::apply_commits`, we assume that all commits can be applied, and return an error is that is not the case. As automerge-repo cannot track which commits can be applied, we put this causal delivery logic in coln-js-runtime temporarily, by keeping what is returned from apply_chunk_bytes() and keep retrying until success. coln-js-runtime is not supposed to do this though, and in the long run we wish to move this logic to somewhere else, perhaps subduction.
Draft
|
Thanks so much. I'll get my new sync code rebased onto this and check everything runs as expected. |
|
@incipit0 Tested this today and everything is working as expected with what I need from sync for now, thanks so much. |
Collaborator
Author
|
Ok, I will try to get this merged asap. I might make some force pushes at some point, will let you know if I do that. |
incipit0
commented
Aug 28, 2026
| // | ||
| // SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
|
||
| import { StoreHandle, type TransactionHandle } from "@coln-project/runtime"; |
Collaborator
Author
There was a problem hiding this comment.
@mvr Can I have your 👀 on this little change? It seems sensible to me, but I wonder if you have opinions on this.
|
Understood. I'm very happy to just transpose my work directly on top of the new main when this is merged. Thanks so much |
incipit0
marked this pull request as ready for review
August 28, 2026 14:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@acurrieclark Here is my attempt to replicate your #130 , I have introduced abort, also made all the
apply_function return bytes that have not been applied if they are not ready. Have a go and see if it works for you.