Read the borrowed-words log without the logger's clock, so the test passes at any time of day (issue 752)
mesh/merge-gate head f877c33c7c18 merged into trunk 0b7e740b299c — pass: builds build-agent → ace, g14, novox, shanks; no bus step; every machine composes …
mesh/repo-check head f877c33c7c18 merged into trunk 0b7e740b299c — pass: its merge-check.sh passed
mesh/delivery delivered

The test forbids "23:3" in the log line, and the logger's own timestamp held it from 23:30
to 23:39 every night, so the check went red for no reason in that window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 23:51:05 +00:00
co-authored by Claude Opus 5.5
parent 0b7e740b29
commit f877c33c7c
+4 -2
View File
@@ -258,9 +258,11 @@ func TestBorrowedWordsAreLogged(t *testing.T) {
loggedUnworded.Clear() loggedUnworded.Clear()
t.Cleanup(loggedUnworded.Clear) t.Cleanup(loggedUnworded.Clear)
var out bytes.Buffer var out bytes.Buffer
writer := log.Writer() writer, flags := log.Writer(), log.Flags()
log.SetOutput(&out) log.SetOutput(&out)
t.Cleanup(func() { log.SetOutput(writer) }) // Without the logger's own date and time, which would hold "23:3" itself from 23:30 to 23:39 (issue 752).
log.SetFlags(0)
t.Cleanup(func() { log.SetOutput(writer); log.SetFlags(flags) })
// A time that changes each observation, and a hash-shaped word: one line, quoting neither. // A time that changes each observation, and a hash-shaped word: one line, quoting neither.
for _, at := range []string{"23:32", "23:33", "23:34"} { for _, at := range []string{"23:32", "23:33", "23:34"} {
if _, err := k.Observe(t.Context(), Observation{Scope: ScopeMachine, ID: "ace", Kind: "test-clock", Machine: "ace", if _, err := k.Observe(t.Context(), Observation{Scope: ScopeMachine, ID: "ace", Kind: "test-clock", Machine: "ace",