fix(natives): prevent deep HTML crashes and silent truncation

html-to-markdown-rs 2.30 could recurse through pathological HTML until
a native stack overflow aborted the entire OMP process. Upstream 3.9.2
bounds those traversals and reports omitted subtrees as a
machine-readable DepthLimitExceeded warning.

Upgrade html-to-markdown-rs to 3.9.2. Upstream treats a depth-limited
conversion as a successful partial Markdown result plus a warning;
deliberately promote that warning to a rejected `htmlToMarkdown`
promise, allowing the Read tool to fall back without terminating OMP.
Normal conversions and unrelated warnings keep their existing behavior.

Add a rejection-contract test plus a child-process regression proving
OMP survives deeply nested and malformed input.
This commit is contained in:
br411
2026-07-12 23:20:00 +02:00
parent 4df68d6043
commit c1c162225b
7 changed files with 331 additions and 108 deletions
+155 -90
View File
File diff suppressed because one or more lines are too long