Skip to content

Conversation

@Mr-Leshiy
Copy link
Contributor

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

Description

Implemented a proper DocumentRef validation with the referenced document which was fetched from the provider.
The DocumentRef value from the metadata field must exactly match with the actual DocumentRef calculated from the fetched document.
This way we are ensuring that the provider would return a correct document, according to the asked DocumentRef.

Refactored ChainRule::check method, use doc_refs_check to apply full set of DocumentRef checks.

Related Issue(s)

Closes #644

Description of Changes

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

Copy link
Member

@stanislav-tkach stanislav-tkach left a comment

Choose a reason for hiding this comment

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

LGTM, but Clippy isn't happy with the check function size. I propose to make the validator lambda a separate function instead of adding the allow attribute.

@Mr-Leshiy Mr-Leshiy added review me PR is ready for review squad: gatekeepers Catalyst App Backend, System Development & Integration Team labels Nov 25, 2025
@Mr-Leshiy Mr-Leshiy moved this from New to 👀 In review in Catalyst Nov 25, 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/full-doc-ref-check

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

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

Copy link
Collaborator

@apskhem apskhem left a comment

Choose a reason for hiding this comment

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

LGTM

@Mr-Leshiy Mr-Leshiy enabled auto-merge (squash) November 26, 2025 07:55
@Mr-Leshiy Mr-Leshiy merged commit 60f359b into main Nov 26, 2025
3 checks passed
@Mr-Leshiy Mr-Leshiy deleted the feat/full-doc-ref-check branch November 26, 2025 07:55
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Catalyst Nov 26, 2025
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.

DocLocator validation for all fetching documents from provider

4 participants