Commit Graph

3185 Commits

Author SHA1 Message Date
Alexis Sellier 15f183ac7d
patch: Implement redacted revisions
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier b3faba715b
patch: Correctly merge review edits
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 919e36ab1f
crdt: Rely on causal ordering of events
Since the underlying DAG guarantees causal event delivery,
we can rely on this to simplify the code.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 3af2c53bb2
cob: Implement COB removal function
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier dd7052926a
cob: Remove `author` from `Entry`
It was no longer used.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 5a47023ac0
cob: Change history type to a string
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 0dc34dc15d
Implement patches with radicle CRDTs
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier b82e1864b5
cob: Update issues and threads
Updates these COBs to work with the implicit DAG clock.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 252b6cd7bc
crdt: Small improvements
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier f140c6d28e
cob: Add actor to `Entry`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier e83d47ff45
cob: Compute implicit monotonic clock on changes
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 1a5b68c2b3
cob: Parametrize `Change` with single signature
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 2230c8ddc4
crdt: Relax bounds and take references
The getter-style functions don't need owned keys.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier b015b29f34
cob: Add timestamp to comment state
Since the timestamp is to be retrieved from the commit,
we don't add it to the action.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 63614e9c94
cob: Make sure we generate all thread variants
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 41309538fb
crdt: Small improvements and function additions
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier be789a487f
Move `hash` module to `radicle-crypto`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier 09a8b46f34
cob: Move clock out of `Issue`
The clock shouldn't be part of the issue state, but rather
the local "actor" state.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier c5225c64cd
crdt: Relax some of the type constraints
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Vincenzo Palazzo c7d5ffe51b
cli: fix ambiguity between mutually exclusive args
There are some cases where it is just safe to skip the `--x` flag
because it is already set to true by default, and other cases where we
need to use an option value.

Also, I may miss some team code conventions regarding the PartialEq and
Eq macros to enable the quality on the `Comment` type!

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-12-01 10:18:58 +01:00
xphoniex 1b00e8a413
httpd: implement `IntoResponse` for api error variants
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex b96f357c2e
Migrate `/v1/stats` route
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex e5e8a403fc
Migrate `/projects`: `issues`, `issue` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex b4902d3408
Migrate `/projects`: `remotes`, `remote`, `blob`, `readme` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex 84c3cf4cf1
Migrate `/projects`: `history` and `tree` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex dea7082a6f
Migrate `/projects`: `root`, `project`, `commit`, `activity` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex 77e0a176bd
Migrate `/v1/delegates` route
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex 6f8511c360
Migrate `/v1/sessions` route
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex acd7aeb9c9
Migrate `/v1/`, `/v1/node` routes to heartwood
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
Dr Maxim Orlovsky da55e521a1
Use socket addr instead of Ip for the address book 2022-11-29 17:58:38 +01:00
xphoniex c597b6989e
cli: Change help descriptions for cmds
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-28 11:25:06 +01:00
xphoniex 5532d40aae
cli: Add rest of cmds to `rad`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-28 11:25:06 +01:00
Alexis Sellier 86e6fa22a1
cob: Rename default history type
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:52:31 +01:00
Alexis Sellier a79c95283b
Minor doc and instance changes
Signed-off-by: Alexis Sellier<alexis@radicle.xyz>
2022-11-26 17:51:07 +01:00
Alexis Sellier fee0296910
Rename `LClock` to `Lamport`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:48:50 +01:00
Alexis Sellier b79e2f5b56
crdt: Remove redundant `Author` type
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:44:18 +01:00
Alexis Sellier d18b67ba21
crdt: Remove redundant `merge` function
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:41:46 +01:00
Alexis Sellier d1360bbec0
crdt: Remove `Copy` bound on `LWWMap`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:41:40 +01:00
Alexis Sellier 171b5a45f7
Implement issues using radicle CRDTs
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:41:37 +01:00
Alexis Sellier 36ccab2d7a
crdt: Make some improvements to the types
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier cc33d04a7b
crdt: Require `LWWReg` value to be `Semilattice`
* Also derive instances of `Semilattice` for built-in types.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier cc64c1d80b
cob: Use semilattice rules for commenting
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier fa9a89caa3
Start integrating new CRDTs into `radicle` crate
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 550ad2b558
Make `Thread` a semilattice
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 7e8af47f59
Implement `Change::decode`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 0448441418
Use `merge` as the `Semilattice` join method
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 01b7686659
Turn `Redactable` into a semilattice
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 681a8c9374
Test CRDT storage, simplify `Thread`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 01ad0fb31d
cob: Split generic code from automerge-specific 2022-11-26 17:13:18 +01:00
Alexis Sellier 5526eceea0
cob: Add new history type, simplify `Content`
Keep the history type in the manifest, but no need to specify it
for all individual changes.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-24 13:41:24 +01:00