Replies: 1 comment
|
Verified all three claims against master (47f9438) — and this is the same write-side gap I confirmed in #1538 (out-of-repo plugin 1. 2. The failure is silent at write, loud at read — the log can be poisoned for a long time before any symptom. 3. A registration surface (your fix #1) cannot fix the persisted-log read path by itself — the marker is the only durable contract. One design note to weigh when opening the opt-in: I argued in #1586 against decoder-side heuristics for the corruption family, because strict unknown-type refusal is the family's integrity backstop — a plugin that marks a required event ignorable would silently reconstruct a wrong session. The safe shape is: strict typing on the opts ( |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Plugin-written session events have no registration surface — a third-party plugin event makes whole session logs unloadable on rc.6
TL;DR
dsh-sessionvalidates persisted logs against a static list of known event types, and there is no way for a plugin to register its own event types — nor to mark an event as ignorable. A third-party plugin that appends a custom session event therefore makes the entire session log unloadable: no history, no resume. This is a real API gap, not a version mismatch.Problem
The source itself acknowledges the gap:
That consumer now exists: plugins like
LoserFox/distill(a skill-distillation plugin) append custom session events viasession.append(type, data). On rc.6 two facts combine into a hard failure:session.append(type, data, opts)accepts onlysourceEventSeqs/surfaceOp— a plugin cannot setignorable: trueon the envelope, even though the load side (assertSessionEventEnvelope) already understands that key.assertEventsSupportedrefuses the whole log if it contains a type outsideKNOWN_SESSION_EVENT_TYPESthat is not marked ignorable →SessionFormatUnsupportedError.The error message ("it was likely written by a newer harness") is misleading here: the log is perfectly valid, the harness just doesn't know the plugin's event type.
Impact
minUserMessages: 3, essentially every active session is affected.ignorablecontract was designed for, yet the API makes it impossible to mark as such.Suggested fixes (in priority order)
registerSessionEventType(type)on the session service/store.session.append(type, data, opts)to carryignorable: trueon the envelope, so log-only/diagnostic plugin events that are safe to skip can opt in.ignorablecontract, instead of blaming a newer harness.Repro
Workaround (local, non-durable — lost on
npm update)KNOWN_SESSION_EVENT_TYPESin the installeddsh-session:node_modules/@deepseek-ai/dsh/node_modules/@deepseek-ai/dsh-session/lib/index.jsunzstd), add"ignorable": trueto that event's envelope, recompress (zstd).Both restore full loading; Option B is safe here because the event is log-only and sits outside any turn.
All reactions