fix: do not mark failed tag migrations as processed - #319
Conversation
|
I traced the changed batch semantics through the current Web UI before treating this as complete. The cursor/processed split fixes the backend bookkeeping, but the user-visible success path is still wrong on an all-soft-failure pass. |
|
Addressed in 9198ce1:
|
karaaslanz
left a comment
There was a problem hiding this comment.
Re-checked the updated head after the follow-up. The API now exposes the cumulative soft-failure count and the dialog no longer turns a terminal soft-failure pass into a 100% success state, so the user-visible issue I called out is addressed. The focused regression passes as well. Looks good from this review scope.
When tag generation returns a soft failure ({ success: false }) instead
of throwing, the batch handler still advanced processed and eventually
reported the migration complete. Untagged memories stayed empty, so the
migration modal reappeared on every reload.
Track a separate cursor for the batch window, only increment processed
on successful tagging/vector updates, record soft failures in errors,
and reset counters when retrying after a completed pass.
Fixes tickernelz#303
Replace the hardcoded English failure count string so soft-fail terminals stay localized with the rest of the dialog.
2b618c1 to
559a23f
Compare
Summary
Addresses the soft-fail accounting side of #303 (complementary with #333 for the prose /
tool_choiceroot cause).When tag generation returns a soft failure (
{ success: false }, e.g. empty tool-call arguments over OpenRouter) instead of throwing,handleRunTagMigrationBatchstill incrementedmigrationProgress.processedand eventually reported the migration complete. Untagged memories stayed empty, so the migration modal reappeared on every page load.Changes
cursorfor the batch window (advances even on soft failure)processedafter a successful tag write + vector updatemigrationProgress.errors(same path as thrown errors)errorscount; dialog avoids false 100% success toasttoast-migration-tag-failures)Relation to #333
#333 forces tool calls / fixes the contradictory migration prompt so prose-without-
tool_callsis rarer. This PR makes remaining soft failures visible and retryable. Merge both to close the modal-loop fully. Emptyarguments: "{}"is still not “healed”, only surfaced.Does not solely close #303.
Test plan
bun test tests/tag-migration-soft-failure.test.ts— soft-fail provider leavesprocessed === 0, records 2 errors, and never writes tags/vectorsmainverified clean (319→333and333→319)