Skip to content

Deferred hardening follow-ups from PR #30 review #32

Description

@nijoe1

Tracking the explicitly-deferred items from the PR #30 follow-up review (2026-07-23). None block the merge; each is bounded.

  • Check-then-stream TOCTOU (upload/multi-upload): a path can change between stat()/preflight and streaming. Open an fd up front and fstat/stream from it so the validated file is the streamed file.
  • Fresh-address RPC matching (wallet balance): failed to apply on state is broad and could misclassify another RPC failure as ADDRESS_NOT_ON_CHAIN. Tighten (e.g. confirm actor state explicitly via a cheap read) instead of substring matching.
  • wallet init existing-keystore no-op path: without an explicit method, only an existing private key is detected as already_configured — an existing keystore falls through to the interactive prompt. Also make --source mutation atomic with a successful init (today it can persist before a later failure).
  • Docs fetch centralization: move the host allowlist inside docsFetch() itself so every future call site is covered by construction; optionally reject non-default ports.
  • Retrieval wording: distinguish "bytes matched the CID at retrieval time" from ongoing PDP proof status in download's description, README, and skills before release.

Context: PR #30 follow-up review, "Safe to defer" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions