HERMES-GIELIE/static
nesquena-hermes 6be19804f5
fix(routes): bound session/move lock + safe project-delete unlink during streaming (#3746) (#3922)
Two distinct timeout causes, both surfacing as the client's 30s 'Request timed
out' toast with no server-side signal:

A) /api/session/move acquired the per-session agent lock with a bare unbounded
   'with _get_session_agent_lock(sid):'. The streaming thread holds that same
   lock during checkpoint saves; on slow file I/O (WSL/DrvFs) the move could
   block past the client abort. Now acquires with timeout=5 and returns HTTP 503
   on contention (lock kept, not dropped, since s.save() still races the writer).

B) /api/projects/delete unlinked every assigned session via get_session()+save()
   — O(N) full-messages reserialize. For an actively-streaming session we now
   clear project_id on the LIVE CACHED Session object under LOCK (the streaming
   thread persists it on its next save — the worker always does a final save at
   turn completion) instead of issuing a competing s.save(); falls back to a
   direct save when not cached. Non-streaming sessions unchanged.

Also guards the '+ New project and move' shortcut (sessions.js) against the new
503 so it shows a toast instead of an unhandled rejection, keeping the #2551
authoritative refetch in both the success and catch paths.

Adds tests/test_issue3746_session_move_delete_timeout.py (behavioral lock-timeout
test + structural guards for both handlers + the frontend 503 guard). Widened the
#2551 new-project-refetch test's fixed byte-window to a block-scoped search so the
try/catch wrap (which preserves the refetch) doesn't trip a brittle offset assertion.

Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
2026-06-10 02:53:01 -07:00
..
vendor fix: vendor math and yaml assets for CSP 2026-05-26 23:49:02 +02:00
apple-touch-icon.png
boot.js Release v0.51.348 — Release LL (Phase 0 hotfix: timeout regression + data-loss + leaks) (#3917) 2026-06-10 01:12:48 -07:00
commands.js Release v0.51.297 — stage-3711 (terminal remote-backend guard #3711) (#3745) 2026-06-06 14:17:17 -07:00
favicon-32.png
favicon-192.png
favicon-512.png
favicon-512.svg
favicon.ico
favicon.svg
i18n.js Release v0.51.347 — Release LK (streaming & render reliability cluster #3892 #3898 #3885 #3882 #3868) (#3902) 2026-06-09 17:02:35 -07:00
icons.js Merge remote-tracking branch 'origin/master' into fix/session-list-touch-actions 2026-05-18 22:22:35 -06:00
index.html Release v0.51.347 — Release LK (streaming & render reliability cluster #3892 #3898 #3885 #3882 #3868) (#3902) 2026-06-09 17:02:35 -07:00
login.js feat: add passkey sign-in 2026-05-25 00:14:38 +00:00
manifest.json Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
messages.js Release v0.51.348 — Release LL (Phase 0 hotfix: timeout regression + data-loss + leaks) (#3917) 2026-06-10 01:12:48 -07:00
onboarding.js
panels.js Release v0.51.348 — Release LL (Phase 0 hotfix: timeout regression + data-loss + leaks) (#3917) 2026-06-10 01:12:48 -07:00
pwa-startup.js Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
sessions.js fix(routes): bound session/move lock + safe project-delete unlink during streaming (#3746) (#3922) 2026-06-10 02:53:01 -07:00
style.css Release v0.51.338 — Release LB (saved prompts library, #3571) (#3860) 2026-06-08 19:32:12 -07:00
sw.js Release v0.51.346 — Release LJ (PWA notification controls #3229) (#3897) 2026-06-09 15:54:21 -07:00
terminal.js Release v0.51.297 — stage-3711 (terminal remote-backend guard #3711) (#3745) 2026-06-06 14:17:17 -07:00
ui.js Release v0.51.348 — Release LL (Phase 0 hotfix: timeout regression + data-loss + leaks) (#3917) 2026-06-10 01:12:48 -07:00
workspace.js Release v0.51.343 — Release LG (Phase-1 batch: #3883 + #3878 + #3880) (#3891) 2026-06-09 13:03:15 -07:00