fix(skills): scan and cap trust for self-learning auto-improved skills#6619
Merged
Conversation
bug-ops
force-pushed
the
fix/6568-skill-auto-improvement-scan
branch
from
July 20, 2026 21:46
e9c4cc3 to
3d947cb
Compare
bug-ops
enabled auto-merge (squash)
July 20, 2026 21:46
store_improved_version wrote LLM-regenerated skill bodies straight to the live SKILL.md without running scan_skill_body, and never applied a reduced trust tier to auto-sourced versions, letting them silently inherit the parent skill's Trusted/Verified level. Add a shared scan_and_cap_for_activation gate that hard-blocks activation on a scan match and caps trust at Quarantined (via min_trust, fail-closed on a DB read error) before any live write. Wire the gate into all three points that can activate a skill version: store_improved_version, activate_version_and_write (the choke point shared by /skill activate, /skill approve, /skill reset), and arise_store_version. Retroactive re-scan of pre-existing auto versions and per-version (rather than per-skill-name) trust restoration on rollback are deferred as follow-ups; both are noted inline where relevant. Closes #6568
bug-ops
force-pushed
the
fix/6568-skill-auto-improvement-scan
branch
from
July 20, 2026 21:50
3d947cb to
b368e35
Compare
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
store_improved_version, the failure-driven self-learning path, wrote LLM-regenerated skillbodies straight to the live
SKILL.mdwith no injection scan, and the new"auto"-sourcedskill version silently inherited the parent skill's trust tier (including
Trusted/Verified)instead of being demoted for machine-evolved content. The same gap existed at the two other
paths that can activate a skill version:
activate_version_and_write(the choke point sharedby
/skill activate//skill approve//skill reset) and the success-trace-drivenarise_store_versionpath.scan_skill_bodyand hard-block activation on a match —the version row is still saved for forensics, the previously-active body stays live.
Quarantinedviamin_trust,written before the live file write; the write fails closed (activation skipped) if the trust
write itself errors.
"auto"versions and per-version (rather thanper-skill-name) trust restoration on rollback are explicitly deferred — noted inline where
relevant.
Closes #6568
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins(15020 passed)RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"gitleaks protect --staged/skill approvebypass prevention, ARISE path parity, DB-read-error fail-closed handling.local/testing/playbooks/arise-stem-erl.md, coverage row added as Untested)