fix(core): wire corrections write path regardless of LearningConfig::enabled#1918
Merged
fix(core): wire corrections write path regardless of LearningConfig::enabled#1918
Conversation
…enabled detect_and_record_corrections() was gated behind is_learning_enabled(), which defaults to false. Correction detection and persistence (SQLite + Qdrant) are memory/observability primitives that should always run when correction_detection is enabled (default: true). Only skill outcome recording remains behind the learning gate. Adds regression test correction_stored_when_learning_disabled that verifies corrections reach the user_corrections table when enabled=false. Closes #1910
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
detect_and_record_corrections()was gated behindis_learning_enabled(), which defaults tofalse— makingzeph_correctionsQdrant collection anduser_correctionsSQLite table permanently emptyrecord_skill_outcomes()requires the learning gate!self.is_learning_enabled()early-return fromdetect_and_record_corrections(); moved guard to wrap onlyrecord_skill_outcomes()Test plan
correction_stored_when_learning_disabledverifies corrections reachuser_correctionswhenLearningConfig::enabled = falsecargo +nightly fmt --checkpassescargo clippy --workspace --features full -- -D warningspasses (0 warnings)cargo nextest run --workspace --features full --lib --binspasses (6044 tests)Closes #1910