Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
Canonical References
Draft fintohaps opened 1 year ago

See RIP-00041 for the specification.

This patch is an implementation of RIP-0004. It implements the rules mechanism within the rules module. This is interplays with the existing canonical mechanisms, already defined (but slightly refactored).

The rules are then used in pushing and fetching references. A test is added to illustrate the canonical references in action via tags.

There were some incidental changes that were made to ensure the tags use case is easy for users. The first change was to add a tags refspec to remotes in order to easily fetch tags from peers – as well ensuring those tags do not pollute the refs/tags namespace in the working copy.

This had a knock on change where there was a bug libgit2 that didn’t allow for deleting multivar entries, which the new remote setup fell under. This was fixed and so we update to git2-0.19.

As well this, the rad id update command would error if the payload identifier was not the project identifier. This would stop adding new payloads to extend the identity – which was needed for introducing canonical references.

1

https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z3trNYnLWS11cJWC6BbxDs5niGo82/patches/1d1ce874f7c39ecdcd8c318bbae46ffd02fe1ea8?tab=changes

fintohaps opened with revision c54883e5 on base 54551b11 +1486 -78 1 year ago

See RIP-00041 for the specification.

This patch is an implementation of RIP-0004. It implements the rules mechanism within the rules module. This is interplays with the existing canonical mechanisms, already defined (but slightly refactored).

The rules are then used in pushing and fetching references. A test is added to illustrate the canonical references in action via tags.

There were some incidental changes that were made to ensure the tags use case is easy for users. The first change was to add a tags refspec to remotes in order to easily fetch tags from peers – as well ensuring those tags do not pollute the refs/tags namespace in the working copy.

This had a knock on change where there was a bug libgit2 that didn’t allow for deleting multivar entries, which the new remote setup fell under. This was fixed and so we update to git2-0.19.

As well this, the rad id update command would error if the payload identifier was not the project identifier. This would stop adding new payloads to extend the identity – which was needed for introducing canonical references.

1

https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z3trNYnLWS11cJWC6BbxDs5niGo82/patches/1d1ce874f7c39ecdcd8c318bbae46ffd02fe1ea8?tab=changes

fintohaps pushed revision 2 c1a2cc57 on base c8fbcf2a +4603 -1519 1 year ago

Major Update

See commits for all details, but basically it was the yak shave of a lifetime.

fintohaps pushed revision 3 c55494ef on base c8fbcf2a +4621 -1550 1 year ago

Changes:

  • Remove use of --tags flag in git-tag test
  • Use EntryKey instead of ObjectId in ChangeGraph to simplify getting the root entry. This means that timestamp_of is only used in the GraphBuilder.
fintohaps pushed revision 4 583e6b33 on base c8fbcf2a +5158 -1535 1 year ago

Changes:

  • Introduce VersionGroupId
  • Update test SHAs
  • Handle ordering case in identity test, where we expect the commit to happen later (uses unsafe and manipulating env var)
  • Introduce migration code for Docs
  • Introduce rad id migrate
fintohaps pushed revision 5 d54ddef2 on base 0c9a7419 +2284 -902 1 year ago

Changes:

fintohaps pushed revision 6 ac48ae6e on base c7f00b1c +3950 -1229 1 year ago

Changes:

  • Rebased on c7f00b1c
  • Missing commit for incorporating rules into identity doc
fintohaps pushed revision 7 2b31e460 on base c7f00b1c +3947 -1229 1 year ago

Changes:

  • Fixups in documentation and tests
fintohaps pushed revision 8 e1c360a1 on base c7f00b1c +3968 -1229 1 year ago

Changes:

  • Disallow rad/sigrefs rule
  • Add test for failing validation with rad/id and rad/sigrefs
fintohaps pushed revision 9 492cfbaf on base 0c9a7419 +4361 -1228 1 year ago

Changes:

  • Rename delegates field and type to allow and Allowed
  • Rename token from $identity to delegates
  • Use BTreeMaps instead of Vec.
    • This required rethinking using QualifiedPattern, and instead using a newtype, Pattern, that implemented Ord by specificity.
    • Pattern also disqualifies any use of refs/rad
  • Add From<Did> for doc::Delegates to infallibly construct the set with a single Did.
  • Changes extensions to a JSON map
  • Derive Deserialize for Rule, but only via the private Sealed trait
  • Changed the FnMut resolve callback to be Fn
  • Required updating all the radicle-cli tests
  • Added other QoL API improvements
fintohaps pushed revision 10 fbdf18d7 on base 3b5fac17 +4034 -1267 1 year ago

Rebased on master @ 3b5fac178eaf9bca639fbd0c1df0c68619a7f51f

fintohaps pushed revision 11 4baf32af on base 3b5fac17 +4051 -1267 1 year ago

Changes:

  • Document RawCanonicalRefs and CanonicalRefs
lorenz reviewed · 10 comments 1 year ago
fintohaps pushed revision 12 d2ebc70c on base 7eb07e1b +4051 -1189 1 year ago

Changes:

  • Rebased
  • Rename canonical-ref to cref
  • Order enum variant in canonical-ref.rs
  • Fix wording in example tests
  • Avoid removing rad-config tests
  • Use saturating_sub for threshold calculation in radicle-fetch
fintohaps pushed revision 13 13e9ba64 on base f30760d6 +4108 -1245 1 year ago

Rebased

fintohaps pushed revision 14 47495c40 on base f30760d6 +4735 -1423 0 years ago

Changes:

  • Stricter version parsing
  • Using VersionedRawDoc to enumerate each version of the RawDocs
  • Singleton approach for version numbers in the docs
  • Better renaming of CLI cref module
  • Fix docs for rad id migrate
fintohaps pushed revision 15 e3bdb65d on base f30760d6 +4635 -1574 11 months ago

Changes:

  • Remove MatchedRule
  • Refactoring of Canonical
  • General fixes
did:key:z6MkgFq6...nBGz reviewed · 17 comments 11 months ago
fintohaps pushed revision 16 9f779028 on base f30760d6 +4640 -1574 11 months ago

Changes:

  • Addressed erik’s feedback
fintohaps pushed revision 17 86ebfcaa on base f30760d6 +4642 -1575 11 months ago

Changes:

  • Fixed cargo doc errors
  • Fixed cli test errors
fintohaps pushed revision 18 fa9bdff3 on base 59a10214 +4642 -1575 11 months ago

Rebased