Repository navigation
Bug: v0-to-v1 migrator rejects subagent/descriptor version 2 written by earlier releases, breaking session search #6890
silence201991
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Environment
openAt: first-searchSummary
After upgrading, every session search fails. Both
searchSessionsandsearchEventsrun thesame global reconcile step, so a single un-migratable session breaks the whole feature.
Steps to reproduce
subagent/descriptorrecords withdata.version === 2.searchSessions({ query, limit })), or any plugin toolthat wraps it (here:
session_search).Actual
Expected
Legacy sessions migrate, or are skipped with a warning, and search over the remaining
sessions keeps working.
Root cause
Two gates, both keyed on the descriptor version. (Line numbers are from the published package
build,
lib/index.js; the function names are the stable part.)1)
dsh-session-format-v0-to-v1, the v0-to-v1 migrator:2)
dsh-session-format-v0-to-v1,subagentDescriptorValue()— reached throughassertReleasedPayloadSemantics(), whichdsh-session-format-v2-to-v3imports directly(line 3 of that package):
Relaxing gate 1 alone only moves the failure to gate 2:
Earlier releases wrote descriptor version 2, and neither gate has a v2 branch.
Measured payload shapes of the version-2 records (76 records)
continuable:mode,provider,version,label,agentProvider,agentModel(the agent pair is complete)
one-shot:mode,provider,version, optionallabelThey satisfy every other field check, so the version literal is the only rejection.
Impact (measured on my machine)
163 v0 session files; 76 contain
subagent/descriptorrecords; all 76 are version 2 and noneare version 3. Session search was therefore 100% unavailable rather than occasionally failing.
The failed migration leaves the source artifact unchanged, so no data is lost.
Local verification
Relaxing both gates locally (
[3]→[2, 3], and not throwing in the generation-0 branch)restores search immediately: all 76 legacy artifacts then pass validation, search returns hits
from the previously un-migratable sessions, and 162 of the 163 source files are byte-identical
by SHA-256 (the one change is the live session log being written).
Suggested fix
warning, instead of failing the global reconcile that both
searchSessionsandsearchEventsdepend on. One legacy session should not be able to disable the whole query service.
All reactions