feat(skills): AutoSkill A2 — dedup_threshold config + Add/Merge/Discard in miner.rs#4499
Merged
Conversation
…dation (#4474) Add `dedup_threshold: f32` field to `LearningConfig` (default 0.90) for the AutoSkill A2 Add/Merge/Discard pipeline. Wire the value into `crates/zeph-core/src/agent/trace_extraction.rs`, replacing the hardcoded 0.90. Add `LearningConfig::validate()` that enforces `merge_threshold < dedup_threshold` and call it from `Config::validate_llm_and_skills` to catch misconfigured thresholds at startup. Closes #4474
…4475) Replace the binary novel/duplicate dedup check in `SkillMiner::process_repo` with the three-way `Add/Merge/Discard` flow via `merger::decide()`, mirroring the pattern already used in `TraceExtractor`. Changes: - Add `merge_threshold: f32` (0.75) and `merge_enabled: bool` (true) to `MiningConfig` - Add private `embed_candidate()` and `merge_candidate()` methods to `SkillMiner` - Replace `is_novel()` call in `process_repo()` with `find_nearest()` + `decide()` + three-way match - Update `is_novel()` doc to document merge-zone divergence from `process_repo()` - Update all test `MiningConfig` literals with new fields Closes #4475
…py::field_reassign_with_default
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
zeph-config: adddedup_threshold: f32toLearningConfigwith default 0.90 and startup validationmerge_threshold < dedup_thresholdviaLearningConfig::validate()(closes feat(skills): wire dedup_threshold config into trace_extractor #4474)zeph-core: replace hardcoded0.90intrace_extraction.rswithlearning_cfg.dedup_thresholdzeph-skills: replace binaryis_novel()dedup inSkillMiner::process_repowith the three-wayAdd/Merge/Discardflow viamerger::decide(), matching theTraceExtractorpipeline; addsmerge_threshold/merge_enabledtoMiningConfig(closes feat(skills): apply Add/Merge/Discard flow to miner.rs (AutoSkill A2 full integration) #4475)Changes
crates/zeph-config/src/learning.rsdedup_threshold: f32(default 0.90) in the AutoSkill A2 config blockLearningConfig::validate()— returnsErrwhenmerge_threshold >= dedup_thresholdConfig::validate_llm_and_skillsfor startup enforcementautoskill_a2_dedup_threshold_default_and_roundtrip,autoskill_a2_defaults,validate_rejects_inverted_thresholdscrates/zeph-core/src/agent/trace_extraction.rslet dedup_threshold = learning_cfg.dedup_threshold;— no longer hardcodedcrates/zeph-skills/src/miner.rsMiningConfig: +merge_threshold: f32(0.75), +merge_enabled: bool(true)SkillMiner: +embed_candidate(), +merge_candidate()(mirrorstrace_extractor)process_repo():find_nearest()→decide()→ matchAdd/Discard/Mergeis_novel(): updated doc to note merge-zone divergence fromprocess_repo()Test plan
cargo nextest run -p zeph-config -p zeph-core -p zeph-skills --lib --bins— 2415 passedcargo clippy --workspace -- -D warnings— cleancargo +nightly fmt --check— cleanRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— cleanFollow-up issues (not blocking)
process_repo()Discard/Merge/error-recovery branches — requires more configurable mock infrastructure (noted by tester)miner.rsAdd path missing explicit injection scan beforeapprove_and_save— noted by security, low severity