Skip to content

fix(skills): auto-arm integrity re-check on trust promotion - #6164

Merged
bug-ops merged 1 commit into
mainfrom
fix/6087-auto-trust-check-activation
Jul 12, 2026
Merged

fix(skills): auto-arm integrity re-check on trust promotion#6164
bug-ops merged 1 commit into
mainfrom
fix/6087-auto-trust-check-activation

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds [skills.trust] require_integrity_check_on_promote config default (true) that automatically arms requires_trust_check whenever a skill is promoted to trusted/verified, closing the gap where the manual --require-check flag (requires_trust_check per-invocation integrity re-check has zero production setters — inert since #4306 #6080) could be forgotten.
  • Applied at both operator promotion sites: CLI zeph skill trust and in-session /skill trust. --require-check/--no-require-check (mutually exclusive) continue to override the config default; promotion to quarantined/blocked leaves the flag untouched.
  • The 3-way 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 two duplicated copies had behavior test coverage (found by adversarial critique during this PR's review).
  • Migration step 80 adds a commented advisory for the new key to existing configs that already declare [skills.trust].
  • Full integration surface: config default, CLI flag + wizard prompt, migration, CHANGELOG, mdBook docs, both specs/005-skills and specs/010-security spec 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 --check
  • cargo clippy --profile ci -p zeph-config -p zeph-core -p zeph --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings
  • cargo 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 failed
  • cargo test --doc --workspace (including new resolve_require_check doctest)
  • RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"
  • New end-to-end handler-level tests in src/commands/skill.rs: real skill install → real promote via handle_skill_command → real SQLite readback of requires_trust_check, covering both default-arm and --no-require-check override
  • Pure-function unit tests on resolve_require_check covering all 4 precedence cases
  • Migration step 80 tests: add / no-op-already-present / no-op-absent / no-op-commented / no-op-scanner-subtable / idempotent
  • Rebased onto latest origin/main (no conflicts) and re-verified build after rebase

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
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate config Configuration file changes size/XL Extra large PR (500+ lines) and removed bug Something isn't working labels Jul 12, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 12, 2026 19:27
@bug-ops
bug-ops merged commit 84b0e32 into main Jul 12, 2026
47 checks passed
@bug-ops
bug-ops deleted the fix/6087-auto-trust-check-activation branch July 12, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

requires_trust_check has no automatic/default-on activation path — --require-check (#6080) is manual-only

1 participant