desktop: Name the refs behind local announcements

The node announces the user's own writes, and those of the `rad` CLI,
without saying which refs changed, so each one refetched the whole repo,
including a scan of every CI job. Comparing the announced signed refs
with the previous ones names them. Releases and boards get keys of their
own instead of falling back to the whole repo.
This commit is contained in:
Rūdolfs Ošiņš
2026-11-20 19:32:17 +01:00
parent cbdd3d2d86
commit 94ac124c62
5 changed files with 338 additions and 42 deletions
+12
View File
@@ -45,6 +45,18 @@ describe("affectedKeys", () => {
).toEqual([keys.jobs(rid)]);
});
test("releases and boards affect only their own keys", () => {
expect(
affectedKeys({
rid,
refs: [
`refs/namespaces/${nid}/refs/cobs/dev.radicle.artifact/${issue}`,
`refs/namespaces/${nid}/refs/cobs/works.monadic.board/${issue}`,
],
}),
).toEqual([keys.releases(rid), keys.boards(rid)]);
});
test("an identity update affects the whole repository", () => {
expect(
affectedKeys({