]> git.giacomolli.uk - onechat/commitdiff
Mark the line limit with ASCII only
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 18:12:33 +0000 (15:12 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 18:12:33 +0000 (15:12 -0300)
The note for a line that is too long ends its cut with "| <- LIMIT"
instead of a Unicode arrow, as the guide requires ASCII in every file
except Unicode test data.

Issue: b14d537

compactor.go
compactor_test.go

index 6840fd41a2c53726acfc87a96b75db6857aa3a1c..ac5fd1d56541e416e981c013cbe20f289afb281a 100644 (file)
@@ -129,7 +129,7 @@ func tooLong(line string) string {
        return fmt.Sprintf(`Too long: your last line for this <input> was %d bytes,
 over the %d-byte limit. Write the whole line again, cutting just
 enough of the least valuable items to fit before this cut:
        return fmt.Sprintf(`Too long: your last line for this <input> was %d bytes,
 over the %d-byte limit. Write the whole line again, cutting just
 enough of the least valuable items to fit before this cut:
-%s| ← LIMIT`, len(line), nodeBytes, cutLine(line))
+%s| <- LIMIT`, len(line), nodeBytes, cutLine(line))
 }
 
 // cutLine returns the first nodeBytes bytes of line, without a part of a
 }
 
 // cutLine returns the first nodeBytes bytes of line, without a part of a
index 7813c773369287593f07b246c6620c7b9c4560ea..cd6311ad52b612b21f802024a528e5afc143a799 100644 (file)
@@ -85,7 +85,7 @@ func TestCompactorRetriesALongLineWithTheNewestNote(t *testing.T) {
                require.Equal(t, first, parts[:2])
                require.Equal(t, []string{tooLong(want)}, parts[2:])
                require.Contains(t, parts[2], "was "+strconv.Itoa(len(want))+" bytes,")
                require.Equal(t, first, parts[:2])
                require.Equal(t, []string{tooLong(want)}, parts[2:])
                require.Contains(t, parts[2], "was "+strconv.Itoa(len(want))+" bytes,")
-               require.Contains(t, parts[2], "\n"+want[:512]+"| ← LIMIT")
+               require.Contains(t, parts[2], "\n"+want[:512]+"| <- LIMIT")
 
                note, err := json.Marshal(map[string]string{
                        "type": "input_text",
 
                note, err := json.Marshal(map[string]string{
                        "type": "input_text",