Skip to content

friglet-ipc, blindbit-cli: narrow the interface, fix comments (SNB-676) - #55

Closed
setavenger wants to merge 1 commit into
integrationfrom
snb-676-ipc-cli-narrow
Closed

setavenger wants to merge 1 commit into
integrationfrom
snb-676-ipc-cli-narrow

Conversation

@setavenger

Copy link
Copy Markdown
Owner

Part of the friglet cleanup (SNB-661). Implements SNB-676. +27 −24 lines (doc comments grew); no behaviour change, no wire change.

What changed

  • Narrowed to private (each is used only inside its own module): write_message, read_message (lib.rs), SpDescriptor::scan_pubkey, descriptor_checksum (descriptor.rs), MAX_LOG_BYTES, KEPT_ROTATIONS, DAEMON_LOG_NAME, TRAY_LOG_NAME, RotatingLog::with_limit (logfile.rs). No other crate in this workspace uses them. friglet-ui (blindbit-node-apps) depends on friglet-ipc and uses only Request, Response, StatusInfo, Client, listen, accept, read_config_toml and DaemonConfig (checked by grep; its own scan_pubkey is on its WalletKeys).
  • Stale doc comments:
    • The crate doc named a frigletctl tool that does not exist.
    • state_file now says that the default path is keyed per wallet (scanner_state-<network>-<wallet id>.json) and that an explicit path is used as is.
    • OkWithNote's example ("which changed settings need a daemon restart") is replaced by what the daemon sends today.
    • oracle_connected described a "cache TTL"; it reflects the background poll within the last 30 s.
    • The logfile module doc no longer links the now-private constant.
  • The default oracle_url uses network::MAINNET_ORACLE_URL, the same constant hosted_oracle_url("bitcoin") returns, instead of repeating the literal (same value).
  • tests/roundtrip.rs set scan_health: Default::default() next to ..Default::default().
  • blindbit-cli: removed four comments that restated the next line (no reformatting of the crate).

Verification

  • cargo check --workspace --all-targets --all-features: 0 warnings
  • cargo clippy --no-deps -p friglet -p friglet-ipc -p friglet-tray --all-targets -- -D warnings: clean
  • cargo fmt -p friglet -p friglet-ipc -p friglet-tray -- --check: clean
  • cargo test --workspace: 254 passed, 1 ignored, 0 failed (same as base)

Not touched: friglet-ipc/Cargo.toml.

friglet-ipc items only its own module uses are private now:
write_message, read_message, SpDescriptor::scan_pubkey,
descriptor_checksum, the log-file constants and RotatingLog::with_limit.
No other crate in the workspace uses them, and neither does friglet-ui
(it uses Request/Response/StatusInfo, Client, listen, accept,
read_config_toml and DaemonConfig).

Comments: no frigletctl tool exists; state_file documents the per-wallet
file name; OkWithNote's example is what the daemon sends today;
oracle_connected describes the background poll, not a cache TTL. The
default oracle_url uses the same constant as hosted_oracle_url("bitcoin")
instead of repeating the URL. The roundtrip test sets scan_health twice;
blindbit-cli has four comments that restate the next line.

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

Copy link
Copy Markdown
Owner Author

Merged into integration through #69 on 2026-10-11 (the user live-tested the combined stack first). GitHub's stacked-PR merge rebased the stack, so this PR's commits landed with new IDs and GitHub can't mark it merged itself. The code is identical: integration now has the same tree as the tested branch friglet-deslop-live-test (08bf11d), which contains this PR's head. Closing as merged via #69.

@setavenger setavenger closed this Oct 11, 2026
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