Skip to content

MCH 0.1.0: verified copy/move, real parallel workers, CLI fixes - #1

Merged
Olize merged 4 commits into
mainfrom
feature/mch-0.1.0
Oct 20, 2026
Merged

Olize merged 4 commits into
mainfrom
feature/mch-0.1.0

Conversation

@Olize

@Olize Olize commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix the alpha.5 broken standalone -v/--version and misleading -h option descriptions; keep the motto only in the normal run banner.
  • Implement --count as real Rayon file-level parallel workers.
  • Preserve all eight selectable hash functions, recursive copy/move and -O behavior.
  • Add safe preflight checks, staged verification, optional --overwrite, --dry-run, --quiet and --no-color.
  • Add README, changelog, docs/SPECIFICATION.md, docs/ROADMAP.md and GitHub Actions CI.

Local verification (Android Termux, Rust 1.99.1)

  • cargo fmt --check: pass
  • cargo clippy --locked --all-targets -- -D warnings: pass
  • cargo test --locked: 21 integration tests pass
  • cargo build --release --locked: pass

Scope and limitations

MCH is not an atomic multi-file transaction or filesystem snapshot. Metadata such as timestamps/ACLs/xattrs is not fully preserved. A per-file copy failure leaves all original sources, but completed destination files may remain. Windows and macOS CI must pass before merging. See docs/SPECIFICATION.md.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T18:54:10.270094Z 4eb5255 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4eb5255d6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/engine.rs
Comment on lines +343 to +344
for task in &plan.files {
if !targets.insert(task.destination.clone()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject case-folded duplicate destinations

On case-insensitive filesystems such as default macOS APFS, two sources whose basenames differ only by case (for example A and a) produce distinct PathBuf keys here but refer to the same destination file. With parallel workers, both pre-publish checks can observe the destination as absent, both renames can succeed by replacing the same file, and a --move run then deletes both originals while retaining only one payload. Destination collision detection must account for the target filesystem's path equivalence rather than only exact PathBuf equality.

Useful? React with 👍 / 👎.

Comment thread src/engine.rs Outdated
Comment on lines +388 to +390
if let Err(error) = fs::rename(stage, destination) {
fs::rename(&backup.0, destination)
.context("restoring existing destination after rename failure")?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the Windows backup when restoration fails

On Windows, if publishing the staged file fails after the existing destination was moved to backup, and restoring that backup also fails (for example because another process recreated the destination or the filesystem has a transient error), ? returns while backup is still a TempPath. Its Drop implementation then deletes the backup, destroying the user's original destination precisely when the replacement operation failed; the backup must be retained or otherwise disarmed when restoration cannot complete.

Useful? React with 👍 / 👎.

@Olize
Olize merged commit 4e89515 into main Oct 20, 2026
3 checks passed
@Olize
Olize deleted the feature/mch-0.1.0 branch October 20, 2026 20:34
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