Skip to content

fix(cli): show P2TR address in single subcommand output#85

Merged
oritwoen merged 2 commits into
mainfrom
fix/single-missing-p2tr
Mar 22, 2026
Merged

fix(cli): show P2TR address in single subcommand output#85
oritwoen merged 2 commits into
mainfrom
fix/single-missing-p2tr

Conversation

@oritwoen
Copy link
Copy Markdown
Owner

P2TR support landed in #79 but the single subcommand still only prints P2PKH compressed, P2PKH uncompressed, and P2WPKH. Taproot address was missing from the output.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e8163ac6-6286-479e-8128-0dc5d53d066e

📥 Commits

Reviewing files that changed from the base of the PR and between 0789ea2 and f5c8e28.

📒 Files selected for processing (1)
  • src/main.rs
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Order imports as: external crates → std → blank line → super:: → blank line → crate::
Prefer ? operator over .unwrap() in new code
Use PascalCase for types and structs
Use snake_case for function and method names
Use SCREAMING_SNAKE_CASE for constants
Use snake_case for file and module names

Files:

  • src/main.rs
src/main.rs

📄 CodeRabbit inference engine (AGENTS.md)

src/main.rs: Use anyhow::Result<T> and anyhow::bail!() for CLI and top-level error handling
CLI command and subcommand changes go in src/main.rs using clap derive macros

Files:

  • src/main.rs
src/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.rs: Use indicatif::ProgressBar for long-running operations
Place inline tests in #[cfg(test)] mod tests at the end of each file, using standard assert! and assert_eq! macros
Use tempfile crate for file I/O tests

Files:

  • src/main.rs
🧠 Learnings (4)
📚 Learning: 2026-03-12T18:25:01.029Z
Learnt from: CR
Repo: oritwoen/vuke PR: 0
File: src/output/AGENTS.md:0-0
Timestamp: 2026-03-12T18:25:01.029Z
Learning: Applies to src/output/console.rs : Compact CSV format for file output should be: `source,transform,privkey_hex,address`

Applied to files:

  • src/main.rs
📚 Learning: 2026-03-12T18:24:52.371Z
Learnt from: CR
Repo: oritwoen/vuke PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-12T18:24:52.371Z
Learning: Applies to src/main.rs : CLI command and subcommand changes go in `src/main.rs` using clap derive macros

Applied to files:

  • src/main.rs
📚 Learning: 2026-03-05T12:48:44.245Z
Learnt from: CR
Repo: oritwoen/vuke PR: 0
File: src/source/AGENTS.md:0-0
Timestamp: 2026-03-05T12:48:44.245Z
Learning: Applies to src/source/src/main.rs : Update `create_source()` function in `src/main.rs` to handle new source variants

Applied to files:

  • src/main.rs
📚 Learning: 2026-03-13T13:20:58.369Z
Learnt from: oritwoen
Repo: oritwoen/vuke PR: 76
File: src/source/wordlist.rs:134-143
Timestamp: 2026-03-13T13:20:58.369Z
Learning: Do not flag .ok() calls on output.hit() / output.key() inside Rayon par_chunks().for_each() closures in Rust files (e.g., src/source/wordlist.rs) as bugs. Rayon for_each requires FnMut() -> (), which cannot propagate Result with ?. This is a known limitation discussed in issue `#77`. Treat these .ok() usages in this pattern as intentional and not regressions; focus review on actual logic or error handling outside this specific closure pattern.

Applied to files:

  • src/main.rs
🔇 Additional comments (1)
src/main.rs (1)

767-770: LGTM - straightforward addition

Adds the missing P2TR address output. Field exists on DerivedKey and alignment is consistent with the other address formats.


📝 Walkthrough

Walkthrough

One console output statement was added to run_single that prints the P2TR (Pay-to-Taproot) derived address format alongside existing address format outputs.

Changes

Cohort / File(s) Summary
Console Output
src/main.rs
Added single line printing derived.p2tr as P2TR: in standard output of run_single.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

Taproot joins the stage with pride,
P2TR now printed side by side,
One line of light in darkness cast,
The wallet's formats hold steadfast. 🔑

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding P2TR address output to the single subcommand.
Description check ✅ Passed The description directly relates to the changeset, explaining why P2TR support was added to the single subcommand output.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/single-missing-p2tr
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/single-missing-p2tr

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

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Trivial addition of a print statement to display an existing field in CLI output.

@oritwoen oritwoen self-assigned this Mar 22, 2026
@oritwoen oritwoen merged commit 3094d67 into main Mar 22, 2026
2 checks passed
@oritwoen oritwoen deleted the fix/single-missing-p2tr branch March 22, 2026 18:35
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