Skip to content

fix: robust provide strategy detection - #3196

Merged
lidel merged 1 commit into
mainfrom
fix/tray-provide-strategy-detection
Aug 3, 2026
Merged

fix: robust provide strategy detection#3196
lidel merged 1 commit into
mainfrom
fix/tray-provide-strategy-detection

Conversation

@lidel

@lidel lidel commented Aug 3, 2026

Copy link
Copy Markdown
Member

Problem

Quick follow-up to #3194, making the config handling around provide settings more robust. Provide.Strategy and Import.FastProvide* were treated as one setting, so a config carrying the strategy but not the FastProvide keys read as hand-tuned, and the tray showed Provide Strategy as a read-only "Manual". A repo IPFS Desktop sets up itself lands in exactly that state.

Fix

  • detection reads Provide.Strategy alone. FastProvide* are kubo import knobs, not part of the strategy or of IPIP-499
  • they become plain repo defaults: written for new repos, and filled in key by key by migration revision 8 where the user has no preference
  • added and pinned content now has the blocks under its root announced right away, not at the next reprovide cycle. The why sits in DEFAULT_FAST_PROVIDE in src/daemon/config.js

A strategy set by hand still shows read-only "Manual", which is what that state is for.

Import.FastProvide* are kubo import knobs, not part of Provide.Strategy
nor of IPIP-499, yet detection required them to match a named strategy.
applyDefaults wrote the strategy without them, so every repo IPFS
Desktop created classified as "Manual" and the tray rendered all three
options read-only, over a config the app wrote itself. Revision 7 did
the same to existing repos.

- detection reads Provide.Strategy alone, and picking an entry in the
  tray no longer touches Import
- the FastProvide preferences become repo defaults next to
  Provide.Strategy: written for new repos, and filled in key by key by
  migration revision 8 wherever the user has not set them
- content added or pinned now has the blocks under its root announced
  right away rather than at the next reprovide cycle. Kubo defaults
  Import.FastProvideDAG to false to keep bulk imports cheap; a desktop
  node adds a few files at a time and can afford the walk
- unit tests pin what applyDefaults and migrateConfig write against the
  detection the tray depends on
@lidel
lidel requested a review from a team as a code owner August 3, 2026 17:54
@lidel
lidel merged commit bce77f1 into main Aug 3, 2026
9 checks passed
@lidel
lidel deleted the fix/tray-provide-strategy-detection branch August 3, 2026 18:07
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