8000 feat(pipelines): a Read step picks its own converter, such as anytopdf by adeelahmad · Pull Request #610 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(pipelines): a Read step picks its own converter, such as anytopdf - #610

Merged
adeelahmad merged 3 commits into
mainfrom
claude/project-thread-vtz8ka
Oct 18, 2026
Merged

adeelahmad merged 3 commits into
mainfrom
claude/project-thread-vtz8ka

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: whether anytopdf makes a document's PDF was one server-wide choice (documents.converter). A pipeline for scanned receipts couldn't use anytopdf (with its page flattening) while the rest of the archive kept Lens's own converters. Re-reading an image with Lens after anytopdf had read it left the asset pointing at the old anytopdf PDF.

After: a pipeline's Read step takes converter (auto, anytopdf or lens), shown in the pipeline editor as Make PDFs with; unset follows Settings › Documents. If the step asks for anytopdf where it isn't installed and no conversion node is set, Lens converts the file and the run log says why. An image read by Lens itself clears its stale rendition. DEVLOG's anytopdf entry (from #120, still saying "not started") now lists what's built and what's left.

How: pipelines.validate_steps accepts converter only on a read step and checks its value; jobs._read runs documents.transcribe with that converter in place of documents.converter; no stored-data shape changes.

Motivation and Context

The anytopdf integration backlog item (#120). Most of it shipped already (#210 #220 #222 #223 #226 #229 #233); the open "Convert with anytopdf node with its options" item is this.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project.
  • I added or updated tests (test_a_read_step_picks_its_own_converter, pipeline-convert.test.ts).
  • I have updated docs/ (processing.md, configuration.md, requirements.md, README).
  • Changelog fragment changelog.d/read-step-converter.md.

Local CI: ci/local-ci.sh --jobs backend passed on 3c4cd56; frontend jest for the changed test, tsc, eslint, prettier, ruff and check_requirements.py pass.

Done questions

  • Goal: per-pipeline anytopdf conversion; merged on green.
  • Agents: POST/PATCH /api/v1/pipelines with {"type": "read", "converter": "anytopdf"}, and POST /api/v1/jobs with steps.
  • Zero setup: nothing new; anytopdf is fetched as before.
  • Fewest clicks: one select on the Read step, defaulting to the server's choice.
  • Configurable: in the pipeline editor; default unchanged.
  • Light: nothing heavy added; anytopdf still fetched only when picked.
  • Private and secure: same offline, no-plugin anytopdf runs; no new surface.
  • Cost: no model calls.
  • User decides: off unless set on a step; existing defaults unchanged.
  • Upgrades: no stored-data shape change (existing steps have no converter).
  • Honest: DEVLOG says what's built and what's left.
  • Tests, docs updated; no generated files affected (steps are free-form in the schema).
  • Open standards: n/a; no new dependencies.
  • Reported; refine later in DEVLOG: evidence PDF as a step, reading anytopdf's graph bundle, Lens OCR as a sidecar.
  • Reuse: reuses documents.converter logic, only overriding it per step.

Generated by Claude Code

A pipeline's read step takes converter (auto, anytopdf or lens) in place of
documents.converter, so one pipeline can make its PDFs with anytopdf while the
rest keep the server's choice. The pipeline editor shows it as Make PDFs with.
An image read again by Lens itself no longer keeps a stale anytopdf rendition.
DEVLOG's anytopdf entry now says what is built and what is left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ChKkay74tsVsqnBCyksvoW
@adeelahmad adeelahmad self-assigned this Oct 18, 2026
…-vtz8ka

# Conflicts:
#	README.md
#	fastapi_backend/app/domain/pipelines.py
@adeelahmad
adeelahmad merged commit ecfce0d into main Oct 18, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-vtz8ka branch October 18, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0