Skip to content

fix: salvage partial L3 abstraction drafts#2054

Draft
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/salvage-l3-abstraction-drafts
Draft

fix: salvage partial L3 abstraction drafts#2054
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/salvage-l3-abstraction-drafts

Conversation

@RerankerGuo

Copy link
Copy Markdown

Description

Fixes #1668.

L3 abstraction now normalizes partially structured provider output before deciding whether to reject it. Salvageable drafts can use string or object entries for environment, inference, and constraints; common label, description, and evidence aliases are normalized; tag strings are split into arrays; and a missing title can be derived from recovered content.

Drafts that remain completely empty after normalization still fail with LLM_OUTPUT_MALFORMED, so unusable output is not persisted.

Related Issue (Required): Fixes #1668

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • cd apps/memos-local-plugin && npm test -- --run tests/unit/memory/l3/abstract.test.ts passed with 8 tests.
  • cd apps/memos-local-plugin && npm run lint passed.
  • make format could not run in this environment because poetry is not installed: make: poetry: Command not found.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation, if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

bug(memos-local-plugin): L3 abstraction rejects salvageable structured outputs too aggressively

1 participant