docs(code-runtime-python): register the truncation exception to open merging; clean a case comment

The review's warning: the READMEs (outer and inner wire sections, en + zh) and
the fd-3 protocol note still claimed the next log frame always merges into an
open entry, while truncateLogs commits the already-billed prefix as its own
entry before the marker. The one exception (truncation) is now stated in both
READMEs and the owning note, paired and re-recorded. The prefix-commit case's
parenthetical describing the pre-fix implementation is removed per the
comment-does-not-record-review-history rule.
This commit is contained in:
Chinesezjc
2026-08-31 15:04:43 +08:00
committed by Tianyi Cui
parent 6bdbe71092
commit fa0565032f
7 changed files with 10 additions and 11 deletions
@@ -1901,8 +1901,7 @@ describe('PythonCodeRuntime — programs and bindings', () => {
it('commits a flushed open prefix before the truncation marker', async () => {
// A flushed unterminated line is billed and committed; when a later
// over-budget write truncates, the committed prefix must appear BEFORE the
// marker — the ledger charged for it, so it cannot vanish. (The bug: all
// truncation arms pushed only the marker, dropping the held prefix.)
// marker — the ledger charged for it, so it cannot vanish.
const { runtime } = await setup({ maxLogBytes: 64 })
const result = await runtime.run({
program: [