fix(skills): assign Trusted trust to bundled skills on startup and hot-reload#3042
Merged
fix(skills): assign Trusted trust to bundled skills on startup and hot-reload#3042
Conversation
…t-reload Bundled skills (web-search, git, github, browser, docker, etc.) were classified as SourceKind::Hub on every fresh install because the trust DB population loop checked only the managed_dir prefix. The .bundled marker file written by provision_bundled_skills() was never consulted, causing all bundled skills to receive Quarantined trust and blocking bash/curl execution. Changes: - Add SourceKind::Bundled variant to zeph-memory with as_str/FromStr/serde - Add bundled_level: SkillTrustLevel field to TrustConfig (default: Trusted) - Check .bundled marker inside spawn_blocking in startup trust DB loop (src/runner.rs) and hot-reload path (zeph-core/src/agent/mod.rs) - Migrate existing hub/quarantined rows to bundled/trusted on restart; preserve operator-promoted trust (Blocked and higher-trust levels kept) - Add tracing::warn! for unknown trust_level strings in migration path Regression tests: fresh-DB bundled assignment, migration hub->bundled, hot-reload trust preservation, bundled_level config override, operator Blocked skill preserved through migration. Closes #3039. Part of epic #3041.
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
Quarantinedtrust on every fresh install because the trust DB population loop classified all skills inmanaged_dirasSourceKind::Hub, ignoring the.bundledmarker file written byprovision_bundled_skills()TrustGateExecutorblockedbash/curlexecution for Quarantined skills, silently failing all built-in skills that use these toolssrc/runner.rs) and the hot-reload path (crates/zeph-core/src/agent/mod.rs) had the same bugChanges
SourceKind::Bundledvariant tocrates/zeph-memory/src/store/trust.rsbundled_level: SkillTrustLevelfield toTrustConfigincrates/zeph-config/src/security.rs(default:Trusted, configurable).bundledmarker insidespawn_blockingbefore classifying as Hub.bundledmarker check, same classification logichub/quarantinedrows upgraded tobundled/trustedon restart; operator-promoted levels (includingBlocked) are preservedTest Plan
cargo build --workspace— 0 errorscargo clippy --workspace -- -D warnings— 0 warningscargo nextest run --workspace --lib --bins— 7990 passed, 20 skippedcargo +nightly fmt --check— cleancargo run --features full -- --config .local/config/testing.toml→ verifyweb-searchexecutes withouttrust=quarantinedin logsCloses
Closes #3039. Part of epic #3041.