| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This pull request has been inactive for 14 days and is now marked stale. It will be closed in 7 days if there is no further activity. Comment or remove the stale label to keep it open. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Implements the windowed full-page-text drafting direction recorded in #133. The structure draft model previously saw only the first page_text_chars characters (default 1,200) of each page in a single pass, so section starts in the lower part of a dense page and structure that must be inferred from body prose were invisible at drafting time, and node summaries were written from the same truncated view.
Drafting now follows the PageIndex-style input policy the issue describes: pages are packed complete into character-bounded windows (window_chars, default 80,000 ≈ 20k tokens, matching the reference implementation's window size at ~4 chars/token), consecutive windows share window_overlap_pages (default 1) trailing pages for continuity, and a document larger than one window is drafted across chained calls in which the model receives the prior draft as draft_so_far and returns the complete extended hierarchy. A page is never split; an oversized page forms its own window; window packing always advances at least one page, so it terminates. The returned draft keeps the worst quality rating seen across windows, so one unreliable window still routes the document to the existing deterministic flat fallback in PaperStructureTree.from_draft.
page_text_chars stays available as an explicit per-page clip for cost control on sparse inputs, per the issue's "document when truncation is safe" note, but the default is now None (full pages). PaperStructureProducer records the new input policy (orchestration: "windowed-v1", window_chars, window_overlap_pages, optional page_text_chars); the previous "single-pass-v1" literal and integer page_text_chars remain valid so stored artifacts keep loading, and the changed producer identity versions new trees separately from old ones, as designed. prompt_version bumps to paper-structure-v3.
The issue's remaining directions — a title-verification pass and a dedicated summary pass over full section text — are not in this PR; they change the draft acceptance and call-count contracts and seem better reviewed as their own slices on top of this input-policy change.
Related Issue
Part of #133.
Verification
Checklist