internal/pkg: implementation revisions

This enables changing the behaviour of an artifact implementation without changing its IR structure. Unfortunately this changes the IR header structure resulting in many rebuilds.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-07-23 16:39:34 +09:00
parent 0e689d9983
commit 67dbb68818
15 changed files with 168 additions and 94 deletions
+4 -4
View File
@@ -63,7 +63,7 @@ func TestNoReply(t *testing.T) {
}
<-done
wantIdent := pkg.MustDecode("fiZf-ZY_Yq6qxJNrHbMiIPYCsGkUiKCRsZrcSELXTqZWtCnESlHmzV5ThhWWGGYG")
wantIdent := pkg.MustDecode("fRn1L_pE6JbizdDOKS9GiZXEIp_yx4YYz_nSuv423hGnxAI2rUAwnR1OG1zjsP0N")
if gotIdent := c.Ident(a).Value(); gotIdent != wantIdent {
t.Errorf(
"cureFromIR: %s, want %s",
@@ -124,7 +124,7 @@ func TestDaemon(t *testing.T) {
cancel()
<-done
const want = "fiZf-ZY_Yq6qxJNrHbMiIPYCsGkUiKCRsZrcSELXTqZWtCnESlHmzV5ThhWWGGYG"
const want = "fRn1L_pE6JbizdDOKS9GiZXEIp_yx4YYz_nSuv423hGnxAI2rUAwnR1OG1zjsP0N"
if got := filepath.Base(p.String()); got != want {
t.Errorf("cureRemote: %s, want %s", got, want)
}
@@ -132,8 +132,8 @@ func TestDaemon(t *testing.T) {
wantLog := []string{
"",
"daemon: aborting all pending cures",
"daemon: attempting to cancel invalid artifact kQm9fmnCmXST1-MMmxzcau2oKZCXXrlZydo4PkeV5hO_2PKfeC8t98hrbV_ZZx_j",
"daemon: fulfilled artifact fiZf-ZY_Yq6qxJNrHbMiIPYCsGkUiKCRsZrcSELXTqZWtCnESlHmzV5ThhWWGGYG",
"daemon: attempting to cancel invalid artifact C0YO8fkKg38JGK95j8k1tHywA7nMk9xp2TUa69di7uFvnKioTdOOLaDRiwRcs1Nf",
"daemon: fulfilled artifact " + want,
}
gotLog := strings.Split(buf.String(), "\n")
slices.Sort(gotLog)