Skip to content

fix(skills): include managed_dir in build_registry and wire FaultCategory enum path#2265

Merged
bug-ops merged 1 commit intomainfrom
2259-skills-build-registry
Mar 27, 2026
Merged

fix(skills): include managed_dir in build_registry and wire FaultCategory enum path#2265
bug-ops merged 1 commit intomainfrom
2259-skills-build-registry

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 27, 2026

Summary

Changes

crates/zeph-core/src/bootstrap/mod.rs

  • build_registry(): replaced inline self.config.skills.paths collection with self.skill_paths() (which already deduplicates and appends managed_dir)

crates/zeph-core/src/agent/tool_execution/native.rs

  • Declared tool_err_category: Option<ToolErrorCategory> before the result match loop
  • Populated it in the Err(ref e) arm from e.category()
  • At skill outcome recording, use tool_err_category.take().map_or_else(|| FailureKind::from_error(&output), FailureKind::from)

crates/zeph-core/src/agent/tool_execution/legacy.rs

  • In handle_tool_result Err(e) arm: extract category = e.category() before consuming e with format!, then use FailureKind::from(category)
  • process_successful_tool_output unchanged (no ToolError in scope)

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy -p zeph-core -p zeph-skills -- -D warnings — clean
  • cargo nextest run -p zeph-core -p zeph-skills --lib --bins — 1419/1419 passed

Closes #2259
Closes #2224

@github-actions github-actions bot added bug Something isn't working size/L Large PR (201-500 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate and removed size/L Large PR (201-500 lines) labels Mar 27, 2026
@bug-ops bug-ops force-pushed the 2259-skills-build-registry branch from c6156cd to c73daf2 Compare March 27, 2026 12:45
@github-actions github-actions bot added the size/S Small PR (11-50 lines) label Mar 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 27, 2026 12:45
…gory path

- build_registry() now calls self.skill_paths() instead of building the
  path list from config.skills.paths directly; ensures managed_dir is
  always included so bundled skills are matched even when skills.paths
  is customized (#2259)

- native.rs: capture ToolErrorCategory in the Err arm and propagate it
  via tool_err_category to the skill outcome recording; replaces the
  string heuristic FailureKind::from_error with enum-accurate
  FailureKind::from(category) (#2224)

- legacy.rs: extract category = e.category() before consuming e with
  format!, then use FailureKind::from(category) in handle_tool_result
  Err branch (#2224)
@bug-ops bug-ops force-pushed the 2259-skills-build-registry branch from c73daf2 to 73446e1 Compare March 27, 2026 12:54
@bug-ops bug-ops merged commit 7ee742b into main Mar 27, 2026
25 checks passed
@bug-ops bug-ops deleted the 2259-skills-build-registry branch March 27, 2026 13:02
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 rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

1 participant