Skip to content

Conversation

@reinkrul
Copy link
Member

Fixes #3967

@qltysh
Copy link

qltysh bot commented Jan 14, 2026

2 new issues

Tool Category Rule Count
qlty Structure Function with many returns (count = 6): SearchIssuedVCs 2

@qltysh
Copy link

qltysh bot commented Jan 15, 2026

Qlty

Coverage Impact

⬆️ Merging this pull request will increase total coverage on master by 0.01%.

Modified Files with Diff Coverage (5)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
vcr/api/vcr/v2/api.go75.0%262-263
Coverage rating: B Coverage rating: B
vcr/issuer/sql_store.go100.0%
Coverage rating: B Coverage rating: B
vcr/issuer/leia_store.go77.8%159-160
Coverage rating: B Coverage rating: B
vcr/issuer/issuer.go89.2%107-108, 121-122
Coverage rating: C Coverage rating: C
vcr/revocation/statuslist2021_issuer.go95.0%479
Total88.2%
🤖 Increase coverage with AI coding...

In the `iss3967-issued-vc-status` branch, add test coverage for this new code:

- `vcr/api/vcr/v2/api.go` -- Line 262-263
- `vcr/issuer/issuer.go` -- Lines 107-108 and 121-122
- `vcr/issuer/leia_store.go` -- Line 159-160
- `vcr/revocation/statuslist2021_issuer.go` -- Line 479

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Select("status_list_credential.status_purpose, status_list_entry.created_at").
Joins("JOIN status_list_credential ON status_list_entry.status_list_credential = status_list_credential.subject_id").
Where("status_list_entry.credential_id = ?", credentialID.String()).
First(&result).
Copy link
Member

Choose a reason for hiding this comment

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

can we somehow create a unique index on the table so that is would be impossible to have multiple revocations per VC?

Copy link
Member Author

@reinkrul reinkrul Jan 19, 2026

Choose a reason for hiding this comment

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

As there are multiple statuslist reasons (e.g. suspended, revoked), there can be multiple statuslist entries (first suspended, then revoked). We don't actively use it, but I don't think it's smart to limit the current setup to only 1 statuslist entry, since it won't make things better, but might break things in future.

Copy link
Member

@stevenvegt stevenvegt left a comment

Choose a reason for hiding this comment

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

I'm not sure how the ErrMultipleFound can be caused and fixed. But I prefer a setup in which this error should not be possible.

@reinkrul reinkrul requested a review from stevenvegt January 19, 2026 08:40
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.

VCR.SearchIssuedVCs(): revocation status is incorrect for did:web credentials

3 participants