Location: crates/mds-core/src/lint/diagnostic.rs:416
What: sanitize_control_chars lives in the lint module but is now a core cross-cutting concern used by:
lint::to_canonical_json()
error::MdsError::serialize()
- Python bindings (
mds-python/src/lib.rs)
- CLI render paths
Why deferred: Orthogonal to closing #176. Better as a separate refactor after the security hardening lands.
Source review: .devflow/docs/reviews/fix-esc-injection-176/2026-07-25_1625 (architecture-11)
Acceptance Criteria:
Note: The function's public API signature will not change. This is a pure organizational refactor to reflect the cross-cutting nature of sanitization in the system architecture.
Location: crates/mds-core/src/lint/diagnostic.rs:416
What:
sanitize_control_charslives in the lint module but is now a core cross-cutting concern used by:lint::to_canonical_json()error::MdsError::serialize()mds-python/src/lib.rs)Why deferred: Orthogonal to closing #176. Better as a separate refactor after the security hardening lands.
Source review: .devflow/docs/reviews/fix-esc-injection-176/2026-07-25_1625 (architecture-11)
Acceptance Criteria:
crates/mds-core/src/sanitize.rssanitize_control_charsand its helpers to the new modulemds::sanitize_control_chars(no change to public API)Note: The function's public API signature will not change. This is a pure organizational refactor to reflect the cross-cutting nature of sanitization in the system architecture.