Skip to content

loop doctor tracebacks (raw UnicodeDecodeError) on a terminal file with invalid UTF-8 bytes #107

Description

@SollanSystems

Found while adjudicating a Slice 4a review advisory (PR #106, run ledger Task 4).

Reproduction:

  1. loop scaffold ws
  2. write invalid UTF-8 bytes to ws/.loop/terminal_state.json (e.g. \xff\xfe{})
  3. loop doctor ws -> exit 1 with a raw UnicodeDecodeError traceback

Expected: a typed doctor issue (an unreadable record is a finding, not a crash) — same family as the #27#30 strict-UTF-8 work and the 'an errored check fails, it never skips' rule. doctor_report raises the exception out of its read path instead of appending an issue.

Note: loop verdict is NOT affected — its doctor wrapper converts the escape to a typed VerdictError, and scripts/test_verdict.py::test_terminal_record_with_invalid_utf8_raises_verdict_error pins that contract site-agnostically.

https://claude.ai/code/session_01JK76jSm45nHcoRoP1SdxXF

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions