Repository navigation
fix(skills): require use evidence for patch review hints - #4713
Closed
ScriptedAlchemy wants to merge 2 commits into
Closed
ScriptedAlchemy wants to merge 2 commits into
ScriptedAlchemy wants to merge 2 commits into
Conversation
|
This was referenced Nov 3, 2026
Owner
Author
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.
Problem
The usage recommender treats
use_count <= patch_countas evidence for a repair hint after two patches. With unmeasured usage, the default zero satisfies that comparison, so merely patching a skill twice manufactures a repair recommendation. The stale-skill path already treats missing usage as unknown, but the improvement path did not.Change
Require a recorded use count and timestamp before applying the existing observed-use patch-review heuristic. Missing or incomplete use evidence produces the existing non-actionable recommendation with an explicit evidence-gap reason, not a claim that no skill work is needed. Raw patch/view/use evidence remains available.
Pinned, user-authored, archived and disabled exclusions still run first. The observed-use policy, schemas, storage, MCP/dashboard response shape, writer execution, manual authoring and mutation authority are unchanged. The existing writer consumes this shared recommendation API, so missing telemetry no longer creates its
managed_skill_patchhint.Regression coverage
Updated the previous unmeasured-usage fixture to assert no repair hint while retaining all evidence. Added tests for incomplete count/timestamp pairs, the existing policy with observed use, and pinned/user-authored/disabled/archived exclusions with observed usage. The existing persisted-ledger integration test records a real Use event before its two patches and retains its positive expectation unchanged.
Validation
Reviewed the actual recommender, its writer consumer, MCP/dashboard call sites, existing persisted-ledger test, and the complete GitHub-generated commit diff. The diff changes only this recommender and its unit tests.
Rust compilation, test execution, rustfmt and Clippy have not run locally: this environment has no supplied checkout or Rust/Bazel toolchain. No Cargo commands were run. Hosted CI must execute the automation-runtime unit tests and the existing agent-suite skill-usage journey before merge. No model-quality or cost-saving measurement is claimed.
Refs #4538. This fixes the missing-telemetry inference only. Kev qualification/shadow evaluation, the separate keyword diagnosis, and deciding whether to retire the remaining observed-use heuristic remain open.