Originally created by: Thanatos9404
focus_lines collapses a run of four or more near-identical lines into its first line, a ... [N similar lines] marker and its last line. The lines in between are "hidden" and are never kept.
When the run's first line was kept, the hidden lines were reported by the similar lines marker. When the first line was omitted, the output loop still skipped the hidden lines, but nothing counted them. ... [N lines omitted] then counted only the run's first and last lines.
In examples/fit-context-big-logs (#87), the generated CI log prints:
... [74 lines omitted] <- really 192: 118 hidden setup lines were not counted
...
... [2 lines omitted] <- really 250: test_endpoint_0 to test_endpoint_249
tests/billing/test_refund.py::test_refund_rounding FAILED
llmslim/focus.py: when the first line of a collapsed run is omitted, its hidden lines are added to the same gap. Which lines are kept does not change, only the number in the marker. The count still covers non-blank lines, as before; blank lines are dropped without a marker.
fit_text measures the whole output, markers included, so a longer number cannot push a result over its budget.
test_omitted_marker_counts_every_line_of_a_collapsed_run in tests/test_focus_v08.py:... [249 lines omitted] (it showed ... [1 lines omitted] before the fix, and the test fails on main);ruff check . and ruff format --check . pass. mypy llmslim has no errors in focus.py.[#87] is still open, so its README is unchanged here. Once both are merged, the printed output in examples/fit-context-big-logs/README.md should read ... [192 lines omitted] and ... [250 lines omitted] in place of [74 lines omitted] and [2 lines omitted]. The kept lines stay the same.
Originally posted by: vercel[bot]
The latest updates on your projects. Learn more about Vercel for GitHub.