Skip to content

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Oct 17, 2025

Centralize redaction in persistence layer; sanitize on write, sanitize on read as safety net; add unit tests.


Important

Centralizes UI message redaction in the persistence layer by sanitizing sensitive data on write and read, with tests verifying the functionality.

  • Behavior:
    • saveTaskMessages() in taskMessages.ts sanitizes sensitive data before writing to disk.
    • readTaskMessages() sanitizes legacy data on read as a safety net.
  • Functions:
    • Adds sanitizeMessageText() and sanitizeMessages() to handle redaction of sensitive tags.
    • Updates saveTaskMessages() and readTaskMessages() to use sanitization functions.
  • Tests:
    • New tests in taskMessages.sanitize.spec.ts verify sanitization on write and read, idempotency, and handling of non-string data.

This description was created by Ellipsis for cc77aab. You can customize this summary. It will automatically update as commits are pushed.

…revent storing file payloads in ui_messages.json; sanitize on save and read
@roomote roomote bot requested review from cte, jr and mrubens as code owners October 17, 2025 04:58
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Oct 17, 2025
Copy link
Author

roomote bot commented Oct 17, 2025

Code Review Complete ✅

I've completed a thorough review of this pull request and found no issues that require changes.

Summary

This PR successfully centralizes UI message redaction in the persistence layer with:

  • Clean separation of concerns by handling sanitization at the persistence boundary
  • Comprehensive test coverage for various sanitization scenarios
  • Proper use of safeWriteJson as required by project rules
  • Type-safe implementation with proper type guards
  • Defense-in-depth approach with both write-time and read-time sanitization

The implementation is well-designed and ready for merge.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants