Skip to content

fix(conversation): Recover stored configs field by field - #1102

Open
JeanMertz wants to merge 2 commits into
mainfrom
recover-field-by-field
Open

fix(conversation): Recover stored configs field by field#1102
JeanMertz wants to merge 2 commits into
mainfrom
recover-field-by-field

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

A stored conversation config whose field types no longer match keeps everything that still parses. A field whose type changed, an enum variant that was renamed, or a validator that was tightened costs that one field instead of the whole config, and the conversation keeps loading.

Deserialization runs in a loop: each failure names a path, that entry is dropped with a warning naming it, and the value is parsed again. The empty-config fallback is reached only when a failure names nothing addressable. That fallback was always close to useless as a recovery — assistant.model.id.provider and conversation.tools.'*'.run are required and have no default, so an empty config cannot be finalized and the conversation fails to load anyway.

Paths that end in an enum or unknown segment are truncated to the last addressable entry and that is dropped instead, which discards more than the failure named but keeps the config around it. Config deltas recorded in the event stream take the same path, so a single unreadable delta no longer empties itself.

A stored conversation config whose field types no longer match keeps
everything that still parses. A field whose type changed, an enum
variant that was renamed, or a validator that was tightened costs that
one field instead of the whole config, and the conversation keeps
loading.

Deserialization runs in a loop: each failure names a path, that entry is
dropped with a warning naming it, and the value is parsed again. The
empty-config fallback is reached only when a failure names nothing
addressable. That fallback was always close to useless as a recovery —
`assistant.model.id.provider` and `conversation.tools.'*'.run` are
required and have no default, so an empty config cannot be finalized and
the conversation fails to load anyway.

Paths that end in an enum or unknown segment are truncated to the last
addressable entry and that is dropped instead, which discards more than
the failure named but keeps the config around it. Config deltas recorded
in the event stream take the same path, so a single unreadable delta no
longer empties itself.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant