Skip to content

feat: add cid.contact ipni verification after filecoinpin.contact check#580

Merged
silent-cipher merged 5 commits into
mainfrom
feat/check-cid-contact
Jun 2, 2026
Merged

feat: add cid.contact ipni verification after filecoinpin.contact check#580
silent-cipher merged 5 commits into
mainfrom
feat/check-cid-contact

Conversation

@silent-cipher
Copy link
Copy Markdown
Collaborator

@silent-cipher silent-cipher commented May 28, 2026

Summary

  • Adds a sequential cid.contact cross-check to IPNI verification. After filecoinpin.contact confirms a CID is present, dealbot now also polls cid.contact for the same <rootCID, SP> provider record. The check is sequential by design: cid.contact applies negative
    caching, so querying before filecoinpin.contact confirms would cache a false negative.
  • The cid.contact check is observational only — its outcome does not affect Discoverability sub-status or deal success/failure.
  • cid.contact shares the remaining timeout budget from ipniTimeoutMs (not a fresh full budget), so the two sequential calls together never exceed ipniTimeoutMs in wall-clock time.

New metrics

  • cidContactVerification counter — emitted once per deal. value label: success, failure.timedout, failure.other, skipped (when filecoinpin.contact did not verify).
  • ipniVerifyMs histogram gains indexer label — filecoinpin.contact or cid.contact. Existing queries without the label continue to aggregate correctly; filter {indexer="filecoinpin.contact"} to reproduce pre-PR behaviour.
  • ipniVerifyMs value label vocabulary updated — verifiedsuccess, timeoutfailure.timedout, errorfailure.other, aligning with the sub-status vocabulary used by all other dealbot counters.

Docs (docs/checks/)

  • ata-storage.md: documents the two-stage IPNI verification flow, adds assertion 5b for cid.contact, adds cid.contact Verification Status table, updates the deal lifecycle flowchart, and updates the FAQ.
  • events-and-metrics.md: updates ipniVerifyMs definition with indexer label and new value vocabulary, adds cidContactVerification counter entry, updates the sequence diagram with both IPNI participants.

Closes #572

@FilOzzy FilOzzy added this to FOC May 28, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC May 28, 2026
Copy link
Copy Markdown
Collaborator Author

@silent-cipher silent-cipher left a comment

Choose a reason for hiding this comment

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

two open questions...

Comment thread docs/checks/events-and-metrics.md Outdated
Comment thread docs/checks/data-storage.md Outdated
@silent-cipher silent-cipher requested a review from BigLep May 28, 2026 06:45
@silent-cipher silent-cipher self-assigned this May 28, 2026
@BigLep
Copy link
Copy Markdown
Contributor

BigLep commented May 28, 2026

I'll look 2026-05-28 (NA Pacific)

@BigLep BigLep moved this from 📌 Triage to ⌨️ In Progress in FOC May 28, 2026
Comment thread docs/checks/data-storage.md Outdated
Comment thread docs/checks/events-and-metrics.md Outdated
Copy link
Copy Markdown
Contributor

@BigLep BigLep left a comment

Choose a reason for hiding this comment

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

@silent-cipher : I found it was easier for me to just create a PR on top to convey my thoughts: #581

Feel free to merge and adjust what you need.

I was tearing my hair out a bit with how we have a "value" label and we have metrics that produce different values.

This all feels more complicated than I would like, but #581 was a PR to clean up the communication a little bit.

I think that PR also opens your open question about ipniVerifyMs and how to handle.

If that PR looks good, I'm good for you to work on implementation.

BigLep and others added 2 commits May 29, 2026 18:01
…581)

* docs(checks): resolve cid.contact verification design from PR review

Document cidContactVerification metric, separate cid.contact sub-status,
and ipniVerifyMs timer semantics for the two-stage indexer checks.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(checks): link pullCheckStatus values to pull-check spec

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(checks): address PR review on cid.contact metrics docs

Clarify ipniVerifyMs labels, cidContactVerification skipped emission,
timer anchors on ipniVerificationStart, and source citations.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: split #581

* moved to another pr

* docs: remove pending cidContactVerification state

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: silent-cipher <puspendramahariya@gmail.com>
@silent-cipher silent-cipher changed the title docs: initial cid.contact ipni check design feat: add cid.contact ipni verification after filecoinpin.contact check May 29, 2026
@silent-cipher silent-cipher marked this pull request as ready for review May 29, 2026 14:07
Copilot AI review requested due to automatic review settings May 29, 2026 14:07
Copy link
Copy Markdown
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
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

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

Comment thread apps/backend/src/deal-addons/strategies/ipni.strategy.ts
Comment thread apps/backend/src/deal-addons/strategies/ipni.strategy.ts Outdated
Comment thread docs/checks/events-and-metrics.md Outdated
Comment thread docs/checks/data-storage.md Outdated
@BigLep
Copy link
Copy Markdown
Contributor

BigLep commented May 29, 2026

@silent-cipher : I'm confused on this PR vs. #583 given #581 was merged.
I'm probably missing it, but can you clarify what review you want from which PRs?

@silent-cipher
Copy link
Copy Markdown
Collaborator Author

@BigLep , I've split changes from #581 into #583 which aren't related to cid.contact verification. #583 only has changes proposed in #581.

@silent-cipher silent-cipher requested review from BigLep and SgtPooki May 29, 2026 19:16
Copy link
Copy Markdown
Contributor

@BigLep BigLep left a comment

Choose a reason for hiding this comment

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

Docs look good - will leave to @SgtPooki on code.

@github-project-automation github-project-automation Bot moved this from ⌨️ In Progress to ✔️ Approved by reviewer in FOC May 29, 2026
@BigLep BigLep moved this from ✔️ Approved by reviewer to 🔎 Awaiting review in FOC May 31, 2026
@BigLep BigLep moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Jun 1, 2026
Copy link
Copy Markdown
Collaborator

@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.

lgtm

@silent-cipher silent-cipher merged commit 9ca4ffa into main Jun 2, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Jun 2, 2026
@silent-cipher silent-cipher deleted the feat/check-cid-contact branch June 2, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

Check cid.contact after filecoinpin.contact

5 participants