unsloth/studio/backend/loggers
Roland Tannous c57a97958a
Studio: stop truncating long log lines as suspected base64 (#5335)
* Studio: stop truncating long log lines as suspected base64

filter_sensitive_data carried a heuristic from the original Studio
import that truncated any string >100 chars containing ',' or '/'
to value[:20] + '...'. The block was dormant until #5246 wired
filter_sensitive_data into the structlog processor chain to redact
native-path leases. Once active, the heuristic ate normal log lines
- llama_cpp_backend's GGUF size summary, mmproj selection, the full
llama-server command line, and any traceback containing a path -
all rendered as a 20-char prefix, defeating debugging of llama-server
exceptions and GPU selection.

Drop the base64 truncation. No call site in the codebase logs raw
base64; if one ever does, it should truncate at the source rather
than in a global filter. Native-path lease redaction added by #5246
is preserved.

* Studio: regression test for filter_sensitive_data truncation

Pins two properties in studio/backend/loggers/handlers.py:

1. Long log messages with ',' or '/' (the GGUF size summary, mmproj
   selection, full llama-server command, exception tracebacks) flow
   through filter_sensitive_data unchanged. Exercises the exact call
   sites that regressed when #5246 wired the processor in.

2. Native-path lease redaction still fires for both the inline
   native_path_lease=... regex form and the nativePathLease dict-key
   form, so a future cleanup of the truncation logic can't quietly
   strip #5246's redaction along with it.
2026-05-08 13:07:18 +04:00
..
.gitkeep root studio folder 2026-02-02 09:13:49 +00:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
config.py Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00
handlers.py Studio: stop truncating long log lines as suspected base64 (#5335) 2026-05-08 13:07:18 +04:00