feat: add assessment, privacy and support flows

This commit is contained in:
TakuyaYagam1 committed 2026-10-08 08:08:25 +03:00
1 parent ee3738ee73
commit e4f24fa202
339 files changed
+56454 -1126

No files matched your search

+446 -93
View File
@@ -854,6 +854,58 @@ paths:
$ref: '#/components/responses/TooManyRequests'
default:
$ref: '#/components/responses/Problem'
/api/v1/me/assessment-attempts/{attempt_id}/signals:
post:
operationId: RecordMyAssessmentAttemptSignals
summary: Store a bounded batch of client-reported assessment signals.
description: |-
Requires a candidate session, its CSRF token in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The attempt must belong to the candidate, be a real root or corrective attempt, remain active, and have a current C3 consent. The server locks C3 before locking the attempt, checks every item_instance_id against that attempt, and commits the receipt and any events in one transaction. A terminal, expired, or demo_express attempt accepts no new evidence; demo_express remains a separate training mode and receives no signal storage or grade effect.
The contract accepts only focus-loss duration, copy/paste/cut byte counts, fullscreen exits, item identifiers, and untrusted client timestamps. It never accepts answer text, clipboard contents, arbitrary strings, camera, microphone, screen recordings, screenshots, or organization identifiers. Client timestamps must be within five minutes before attempt creation and five minutes after the database receipt clock. Server receipt time controls rolling rate limits. Signal events are removed with the assessment attempt or account; this release does not promise an independent expiry schedule. Signals do not change scores, categories, quotas, or candidate/employer result responses.
A batch has at most 50 events and the raw request body is limited to 32 KiB before decoding. At most 30 new receipts per candidate and attempt are accepted in a rolling minute; an over-limit request answers 429 and does not consume its idempotency key. Storage is capped at 10,000 events per attempt. If the whole batch would exceed that cap, the server stores no events from it and replays a `saturated` receipt. Repeating the same key and body within 24 hours returns the original receipt without storing another batch; using that key with another body answers 422.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: '#/components/parameters/AssessmentAttemptId'
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssessmentSignalBatch'
responses:
'200':
description: The stored or replayed receipt. A saturated receipt explicitly says that none of this batch's events was stored.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/AssessmentSignalReceipt'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/CsrfCheckFailedOrForbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/StateConflict'
'413':
$ref: '#/components/responses/PayloadTooLarge'
'422':
$ref: '#/components/responses/UnprocessableContent'
'429':
$ref: '#/components/responses/TooManyRequests'
default:
$ref: '#/components/responses/Problem'
/api/v1/me/assessment-attempts/{attempt_id}/answers:
post:
operationId: SubmitMyAssessmentAnswer
@@ -954,7 +1006,7 @@ paths:
A failed attempt never lowers a confirmed grade. Repeats return the same outcome: a retry with the same Idempotency-Key replays the stored response, and a finalize of a `completed` attempt answers 200 with that attempt even with a new key or an older `expected_version`; the result is computed once. When `expires_at` passes or the session limit is reached, a command or background transition finalizes `ready_to_finalize` without offering an additional practice. A finalize after this transition answers 200 with the stored `completed` attempt; a GET never commits it.
An attempt in `in_progress` or `practice_pending`, one with a practice verdict `pending`, or one that ended as `expired` or `insufficient_bank` answers 409 state_conflict. The problem does not list what is unfinished; the attempt shows it in `state`, `progress`, `current_item`, and `practices`. A stale `expected_version` answers 412 version_conflict, the repository status for a stale version.
An attempt in `in_progress` or `practice_pending`, one with a practice verdict `pending`, or one that ended as `expired` or `insufficient_bank` answers 409 state_conflict. When required questions are unfinished, the problem includes their frozen IDs in `pending_item_ids`; other state conflicts omit that field. A stale `expected_version` answers 412 version_conflict, the repository status for a stale version.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the attempt (404 not_found; a due deadline transition may be committed, but this request never starts a work session), the repeat on a `completed` attempt (200), the version (412), then the state (409 state_conflict, including an ended idle session). 404 and 409 state_conflict are stored under the key; 400 and 412 are not.
security:
@@ -1470,6 +1522,52 @@ paths:
$ref: '#/components/responses/TooManyRequests'
default:
$ref: '#/components/responses/Problem'
/api/v1/organizations/{org_id}/candidate-cards/{candidate_handle}:
get:
operationId: GetOrganizationCandidateCard
summary: Read one currently visible anonymous candidate card.
description: |-
Requires the session cookie of an employer account with an active membership in `org_id`. The organization and membership come from the current server-side session and path, never from cached search data.
`candidate_handle` is the organization-scoped opaque alias issued by the current anonymous-card projection. The server resolves it against the current visible cohort, rechecks active membership, effective C2 publication, and the candidate's hiding settings on every request, and applies the cohort suppression rules again. It does not use a previously cached candidate ID. An unknown handle, a handle from another organization, a closed or revoked publication, a profile hidden from this organization, and a profile suppressed by the minimum cohort all answer the same 404 not_found.
The response contains only the anonymous card allowlist. It has no contact values. Contacts, if ever available, are a separate operation and require the current explicit C4 grant and contact-access policy; a workflow status alone never grants contact access. Closing C2 or hiding the profile blocks this read immediately. Republishing does not reopen an earlier contact grant.
Every allowed employer card read is recorded in the access history and consumes the organization's current product-policy card-view quota. A repeated view within the quota window is allowed by the existing distinct-card quota rule. When the quota is exhausted the operation answers 429 with Retry-After. The response is `Cache-Control: no-store`.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an unknown organization or account without an active membership answers 404 not_found. An `org_id` that is not a UUID or a malformed candidate handle answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- privacy
parameters:
- $ref: '#/components/parameters/OrganizationId'
- $ref: '#/components/parameters/CandidateHandle'
responses:
'200':
description: The current anonymous card for this organization.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/AnonymousCardContent'
examples:
published:
$ref: '#/components/examples/OrganizationAnonymousCandidateCard'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
default:
$ref: '#/components/responses/Problem'
/api/v1/organizations/{org_id}/invitations:
get:
operationId: ListOrganizationInvitations
@@ -2529,9 +2627,11 @@ paths:
operationId: GetMyCardPreview
summary: Preview the anonymous card that organizations would read.
description: |-
Requires the session cookie of a candidate account. Returns the card exactly as an organization that the candidate does not hide the profile from would read it now, built from the current profile, the current publication, and the consent ledger. The response is `Cache-Control: no-store`.
Requires the session cookie of a candidate account. Returns a private preview of the permitted anonymous-card fields from the current profile, publication, and consent ledger. The response is `Cache-Control: no-store`.
The preview is a private read for the candidate: it creates no view, leaves no access record, and is never shown to an organization. While the profile is closed `card` is null. `card` is `AnonymousCardContent`, whose schema reaches no private profile schema, no contact, and no identifier of the candidate: it has no name, email, phone, Telegram name, employer, salary figure, or account or profile identifier, and each property is null when it is not published or has no value, so a reader cannot tell the two apart. Only the fields in `fields` are filled, and only with values that the candidate confirmed: an unconfirmed suggestion and an unknown value never appear. A free text value that looks like a contact (an email address, a phone number, a URL, a Telegram link, an @handle) is dropped from the card, so the preview shows exactly what an organization would read. The self-assessed grade is not a category and never appears; categories come only from assessment results.
The preview creates no view or access record and is never shown to an organization. While the profile is closed `card` is null. Its pseudonym uses a separate preview context and is not an organization's pseudonym. Organization-specific visibility filters and cohort checks can further generalize or suppress the card when an organization reads it.
`card` is the closed `AnonymousCardContent` projection. It reaches no private profile or contact schema and contains no name, email, phone, Telegram name, employer, salary figure, account identifier, or profile identifier. Unpublished or unknown values are null. Only allowed canonical skills and generalized experience are exposed; arbitrary profile text and imported excerpts never appear. `categories` contains only confirmed assessment results. Self-assessed grades and work formats appear only through their separate explicit publication choices, and self-assessment never becomes a confirmed category. Salary compatibility is nullable and contains no salary amount.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
@@ -2659,7 +2759,7 @@ paths:
The operation sets a state, so it is idempotent and needs no Idempotency-Key: hiding an organization that is already hidden answers 200 with the existing record and its original `hidden_at`, changes nothing, and writes no history record. There is one record per candidate and organization.
Anti-enumeration: an organization that does not exist and an organization that the candidate cannot see answer the same 404 not_found, with the same body and without a timing or an error code that tells them apart, so the operation is not a way to ask whether an identifier belongs to an organization. The candidate can see an organization that has sent them an invitation, and the organizations that a candidate lookup will list (planned; see the open questions of the contract). The response names the organization only after that check, with its current name. The identifiers are random, the general rate limit applies and can answer 429 with Retry-After before any check, and the record never reveals to an organization that a candidate hides it.
Anti-enumeration: an organization that does not exist and an organization that the candidate cannot see answer the same 404 not_found, with the same body and without a timing or an error code that tells them apart, so the operation is not a way to ask whether an identifier belongs to an organization. The candidate may name an organization in their own card-access history or an existing hidden-organization record. Invitation visibility will be added with the invitation workflow, and a candidate lookup remains planned. The response names the organization only after that check, with its current name. The identifiers are random, the general rate limit applies and can answer 429 with Retry-After before any check, and the record never reveals to an organization that a candidate hides it.
A candidate hides at most 1000 organizations; hiding one more answers 409 state_conflict with the entry `{in: path, pointer: /org_id, code: limit_reached}` in `errors`, which tells it apart from other conflicts, and changes nothing, and a repeat of an existing hiding is never refused for the limit.
@@ -2775,9 +2875,9 @@ paths:
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, so the response holds only accesses to the caller's own card. Returns a page, newest first with the record identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
An access is a view of the anonymous card by an organization (`card_viewed`) or a read of the contacts through an active contact grant (`contact_read`). Reading the history is not an access and writes nothing. A view of the card by an organization that has no invitation relation with the candidate carries `organization` null, so the candidate sees that the card was viewed without learning a company that they cannot otherwise see; a contact read always names the organization, because the candidate accepted its invitation. The entries carry no search query, filter, or ranking of the organization, and no organization the candidate hides ever appears as a viewer, because a hidden organization cannot read the card.
An access is a view of the anonymous card by an organization (`card_viewed`) or a read of the contacts through an active contact grant (`contact_read`). Reading the history is not an access and writes nothing. A retained access record permits the candidate to see the organization's identifier and current name and to hide their profile from it. The nullable organization field is preserved for records whose organization cannot be presented. The entries carry no employee identity, search query, filter, or ranking of the organization. Hiding an organization prevents future reads; it does not erase earlier permitted accesses from the history.
The storage of accesses is planned with the card and contact operations of the organization side (anonymous card reads and contact reads under the invitation contract); until then the operation answers 501 not_implemented after the session and request checks.
Successful organization card reads are recorded transactionally with the visibility and quota checks. Contact-read records require the invitation grant workflow, which is not implemented yet; an accepted workflow status alone never authorizes contact access.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor` answers 400 validation_failed.
security:
@@ -5026,6 +5126,7 @@ components:
number:
type: number
format: double
x-ogen-type: lincodex/backend/internal/adapter/primary/http/apitypes.AssessmentNumber
StringAnswer:
type: object
description: String answer, at most the `max_length` of the item. Two answers are equal only when their texts are identical; no trimming, case folding, or Unicode normalization applies to that comparison.
@@ -5146,6 +5247,120 @@ components:
$ref: '#/components/schemas/AssessmentItemId'
answer:
$ref: '#/components/schemas/AssessmentAnswer'
AssessmentSignalEvent:
description: One client-reported event bound to an item instance of the attempt. The timestamp is untrusted input and is used only as event metadata; server receipt time is authoritative for limits and retention.
oneOf:
- $ref: '#/components/schemas/AssessmentFocusLossSignal'
- $ref: '#/components/schemas/AssessmentClipboardSignal'
- $ref: '#/components/schemas/AssessmentFullscreenExitSignal'
discriminator:
propertyName: kind
mapping:
focus_loss: '#/components/schemas/AssessmentFocusLossSignal'
copy: '#/components/schemas/AssessmentClipboardSignal'
paste: '#/components/schemas/AssessmentClipboardSignal'
cut: '#/components/schemas/AssessmentClipboardSignal'
fullscreen_exit: '#/components/schemas/AssessmentFullscreenExitSignal'
AssessmentFocusLossSignal:
type: object
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
- duration_ms
properties:
kind:
type: string
enum:
- focus_loss
item_instance_id:
$ref: '#/components/schemas/AssessmentItemId'
occurred_at:
$ref: '#/components/schemas/Timestamp'
duration_ms:
type: integer
format: int32
minimum: 1
maximum: 259200000
description: Client-measured duration away from the assessment tab or window, in milliseconds.
AssessmentClipboardSignal:
type: object
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
- size_bytes
properties:
kind:
type: string
enum:
- copy
- paste
- cut
item_instance_id:
$ref: '#/components/schemas/AssessmentItemId'
occurred_at:
$ref: '#/components/schemas/Timestamp'
size_bytes:
type: integer
format: int32
minimum: 0
maximum: 2147483647
description: Byte count only. Clipboard or selection contents are not transmitted or retained.
AssessmentFullscreenExitSignal:
type: object
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
properties:
kind:
type: string
enum:
- fullscreen_exit
item_instance_id:
$ref: '#/components/schemas/AssessmentItemId'
occurred_at:
$ref: '#/components/schemas/Timestamp'
AssessmentSignalBatch:
type: object
description: A bounded batch of client event metadata. The raw request body is limited to 32 KiB before decoding and the batch contains at most 50 events.
additionalProperties: false
required:
- events
properties:
events:
type: array
minItems: 1
maxItems: 50
items:
$ref: '#/components/schemas/AssessmentSignalEvent'
AssessmentSignalReceipt:
type: object
description: Receipt for the submitted batch. It contains no signal details, score, review decision, threshold, or result band.
additionalProperties: false
required:
- status
- accepted_events
- received_at
properties:
status:
type: string
enum:
- accepted
- saturated
description: '`saturated` means no event from this batch was stored because the attempt''s bounded evidence storage is full.'
accepted_events:
type: integer
format: int32
minimum: 0
maximum: 50
description: Number of events stored from this batch; zero when saturated.
received_at:
$ref: '#/components/schemas/Timestamp'
AssessmentFinalization:
type: object
description: Command to finalize the attempt.
@@ -6817,7 +7032,7 @@ components:
- 'null'
format: int32
minimum: 1
description: 'For a manual assessment, the version of the published rubric of the category that the server fixed on creation; the expert assesses with it, the same rubric as the automated assessment. Null for other types, and null for a manual assessment whose category has no published rubric yet: the case then waits in `waiting_expert` and the client says so instead of promising a date.'
description: For a manual assessment, the version of the grading policy pinned by the server at creation. The exact reviewed category opening and rubric manifest are retained privately so the expert can use the same rubric as automated assessment. Null for other types and for a manual assessment without one unique current reviewed category; the case still waits in `waiting_expert`.
response_target:
$ref: '#/components/schemas/SupportResponseTarget'
decision:
@@ -6967,12 +7182,12 @@ components:
- 7
CandidateHandle:
type: string
minLength: 1
maxLength: 128
pattern: ^[A-Za-z0-9_-]+$
description: Opaque reference to a candidate as one organization sees it, taken from a search result card of that organization. It is not the candidate's account or profile identifier, it never contains an email address or a phone number, and it means nothing to another organization. The server resolves it only for the organization in the path. Clients never parse it. It is shared by the invitations of FR12 and the search results of FR11, which issue it.
minLength: 47
maxLength: 47
pattern: ^cv1_[A-Za-z0-9_-]{43}$
description: Opaque reference to a candidate as one organization sees it, taken from the organization-scoped anonymous card. It is a versioned HMAC alias, not a candidate account or profile identifier; it contains no contact information and is meaningless to another organization. The server resolves it only against the current visible cohort of the organization in the path. Clients never parse or construct it. It is shared by the candidate-card read and invitations.
examples:
- cand_7Qm2xVb9Lr4Kp0Zt
- cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
InvitationRoleTitle:
type: string
minLength: 1
@@ -8495,27 +8710,31 @@ components:
description: |-
A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.
- categories: the categories confirmed by assessment results (specialization and confirmed grade). A self-assessed grade is not a category and is never published.
- stack: the technology tags of the profile.
- experience: the total months of work experience, without employers, periods, or descriptions.
- soft_skills: the soft skills of the profile.
- location: the city or region of the profile.
- relocation: whether the candidate is ready to relocate.
- categories: specialization and grade confirmed by an authoritative assessment result.
- self_assessment: the candidate's declared specialization and grade, separate from confirmed categories.
- stack: only recognized technology codes from the server's closed taxonomy.
- experience: a coarse total-experience band, without employers, periods, or descriptions.
- work_formats: explicitly selected work formats from the private questionnaire.
- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.
- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.
Only values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.
Adding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.
enum:
- categories
- salary_compatibility
- self_assessment
- stack
- experience
- soft_skills
- location
- relocation
- work_formats
CardFieldSet:
type: array
minItems: 0
maxItems: 6
maxItems: 9
uniqueItems: true
description: Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.
items:
@@ -8715,23 +8934,37 @@ components:
required:
- specialization
- grade
- strength
properties:
specialization:
$ref: '#/components/schemas/SpecializationCode'
grade:
$ref: '#/components/schemas/GradeCode'
strength:
type: string
enum:
- standard
- strong
description: Coarse strength of the authoritative confirmation.
AnonymousCardContent:
type: object
description: The anonymous candidate card as an organization reads it. Only values that the candidate confirmed reach it; an unconfirmed suggestion and an unknown value never do. A free text value (a stack tag, a soft skill, the location) that looks like a contact (an email address, a phone number, a URL or domain, a Telegram link, an @handle) is dropped by the builder and never published. It carries no name, contact, resume text, employer, salary figure, account or profile identifier, and no schema of the private profile or of a contact disclosure is reachable from it; a contact reaches an organization only through the contact grant of an accepted invitation. Each property is null when its field is not published or the candidate has no value for it, so the card does not tell the two apart. The set of properties is closed, and an organization-visible card must never gain a property that identifies the candidate. The search ranking and the full card of an organization's search result are defined by the search contract, which reuses this content.
description: The anonymous candidate card as an organization reads it. Only explicitly published values reach it; unconfirmed stack suggestions and unknown values never do. Stack output uses a closed taxonomy. It carries no name, contact, resume text, employer, salary figure, account or profile identifier, and no schema of the private profile or of a contact disclosure is reachable from it; a contact reaches an organization only through the contact grant of an accepted invitation. Each property is null when its field is not published or the candidate has no value for it, so the card does not tell the two apart. The set of properties is closed, and an organization-visible card must never gain a property that identifies the candidate. The search ranking and the full card of an organization's search result are defined by the search contract, which reuses this content.
additionalProperties: false
required:
- pseudonym
- categories
- stack
- experience_months
- soft_skills
- location
- relocation
- self_assessment
- experience_band
- work_formats
- salary_compatibility
properties:
pseudonym:
type: string
minLength: 47
maxLength: 47
pattern: ^cv1_[A-Za-z0-9_-]{43}$
description: Stable opaque alias scoped to the reading organization. It is not an account or profile identifier and changes across organizations.
categories:
type:
- array
@@ -8744,45 +8977,44 @@ components:
type:
- array
- 'null'
maxItems: 30
description: Technology tags of the candidate, or null.
maxItems: 4
description: Recognized confirmed technology codes only, or null.
items:
$ref: '#/components/schemas/StackTag'
experience_months:
type:
- integer
- 'null'
minimum: 0
maximum: 1200
description: Total months of work experience, summed by the server without the employers, periods, or descriptions, or null.
soft_skills:
type: string
enum:
- go
- postgresql
- kafka
- docker
self_assessment:
type:
- array
- 'null'
maxItems: 10
description: Soft skills of the candidate, or null.
maxItems: 9
description: Candidate-declared specialization and grade, separate from categories.
items:
type: string
minLength: 1
maxLength: 50
pattern: ^\S(?:.*\S)?$
description: Plain text; clients show it as text, never as HTML.
location:
$ref: '#/components/schemas/CardSelfAssessment'
experience_band:
oneOf:
- $ref: '#/components/schemas/CandidateExperienceBand'
- type: 'null'
description: Coarse total work-experience bucket, or null.
work_formats:
type:
- string
- array
- 'null'
minLength: 1
maxLength: 100
pattern: ^\S(?:.*\S)?$
description: City or region as free text, never a street address, or null. Plain text; clients show it as text, never as HTML.
relocation:
type:
- boolean
- 'null'
description: Whether the candidate is ready to relocate, or null.
maxItems: 3
description: Explicitly opted-in work formats, or null.
items:
$ref: '#/components/schemas/CandidateWorkFormat'
salary_compatibility:
oneOf:
- $ref: '#/components/schemas/CandidateSalaryCompatibility'
- type: 'null'
description: Nullable compatibility result with no salary values.
CardPreview:
type: object
description: 'What an organization that the candidate does not hide the profile from would read now, computed from the current profile, the current publication, and the consent ledger. It is a read for the candidate: it creates no view and no history record, and it never reaches an organization. `card` is null while the profile is closed.'
description: A private candidate preview computed from the current profile, publication, and consent ledger. Its pseudonym uses a separate preview context and is not an organization's alias. Organization-specific visibility filters and cohort checks can further generalize or suppress the organization-facing card. This read creates no view or history record and never reaches an organization. `card` is null while the profile is closed.
additionalProperties: false
required:
- state
@@ -8877,14 +9109,14 @@ components:
description: |-
How an organization reached the candidate.
- card_viewed: an organization read the anonymous card in a search result.
- card_viewed: an organization read the permitted anonymous card.
- contact_read: an organization read the contacts through the contact grant of an accepted invitation.
enum:
- card_viewed
- contact_read
CardAccess:
type: object
description: One access of an organization to the card or the contacts of the current candidate. `organization` is null for a view by an organization that has no invitation relation with the candidate, so the history shows that the card was viewed without naming a company that the candidate cannot otherwise see; whether the candidate should learn the name is an open product question. The record carries no query, ranking, or search filter of the organization.
description: One access of an organization to the card or the contacts of the current candidate. A retained access permits the candidate to see the organization's identifier and current name and to hide their profile from it. `organization` is null when the organization cannot be presented. Earlier permitted accesses remain after hiding. The record carries no employee identity, query, ranking, or search filter of the organization.
additionalProperties: false
required:
- id
@@ -9194,6 +9426,58 @@ components:
- task_language
- root_attempt_id
- chain_deadline
AssessmentFinalizeConflictProblem:
type: object
description: A finalize state conflict. `pending_item_ids` is present only when the attempt still has required questions without answers; it is omitted for other state conflicts and idempotency conflicts.
additionalProperties: false
required:
- type
- title
- status
- code
properties:
type:
type: string
format: uri-reference
maxLength: 256
title:
type: string
minLength: 1
maxLength: 200
status:
type: integer
format: int32
const: 409
code:
type: string
enum:
- state_conflict
- idempotency_in_progress
detail:
type: string
maxLength: 1000
instance:
type: string
format: uri-reference
maxLength: 2048
trace_id:
type: string
minLength: 1
maxLength: 128
pattern: ^[A-Za-z0-9._-]+$
errors:
type: array
maxItems: 100
items:
$ref: '#/components/schemas/ProblemFieldError'
pending_item_ids:
type: array
maxItems: 220
uniqueItems: true
items:
type: string
format: uuid
description: Frozen item IDs still unanswered when finalize is rejected for an incomplete attempt. Omitted when the conflict is unrelated to unanswered items.
AssessmentRealResultCommon:
type: object
description: Immutable result of a real assessment, visible only to its candidate. It records the method, versions, decision, uncertainty, and limitations. A corrective result also carries root_attempt_id and chain_deadline from the same chain. Later policy, bank, or algorithm versions never change it. It never contains answers, per-item correctness, keys, seeds, hidden checks, or anti-cheat signals. Fields the method does not compute are null, never zero.
@@ -9460,6 +9744,47 @@ components:
description: Short educational feedback about this training run.
decided_at:
$ref: '#/components/schemas/Timestamp'
CardSelfAssessment:
type: object
description: Candidate-declared specialization and optional grade. This is never an assessment result.
additionalProperties: false
required:
- specialization
- confirmation_status
properties:
specialization:
$ref: '#/components/schemas/SpecializationCode'
confirmation_status:
type: string
enum:
- confirmed
- unconfirmed
declared_grade:
oneOf:
- $ref: '#/components/schemas/GradeCode'
- type: 'null'
CandidateExperienceBand:
type: string
description: Coarse total experience bucket. Rare combinations may be generalized to 0_3 or 3_plus before they are returned.
enum:
- '0_1'
- '1_3'
- '3_6'
- 6_plus
- '0_3'
- 3_plus
CandidateWorkFormat:
type: string
enum:
- remote
- office
- hybrid
CandidateSalaryCompatibility:
type: string
description: A coarse compatibility result only. No salary amount, minimum, range, or threshold is part of the anonymous card.
enum:
- compatible
- not_compatible
parameters:
IdempotencyKey:
name: Idempotency-Key
@@ -9577,6 +9902,14 @@ components:
type: string
format: uuid
example: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
CandidateHandle:
name: candidate_handle
in: path
required: true
description: Organization-scoped opaque candidate alias issued by the current visible card projection. The server resolves it only for the organization in the path and rechecks current membership, publication consent, and hiding on every read. Unknown, hidden, unpublished, and suppressed candidates all answer the same 404.
schema:
$ref: '#/components/schemas/CandidateHandle'
example: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
headers:
ETag:
description: Strong entity tag of the returned resource version. Send it back in If-Match to change this version.
@@ -9886,11 +10219,11 @@ components:
idempotency_in_progress:
$ref: '#/components/examples/IdempotencyInProgress'
AssessmentFinalizeConflict:
description: 'The attempt state does not allow finalize at the current version, code state_conflict: items or the main practice are unfinished, a practice verdict is pending, or the attempt ended as expired or insufficient_bank. The problem does not list the unfinished parts, because Problem allows no extension fields; the attempt shows them in `state`, `progress`, `current_item`, and `practices`. Or a request with the same Idempotency-Key is still running, code idempotency_in_progress. Nothing was changed in either case.'
description: 'The attempt state does not allow finalize at the current version, code state_conflict: items or the main practice are unfinished, a practice verdict is pending, or the attempt ended as expired or insufficient_bank. If required questions are unfinished, the response includes their frozen IDs in `pending_item_ids`; other state conflicts omit that field. Or a request with the same Idempotency-Key is still running, code idempotency_in_progress. Nothing was changed in either case.'
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
$ref: '#/components/schemas/AssessmentFinalizeConflictProblem'
examples:
state_conflict:
$ref: '#/components/examples/AssessmentFinalizeNotReady'
@@ -11411,6 +11744,24 @@ components:
code: version_conflict
detail: The resource changed after it was read. Read it again before retrying.
trace_id: 5f6a7b8c-9d0e-4f1a-8b2c-3d4e5f6a7b8c
StateConflict:
summary: The resource state does not allow the operation
value:
type: urn:lincodex:problem:state_conflict
title: Resource state conflict
status: 409
code: state_conflict
detail: The resource is in a state that does not allow this operation.
trace_id: 1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5b
PayloadTooLarge:
summary: The request body exceeds the limit
value:
type: urn:lincodex:problem:payload_too_large
title: Request body too large
status: 413
code: payload_too_large
detail: Reduce the request body size and retry.
trace_id: 8b9c0d1e-2f3a-4b4c-9d5e-6f7a8b9c0d1e
AssessmentChoiceAnswer:
summary: Answer item 1 of version 1
value:
@@ -11562,8 +11913,7 @@ components:
value:
expected_version: 20
AssessmentFinalizeNotReady:
summary: Premature finalize; the problem does not list the unfinished parts
description: 'Problem has no extension fields. The client reads what remains from the attempt: `state`, `progress`, `current_item`, and `practices`.'
summary: Premature finalize; the problem lists unanswered frozen items
value:
type: urn:lincodex:problem:state_conflict
title: Resource state conflict
@@ -11571,6 +11921,9 @@ components:
code: state_conflict
detail: The resource is in a state that does not allow this operation.
trace_id: 6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9e
pending_item_ids:
- 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
- 01928f7b-2222-7a2b-8c3d-4e5f6a7b8c9d
AssessmentDemoBasicResult:
summary: demo_basic result with a confirmed grade and no uncertainty
description: demo_basic computes no ability estimate, so `uncertainty` and `strength` are null rather than zero, and no percentile is shown. The pass mark comes from basic grading policy version 1, and the limitations name the uncalibrated thresholds, the demo bank, and the missing practice. A first confirmation is not a promotion, so the higher grade can be tested at once. The result never changes; a repeated finalize returns the completed attempt, and this read returns the same result.
@@ -12738,13 +13091,29 @@ components:
code: version_conflict
detail: The resource changed after it was read. Read it again before retrying.
trace_id: 0f1a2b3c-4d5e-4f6a-8b7c-8d9e0f1a2b3d
OrganizationAnonymousCandidateCard:
summary: An anonymous card currently visible to one organization
description: The alias is scoped to the reading organization; no contact values are included.
value:
pseudonym: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
categories:
- specialization: backend
grade: middle
strength: standard
stack:
- postgresql
- kafka
self_assessment: null
experience_band: '1_3'
work_formats: null
salary_compatibility: null
OrganizationInvitationListPage:
summary: The last page of the invitations of an organization
description: The organization sees that the second invitation was declined, but not the reason or the comment.
value:
items:
- id: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -12767,7 +13136,7 @@ components:
created_at: '2026-10-06T09:00:00Z'
updated_at: '2026-10-06T15:00:00Z'
- id: 01928f7a-9c0d-7e1f-8a2b-3c4d5e6f7a80
candidate_handle: cand_Hx3Tn8Wq1Ys6Fd2Vb
candidate_handle: cv1_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
need: null
state: declined
expiry_reason: null
@@ -12793,7 +13162,7 @@ components:
summary: A draft for a candidate from the search results of a need
description: 'Every term is present: net salary range, communication method, and each package condition, provided or explicitly not provided.'
value:
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -12841,7 +13210,7 @@ components:
value:
id: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -13007,7 +13376,7 @@ components:
value:
id: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -13071,7 +13440,7 @@ components:
value:
id: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -13179,7 +13548,7 @@ components:
value:
id: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -13238,15 +13607,6 @@ components:
delivered_at: null
viewed_at: null
responded_at: null
StateConflict:
summary: The resource state does not allow the operation
value:
type: urn:lincodex:problem:state_conflict
title: Resource state conflict
status: 409
code: state_conflict
detail: The resource is in a state that does not allow this operation.
trace_id: 1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5b
InvitationStaleTerms:
summary: The acceptance named a terms version that is no longer current
description: The organization raised the salary after the candidate read the terms. Nothing changed and no consent or grant was recorded; the client reads the invitation again and shows the new terms for a new decision.
@@ -13309,7 +13669,7 @@ components:
value:
id: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -13377,7 +13737,7 @@ components:
value:
id: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
candidate_handle: cand_7Qm2xVb9Lr4Kp0Zt
candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
need:
need_id: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
requirements_version: 3
@@ -14146,16 +14506,18 @@ components:
- categories
- stack
card:
pseudonym: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
categories:
- specialization: backend
grade: middle
strength: standard
stack:
- PostgreSQL
- Kafka
experience_months: null
soft_skills: null
location: null
relocation: null
- postgresql
- kafka
self_assessment: null
experience_band: '1_3'
work_formats: null
salary_compatibility: null
generated_at: '2026-10-06T09:30:00Z'
ClosedCardPreview:
summary: The preview of a closed profile
@@ -14539,15 +14901,6 @@ components:
message: Решение не проходит вторую группу скрытых проверок на пустом входе. Исходный результат остается в силе; повторная попытка на тот же грейд откроется по обычным правилам.
created_at: '2026-10-01T10:00:00Z'
updated_at: '2026-10-09T14:30:00Z'
PayloadTooLarge:
summary: The request body exceeds the limit
value:
type: urn:lincodex:problem:payload_too_large
title: Request body too large
status: 413
code: payload_too_large
detail: Reduce the request body size and retry.
trace_id: 8b9c0d1e-2f3a-4b4c-9d5e-6f7a8b9c0d1e
PreconditionRequired:
summary: The operation requires If-Match
value: