fix(skills): auto-arm integrity re-check on trust promotion - #6164
Merged
Conversation
requires_trust_check could only be armed via the manual --require-check flag added by the #6080 fix, so an operator who forgot to pass it on a skill trust promotion left a Trusted/Verified skill's SKILL.md tamper re-check unarmed. Add a [skills.trust] require_integrity_check_on_promote config default (true) that automatically arms the check whenever a skill is promoted to trusted/verified, at both the CLI and in-session trust handlers. --require-check/--no-require-check (mutually exclusive) keep overriding the config default per invocation; promotion to quarantined/blocked leaves the flag untouched. The precedence decision (force-on > force-off > config default) is centralized in a single resolve_require_check function shared by both call sites, closing a gap where only one of the two duplicated copies had behavior test coverage. Self-learning auto-promotion and reload trust-assignment intentionally remain out of scope for this fix. Closes #6087
bug-ops
enabled auto-merge (squash)
July 12, 2026 19:27
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
[skills.trust] require_integrity_check_on_promoteconfig default (true) that automatically armsrequires_trust_checkwhenever a skill is promoted totrusted/verified, closing the gap where the manual--require-checkflag (requires_trust_check per-invocation integrity re-check has zero production setters — inert since #4306 #6080) could be forgotten.zeph skill trustand in-session/skill trust.--require-check/--no-require-check(mutually exclusive) continue to override the config default; promotion toquarantined/blockedleaves the flag untouched.resolve_require_checkfunction shared by both call sites, closing a gap where only one of two duplicated copies had behavior test coverage (found by adversarial critique during this PR's review).[skills.trust].specs/005-skillsandspecs/010-securityspec updates, live-testing playbook extension, coverage-status row.Self-learning/heuristic auto-promotion and reload trust-assignment are intentionally out of scope — they raise trust levels through different code paths than the two operator-facing handlers touched here. A follow-up issue may be filed to cover them separately.
Closes #6087
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci -p zeph-config -p zeph-core -p zeph --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml -p zeph-config -p zeph-core -p zeph --features "desktop,ide,server,chat,pdf,scheduler,testing" --lib --bins— 3367 passed, 0 failedcargo test --doc --workspace(including newresolve_require_checkdoctest)RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"src/commands/skill.rs: real skill install → real promote viahandle_skill_command→ real SQLite readback ofrequires_trust_check, covering both default-arm and--no-require-checkoverrideresolve_require_checkcovering all 4 precedence casesorigin/main(no conflicts) and re-verified build after rebase