You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: remove runtime_dir from LifecycleError variants; thread via CLI adapter layer #136
LifecycleError::LaunchDaemon and LifecycleError::StartupFailed in crates/weaver-cli/src/lifecycle/error.rs carry a runtime_dir: PathBuf field whose sole purpose is to let crates/weaver-cli/src/actionable_guidance.rs derive the weaverd.health path for CLI guidance output.
This violates the domain/adapter boundary: the lifecycle domain error type is carrying CLI adapter context. The runtime directory is already available in the CLI layer (via RuntimePaths) at the call sites that call spawn_daemon, poll_spawned_child, and try_auto_start_daemon; it does not need to travel through the error value to reach write_startup_guidance.
Required refactoring
Remove runtime_dir: PathBuf from LifecycleError::LaunchDaemon and LifecycleError::StartupFailed.
Update spawn_daemon and poll_spawned_child to drop the runtime_dir argument they accepted solely to set this field.
Pass runtime_dir separately through the CLI adapter layer (e.g., as an additional argument to write_startup_guidance, or by making the caller derive health_path before calling guidance functions) rather than extracting it from the error.
Update crates/weaver-cli/src/actionable_guidance.rs, crates/weaver-cli/src/lifecycle/utils.rs, and crates/weaver-cli/src/lifecycle/spawning.rs accordingly.
Update unit tests in crates/weaver-cli/src/tests/unit/actionable_guidance.rs.
Context
Identified during review of PR #128 (Define local daemon observability). The runtime_dir field was threaded through error variants in that PR to improve actionable guidance output; this issue tracks the follow-up architectural cleanup.
#131 - Extend daemon start help with config and environment guidance (3.2.2) [merged]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Activity
coderabbitai commentedon May 17, 2026
🔗 Related PRs
#131 - Extend daemon start help with config and environment guidance (3.2.2) [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!