Skip to content

Broad-Side: repair/retry lens outputs truncated at max_tokens #133

Description

@TheAmericanMaker

Type: improvement (feat/103-broadside) · Found by: running Broad-Side on this repo

In the self-scan run (2026-08-23T05-52-23-986Z), 3 of 10 defect-lens slices returned content cut off at the output cap — the saved .json files are unparseable (Unterminated string etc.). The strict JSON schema does not protect against max_tokens truncation, and collect currently saves whatever came back with no detection.

Ideas:

  • Detect non-JSON lens content on save and mark the slice truncated in state + run-meta.json.
  • Auto-resubmit truncated slices once (higher max_tokens or split the module into finer slices).
  • Report truncation counts in collectResultText so callers know coverage is incomplete.

The synthesis pass should also receive a note about truncated slices rather than silently synthesizing from partial data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions