Skip to content

fix(security): keep formatted panic messages out of logs and the terminal - #1158

Open
Claudius-Maginificent wants to merge 97 commits into
v1.0-devfrom
fix/panic-hook-secrets
Open

Claudius-Maginificent wants to merge 97 commits into
v1.0-devfrom
fix/panic-hook-secrets

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR: Crash reports no longer repeat a panic's formatted message, so a crash cannot copy a value from memory into a log file or onto the terminal. We found no case where a secret actually leaked. This closes those paths before one can.

User story

As a user who shares det.log after a crash, I want the log to contain nothing about my wallet beyond where the app crashed, so that sharing it is safe.

Scenario

Base flow

A background task or the command-line client hits an unexpected error and panics with a message built at runtime.

Actual behavior

The panic message is written verbatim to det.log, printed again to det-stderr.log or the terminal, and repeated in an error banner's details. If such a message ever contained a key, seed or password, it would be stored or shown.

Expected behavior

Logs and the terminal record the thread, the code location and a backtrace, plus <redacted: formatted panic message, N bytes>. Fixed messages such as panic!("invariant broken") are still shown in full.

Detailed discussion

Stacked on #1156; merge that first.

What was done

  • Panic hook (src/logging.rs, install_panic_hook()):
    • It replaces the default hook instead of chaining it, so the payload is no longer printed a second time.
    • Message policy:
      • a &'static str payload is a compile-time literal and is kept;
      • a String payload is runtime-formatted and is replaced by its length;
      • any other payload becomes <non-string panic payload>.
    • Kept: location, thread name, and a force-captured backtrace in det.log.
    • stderr gets a crash marker in the default format, with a backtrace only when RUST_BACKTRACE asks for one.
  • det-cli installs the same hook as its first action. It previously used the default hook, in a mode that reads passwords and mnemonics.
  • TaskError::JoinError wraps the redacted BackendTaskJoinError with a manual From<JoinError>, so banner details and logs no longer repeat tokio's panic string.
  • Stdio MCP server: rmcp's JoinError goes through the same redaction before it is printed.
  • Hardening: two private-key Vec → [u8; 32] conversions use a slice conversion whose error carries no data.
  • SPV restart-required errors: DET swaps the text of platform-wallet's SpvProcessRestartRequired for its length before logging it or keeping it as banner details. That text embeds the joined SPV task's result, panic message included.

Audit

Confirmed sinks: places that printed a panic payload verbatim. No secret-bearing panic source was found in DET or in the upstream wallet crates.

ID Sink Status
S1 Hook logged the message to det.log redacted
S2 Chained default hook reprinted it to stderr / det-stderr.log default hook replaced
S3 det-cli had no hook hook installed
S4 TaskError::JoinError Debug repeated the panic string in banner details wrapped in the redacted type
S5 Stdio MCP server printed rmcp's JoinError redacted
S6 DET logged platform-wallet's SpvProcessRestartRequired (its text embeds a joined SPV task's panic) with ?e on both SPV stop paths, kept it as banner details on SPV start failure, and logged pwm.shutdown()'s report, whose Panicked/Error entries carry panic text redacted (redact_wallet_error, warn_if_shutdown_unclean)

Scope: this PR covers the panic hook and every sink DET itself owns. Panic text that a dependency (rmcp, platform-wallet) formats and logs on its own, before DET receives the error, is out of scope; those crates own that logging (H5, H6).

Hypothetical: a source with no demonstrated panic, or a sink with no source.

ID Case Status
H1 Two key conversions whose unreachable expect would print the key bytes hardened
H2 str non-char-boundary panics quote the string no secret str slicing exists
H3 Third-party formatted panics the hook's own report is covered by S1/S2; dependency code that catches a panic and logs its JoinError is outside the hook (H5, H6)
H4 Option::expect("literal") arrives as a String redacted, location kept
H5 rmcp 3.7.0 logs its own transport-send tasks' JoinError with %e / ?quit_reason; DET tool-handler tasks are detached, so their panics never reach these logs out of scope: logging owned by a dependency
H6 platform-wallet logs panic-bearing text itself: the wallet-event commit thread's JoinError (changeset/core_bridge.rs), the SPV teardown failure text (spv/runtime.rs spawn_run_loop), and the SPV stop error inside PlatformWalletManager::shutdown (manager/mod.rs "SPV shutdown failed") out of scope: logging owned by a dependency

Residual: panic_any with a leaked runtime &'static str would pass as a literal. This is documented, and DET never calls panic_any.

Testing

  • The test binary re-runs itself as a child process that installs the real hook and panics. The tests then check stdout, stderr and the log file:
    • panic_hook_keeps_formatted_panic_messages_out_of_stderr_and_the_log
    • panic_hook_keeps_static_panic_messages_verbatim
    • unit_tests_that_boot_the_logger_keep_assertion_values (a unit test that boots the logger keeps libtest's assertion output)
    • redact_wallet_error_withholds_a_joined_spv_task_panic_message
    • unclean_shutdown_report_is_logged_without_worker_text
  • Unit tests: panic_message_keeps_only_compile_time_literals, join_error_never_repeats_the_panic_message.
  • Mutation check: putting back the chaining of the default hook makes the first test fail.
  • Local runs: clippy --all-features --all-targets -D warnings clean, the logging and error tests pass, cargo fmt --check clean.

Breaking changes

None for users. The text of formatted panic messages no longer appears in logs.

Attribution

🤖 Generated with Claude Code

🤖 Co-authored by Claudius the Magnificent AI Agent

PR Hygiene · 8e95705

  • Bots — coderabbitai skipped after its own rate limit · thepastaclaw skipped after the window
  • Self-review — not asked of a bot author
  • Build failed — review was already requested; it still has to pass to merge
  • Approvals
    • files with no dedicated owner (Cargo.lock, Cargo.toml, src/backend_task/error.rs and 4 more) — lklimek

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • Bug Fixes
    • Panic reports now include a backtrace while limiting exposure of panic details: literal messages remain visible, but formatted messages are redacted and non-text messages are replaced with a generic notice.
    • Task failure errors no longer expose panic payloads in their displayed or debugged error details, while still indicating when a panic occurred.
    • Panic reporting is enabled earlier during command-line startup and remains available when logging is already active.

lklimek and others added 30 commits October 12, 2026 12:26
Show published avatars, compact username controls, responsive Home cards, and Profile navigation. Reuse the wallet send form with fixed identity parties and owned-wallet withdrawal destinations.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
Keep contacts at the top of the right column beside quick actions. Place
left-aligned username cards with setup and payment history, using A05
column proportions and stacked cards in narrow windows.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
Preserve the development-branch update alongside the Home layout fix.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
SDK responses include recipient addresses. Only update balances for
Platform addresses registered to the selected wallet, preventing unrelated
wallets from offering foreign funds for identity top-ups or transfers.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
…idle

The offline profile-cache test intentionally leaves the avatar request
pending. Render bounded frames while checking the pending fetch and
preserving assertions for cached, saved, and absent profile data.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
Conflict in src/ui/identity/settings.rs: both sides added methods to
SettingsTab at the same place. Kept both (focus_section from this branch,
usernames_card_mut and accepts_legacy_recovery_result from #1076) and this
branch's doc comment on render.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
IDH-004 still described a `Set up your social profile` checklist entry
with its own skip affordance. Home renders an optional `Set a display
name` step, and the only dismiss control, `Hide this for now`, hides the
whole checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…owns

The only Move to wallet test ran against a context without wallets and
asserted that an external address is refused, so it would also pass if the
ownership check refused every address.

Register a wallet, take one of its receiving addresses, and drive the
production validation and confirmation: the dispatched withdrawal must carry
the bound identity, that address and the entered amount. An external address
is still refused, and the owned address is refused once its wallet is removed.
Nothing is broadcast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Every frame of an identity-bound send form restored the binding, which
allocated a new box and cloned the identity twice for Send and Move to
wallet, and looked up the username again for Top up, even when nothing had
changed.

The check `validated_send_route` already made is now a shared predicate, and
the per-frame call restores only when that predicate fails. Construction,
reset and refresh still restore unconditionally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Home tracked which request its payment preview answered, but not which
identity the rows belonged to. The selected identity can change without the
hub hearing of it, for example when another screen's identity selector is
used and that screen is closed without a refresh. Home then showed the new
identity above the previous identity's payments, and the load guard kept the
new identity's history from being requested.

Home state now records its owner and reconciles it before rendering: content
of another identity is dropped and its pending request forgotten, so a late
answer is discarded and the new history loads. A refresh for the same
identity keeps the preview on screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…llet

Move to wallet opens the shared send form, whose Max for an identity sender
always kept back the fee of a transfer between identities. A withdrawal to a
Core address costs far more, so Max offered an amount the network refused,
and the form only compared the amount with the balance.

The reserve now follows the destination: a Core address keeps back the
withdrawal estimate, every other destination keeps what it kept before. Max
and send validation read the same value, and a withdrawal that would leave
too little for the fee is refused before the confirmation, naming the highest
amount that works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…s app

Send from Identity Home dispatched its transfers without a signing key. The
backend passed that on, and the SDK then takes the identity's first TRANSFER
key, including a disabled one, without asking whether the local signer holds
it. An identity with an earlier disabled key, or one imported with only a
later key, could not send.

Transfers to an identity and to Platform addresses now resolve the key before
any network call: an active TRANSFER key the signer can use, lowest id first.
An explicitly requested key that is unusable is refused rather than replaced,
and a missing key is reported as its own error. The send form resolves the
same key, passes it along, and refuses before the confirmation when there is
none. This also covers the MCP transfer tools, which dispatch without a key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…registration

The fixture wired the wallet backend before registering its wallet, which
starts a background registration next to the awaited one, and then polled
for the addresses. Registering the wallet first leaves the awaited calls as
the only registration, so the owned address is available as soon as they
return and the wait is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Home and the Contacts tab share one ContactsState, and the hub reset it only
for identity changes it made itself. Selecting another identity on a screen
opened from the hub (Add contact, then Cancel) left the previous identity's
contacts and requests on screen under the new identity, with the load slot
still claimed, so the new identity's lists never loaded and Accept paired the
new identity with the old identity's request.

ContactsState now records the identity its lists belong to. Home and the
Contacts tab bind it before reading or loading: on a change the lists are
dropped and the load re-armed. Paid-action guards are keyed by request and
survive the change, so a request both identities can see stays guarded while
its action is still running.

The Home payments test no longer depends on which frame its load goes out
in: the contact load now takes the first frame after such a change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…latform address

The shared send form reserved the identity-to-identity transfer fee for a
Platform address destination, while the task it dispatches estimates the
larger transfer-to-addresses fee, and it accepted any amount up to the full
balance. The transfer screen it replaced used the transfer-to-addresses
estimate for Max, the fee shown and an amount-plus-fee check.

Max, the fee preview and the confirmation text now read one reserve that
uses the existing transfer-to-addresses estimate for this route, and an
amount that leaves less than that fee in the identity is refused before the
confirmation, with the highest amount that works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… took

The hub replaces the tab's action with the header's when both produce one
in the same frame. A tab that returned its contact or payment-history load
on that frame had already claimed the load's one dispatch slot, so the load
never ran, and cancelling the screen the header opened returns to the hub
without refreshing it.

Home and the Contacts tab now take a `may_load` flag. The hub clears it on a
frame where the header returned an action, so the slot stays free and the
load goes out on the next frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er screen

Home asks for its payment history once per arrival and accepts only the
answer to that request. An answer that arrived while Send or Top up covered
the hub went to the covering screen, which ignores it; Cancel returns
without refreshing, so the preview stayed empty or stale until an explicit
refresh.

The app now forwards a payment history result to the hidden hub as it does
for profile results. The hub still records only the answer to its own
request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The existing tests call the key resolver directly, so they would still pass
if a transfer task stopped calling it. This one dispatches both transfer
tasks through `run_identity_task` against a mock SDK, with no usable key and
with an explicitly requested unusable one, and expects the dedicated error:
a task that got past the resolver would fail on the mock instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the list

The preview took six entries from a vector of every matching contact, built
again on each frame. `ContactsState` now offers the matches as an iterator,
which the preview bounds before reading; the Contacts tab keeps the
collected list where it needs the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hub asks for its contacts and contact requests once per arrival, and
Home now shows them. Answers that arrived while Send or Top up covered the
hub went to the covering screen, which ignores them; Cancel returns without
refreshing, so Home's contact preview stayed empty until an explicit
refresh.

The app now forwards both results to the hidden hub, next to the payment
history. The hub keeps dropping lists loaded for an identity other than the
one it shows, which the new test covers with a result for another identity.
The payment history test shares the new helper that covers the hub with the
Send screen and cancels back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #1077, #1078 and #1079. No conflicts: docs/user-stories.md and
src/ui/identity/settings.rs merged automatically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Home's Top up now opens the shared send form, which numbered a wallet-funded
top-up by the count of stored top-ups. A stored history can have gaps, so
with entries 0 and 2 the form chose 2 and the finished top-up replaced that
entry in the identity's stored history; every later one did the same. The
screen it replaced used the highest stored index plus one.

`QualifiedIdentity::next_top_up_index` is now the one place that chooses the
index: one past the highest stored, or the lowest free one when the highest
possible index is taken, so it can neither overflow nor reuse an entry. The
shared send form and the older top-up screen both use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The identity top-up tool numbered a top-up by the count of stored top-ups,
so a history with a gap had an entry replaced, as in the shared send form.
It now uses `QualifiedIdentity::next_top_up_index`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…decided

A hub frame merges actions from the top bar, the sidebar, the header, the
tab, the breadcrumb and a confirmation dialog, and the last non-empty one
wins. The tabs returned their data loads from rendering, claiming the load's
one dispatch slot on the spot. A load could then replace a sidebar or top
bar click made on the same frame, and a breadcrumb entry applied after the
tab could replace a load whose slot was already claimed, so it never ran.
The earlier header-only flag covered one of those sources.

Home and the Contacts tab no longer load while rendering. The hub asks the
rendered tab for its due load at the end of the frame, only when nothing
produced an action, and nothing after that point replaces an action. So a
click anywhere keeps its frame and a claimed load is always the action
returned. The load binds the lists to the selected identity first, so an
identity chosen in the breadcrumb is loaded once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on this device

The transfer key resolver took any stored key entry for a usable key. An
entry that only refers to a wallet needs that wallet on this device: without
it an earlier such key was chosen over a later key whose material is here,
and an identity with only such a key reached the confirmation, to fail when
the transfer was signed.

The resolver now asks whether the private half can be obtained. The rule is
the one username registration already uses; it moves to `QualifiedIdentity`
so both read it from one place. A locked wallet still counts, as the app asks
for its password when it signs. `can_sign_with` is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The app hands every failure to the visible screen as a message without a
task context, and Wallet Send took any of them for the failure of its own
send: it left the waiting state and showed the filled form again while the
payment was still running, so the user could confirm it a second time. Home
starts loads of its own right before Send or Top up opens, which makes such
a failure likely.

A confirmed send now goes out under a dispatch context of its own and the
screen remembers it. While it waits, only a failure carrying that context
ends the wait; other failures are still reported by the banner. The send no
longer joins a task batch, which cannot carry a context: an asset-lock
maximum lookup due in the same frame is asked for on the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… form runs

Home's Top up opens the shared send form, which remembered a running top-up
only on the screen. Leaving the waiting form by its breadcrumb destroyed that
record, so a reopened form offered the same identity another top-up while the
first still ran: funds would leave twice, and both could be recorded under
one index.

The form now records its top-ups in the registry Add Funds keeps outside any
screen, and refuses a top-up of an identity that has one in flight. The app
releases the entry on that top-up's own result, as it does for Add Funds, and
hands the result to the form that waits on it. Either screen holds back while
the other's top-up runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Wallet Send tests entered the waiting state through a hook that took a
hand-made context, which no dispatch ever produced. They now go through
`dispatch_send`, the path a confirmed send takes, so the screen waits on a
dispatch of its own and the tests keep holding when the screen relies on it.
The unused hook is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acy encrypted format

Early versions kept a private key in a per-key encrypted format. This version
stores such an entry but cannot open it, with or without a password, yet the
transfer key resolver counted it as usable: an earlier such key was chosen
over a later key that can sign, and an identity with only such a key reached
the confirmation, to fail when the transfer was signed.

The shared rule now says such a key cannot be obtained. A key in the vault and
a key also held in a readable way stay eligible. Username registration keeps
reporting such a key as ready, as before: it needs a status and guidance of
its own first, and the note saying so moves to where that decision is made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lklimek
lklimek marked this pull request as ready for review November 3, 2026 15:11
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai ✓, 2 threads unresolved — resolve them · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 3, 2026
@lklimek
lklimek enabled auto-merge (squash) November 3, 2026 15:22

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread src/logging.rs Resolved
Comment thread src/logging.rs Resolved

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 2 only (no Phase 1 for this repository)

Verified both Phase-2 findings against head 983ff27 and the pinned dependency sources. The application-owned panic reports are redacted, but independent MCP and wallet-runtime logging paths still format panic payloads, leaving the PR's stated protection incomplete. This was a static review; Test Suite and Clippy remain pending, and the supplied base drift has no conflicting files.

🔴 2 blocking

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — The change spans panic-hook behavior, CLI initialization, asynchronous error redaction, and subprocess tests, but primarily changes logging and error reporting rather than an intricate critical surface.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `src/mcp/mod.rs`:
- [BLOCKING] src/mcp/mod.rs:51-57: Cover rmcp's internal panic-message logging before waiting returns
  Redacting the outer error from waiting() leaves rmcp's internal panic reports exposed. In the pinned rmcp 3.7.0, src/service.rs:1429 formats a send-task JoinError with %e, lines 1479 and 1762 format response-send JoinErrors with %error, and line 1799 logs ?quit_reason, which can contain QuitReason::JoinError. The pinned Tokio implementation includes the original panic payload in both Display and Debug. These ERROR and INFO events pass sensitive_target_cap() and can reach det.log or enabled CLI logging after the panic hook has emitted its redacted report. The QuitReason path also returns successfully, so this map_err cannot intercept it. Correct the dependency-owned reports upstream or protect these specific events in the logging layer, and add a regression covering a joined MCP send-task panic. This is a remaining sink, not evidence of an actual secret leak. If deferred, link a tracking issue and explicitly qualify the PR's claimed coverage.

In `src/logging.rs`:
- [BLOCKING] src/logging.rs:161-169: Include wallet-runtime JoinError sinks in the redaction coverage
  The hook changes its own output but leaves the original payload available to code that catches the panic. The pinned platform-wallet formats join_error directly in packages/rs-platform-wallet/src/changeset/core_bridge.rs:987–1003, including tracing::error!(error = %join_error). This adapter is active: WalletBackend::new constructs PlatformWalletManager, whose constructor starts the wallet-event adapter. A second path in spv/runtime.rs:595–607 formats a joined failure into Shutdown::Failed and returns it as SpvProcessRestartRequired; DET then logs that error with ?e in src/wallet_backend/mod.rs:2055–2059 and 2114–2118. A runtime-formatted panic on either path can therefore be redacted by the hook and subsequently copied into det.log. Both sinks also remain in the supplied platform default checkout. Fix their reporting in dashpay/platform to retain task identity and panic/cancellation status without formatting the payload, then consume the corrected dependency. If deferred, link a dedicated tracking issue and document this residual exposure instead of claiming third-party formatted panics are covered.

Comment thread src/mcp/mod.rs Resolved
Comment thread src/logging.rs Resolved
@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 3, 2026
lklimek and others added 2 commits November 4, 2026 10:38
A lib unit test that boots the app went through initialize_logger and
installed the redacting panic hook for the whole test process, so every
later failed assert_eq! lost its left/right values. Skip that automatic
install under cfg(test); production entry points are unchanged.

Also make the panic-hook tests' location checks use file!() so they
match rustc's path separator on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…anners

platform-wallet builds SpvProcessRestartRequired's text from the joined
SPV task's result, so a panic there carries its runtime-formatted message.
DET logged that error with ?e on both SPV stop paths and kept it as the
banner-details source when SPV start failed. Swap the text for its length
at those three places, matched on the typed variant; other variants pass
through unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 4, 2026
pwm.shutdown() re-runs the SPV stop and copies its error text, panic
message included, into the report; other workers' Panicked entries
carry their panic message too. DET logged that report with ?report.
Log it with every worker's text replaced by its length; worker, status
and orphan count are kept. dash-async (same pinned rev, already in the
graph) is now a direct dependency so the statuses can be matched by type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai skipped after its own rate limit · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)

Verified head 8e95705: the DET-owned redactors address the local reporting paths, but both prior findings remain valid because dependency-owned reports still format panic payloads before those redactors run. These residuals are acknowledged in H5/H6 but lack linked tracking issues, so their proposed deferrals are not yet complete. Current CI reports successful tests, Clippy, and platform-pin checks; PR Hygiene remains pending, and no builds or tests were run locally.

🔴 2 blocking

1 carried-forward finding(s) already raised on this PR; not re-posting as new inline comments.

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — The cross-cutting panic-hook and error-redaction changes require careful review, but the diff primarily changes logging and diagnostics rather than an intricate critical surface.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `src/wallet_backend/mod.rs`:
- [BLOCKING] src/wallet_backend/mod.rs:2069: Include wallet-runtime JoinError sinks in the redaction coverage
  The new sanitizers protect DET's SPV diagnostics and returned shutdown report, but dependency-owned reports execute before this wrapper receives that report. In pinned dashpay/platform 575d961fe0c5, spv/runtime.rs:595–607 retains a failed join's Debug text in Shutdown::Failed. PlatformWalletManager::shutdown then calls stop again and logs that retained error with `tracing::warn!(?error, "SPV shutdown failed")` at manager/mod.rs:1143, before warn_if_shutdown_unclean can redact it. The commit-thread reports at changeset/core_bridge.rs:987–1003 and retained-failure report at spv/runtime.rs:624 also remain unredacted. These paths are still present in the supplied platform default revision, and their warning/error events pass DET's filters. This confirms remaining panic-payload sinks, not an observed secret leak. Fix their reporting in dashpay/platform, or link a dedicated issue or PR covering these sinks before intentionally deferring them; H6's 'follow-up to be filed' does not yet provide tracked ownership.

In `src/mcp/mod.rs`:
- [BLOCKING] src/mcp/mod.rs:51-57: Cover rmcp's internal panic-message logging before waiting returns
  (existing thread: https://github.com/dashpay/dash-evo-tool/pull/1158#discussion_r4456894172)
  The distinction between detached DET handlers and rmcp's joined transport-send tasks is correct, but the latter still bypass this redactor. The checksum-matched rmcp 3.7.0 source logs a send-task JoinError with `%e` at service.rs:1429 and subsequently logs `?quit_reason` at :1799; response-send JoinErrors are also logged at :1479 and :1762. Tokio 1.54.1 includes the original string panic payload in both Display and Debug, and DET's rmcp INFO ceiling admits these ERROR and INFO events. These reports occur before waiting returns; the send-task failure can return as `Ok(QuitReason::JoinError(...))`, so neither map_err nor dropping the successful result protects them. This is a remaining sink rather than a demonstrated secret-bearing panic source. Correct the reports upstream while retaining task identity and panic/cancellation status, or link the proposed upstream tracking issue or PR before deferring the gap. Blanket suppression of rmcp errors is not required, but H5's unfiled follow-up is not yet a tracked deferral.

Comment thread src/wallet_backend/mod.rs Resolved
@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator Author

Re thepastaclaw review at 8e95705 — rmcp transport-send JoinError / quit_reason logging: out of scope (maintainer decision). DET logs no rmcp JoinError or QuitReason itself (src/mcp/mod.rs:51-57 redacts the error and drops QuitReason; det_cli/connect.rs:74 ignores the result), and DET's tool-handler tasks are detached, so their panics never reach rmcp's logs. rmcp formats and logs its own transport-task errors; that logging belongs to rmcp. The PR body states this scope limit (Audit → Scope, H5).

🤖 Co-authored by Claudius the Magnificent AI Agent

@lklimek
lklimek dismissed thepastaclaw’s stale review November 4, 2026 12:04

Dismissed by maintainer decision: both remaining blockers concern panic text logged by dependencies (platform-wallet, rmcp) before DET receives the error — out of scope for this PR, which covers DET-owned sinks. See discussion_r4467196433 and issuecomment-6630113348.

@github-actions github-actions Bot added the bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@thepastaclaw review

No review for 8e957056 yet, so PR Hygiene is asking once. If nothing arrives, the requirement is dropped for this commit and the pull request is labelled bot-review-skipped.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Ready for review — files with no dedicated owner: lklimek.
Full checklist in the description.

@github-actions github-actions Bot added ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. and removed waiting-bots Waiting for the review bots to report on this head labels Nov 5, 2026
@github-actions
github-actions Bot requested a review from lklimek November 5, 2026 03:23
@Claudius-Maginificent Claudius-Maginificent added priority: high High priority — address soon priority: low Low priority — nice to have and removed priority: high High priority — address soon priority: low Low priority — nice to have labels Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. priority: high High priority — address soon ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants