docs(test): correct an overclaiming comment in the tail-fallback regression test

The comment implied the fallback could be "silently skipped" by the
stale hardcoded threshold, which isn't actually true -- the old
smaller numbers were always more eager to trigger the fallback, never
less (same correction as the commit this test belongs to). What the
test actually protects against is the fallback logic itself breaking
(e.g. a copy-paste slip dropping the check entirely), not the exact
threshold value. Reworded to say that.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
timkjr
2026-08-05 11:11:18 -05:00
co-authored by Claude Sonnet 5
parent 251706be3b
commit 09f5f28017
+9 -7
View File
@@ -1470,13 +1470,15 @@ describe('session-routes', () => {
it('still falls back to the tail read when bookkeeping alone exceeds the new 128KB head window', async () => { it('still falls back to the tail read when bookkeeping alone exceeds the new 128KB head window', async () => {
// Raising the head buffer to 128KB helps most restart-heavy sessions, but an // Raising the head buffer to 128KB helps most restart-heavy sessions, but an
// even more extreme case (many more restarts) can still exceed it. The // even more extreme case (many more restarts) can still exceed it. This
// existing tail-read fallback must stay correctly wired to the new // proves the tail-read fallback itself is intact after the threshold
// threshold (headBuf.length, not the old hardcoded 65536) rather than being // rewrite (`fileStat.size > headBuf.length` replacing the old hardcoded
// silently skipped because the size comparison no longer means what it used // 16384/65536) — the fallback's own logic, not the exact threshold value,
// to. The real message here sits near the end of the file, well inside the // is what could have silently broken (e.g. a copy-paste slip that dropped
// 32KB tail window, so a working fallback finds it; a broken one leaves the // the `> headBuf.length` check entirely). The real message sits near the
// row blank exactly like the bug this whole fix addresses. // end of the file, well inside the 32KB tail window, so a working fallback
// finds it; a broken one leaves the row blank exactly like the bug this
// whole fix addresses.
const home = process.env.HOME as string; const home = process.env.HOME as string;
const projPath = join(home, '.claude', 'projects', 'proj-tail-fallback-test'); const projPath = join(home, '.claude', 'projects', 'proj-tail-fallback-test');
await mkdir(projPath, { recursive: true }); await mkdir(projPath, { recursive: true });