Design 47 H2's corrections: the gate's ledger lifetimes and owed acts, the bus module's recreate, gitea runs-as part 2 (issue 1984) #758

Merged
mesh-tools merged 51 commits from feat/47-H2-corrections into main 2026-11-25 20:11:52 +00:00
Showing only changes of commit 5c1911dd7c - Show all commits
@@ -129,17 +129,6 @@ func (f *memFingerprints) Put(k string, v Kept) error {
}
func (f *memFingerprints) Delete(k string) error { delete(f.m, k); return nil }
// asKitKnows reports an other-bytes answer as the refusal the publish conformance kit's RunReserved row (a version held under
// another digest, published whole) still looks for; that row reads H-A-589's old refusal, which H-A-729 and H-A-738 replace.
func asKitKnows(a Answer, err error) (Answer, error, string) {
if a.OtherBytes == nil {
return a, err, ""
}
reason := "not stored: is published with " + a.OtherBytes.Digest
a.Ended = true
return a, errors.New("publish: " + reason), reason
}
func newBed(numbered bool) *bed {
b := &bed{forge: &forge{files: map[string]map[string][]byte{}}, findings: map[string]bool{}}
b.h = &Holder{Objects: memObjects{}, Transfers: memTransfers{}, Fingerprints: &memFingerprints{m: map[string]Kept{}}, Builder: builder{ok: numbered},
@@ -257,14 +246,13 @@ func TestTheForgeHoldsBothPackageSeats(t *testing.T) {
Hold: func() { b.forge.holdDigest(seat, "mesh-sdk", "0.1.19", digest([]byte("first"))) },
PublishWhole: func() publishconformance.Outcome {
a, err := b.h.Publish(seat, goBuild, pub("mesh-sdk", "0.1.19", whole))
a, err, refused := asKitKnows(a, err)
if refused != "" {
return publishconformance.Outcome{Event: "refused", Reason: refused}
}
if err == nil && !a.Ended {
if err == nil && !a.Ended && a.OtherBytes == nil {
_, err = b.h.PublishPart(seat, goBuild, "t-mesh-sdk", digest(whole), 0, true, whole)
}
o := publishconformance.Outcome{Err: err}
if a.OtherBytes != nil {
o.Other = &publishconformance.OtherBytes{Digest: a.OtherBytes.Digest, Fingerprint: a.OtherBytes.Fingerprint}
}
if len(b.said) > 0 {
o.Event, o.Reason = b.said[len(b.said)-1].event, b.said[len(b.said)-1].o.Reason
}