Repository navigation
server: write a request line's control bytes as \xNN in the access log, as Python's log_message does - #2542
Conversation
|
Thanks @chadhurley25075-png. Putting this in |
…g, as Python's log_message does
640de35 to
2dfd087
Compare
|
Thank you @chadhurley25075-png. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
|
Thanks @chadhurley25075-png! This is in TensorFold 1.2.6, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.6
|
The
Test.sinkinlog.ziglets the access line be checked byte for byte, andhttp_conn.latin1keeps a request line's bytes rather than guessing at them. Those two choices are what made this change and its test small.What this changes
Before: a request line's bytes went into the
[tensorfold]access line as they arrived, so a request such as\x1b[2J\x1b]0;owned\x07GET /healthwrote terminal controls into whatever the log is attached to. After:line()writes every C0, DEL and C1 control (the C1 ashttp_conn.latin1carries it,0xc2then the byte) as\xNN, the way Python'slog_messagedoes, at the one place every[tensorfold]line passes through, so the access line, the refusal lines and the key label all get it. One deliberate difference from Python: backslashes are not doubled, so Windows paths in startup lines stay readable; happy to add that if you prefer the exact table. The ordinary line is byte-identical to before, and a line past the buffer still ends in exactly one newline.atc overlap --json(run 2026-11-08 03:2x CT against main):overlaps: [], no open pull request shares the file; one local worktree shares it,conflict: clean.complete: falsewithpullFilesLimit,pullFilesUnavailable,timeLimit, so the open-PR coverage was partial.Checks on this head
python3 tools/zig/lean_check.py, on the base and on this head: 116 and 116, 0 new (python3 tools/pr_check.py --base main: 0 errors, 1 advisory warning about the Unreleased line).zig build -Dfixed-cpu test --test-timeout 10mexit 0,zig build -Dfixed-cpu test-server-securityexit 0,zig build -Dfixed-cpu test-goldenexit 0 (the runner prints no pass/fail/skip summary on a green build; the new test's name begins withsecurity:so the security step reaches it).zig fmt --check build.zig zigandgit diff --checkclean. All of these were run on this head, 640de35, after the rebase onto 1a56448 (test 211 s, security 2 s, golden 81 s).Receipt
n/a: the change is in the server's log line formatting and cannot reach inference, tokens or speed.
[tensorfold]line on every platform; host tests on Linux; Metal, CUDA and HIP builds not run.Checklist
zig build -Dfixed-cpu test-server-securityfails, the sink receives the raw ESC bytes, Build Summary21/22 tests passed (1 failed); with the change it passes. No dependency to skip on.)From Chad Hurley and Compass — Compass is our family's assistant; this change was found, fixed and tested on Claude Mythos 5.1.