Skip to content

Conversation

@atrtde
Copy link
Owner

@atrtde atrtde commented Feb 10, 2026

No description provided.

@atrtde atrtde self-assigned this Feb 10, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 00:49
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/anyhow-thiserror

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors error handling across the CLI to use anyhow for task execution surfaces and introduces a typed AppError via thiserror for core utilities/registry code, while also adding a mntn sync --diff view and stripping ANSI codes from captured command output during package-manager backups.

Changes:

  • Introduce src/error.rs (AppError, Result<T>) and migrate core helpers (e.g., system command runner, registry) to return typed errors.
  • Switch Task::execute() and most task implementations to anyhow::Result<()>, updating call sites accordingly.
  • Add mntn sync --diff to show unstaged + staged diffs (with --cached fallback), and add ANSI-stripping helper used during package-manager backup output capture.

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/utils/system.rs Switch command helpers to typed AppError and add strip_ansi_codes + test.
src/tasks/validate.rs Update task execution signature to anyhow::Result<()>.
src/tasks/use_profile.rs Replace manual io::Error boxing with anyhow::bail! and update signature.
src/tasks/sync.rs Add --diff execution/dry-run logic and staged diff fallback; migrate to anyhow::Result.
src/tasks/restore.rs Update task execution signature to anyhow::Result<()>.
src/tasks/purge.rs Update task execution signature to anyhow::Result<()>.
src/tasks/package_registry.rs Update task execution signature to anyhow::Result<()>.
src/tasks/migrate.rs Update task execution signature to anyhow::Result<()>.
src/tasks/install.rs Update task execution signature(s) to anyhow::Result<()>.
src/tasks/encrypted_configs_registry.rs Update task execution signature to anyhow::Result<()>.
src/tasks/delete.rs Update task execution signature to anyhow::Result<()>.
src/tasks/core.rs Change Task::execute() to return anyhow::Result<()> and update tests accordingly.
src/tasks/configs_registry.rs Update task execution signature to anyhow::Result<()>.
src/tasks/clean.rs Update task execution signature to anyhow::Result<()>.
src/tasks/biometric_sudo.rs Update signature and error conversion to integrate with anyhow.
src/tasks/backup.rs Use strip_ansi_codes on captured package-manager output; update signature to anyhow::Result.
src/registry.rs Migrate registry APIs to typed AppError/Result and update tests.
src/main.rs Register new error module.
src/error.rs Add AppError and crate-wide Result<T> alias.
src/encryption.rs Convert to anyhow + add context-rich error messages.
src/cli.rs Add sync --diff CLI flag.
README.md Document sync diff usage (currently mentions unimplemented --diff-stat).
Cargo.toml Add anyhow and thiserror dependencies.
Cargo.lock Lockfile updates for new deps and transitive changes.
CHANGELOG.md Add v2.3.0 notes (currently mentions unimplemented --diff-stat and inaccurate ANSI-stripping description).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@atrtde atrtde merged commit b5fbf42 into staging Feb 10, 2026
8 checks passed
@atrtde atrtde deleted the refactor/anyhow-thiserror branch February 10, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant