Skip to content

Conversation

@Mr-Leshiy
Copy link
Contributor

@Mr-Leshiy Mr-Leshiy commented Nov 14, 2025

Description

Slightly refactored the usage of the new DocumentLocator type and generation it for the particular document.
Fixed existing tests by setting the correct DocumentRef values.

Description of Changes

  • Added doc_ref(&self) -> anyhow::Result<DocumentRef> method for the CatalystSignedDoc type instead of TryFrom<&CatalystSignedDoc> for DocumentRef.
  • Replaced create_dummy_doc_locator with the create_dummy_document_ref
  • Removed optional argument for the TestCatalystProvider::add_document, added separate TestCatalystProvider ::add_document_with_ref instead.
  • Fixed tests.

Related Pull Requests

Refactoring for #621

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

@Mr-Leshiy Mr-Leshiy changed the base branch from main to fix/doclocator-uses-cid-v1 November 14, 2025 08:33
@Mr-Leshiy Mr-Leshiy added squad: gatekeepers Catalyst App Backend, System Development & Integration Team review me PR is ready for review labels Nov 14, 2025
@saibatizoku saibatizoku moved this from New to 👀 In review in Catalyst Nov 14, 2025
@github-actions
Copy link
Contributor

📚 Docs Preview

The docs for this PR can be previewed at the following URL:

https://docs.dev.projectcatalyst.io/libs/feat/doc-ref-api

@github-actions
Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 565/565}$ | ${\color{red}Fail: 0/565}$ |

@saibatizoku saibatizoku merged commit 53a8829 into fix/doclocator-uses-cid-v1 Nov 14, 2025
30 of 37 checks passed
@saibatizoku saibatizoku deleted the feat/doc-ref-api branch November 14, 2025 17:21
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Catalyst Nov 14, 2025
saibatizoku added a commit that referenced this pull request Nov 16, 2025
* feat(rust/signed-doc): CatalystSignedDocument has CIDv1

* feat(rust/signed-doc): Cid newtype

* break(rust/signed-doc): DocLocator(Cid) must be valid

* Breaking change that removes compatibility with old versions

* fix(rust/signed-doc): fix unit tests to support DocLocator

* removes support for old version

* fix(rust/signed-doc): fix integration tests

* chore(rust/signed-doc): fmt fix

* chore(rust/signed-doc): fix spelling

* chore(rust/signed-doc): fix doc comment

* chore(rust/signed-doc): Add `doc_ref` method for `CatalystSignedDoc`. (#640)

* update API

* wip

* wip

* wip

* fix test

* wip

* wip

* fix fmt

* fix(rust/signed-doc): remove stale example

---------

Co-authored-by: Joaquín Rosales <[email protected]>

---------

Co-authored-by: Alex Pozhylenkov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review me PR is ready for review squad: gatekeepers Catalyst App Backend, System Development & Integration Team

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Update Signed Doc spec

3 participants