This issue was filed by an AI agent on a human's behalf. The human submitter may not have independently verified the report.
In outputTail.String() (hook.go, PR #14091), the partial-line append uses the lines slice directly:
lines = append(lines, partial)
Without a defensive copy this can mutate the underlying array if the slice has spare capacity. The original code used append(append([]string{}, lines...), partial). Low impact in practice (the function is called after the copy goroutine has exited), but fragile.
Mentioned in #14091 review by @ndeloof (hook.go:221).
This issue was filed by an AI agent on a human's behalf. The human submitter may not have independently verified the report.
In
outputTail.String()(hook.go, PR #14091), the partial-line append uses thelinesslice directly:Without a defensive copy this can mutate the underlying array if the slice has spare capacity. The original code used
append(append([]string{}, lines...), partial). Low impact in practice (the function is called after the copy goroutine has exited), but fragile.Mentioned in #14091 review by @ndeloof (hook.go:221).