selfcompose: only the say naming the vault read releases it

Review round 1 of the slow vault read's wait: a tick before the read began
says "waits on nothing it reads (composing)", which released the read at
once; the read then ended before the next tick and the row failed again on
a slow start. The read now waits for a line naming the vault's own
secrets, and the row asks that any line said names it.

Runs under issue 774 (a pass that runs on says what it waits on).
Builds: design 47 H2 (test only; no design line changes)
This commit is contained in:
2026-11-23 10:46:02 +01:00
parent 1d0f3b7709
commit 2a6b92eeab
+5 -2
View File
@@ -562,7 +562,10 @@ func testTheNodeComposesItsWantsFromTheBus(t *testing.T) {
longMu.Lock()
long = append(long, line)
longMu.Unlock()
saidOnce.Do(func() { close(saidLong) })
// Only the line naming the slow read releases it: a tick before the read began says "nothing it reads".
if strings.Contains(line, "waits on the vault's own secrets") {
saidOnce.Do(func() { close(saidLong) })
}
}
}
// What fails is the vault's own, asked for keeper's secret through the same read.
@@ -604,7 +607,7 @@ func testTheNodeComposesItsWantsFromTheBus(t *testing.T) {
// vault's own secrets, which its slow read is.
if row.slow {
longMu.Lock()
names := len(long) > 0 && strings.Contains(long[0], "waits on the vault's own secrets")
names := slices.ContainsFunc(long, func(l string) bool { return strings.Contains(l, "waits on the vault's own secrets") })
longMu.Unlock()
if !names {
t.Errorf("%s: a pass that ran on said nothing of what it waits on: %q", name, long)