Skip to content

N-03: Encoder pre-flight with graceful fallback #293

Description

@gfargo

Value: high, and it directly de-risks B-02. caption already has a pre-flight that validates the Ollama model
before a 300-item bulk run fails identically 300 times. optimize --encoder jsquash has no equivalent: a codec that
can't load throws per-item, mid-run.

Add a one-time encoder pre-flight that actually attempts a tiny encode for the requested format, and on failure either
fall back to sharp with a loud warning or fail fast before touching anything — chosen by --strict. Surface the result
in doctor (N-04).


Extracted from a repo audit performed 2026-07 (the audit doc it came from was proposed via an unmerged docs PR).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions