Verify special YAML strings '~' and 'null' are filtered out when
processing the input from the editor.
Serde replaces empty strings with their values causing an empty title to
become '~'. Best to avoid them entirely and be transparent about it.
The solution is not meant to be long term. This editor format for
getting issue data will be replaced in the near term.
When a user is creating an issue via the editor, it is very easy to
accidentally create an issue.
To fix this, make the default description also 'empty' and bail out if
either it or the title are empty.
Retain the default 'description' message by providing it as a comment.
Update the nix toolchain to be on par with rust-1.70.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Previously, we only sent the announcement when there were external
addresses. But it contains other information like the node alias,
therefore we always send it.
Since the proof-of-work can be expensive to compute everytime, we add
the ability to load the local node announcement from the file system.
We also change the proof-of-work parameters so that they are relaxed
when running in debug mode, instead of when running tests.
Finally, we remove the boolean validation of the PoW. Instead, we store
the work per-node, in the database, to be used in the future in case of
DoS attacks or network congestion.
Allows for setting a patch message during a push. Eg.:
$ git push -o patch.message="My Title" -o patch.message="My description" \
rad HEAD:refs/patches
Works the same way as the `-m` flag of `git commit`.
We test to make sure that in the event of concurrent operations,
traversal order is deterministic.
This required some changes to the testing infrastructure. We're also
able to simplify the `Actor` type that now has redundant functionality.
Simplify graph traversal and evaluation by building in some of the
functionality into `radicle-dag`, namely the pruning fold.
We avoid building vectors of graph nodes this way, and simply iterate
over the graph in one go.
This allows third party integrations to read the obtained sessionId and
the signed payload without having to implement it on their own.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Though these are perhaps not the final error types, we name them the same
across COBs and have them work the same way.
All COB modules now have a `Error` enum.
In a future change, we may want the `FromHistory` trait to support
multiple error types, eg. one for `apply` and one for `validate`.
This adds a simple `validate` function to COBs that is run on load. It
allows COBs to check whether they are valid, once all operations are
loaded, and return an error if not.
We change `Patch::latest` to always return something, because a patch is
malformed if it doesn't have at least one revision, and thus would not
load in the first place.
This also implies that there is a latest revision in the face of
concurrent updates.
Note that currently, traversal order for concurrent updates is still random.
This will be fixed in another patch.
Before this change, if a merge op referred to a commit that was not on
the default branch, the merge op and all descendant ops would be pruned.
This is a bad idea because the state of the default branch can change
*after* the merge op is created, which is out of the control of the
merge op author.
Therefore, instead of exiting, we keep processing ops (but ignore the
merge), in case the merge is invalid for this specific reason.