mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #35] [MERGED] Conversation slots that outlive the engine, and a graceful stop #292
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#292
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/35
Author: @ksanislo
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mw00
Base:
main← Head:persistent-slots📝 Commits (2)
957befbconversation slots that outlive the engine (STRATA_GLM_SLOT_KEEP=1), and a server that ends the engine on SIGTERMca119a5shutdown: a request in progress is wrapped up - its thinking closed, its answer written (STRATA_ENGINE_WRAP_S, 40 s) - then the engine ends and keeps its conversation📊 Changes
3 files changed (+258 additions, -24 deletions)
View changed files
📝
README.md(+4 -1)📝
serve/server.py(+82 -1)📝
src/program/generate.cpp(+172 -22)📄 Description
Slots are emptied at every start, so after a supervisor's idle stop (llama-swap
ttl) every conversation is re-read. The server also had no SIGTERM handler: a stop killed it, the engine kept the GPUs, nothing was saved.STRATA_GLM_SLOT_KEEP=1(default off): the slot folder is kept and indexed at start; each slot gets a.meta(identity, tokens, size), written atomically; foreign/stale ones and those unused forSTRATA_GLM_SLOT_DAYS(7) are removed; the conversation in the model is saved when the engine ends.STRATA_GLM_SLOT_MINmay go down to 1.STRATA_ENGINE_WRAP_S(40 s), then STOP; then QUIT withinSTRATA_ENGINE_QUIT_S(50 s). The engine ignores SIGTERM/SIGINT/SIGPIPE in--serve; QUIT also cancels a request in flight.Measured - Maya-M, 4x T4: after SIGTERM + restart a ~4K-token conversation continued reading 136 new tokens (taken back in 0.2 s; saved in 0.3 s; ~62 KB/token). A stop 24 s into high-effort thinking: thinking closed 0.7 s later, answer streamed, cut at 40 s with
finish_reason: length, queued request refused, conversation saved, server and engine gone 44 s after SIGTERM. Server tests pass.Not tested: Windows.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.