Take only a check build its verdict names, and keep a build another check still names
mesh/merge-gate head 5c606fd1d48b merged into trunk 372faebf2824 — pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every …
mesh/repo-check head 5c606fd1d48b merged into trunk 372faebf2824 — pass: its merge-check.sh passed (run 2)
mesh/delivery delivered
mesh/delivery-group group feat/350-one-build-per-change delivered: every member is delivered
mesh/merge-gate head 5c606fd1d48b merged into trunk 372faebf2824 — pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every …
mesh/repo-check head 5c606fd1d48b merged into trunk 372faebf2824 — pass: its merge-check.sh passed (run 2)
mesh/delivery delivered
mesh/delivery-group group feat/350-one-build-per-change delivered: every member is delivered
The artifact store takes writes from anything on its network, so a record planted under another merge's key could have been registered: the walk now takes a scratch build only when the build seat's own verdict for one of its pull requests names its key and digests. Deleting by digest also took builds another check shared (review of #311; novox/hq ADR 0350).
This commit is contained in:
@@ -156,6 +156,9 @@ func Build(ctx context.Context, run Runner, publish Publisher,
|
||||
type Reuse struct {
|
||||
Scratch Scratch
|
||||
Pulls []PullRef
|
||||
// Named are the builds the verdicts of the walk's own pull requests name (novox/hq ADR 0350 §2): a scratch build
|
||||
// is taken only when one of them names its key and every digest. The record in the store alone is never enough.
|
||||
Named []NamedBuild
|
||||
// keyFirst is a check's build (§1): its key is taken before anything is built, and a module with none is not
|
||||
// built at all — nothing could ever take it.
|
||||
keyFirst bool
|
||||
@@ -465,6 +468,11 @@ func takeACheckBuild(ctx context.Context, run Runner, publish Publisher, reuse R
|
||||
if !ok {
|
||||
return nil, nil, notKeptWhy(ctx, reuse, manifest.Module, key)
|
||||
}
|
||||
// **Only a build a verdict names** (ADR 0350 §2): the store takes writes from anything on the network, so a
|
||||
// record is believed only when a check verdict of the walk's own pull requests names its key and its digests.
|
||||
if why := unnamed(reuse.Named, manifest.Module, key.Key, found); why != "" {
|
||||
return nil, nil, why
|
||||
}
|
||||
taken := &Reused{From: found}
|
||||
for _, made := range found.Made {
|
||||
copied, err := reuse.Scratch.Take(ctx, manifest.Module, made)
|
||||
|
||||
Reference in New Issue
Block a user