Skip to content

feat: add IPNS publish strategy completion events - #1103

Open
nikhilkumar1612 wants to merge 1 commit into
ipfs:mainfrom
nikhilkumar1612:main
Open

feat: add IPNS publish strategy completion events#1103
nikhilkumar1612 wants to merge 1 commit into
ipfs:mainfrom
nikhilkumar1612:main

Conversation

@nikhilkumar1612

Copy link
Copy Markdown

Title

feat: add IPNS publish strategy completion events

Description

Fixes #959.

Adds a publish progress event that fires after each IPNS publishing strategy has completed. This lets callers distinguish between local persistence, Helia routing publication, and any custom routing strategies finishing.

This also addresses the behavior requested in #945 by moving the ipns:routing:datastore:put progress event so it is emitted after the datastore batch commit completes. Callers can now wait for the local IPNS record to be persisted without needing to wait for slower network publishing such as DHT publication.

Changes include:

  • add ipns:publish:strategy:success
  • include the completed strategy name, routing key, and IPNS record in the event detail
  • emit strategy completion after each router put(...) resolves
  • emit a local strategy completion event for offline publishing
  • emit ipns:routing:datastore:put after local datastore commit
  • add tests for online strategy completion, offline local-only completion, and datastore post-commit timing

Notes & open questions

The new strategy completion event uses a single event type, ipns:publish:strategy:success, with the completed strategy identified in evt.detail.strategy.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@nikhilkumar1612
nikhilkumar1612 requested a review from a team as a code owner August 10, 2026 15:32
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.

progress events on completion for each ipns publishing strategy

1 participant