Skip to content

Rewrite historical Rust comments as current rules - #225

Merged
bryanroscoe merged 1 commit into
mainfrom
chore/rust-comment-cleanup
Oct 23, 2026
Merged

bryanroscoe merged 1 commit into
mainfrom
chore/rust-comment-cleanup

Conversation

@bryanroscoe

Copy link
Copy Markdown
Owner

Comment-only cleanup of the Rust code in v2/crates, v2/src-tauri, v2/mobile/src-tauri and v2/tools (v2/vendor excluded). No code, signatures or test logic changed: every changed line in the diff is a comment or a blank line.

Kinds of change:

  • History rewritten as the present-tense constraint it explains: "the old tokio::join!", "used to", "until now", "the old code reported every key written", "which 2.3.0 displayed", "Phase 3", "the lead's on-device check".
  • Reviewer attributions dropped and the issue numbers kept: "Codex on Make Forget work first time, and connect automatically after pairing #128:" is now "Make Forget work first time, and connect automatically after pairing #128:".
  • Speculative roadmap removed: runtime app-list fetching ("future versions will check a versioned URL", "(or remote)"), which the README lists as not built.
  • Comments that were wrong, now fixed:
    • v2/crates/core/src/engine/snapshot.rs:169: cited commitment not digitally signed script file #2 for purity. Purity is commitment SecurityError #1; not digitally signed script file #2 is app lists as data.
    • v2/crates/core/src/engine/types.rs:255: memory_mb was described as "Bytes of RAM". It is MB.
    • v2/mobile/src-tauri/src/file_commands.rs:243: said AdbDriver has no stat and the 2 GiB cap only applies after transfer. pull_limited actually stats the file first and caps it while streaming.
    • v2/mobile/src-tauri/src/file_commands.rs:17 and wireless_adb.rs struct doc: said transfers go only through raw_transfer. Pulls go through pull_limited.
    • v2/src-tauri/src/adb/driver.rs:735,801: said the v1 repo "ships" adb at ../adb relative to the Cargo workspace. The code checks the launch directory and its parent, and v1 downloads adb to the repo root (gitignored).
    • v2/src-tauri/src/adb/driver.rs:51: called from_path an alias for the old PATH-only discovery. It calls the full discover.
    • v2/crates/core/src/adb/remote_input.rs:733: gave a cargo test ... --ignored command for the live test. That test is compiled out with cfg(any()) (it needs the desktop SubprocessAdb), so the command can't run it.
    • v2/src-tauri/src/adb/scan.rs:260: the test comment gave two contradicting hex encodings. The wrong one is gone.
    • v2/src-tauri/src/adb/install.rs:209: said a tempdir failure falls back to a known-good path. It panics. The comment is deleted.
    • Three doc comments were attached to the wrong function. The PIN-redaction doc was on redact_typed_text and now sits on redact_args. The merge_scan_targets doc was on would_duplicate_transport. The discover_home_activity doc was on home_activity_candidates.
    • v2/crates/core/src/lib.rs:4: said "future Android app". The mobile app exists and depends on this crate.

🤖 Generated with Claude Code

Comment-only change across the shared core, desktop, mobile and tools
crates. Comments that narrated how the code used to behave ("the old
code", "used to", "until now", version numbers, "Phase 3", reviewer
attributions) now state the constraint in present tense, keeping the
issue numbers that point at reports and regression tests.

Also corrects comments that no longer matched the code: the
commitment number on compute_apply_plan, the unit on memory_mb, the
mobile pull size cap (now enforced while streaming), the v1 adb
fallback location, the compiled-out remote-input live test, a
self-contradicting /proc/net/route example, a tempdir "fallback" that
panics, and three doc comments attached to the wrong function.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-23T04:09:59.460020Z bc3b62b 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: bc3b62bf27

ℹ️ 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 v2/src-tauri/src/commands/scan.rs
@bryanroscoe
bryanroscoe merged commit 38b72be into main Oct 23, 2026
6 checks passed
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