The system checks external URL liveness using SSRF-protected requests that issue a single-byte streaming GET to classify links into status buckets and strips broken hyperlinks without altering surrounding prose.

flowchart TD
    A[Draft External URL] --> B[safe_get SSRF Validation]
    B -->|Passed| C[Single-byte GET Range Request]
    B -->|Failed| D[Dead / Blocked]

    C --> E{Status Classification}
    E -->|200 / 206| F[Live]
    E -->|404 / 410| G[Gone]
    E -->|5xx| H[Server Error]
    E -->|Timeout / DNS Fail| D

    F --> I[Retain Hyperlink]
    G --> J[Unwrap to Plain Text]
    H --> J
    D --> J

    I --> K[Final Markdown Draft]
    J --> K