test(#3899): widen 2 more fixed-window loadSession slices displaced by idle-reset block

test_issue3306 _load_session_clear_block (4000->6500) + test_issue_new_chat_draft_restore
body window (4000->6500): #3899's idle-reset + live-turn-snapshot blocks pushed the
carry-forward snapshot + destructive S.messages clear past the old fixed windows. Behavior
+ ordering unchanged; windows widened to contain them.
This commit is contained in:
nesquena-hermes
2026-06-13 06:55:36 +00:00
parent 5f3e0ab8d9
commit 377a1889aa
2 changed files with 7 additions and 2 deletions

View File

@@ -26,7 +26,10 @@ SESSIONS_JS = (REPO / "static" / "sessions.js").read_text(encoding="utf-8")
def _load_session_clear_block() -> str:
"""The if(currentSid!==sid||forceReload){...} block in loadSession()."""
start = SESSIONS_JS.index("async function loadSession(sid)")
return SESSIONS_JS[start: start + 4000]
# Window widened to 6500: #3899's idle-reset + live-turn-snapshot blocks added
# code earlier in loadSession, pushing the carry-forward snapshot past the old
# 4000-char window.
return SESSIONS_JS[start: start + 6500]
def _ensure_messages_loaded_body() -> str:

View File

@@ -76,7 +76,9 @@ def test_pre_switch_draft_flush_rechecks_stale_loading_guard():
(Codex pre-release CORE catch, #3471)."""
start = SESSIONS_JS.find("async function loadSession(")
assert start != -1, "loadSession not found"
body = SESSIONS_JS[start:start + 4000]
# Window widened to 6500: #3899's idle-reset + live-turn-snapshot blocks pushed
# the destructive S.messages clear past the old 4000-char window.
body = SESSIONS_JS[start:start + 6500]
await_idx = body.find("await _saveComposerDraftNow(currentSid")
guard_idx = body.find("if (_loadingSessionId !== sid) return;", await_idx)
clear_idx = body.find("S.messages = [];", await_idx)