mesh/delivery-group group fix/704-release-branch-judge rejected: its order contradicts itself: novox/mesh-catalog@47ef2644aca1 and novox/mesh-controller@2bee29…
mesh/merge-gate head 2bee290eea56 merged into trunk 76304d9db817 — pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every …
mesh/repo-check head 2bee290eea56 merged into trunk 76304d9db817 — pass: its merge-check.sh passed
mesh/delivery superseded: a newer head of the same pull request
Review of #329: a judge's home made with a temporary directory inside the build agent is resolved on the host by the container runtime, leaving a cold cache behind on every check, and a kept judge was lost on every redeploy. Judge builds now use the judge cache the build agent declares (MESH_JUDGE_CACHE), mounted into judge builds only: one warm Go cache, the kept judges, and a fresh home per check removed after it (hq ADR 0358 §6, issue 704, issue 482). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1.3 KiB
Go
28 lines
1.3 KiB
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/novox/mesh-controller/internal/link"
|
|
)
|
|
|
|
// **A pull request into a release branch reaches the check as one** (novox/hq ADR 0358): the build seat hands the
|
|
// check the release branch and, beside it, the trunk each repository is read at when it has no branch of that name;
|
|
// and it hands the check the judge cache the build agent declares (MESH_JUDGE_CACHE), never a path of its own.
|
|
func TestTheBuildSeatHandsTheCheckItsReleaseBranch(t *testing.T) {
|
|
spec := checkSpecOf(link.BuildRequest{ID: "b", Repository: "r", Ref: "abc", Check: &link.CheckRequest{
|
|
Owner: "novox", Repo: "mesh-catalog", Base: "feat/57", Release: "feat/57",
|
|
Beside: map[string]link.CheckedOut{"mesh-host": {Repository: "h", Ref: "feat/57", Else: "main"}}}})
|
|
if spec.Release != "feat/57" || spec.Beside["mesh-host"].Ref != "feat/57" || spec.Beside["mesh-host"].Else != "main" {
|
|
t.Fatalf("the check was handed release %q and mesh-host %+v", spec.Release, spec.Beside["mesh-host"])
|
|
}
|
|
t.Setenv("MESH_JUDGE_CACHE", "/var/lib/mesh/build-agent/judge-cache")
|
|
if got := judgeCache(); got != "/var/lib/mesh/build-agent/judge-cache" {
|
|
t.Fatalf("the judge cache the manifest declares is read as %q", got)
|
|
}
|
|
t.Setenv("MESH_JUDGE_CACHE", "")
|
|
if got := judgeCache(); got != "" {
|
|
t.Fatalf("with no judge cache declared, %q is used", got)
|
|
}
|
|
}
|