• .claude/skills/javascript/SKILL.md

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Jul 21 21:53:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8c2fba616c53be965f97ca60
    Modified Files:
    .claude/skills/javascript/SKILL.md
    Log Message:
    javascript skill: document the 512-byte line cap on readAll/readln

    File.readAll() and File.readln() both default to maxlen=512. Because readAll
    is a loop over readln, and readln is fgets(buf, len+1, fp), an over-long line is SPLIT rather than truncated: fgets leaves the remainder in the stream, so
    it comes back as the next array element. The array quietly desynchronizes
    from the file's lines, nothing throws, and f.error stays 0.

    Hit this reading a 20MB data/gitpush.jsonl whose largest payload is ~160KB: a scan for the longest line reported exactly 512 bytes, and JSON.parse threw on the fragments. Only files whose lines all fit in 512 bytes behave correctly, which is what makes it look intermittent.

    Also note that load('json_lines.js') is the right tool for .jsonl and
    .ndjson, but that its own max_line_len default is 4096 -- still too small for records this size, so it has to be passed explicitly.

    Three baseline agents given the un-amended skill all got this right, but each did it by reading js_file.cpp first; the section is here to save that detour, and to carry the json_lines.js default, which none of them had reason to hit.

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net