feat(evidence): project skill evidence from confirmed assessments

This commit is contained in:
shira committed 2026-10-09 11:25:19 +03:00
1 parent 4761508f13
commit c2a8d17195
94 files changed
+10077 -151

No files matched your search

@@ -25,6 +25,9 @@ const (
privacyCursorEvents = 1
privacyCursorHidden = 2
privacyCursorAccess = 3
// privacyCursorEvidence belongs to the skill evidence list, which shares the
// owner-bound cursor of the privacy lists.
privacyCursorEvidence = 4
)
// CandidateViewOperations serves private previews, owner access history, and
@@ -434,7 +437,7 @@ func privacyPageParams(limit api.OptInt32, cursor api.OptString, owner uuid.UUID
func encodePrivacyCursor(owner uuid.UUID, kind byte, at time.Time, id uuid.UUID) (string, error) {
at = at.UTC()
seconds, nanos := at.Unix(), at.Nanosecond()
if owner == uuid.Nil || id == uuid.Nil || kind < privacyCursorEvents || kind > privacyCursorAccess || at.IsZero() ||
if owner == uuid.Nil || id == uuid.Nil || kind < privacyCursorEvents || kind > privacyCursorEvidence || at.IsZero() ||
at.Year() < 1 || at.Year() > 9999 || nanos < 0 || nanos >= 1_000_000_000 || nanos%1_000 != 0 {
return "", errors.New("privacy cursor requires an owner and valid page position")
}
@@ -518,7 +521,13 @@ func cardPreviewResponse(preview candidateview.PreviewResult) api.CardPreview {
} else {
card.SetTo(anonymousCardResponse(*preview.Card))
}
return api.CardPreview{State: state, Fields: fields, Card: card, GeneratedAt: api.Timestamp(preview.GeneratedAt)}
evidence := api.NilOrganizationEvidence{}
if preview.Card == nil {
evidence.SetToNull()
} else {
evidence.SetTo(organizationEvidenceResponse(preview.Evidence))
}
return api.CardPreview{State: state, Fields: fields, Card: card, Evidence: evidence, GeneratedAt: api.Timestamp(preview.GeneratedAt)}
}
func anonymousCardResponse(view domain.AnonymousCandidateViewDTO) api.AnonymousCardContent {