Why
There is an explicit TODO in the filter path:
# TODO(longform): align article inference with translator train sections —
# section → translate each → stitch via split_translator_source_sections +
# stitch_filter_chunks. Avoid a half-built whole-article echo path.
Today long drafts trip should_chunk_filter but the section→translate→stitch path is incomplete. Closing this makes filter useful for article-length rewrite (LinkedIn articles, newsletters) instead of echoing whole pieces.
Goal
Implement the longform filter path that:
- Splits source into translator-compatible sections
- Filters/translates each section with the local adapter/base path
- Stitches with
stitch_filter_chunks (or equivalent)
- Preserves voice guards / force mode semantics
Acceptance criteria
Pointers
filter.py — should_chunk_filter, chunk helpers
- Translator split/stitch helpers (see imports/usages around SFT translator sections)
tests/test_filter_voice.py
Difficulty
Medium — existing helpers are partially there; needs careful tests.
Why
There is an explicit TODO in the filter path:
Today long drafts trip
should_chunk_filterbut the section→translate→stitch path is incomplete. Closing this makesfilteruseful for article-length rewrite (LinkedIn articles, newsletters) instead of echoing whole pieces.Goal
Implement the longform filter path that:
stitch_filter_chunks(or equivalent)Acceptance criteria
filterbehaviorPointers
filter.py—should_chunk_filter, chunk helperstests/test_filter_voice.pyDifficulty
Medium — existing helpers are partially there; needs careful tests.