Summary
Add a --fix flag to weave diagnose that automatically repairs detected config drift issues instead of just reporting them.
Motivation
Currently weave diagnose reports issues (missing servers, stale entries, orphaned commands) but requires the user to manually fix them. Many issues have obvious, safe resolutions:
- Missing server in CLI config → re-apply the pack
- Orphaned command file → delete the file
- Stale manifest entry → remove from manifest
- Missing prompt block → re-inject from pack
A --fix flag would resolve these automatically, with clear reporting of what was changed.
Suggested behavior
weave diagnose — report only (current behavior, unchanged)
weave diagnose --fix — attempt to repair all fixable issues
- Each repair action should be logged with what was changed
- Unfixable issues (e.g., pack no longer in registry) should still be reported as errors
- The
--json output should include a fixed boolean per issue
Safety
- Only fix issues where the correct action is unambiguous
- Never delete user-created content (only Weave-managed entries identified by sidecar manifests)
- Print a summary of all changes made
Summary
Add a
--fixflag toweave diagnosethat automatically repairs detected config drift issues instead of just reporting them.Motivation
Currently
weave diagnosereports issues (missing servers, stale entries, orphaned commands) but requires the user to manually fix them. Many issues have obvious, safe resolutions:A
--fixflag would resolve these automatically, with clear reporting of what was changed.Suggested behavior
weave diagnose— report only (current behavior, unchanged)weave diagnose --fix— attempt to repair all fixable issues--jsonoutput should include afixedboolean per issueSafety