Make worker model sessions finite
This commit is contained in:
parent
f565ad6a73
commit
04169bb1c0
5 changed files with 240 additions and 29 deletions
|
|
@ -2416,6 +2416,28 @@ receipt IDs at read time. Those readers either preserve exact execution
|
|||
members or must first own a self-contained immutable evidence projection. No
|
||||
generic string scan or age rule may substitute for typed references.
|
||||
|
||||
That classification exposed and repaired the archive-unit fault. Worker model
|
||||
sessions were formerly role-long (`openai-worker-session-{binding}`), so future
|
||||
workers kept the session live forever and a session tombstone could never
|
||||
bound the dominant prompt/stream family. Worker execution now derives one
|
||||
session from the exact outer worker `job_id`; all model/tool-followup jobs for
|
||||
that worker share it, while later workers receive different sessions.
|
||||
Successful completion closes the inner model session after the outer typed
|
||||
worker result is admitted. Tool-loop stall and round-limit closure first write
|
||||
failed receipts for the exact unexecuted pending intents, then fail the outer
|
||||
worker and close the same inner session. Tests prove terminal outer job,
|
||||
terminal tool receipt, and completed unique inner session. Conversation-wide
|
||||
model sessions remain intentionally long-lived and cannot be archived until
|
||||
their own owner closes them.
|
||||
|
||||
The initial tombstone can therefore be narrow and honest: archive only a
|
||||
completed session whose jobs are model-adapter jobs, each job has an explicit
|
||||
model execution binding and terminal result, every model stream is terminal,
|
||||
and every tool binding is receipted. Outer worker launch/results and all
|
||||
semantic/Mind/consequence families remain untouched. The tombstone must retain
|
||||
the exact session, job/result, model-request, and tool-intent identities as an
|
||||
ID-reuse barrier plus counts and a digest of bulky retired envelopes.
|
||||
|
||||
The coordinator receipt accumulator is implemented in source. Runtime owns the
|
||||
typed head, cumulative status counts, chained digest, and full-snapshot-fenced
|
||||
replacement/deletion. Resident Self supplies the cross-store preservation set
|
||||
|
|
|
|||
|
|
@ -1501,3 +1501,14 @@ runtime tests pass warning-free. The next pass is source-grounded retained
|
|||
reference classification across semantic, frontier, Hands/Soul, Persona,
|
||||
memory, resident, and coordinator readers before any archived-session deletion
|
||||
is implemented.
|
||||
|
||||
Retained-reference inspection found the archive unit itself was false: worker
|
||||
model sessions were role-long and remained open for later workers. They now
|
||||
derive from the exact outer worker job ID, so one session owns that worker's
|
||||
initial and tool-followup model jobs only. Success closes it after typed outer
|
||||
result admission. Loop-stall and round-limit paths terminalize the exact
|
||||
unexecuted tool intents, fail the outer job, and close the same inner session.
|
||||
Six OpenAI CLI and 15 library tests pass, including terminal receipt/session
|
||||
assertions. The next cut is the narrow archived model-session tombstone; it
|
||||
must retain exact IDs and delete only inner execution envelopes, never outer
|
||||
worker or semantic authority.
|
||||
|
|
|
|||
Reference in a new issue