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

@@ -550,11 +550,23 @@ type Querier interface {
// read adapter resolves an organization name only through this recorded
// access relation, which is already visible to the candidate.
ListCandidateCardAccessEvents(ctx context.Context, arg ListCandidateCardAccessEventsParams) ([]ListCandidateCardAccessEventsRow, error)
// Skill evidence reads. The projection tables hold no answer, score, item,
// failure, or anti-cheat data, and none of these statements names the result,
// attempt, or review tables: evidence is read from its own facts only.
// The candidate's own facts, hidden ones included, newest event first. Every
// statement is scoped by the owner; the caller passes the continuation
// position of the previous page, if any, and fetches one extra row.
ListCandidateEvidenceFacts(ctx context.Context, arg ListCandidateEvidenceFactsParams) ([]ListCandidateEvidenceFactsRow, error)
// One page of the candidate's hidden organizations, newest first with the
// organization identifier as the tie-breaker. The page continues after the
// (hidden_at, organization_id) position of the last record of the previous
// page.
ListCandidateHiddenOrganizations(ctx context.Context, arg ListCandidateHiddenOrganizationsParams) ([]ListCandidateHiddenOrganizationsRow, error)
// The same selection for the candidate's own card preview, so the candidate
// sees what an organization would read. It is scoped by the owner and runs
// after the caller locked the effective C2 and publication; it does not apply
// an organization or a cohort.
ListCandidatePreviewEvidence(ctx context.Context, arg ListCandidatePreviewEvidenceParams) ([]ListCandidatePreviewEvidenceRow, error)
// One page of the candidate's settings history, newest first with the event
// identifier as the tie-breaker. The organization name is resolved here, at
// read time, and is the current name. The page continues after the
@@ -588,6 +600,21 @@ type Querier interface {
// Read one bounded newest-first page of current needs. Both the organization
// scope and the tuple cursor are applied before the limit.
ListOrganizationNeeds(ctx context.Context, arg ListOrganizationNeedsParams) ([]ListOrganizationNeedsRow, error)
// The evidence that one organization may read about one candidate: one fact
// for each category of the card, the fact that supports the confirmed grade
// of that category (the earliest one that passed exactly that grade, so a
// lower grade or a retake adds nothing). The statement selects from the
// effective publication view (published and backed by an unrevoked C2) and
// excludes the candidates that hide the reading organization, so no row means
// nothing to read, whatever the reason. The card must publish the categories
// field and only visible measurements qualify. The categories come from the
// caller as "specialization/grade" pairs taken from the card that was just
// projected, so the answer never names a skill the card does not show. The columns are
// an allowlist: no identifier of the fact, the event, the result, or the
// candidate leaves, the instant is cut to the year, and the basis and the
// calibration (the same for every candidate) say that the fact is a synthetic
// demonstration.
ListOrganizationVisibleEvidence(ctx context.Context, arg ListOrganizationVisibleEvidenceParams) ([]ListOrganizationVisibleEvidenceRow, error)
// Lists the organizations where an account has an active membership,
// newest membership first. The page continues after the (membership
// creation time, organization ID) position of the last item of the