mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 07:00:26 +08:00
Builds on #922, which made read-only scans tolerate undecodable bytes and kept the read-modify-write paths strict. Strict was the right call, but the refusal was invisible: append_note / set_property let a raw UnicodeDecodeError escape, _ObsidianTool.execute catches only VaultError, so the model was told "an unknown error occurred" — the exact failure mode #914 reported spending rounds guessing at. * The two write paths raise VaultError naming the note, the byte offset and the fix. The vault is still never rewritten with U+FFFD in place of the user's bytes. * Both decoders now live in one place each (_read_text / _read_text_exact) rather than four repeated read_text calls, so which of the two a new caller wants is a decision the module states once. * execute() reports any other unexpected exception to the model by type and message, and logs the traceback for the operator. * Frontmatter dates serialise through isoformat() rather than str(), so a YAML timestamp reaches the model as 2026-08-11T09:30:00 instead of 2026-08-11 09:30:00, which is not a date it can hand back.