Runner: the line cap is read once in Start, not per line from a goroutine (issue 1966, review round 3)
mesh/delivery merged: source.main moved to novox/mesh-tools@20979201eb56
mesh/check being carried to 4ee3cc0c7f4c on 20979201eb56 | from 2ea4f019e594
mesh/delivery merged: source.main moved to novox/mesh-tools@20979201eb56
mesh/check being carried to 4ee3cc0c7f4c on 20979201eb56 | from 2ea4f019e594
Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
This commit is contained in:
@@ -301,6 +301,7 @@ func Start(module, entry string, env []string, mesh Bus, logf func(string, ...an
|
||||
// The restart pauses are read once, here: the exit handling runs on its own goroutine and must not
|
||||
// read the package's settings while a caller (a test) changes them (novox/hq issue 476).
|
||||
pauseFirst, pauseMost, settle := RestartFirst, RestartMost, RestartSettle
|
||||
lineCap := maxLine
|
||||
pause := pauseFirst
|
||||
|
||||
start := func() (*child, error) {
|
||||
@@ -348,12 +349,12 @@ func Start(module, entry string, env []string, mesh Bus, logf func(string, ...an
|
||||
defer close(c.handled)
|
||||
rd := bufio.NewReaderSize(stdout, 64*1024)
|
||||
for {
|
||||
raw, tooLong, rerr := readCapped(rd, maxLine)
|
||||
raw, tooLong, rerr := readCapped(rd, lineCap)
|
||||
if tooLong {
|
||||
// Never left frozen (issue 1966): a reader that stops while the bundle lives leaves the bundle's
|
||||
// next write blocked for good. Said, and the bundle ended; the exit path below fails what waits
|
||||
// on it and starts it again.
|
||||
reason := fmt.Sprintf("%s's bundle wrote a line over %d bytes (a tool's answer the bus cannot carry)", module, maxLine)
|
||||
reason := fmt.Sprintf("%s's bundle wrote a line over %d bytes (a tool's answer the bus cannot carry)", module, lineCap)
|
||||
logf("[mesh-tools] %s; ending the bundle", reason)
|
||||
c.mu.Lock()
|
||||
c.endedFor = reason
|
||||
|
||||
Reference in New Issue
Block a user