From 6beee7fef751a5359e29c654222135c62e4dc9ae Mon Sep 17 00:00:00 2001 From: tdwd <111124579+tdwd@users.noreply.github.com> Date: Fri, 9 Oct 2026 16:42:29 +0200 Subject: [PATCH] Put AppendNote's doc comment back on AppendNote The comment sat above the compactAbove and keepNotes block, so Go took all of it as the constants' documentation and AppendNote had none. The sentences about trimming stay on the constants they describe, and the ones about appending move down to the function. No wording changes. --- internal/coord/notes.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/coord/notes.go b/internal/coord/notes.go index 2a0127f..1518643 100644 --- a/internal/coord/notes.go +++ b/internal/coord/notes.go @@ -19,11 +19,6 @@ type Note struct { Text string `json:"text"` } -// AppendNote adds a line to the project's shared log. -// -// The log is append-only and one file per project. Append-only because -// several agents write concurrently and a read-modify-write would silently -// drop entries; one file per project because that is the sharing boundary. // The log is trimmed when it passes compactAbove, back down to keepNotes. // Trimming is what stops an append-only file becoming permanent: without it // the notes grow for the life of the project even though only the tail is ever @@ -33,6 +28,11 @@ const ( keepNotes = 100 ) +// AppendNote adds a line to the project's shared log. +// +// The log is append-only and one file per project. Append-only because +// several agents write concurrently and a read-modify-write would silently +// drop entries; one file per project because that is the sharing boundary. func (c *Coordinator) AppendNote(sessionID, text string) error { // Held across the write and the compaction below. Appends from other // agents are serialised through here, so the rewrite cannot lose a line