Log a refused wording without what it quotes, and keep the secret-given words within bounds
mesh/merge-gate pass: builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step; every machine composes with the change as it…
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered

The reviewer found that the logged reason quoted the refused fragment: a
hash-shaped secret would reach the journal, and a changing clock time
defeated the once-per-kind dedupe. The reason is now logged without its
quoted fragment, the test resets the dedupe so it repeats, and a module
name too long for the headline falls back to the machine.
This commit is contained in:
jochen
2026-10-09 23:44:19 +02:00
parent 988e501ccc
commit a138c045bb
4 changed files with 41 additions and 16 deletions
+8 -2
View File
@@ -151,11 +151,17 @@ func unworded(o Observation, why string) {
Unworded(o, why)
return
}
if _, seen := loggedUnworded.LoadOrStore(o.Kind+"\x00"+why, true); !seen {
log.Printf("the condition kind %q is said in the scope's words, not its own: %s", o.Kind, why)
// The reason without what it quotes of the words: a quoted fragment may be a hash-shaped secret, and a
// fragment that changes (a clock time) would log a new line every time.
reason := quotedFragment.ReplaceAllString(why, "")
if _, seen := loggedUnworded.LoadOrStore(o.Kind+"\x00"+reason, true); !seen {
log.Printf("the condition kind %q is said in the scope's words, not its own: %s", o.Kind, reason)
}
}
// quotedFragment is what a reason of the plain rule quotes of the words it refused, at its end.
var quotedFragment = regexp.MustCompile(` \([^()]*\)$`)
// The plain rule's shapes.
var (
hexID = regexp.MustCompile(`\b[0-9a-f]{7,40}\b`)