fix: salvage partial L3 abstraction drafts#2054
Conversation
|
This draft is now Ready for review. Cloud test-engine rerun on |
|
Hi @Memtensor-AI / @CarltonXiang — friendly ping on this draft. Quick observation: this PR still has base branch Could a maintainer please change the base branch from Thanks! |
|
Hi @syzsunshine219 — looks like you've merged 35 of the last 50 PRs on this repo. Friendly ping on this one. This draft (and the other 21 OPEN PRs I have here) is small, single-commit, has cloud test-engine When you have a moment, would you mind one of:
Both fix and feature PRs in this batch are independent — each can be reviewed/merged on its own. Happy to rebase / split / drop any that don't fit the direction. Thanks! |
7ffd53c to
3da7f5f
Compare
|
Thanks for the contribution. This PR addresses the same issue as #1672 / #1668. We usually continue with the earlier active PR when the implementations are comparable. #1672 was opened first and already covers the L3 abstraction salvage behavior in more detail, including the common malformed wire shapes and additional tests, so we are going to continue the review there. The smaller patch surface and local test/lint notes in this PR are still useful, and we will carry those points into the #1672 review if needed. Closing this PR as a duplicate implementation to keep the review queue focused. Thanks again for the work here. |
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, andconstraints; 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
How Has This Been Tested?
cd apps/memos-local-plugin && npm test -- --run tests/unit/memory/l3/abstract.test.tspassed with 8 tests.cd apps/memos-local-plugin && npm run lintpassed.make formatcould not run in this environment becausepoetryis not installed:make: poetry: Command not found.Checklist: