Skip to content

refactor: unify eprint_error settle patterns in watch.rs #257

Description

@dean0x

Location: crates/mds-cli/src/watch.rs:869, :877

What: eprint_error + error-settle pattern is repeated in two identical pairs across watch.rs. The pairs at :869/:877 and :1280/:1292 are identical but sit in different arms of nested match expressions.

Why deferred: Refactoring requires restructuring match logic, which is out of scope for the security hardening PR #253. Better approached as a dedicated refactor.

Source review: .devflow/docs/reviews/fix-esc-injection-176/2026-07-25_1625 (complexity-7)

Acceptance Criteria:

  • Identify all duplicate error-settle patterns in watch.rs
  • Extract common helper if refactoring is feasible
  • Verify no behavior change in file watching

Note: Two identical pairs exist but extracting requires restructuring nested match expressions. Evaluate trade-off before proceeding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitectural refactoringcliCLI commands and options

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions