e2e: long_session cuts the last file of a turn to the budget (a whole file overshot the 256k context)
Rust port / port-fast (push) Failing after 12s
Rust port / port-typecheck (push) Failing after 12s
Rust port / port-oracles (push) Failing after 13s
Rust port / port-linux-tests (push) Failing after 18s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-10-27 06:04:19 +01:00
co-authored by Claude Sonnet 5.5
parent f8f4fbbec6
commit c40531f071
+1 -1
View File
@@ -45,7 +45,7 @@ def take(files, start, chars):
parts, used, i = [], 0, start
while i < len(files) and used < chars:
with open(files[i], encoding="utf-8", errors="replace") as f:
text = f.read()
text = f.read()[: chars - used] # the last file is cut to the budget, so a turn never overshoots by a whole file
parts.append("// ==== " + os.path.relpath(files[i], os.path.dirname(files[0])).replace("\\", "/") + "\n" + text)
used += len(text)
i += 1