Repository navigation
Conversation
ashhart
force-pushed
the
lead/imprint-forget-one
branch
from
November 14, 2026 01:00
7081167 to
1fb8223
Compare
4 tasks done
ashhart
force-pushed
the
lead/imprint-forget-one
branch
4 times, most recently
from
November 21, 2026 11:00
4cef9ed to
5b56693
Compare
ashhart
force-pushed
the
lead/imprint-forget-one
branch
2 times, most recently
from
November 21, 2026 17:26
930a2c1 to
ef5481c
Compare
POST /v1/imprint/forget takes a chat body, renders and keys it as that conversation's next request would be (an image's rows by its content, and on a framed family the frame in the first word, as the host's lookups key it), and drops the conversation's own kept states in RAM and on disk: each state whose tokens are a prefix of that key or continue it. A state another conversation builds on stays: one kept at a shared cut, a prefix another kept state continues, or a branch point (the store's own rule for a conversation's states). On disk only the states the store's index names are removed, with the blocks no other state names; saves the I/O thread is writing land and are indexed first, so another conversation's write in flight is not cancelled with them. The answer says what went, what stayed because others use it and where the conversation would still resume; found is false for one never kept. DELETE /v1/imprint keeps its meaning. The drop rides the flush's hold: it runs on the engine thread once no request is in flight, while the lane host, a family's round planner and Flash Next's serial host admit nothing new, so a reply running then ends unchanged, the states it keeps go too, and the conversation's next turn prefills cold with the same tokens. A forget or flush also cancels the warm passes in flight and keeps replies running at the time from starting one, so no background prefill puts a forgotten state back. A wait that runs out withdraws it untaken, and an engine without the shared store answers 501 at once. Who may forget is the request cancel route's rule (cancel_ids.allowed): with API keys a full or [admin] key, checked again by the route; without keys only a loopback socket that no proxy header relayed. Fixes #3197
A prompt list builds one openai.Run per prompt; after the imprint forget counter joined Run, its literal had no forgets value and the server stopped compiling. Each run now takes the counter as the request began, as a single chat or completion does.
ashhart
force-pushed
the
lead/imprint-forget-one
branch
from
November 22, 2026 00:45
ef5481c to
46b0bcb
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POST /v1/imprint/forgetforgets one conversation's kept prompt states and leaves every other conversation's.What changed
--learnkeeps for shared prefixes.found,states,ram_bytes,disk_states,disk_bytes,shared_states,disk,ram_tokens,disk_tokensandwaited_seconds. An unknown conversation answersfound: falseand drops nothing.DELETE /v1/imprintwith no body is unchanged.Who may call it: the request cancel route's rule, through the same helper. With API keys, a full or
[admin]key, checked again by the route. Without keys, only a direct loopback socket (IPv4-mapped included) carrying none ofForwarded,X-Forwarded-For,X-Forwarded-Host,X-Real-IP,Via,CF-Connecting-IP,True-Client-IP. Everyone else gets 403loopback_only.Why replies in flight and other conversations are unchanged: the drop uses the prompt cache flush's hold: it runs on the engine thread only once no request is in flight, and new requests wait in the queue meanwhile. A running reply finishes exactly as it would have. A forget also cancels background warm passes in flight and keeps replies running at the time from starting one, so nothing puts a forgotten state back; the flush gets the same guard. The named conversation's next turn prefills cold with the same tokens; other conversations keep their own states and still resume.
Tests (host): the named conversation leaves RAM and disk while another's and a shared cut stay; an unknown name drops nothing; naming a prefix drops later turns; a prefix another conversation continues stays until that one is forgotten too; a write in flight lands first; the bodiless forget is unchanged; the next turn starts cold with the same tokens and the other conversation resumes; a turn in flight ends unchanged before the drop; a framed image conversation is named by its framed key; the keyless loopback and proxy rules, the route's admin-scope check, 501 and the
--idle-unload503, and warm-pass cancellation. New steptest-imprint-forget-host;test-server-cpu,test-prompt-cache-host,test-key-scopes-host,test-server-security,test-prompt-cache-flush-hostandtest-frame-cache-identity-hostpass.Stacked on #3210 (prompt cache flush), which is stacked on #3193 (cancel a request by id).
A served check is still owed: two conversations resuming; forget one; its next turn cold with the same
token_sha256; the other still resuming; an unseen conversationfound: false; a proxied keyless call 403;DELETE /v1/imprintunchanged.Fixes #3197