🧪 Add missing edge-case test for augment with no lessons - #64
🧪 Add missing edge-case test for augment with no lessons#64undivisible wants to merge 4 commits into
Conversation
This adds an edge-case test in `src/self_improve.rs` to verify that when `SelfImprove::augment` is called and no existing lessons match the query, it returns the base string unmodified. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This commit fixes `rustfmt` formatting in `src/store/schema.rs` and Prettier formatting in `plugins/openclaw/cli.ts` which caused CI to fail. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
🎯 What: Adds a missing unit test to
src/self_improve.rsto verify the behavior of theaugmentmethod when no lessons match the query.📊 Coverage: Covers the edge case early-return in
SelfImprove::augmentwhenself.lessons()returns an empty list.✨ Result: Test suite successfully asserts that an unmatched query returns the exact original
basestring without any modification or injection, increasing confidence in the self-improvement loop's fallback behavior.PR created automatically by Jules for task 229032979685625290 started by @undivisible
Note
Low Risk
Test-only change; no production code or runtime behavior is modified.
Overview
Adds a unit test
augment_with_no_lessons_returns_baseinself_improve.rsfor the path where memory has no matching lessons.With an empty DB and no prior
recordcalls,augment("testing", …)must return the base string unchanged—no<lessons_learned>block. This locks in the early-return inSelfImprove::augmentwhenlessons()is empty, complementing the existing test that checks injection when lessons exist.Reviewed by Cursor Bugbot for commit 501cd19. Configure here.