Skip to content

Conversation

@SgtPooki
Copy link
Collaborator

This change adds first-class IPNI announcement validation to filecoin-pin core and wires it into the GitHub Action:

  • Core: executeUpload now (by default) waits for the IPFS Root CID to be announced to IPNI after onUploadComplete, returning ipniValidated.
  • Helper: validateIPNIAdvertisement emits retryUpdate and a final complete event for consumers (e.g. website, gh-action, and CLI after feat: add more details to upload-flow #169) to observe the progress of the validation.
  • GitHub Action: uses executeUpload with onProgress to log attempts, and only shows IPFS gateway URLs if ipniValidated is true.
  • CLI: disables IPNI validation by default (we don't show gateway links yet).

Follow-up: The CLI improvements in #169 will switch to consume this core method and its onProgress callback instead of rolling its own polling, and switch the CLI default of ipniValidation to enabled: true.

Fixes #137

References:

@FilOzzy FilOzzy added team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board. labels Oct 30, 2025
@FilOzzy FilOzzy added this to FS Oct 30, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FS Oct 30, 2025
@SgtPooki SgtPooki force-pushed the 137-action-check-filecoinpincontactcidcid-before-showing-ipfs-mainnet-retrieval-urls branch from 0ba8701 to 7d4303d Compare October 30, 2025 15:15
Copy link
Collaborator Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

self review

const uploadResult = await executeUpload(synapseService, carData, rootCid, {
logger,
contextId: `${contextType}-${Date.now()}`,
ipniValidation: { enabled: false },
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we are not displaying ipfs gateway urls in CLI currently, so we disable it here.

@SgtPooki SgtPooki requested a review from rvagg October 30, 2025 15:20
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FS Oct 30, 2025
@BigLep BigLep requested a review from Copilot October 30, 2025 18:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds IPNI (InterPlanetary Network Indexer) validation to the upload flow, ensuring that uploaded content is announced and discoverable on the IPFS network before displaying IPFS gateway URLs. The validation is enabled by default but can be disabled when needed.

  • Introduces a new validateIPNIAdvertisement utility that polls filecoinpin.contact to verify IPFS CID announcements
  • Integrates IPNI validation into the upload execution flow, with the validation starting after upload completion
  • Updates output display logic to show "Waiting for IPNI announcement" instead of preview URLs when validation is pending

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/core/utils/validate-ipni-advertisement.ts New utility function that polls IPNI with retry logic and progress callbacks
src/core/utils/types.ts New type definitions for progress events and handlers
src/core/utils/index.ts Exports the new IPNI validation utility
src/core/upload/index.ts Integrates IPNI validation into the upload flow with configurable options
src/test/unit/validate-ipni-advertisement.test.ts Comprehensive test coverage for IPNI validation behavior
upload-action/src/types.ts Adds ipniValidated boolean to the upload result interface
upload-action/src/upload.js Threads ipniValidated field through the upload action flow
upload-action/src/outputs.js Conditionally displays gateway URLs based on IPNI validation status
upload-action/src/filecoin.js Configures IPNI validation with progress callbacks and removes fallback preview URL
src/common/upload-flow.ts Explicitly disables IPNI validation for this flow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SgtPooki and others added 9 commits October 30, 2025 16:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(ci): handle duplicate items in add-to-project workflow

Add continue-on-error to prevent workflow failure when an issue/PR already exists in the project board. The actions/add-to-project action does not currently handle this case gracefully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* fix(ci): only run workflow when team/fs-wg label is added

Add conditional to prevent workflow from running on every labeled event. Now it only runs when the specific 'team/fs-wg' label is added, avoiding duplicate runs when multiple labels are added at once.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
* Explicitly declare direct dep rather than rely on synapse

* cdn endEpoch removed from ds info

* 10 day grace period => 30 day grace period

* fix: plumb --warm-storage-address through `payments setup`

* fix: check lockup period during allowance check

* chore: update to synapse@next tag, fix test failures & update more lockup mismatches

* post rebase wip

* Update synapse to v0.35.0

* Make things compile with add piece and create all in one

* chore: fix onPieceAdded txHash

* fix test

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
@SgtPooki SgtPooki merged commit b020a42 into master Oct 30, 2025
12 checks passed
@SgtPooki SgtPooki deleted the 137-action-check-filecoinpincontactcidcid-before-showing-ipfs-mainnet-retrieval-urls branch October 30, 2025 20:50
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to 🎉 Done in FS Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action: check filecoinpin.contact/cid/$cid before showing IPFS Mainnet retrieval URLs

5 participants