Skip to content

🧪 Add missing edge-case test for augment with no lessons - #64

Open
undivisible wants to merge 4 commits into
mainfrom
add-self-improve-edge-case-test-229032979685625290
Open

🧪 Add missing edge-case test for augment with no lessons#64
undivisible wants to merge 4 commits into
mainfrom
add-self-improve-edge-case-test-229032979685625290

Conversation

@undivisible

@undivisible undivisible commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🎯 What: Adds a missing unit test to src/self_improve.rs to verify the behavior of the augment method when no lessons match the query.
📊 Coverage: Covers the edge case early-return in SelfImprove::augment when self.lessons() returns an empty list.
Result: Test suite successfully asserts that an unmatched query returns the exact original base string 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_base in self_improve.rs for the path where memory has no matching lessons.

With an empty DB and no prior record calls, augment("testing", …) must return the base string unchanged—no <lessons_learned> block. This locks in the early-return in SelfImprove::augment when lessons() is empty, complementing the existing test that checks injection when lessons exist.

Reviewed by Cursor Bugbot for commit 501cd19. Configure here.

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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

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>
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