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

+277 -52
View File
@@ -25,12 +25,12 @@ PageInfo:
description: Opaque cursor of the next page, or null on the last page. Clients must not parse, build, or store it beyond the current listing.
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
AssessmentMode:
type: string
description: 'Method of an assessment attempt. For a real assessment, the server selects demo_basic or adaptive from the published bank. A candidate may explicitly request demo_express, which uses a separate training policy and creates no qualification evidence.
@@ -862,6 +862,7 @@ NumberAnswer:
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.
@@ -1213,6 +1214,58 @@ AssessmentResult:
root: '#/AssessmentQualifiedResult'
corrective: '#/AssessmentCorrectiveResult'
demo_express: '#/AssessmentExpressResult'
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: '#/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.
@@ -1594,6 +1647,120 @@ AssessmentAvailability:
description: Questionnaire specializations in questionnaire order.
items:
$ref: '#/AssessmentSpecializationAvailability'
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: '#/AssessmentFocusLossSignal'
- $ref: '#/AssessmentClipboardSignal'
- $ref: '#/AssessmentFullscreenExitSignal'
discriminator:
propertyName: kind
mapping:
focus_loss: '#/AssessmentFocusLossSignal'
copy: '#/AssessmentClipboardSignal'
paste: '#/AssessmentClipboardSignal'
cut: '#/AssessmentClipboardSignal'
fullscreen_exit: '#/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: '#/AssessmentItemId'
occurred_at:
$ref: '#/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: '#/AssessmentItemId'
occurred_at:
$ref: '#/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: '#/AssessmentItemId'
occurred_at:
$ref: '#/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: '#/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: '#/Timestamp'
ProfileVersion:
type: integer
format: int64
@@ -5413,17 +5580,19 @@ CardField:
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.
- categories: specialization and grade confirmed by an authoritative assessment result.
- stack: the technology tags of the profile.
- self_assessment: the candidate''s declared specialization and grade, separate from confirmed categories.
- experience: the total months of work experience, without employers, periods, or descriptions.
- stack: only recognized technology codes from the server''s closed taxonomy.
- soft_skills: the soft skills of the profile.
- experience: a coarse total-experience band, without employers, periods, or descriptions.
- location: the city or region of the profile.
- work_formats: explicitly selected work formats from the private questionnaire.
- relocation: whether the candidate is ready to relocate.
- 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.
@@ -5432,15 +5601,18 @@ CardField:
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:
@@ -5644,24 +5816,78 @@ CardCategory:
required:
- specialization
- grade
- strength
properties:
specialization:
$ref: '#/SpecializationCode'
grade:
$ref: '#/GradeCode'
AnonymousCardContent:
strength:
type: string
enum:
- standard
- strong
description: Coarse strength of the authoritative confirmation.
CardSelfAssessment:
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: Candidate-declared specialization and optional grade. This is never an assessment result.
additionalProperties: false
required:
- specialization
- confirmation_status
properties:
specialization:
$ref: '#/SpecializationCode'
confirmation_status:
type: string
enum:
- confirmed
- unconfirmed
declared_grade:
oneOf:
- $ref: '#/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
AnonymousCardContent:
type: object
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
@@ -5674,45 +5900,44 @@ AnonymousCardContent:
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: '#/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: '#/CardSelfAssessment'
experience_band:
oneOf:
- $ref: '#/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: '#/CandidateWorkFormat'
salary_compatibility:
oneOf:
- $ref: '#/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
@@ -5813,7 +6038,7 @@ CardAccessKind:
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:
@@ -5821,7 +6046,7 @@ CardAccessKind:
- 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
@@ -6612,7 +6837,7 @@ SupportCase:
- '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: '#/SupportResponseTarget'
decision: