Skip to content

fix(skills): assign Trusted trust to bundled skills on startup and hot-reload#3042

Merged
bug-ops merged 1 commit intomainfrom
3041-bundled-skill-trust
Apr 15, 2026
Merged

fix(skills): assign Trusted trust to bundled skills on startup and hot-reload#3042
bug-ops merged 1 commit intomainfrom
3041-bundled-skill-trust

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 15, 2026

Summary

  • Bundled skills (web-search, git, github, browser, docker, etc.) received Quarantined trust on every fresh install because the trust DB population loop classified all skills in managed_dir as SourceKind::Hub, ignoring the .bundled marker file written by provision_bundled_skills()
  • TrustGateExecutor blocked bash/curl execution for Quarantined skills, silently failing all built-in skills that use these tools
  • Both the startup path (src/runner.rs) and the hot-reload path (crates/zeph-core/src/agent/mod.rs) had the same bug

Changes

  • Add SourceKind::Bundled variant to crates/zeph-memory/src/store/trust.rs
  • Add bundled_level: SkillTrustLevel field to TrustConfig in crates/zeph-config/src/security.rs (default: Trusted, configurable)
  • Fix startup trust DB loop: check .bundled marker inside spawn_blocking before classifying as Hub
  • Fix hot-reload path: same .bundled marker check, same classification logic
  • Migration: existing hub/quarantined rows upgraded to bundled/trusted on restart; operator-promoted levels (including Blocked) are preserved

Test Plan

  • cargo build --workspace — 0 errors
  • cargo clippy --workspace -- -D warnings — 0 warnings
  • cargo nextest run --workspace --lib --bins — 7990 passed, 20 skipped
  • cargo +nightly fmt --check — clean
  • Live session test: fresh trust DB + cargo run --features full -- --config .local/config/testing.toml → verify web-search executes without trust=quarantined in logs
  • Hot-reload test: modify a bundled skill file while running → verify trust level unchanged

Closes

Closes #3039. Part of epic #3041.

…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.
@github-actions github-actions Bot added documentation Improvements or additions to documentation skills zeph-skills crate memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate bug Something isn't working size/L Large PR (201-500 lines) labels Apr 15, 2026
@bug-ops bug-ops merged commit 0ed4047 into main Apr 15, 2026
30 checks passed
@bug-ops bug-ops deleted the 3041-bundled-skill-trust branch April 15, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes size/L Large PR (201-500 lines) skills zeph-skills crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(skills): bundled skills receive Quarantined trust on fresh install — web-search and others blocked

1 participant