feat(assessment): add the review band of attempt signals and the disclosed collector

This commit is contained in:
shira committed 2026-10-08 23:04:57 +03:00
1 parent 68286af8b7
commit b3c6dc870b
124 files changed
+13522 -633

No files matched your search

+37 -1
View File
@@ -1778,7 +1778,7 @@ AssessmentClipboardSignal:
format: int32
minimum: 0
maximum: 2147483647
description: Byte count only. Clipboard or selection contents are not transmitted or retained.
description: Size only; clipboard and selection contents are never transmitted or retained. For `paste` it is the UTF-8 byte count of the pasted plain text plus the byte size of pasted files, counted on the device from the paste event. For `copy` and `cut` it is the selection length in UTF-16 code units taken from the selection offsets of a form field, or zero when the field offsets are unavailable; it is an approximate size and the selected text is not read. The server applies no conversion and treats the value as an order-of-magnitude indicator.
AssessmentFullscreenExitSignal:
type: object
additionalProperties: false
@@ -1831,6 +1831,42 @@ AssessmentSignalReceipt:
description: Number of events stored from this batch; zero when saturated.
received_at:
$ref: '#/Timestamp'
AssessmentSignalNoticeVersion:
type: integer
format: int32
minimum: 1
maximum: 2147483647
description: Version of the notice text about the collected signals. The client shows the text of the version it knows and sends that version back when the candidate confirms; a changed text gets a new version and needs a new confirmation.
AssessmentSignalNotice:
type: object
description: State of the notice about the signals that are collected during a real assessment attempt. The acknowledgement is a record that the candidate was informed. It is not a consent, grants no purpose, and neither enables nor blocks signal storage; C3 remains the only consent that the signal operation checks.
additionalProperties: false
required:
- notice_version
- acknowledged
- acknowledged_at
properties:
notice_version:
allOf:
- $ref: '#/AssessmentSignalNoticeVersion'
description: The version the server currently requires the candidate to acknowledge.
acknowledged:
type: boolean
description: True when the candidate acknowledged `notice_version`.
acknowledged_at:
description: Server time of the first acknowledgement of this version, or null.
oneOf:
- $ref: '#/Timestamp'
- type: 'null'
AssessmentSignalNoticeAcknowledgement:
type: object
description: The notice version the candidate was shown and acknowledged.
additionalProperties: false
required:
- notice_version
properties:
notice_version:
$ref: '#/AssessmentSignalNoticeVersion'
ProfileVersion:
type: integer
format: int64
@@ -63,7 +63,15 @@ schemas:
format: int32
minimum: 0
maximum: 2147483647
description: Byte count only. Clipboard or selection contents are not transmitted or retained.
description: >-
Size only; clipboard and selection contents are never transmitted or
retained. For `paste` it is the UTF-8 byte count of the pasted plain
text plus the byte size of pasted files, counted on the device from
the paste event. For `copy` and `cut` it is the selection length in
UTF-16 code units taken from the selection offsets of a form field,
or zero when the field offsets are unavailable; it is an approximate
size and the selected text is not read. The server applies no
conversion and treats the value as an order-of-magnitude indicator.
AssessmentFullscreenExitSignal:
type: object
additionalProperties: false
@@ -122,3 +130,48 @@ schemas:
description: Number of events stored from this batch; zero when saturated.
received_at:
$ref: "#/schemas/Timestamp"
AssessmentSignalNoticeVersion:
type: integer
format: int32
minimum: 1
maximum: 2147483647
description: >-
Version of the notice text about the collected signals. The client
shows the text of the version it knows and sends that version back when
the candidate confirms; a changed text gets a new version and needs a
new confirmation.
AssessmentSignalNotice:
type: object
description: >-
State of the notice about the signals that are collected during a real
assessment attempt. The acknowledgement is a record that the candidate
was informed. It is not a consent, grants no purpose, and neither
enables nor blocks signal storage; C3 remains the only consent that
the signal operation checks.
additionalProperties: false
required:
- notice_version
- acknowledged
- acknowledged_at
properties:
notice_version:
allOf:
- $ref: "#/schemas/AssessmentSignalNoticeVersion"
description: The version the server currently requires the candidate to acknowledge.
acknowledged:
type: boolean
description: True when the candidate acknowledged `notice_version`.
acknowledged_at:
description: Server time of the first acknowledgement of this version, or null.
oneOf:
- $ref: "#/schemas/Timestamp"
- type: "null"
AssessmentSignalNoticeAcknowledgement:
type: object
description: The notice version the candidate was shown and acknowledged.
additionalProperties: false
required:
- notice_version
properties:
notice_version:
$ref: "#/schemas/AssessmentSignalNoticeVersion"
+118 -10
View File
@@ -711,6 +711,78 @@ paths:
$ref: '#/components/responses/Forbidden'
default:
$ref: '#/components/responses/Problem'
/api/v1/me/assessment-signal-notice:
get:
operationId: GetMyAssessmentSignalNotice
summary: Read whether the current candidate acknowledged the signal notice.
description: |-
Requires the session cookie of a candidate account with a confirmed email; the candidate comes from the session. Returns the notice version that the server requires now and whether this candidate acknowledged it. The notice lists the signals that are collected during a real assessment attempt and states that images, sound, and clipboard contents are not collected. Client signals are the time away from the tab or window, copy, paste and cut with a size only, and exits from fullscreen mode. Server signals are the response time of each item measured by the server, a change of network address during the attempt, parallel sessions, and the comparison of answers to variants of the same task by candidates. The server stores for these only one-way keyed digests: it stores no network address, no session token, and no answer text. Client signals are stored only while the C3 consent is current. The client shows it before a real attempt starts and does not start the attempt until the notice is acknowledged.
The acknowledgement is stored on the server per account and notice version, so it survives a reload and a new browser. It is not a consent and never changes C3: the signal operation still requires a current C3 consent, and an unacknowledged notice does not make that operation fail. The demo_express training mode collects no signals and needs no acknowledgement.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account or an unconfirmed email answers 403 forbidden.
security:
- sessionCookie: []
tags:
- assessment
responses:
'200':
description: The notice version and the acknowledgement state of the current candidate.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/AssessmentSignalNotice'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/Forbidden'
default:
$ref: '#/components/responses/Problem'
put:
operationId: AcknowledgeMyAssessmentSignalNotice
summary: Record that the current candidate read the signal notice.
description: |-
Requires the session cookie of a candidate account with a confirmed email, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body carries the notice version the candidate was shown. The server stores the acknowledgement for the account and that version; the response carries the server time of the first acknowledgement.
The operation needs no Idempotency-Key: it is idempotent. Repeating it for an acknowledged version changes nothing, keeps the first time, and answers 200, so a retry after a lost response succeeds. A version other than the one the server requires answers 409 state_conflict and stores nothing; the client reads the notice again.
The acknowledgement is not a consent. It does not grant, replace, or hide C3, and it does not affect the signal operation or any score, category, or quota. The body carries no signal, answer, or clipboard data.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account (403 forbidden), then the version (409).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssessmentSignalNoticeAcknowledgement'
responses:
'200':
description: The stored acknowledgement, new or repeated.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/AssessmentSignalNotice'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/CsrfCheckFailedOrForbidden'
'409':
$ref: '#/components/responses/StateConflict'
default:
$ref: '#/components/responses/Problem'
/api/v1/me/assessment-attempts:
post:
operationId: CreateMyAssessmentAttempt
@@ -5411,7 +5483,7 @@ components:
format: int32
minimum: 0
maximum: 2147483647
description: Byte count only. Clipboard or selection contents are not transmitted or retained.
description: Size only; clipboard and selection contents are never transmitted or retained. For `paste` it is the UTF-8 byte count of the pasted plain text plus the byte size of pasted files, counted on the device from the paste event. For `copy` and `cut` it is the selection length in UTF-16 code units taken from the selection offsets of a form field, or zero when the field offsets are unavailable; it is an approximate size and the selected text is not read. The server applies no conversion and treats the value as an order-of-magnitude indicator.
AssessmentFullscreenExitSignal:
type: object
additionalProperties: false
@@ -9504,6 +9576,42 @@ components:
- kind
- root_attempt_id
- chain_deadline
AssessmentSignalNoticeVersion:
type: integer
format: int32
minimum: 1
maximum: 2147483647
description: Version of the notice text about the collected signals. The client shows the text of the version it knows and sends that version back when the candidate confirms; a changed text gets a new version and needs a new confirmation.
AssessmentSignalNotice:
type: object
description: State of the notice about the signals that are collected during a real assessment attempt. The acknowledgement is a record that the candidate was informed. It is not a consent, grants no purpose, and neither enables nor blocks signal storage; C3 remains the only consent that the signal operation checks.
additionalProperties: false
required:
- notice_version
- acknowledged
- acknowledged_at
properties:
notice_version:
allOf:
- $ref: '#/components/schemas/AssessmentSignalNoticeVersion'
description: The version the server currently requires the candidate to acknowledge.
acknowledged:
type: boolean
description: True when the candidate acknowledged `notice_version`.
acknowledged_at:
description: Server time of the first acknowledgement of this version, or null.
oneOf:
- $ref: '#/components/schemas/Timestamp'
- type: 'null'
AssessmentSignalNoticeAcknowledgement:
type: object
description: The notice version the candidate was shown and acknowledged.
additionalProperties: false
required:
- notice_version
properties:
notice_version:
$ref: '#/components/schemas/AssessmentSignalNoticeVersion'
AssessmentQualifiedAttemptCreate:
type: object
description: Start a real assessment for a specialization and target grade, with the task language. The candidate comes from the session. The server chooses demo_basic or adaptive and fixes the policy, bank, and algorithm versions. Unknown fields such as `mode`, `seed`, or `score` are rejected.
@@ -11900,6 +12008,15 @@ components:
max_sessions: null
max_items: null
practice_required: 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
AssessmentAttemptCreateBackendJunior:
summary: Start Backend junior with Go tasks
value:
@@ -12432,15 +12549,6 @@ 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:
+2
View File
@@ -105,6 +105,8 @@ paths:
$ref: ./routes/candidate_assessment_availability.yml
/api/v1/me/assessment-results:
$ref: ./routes/candidate_assessment_results.yml
/api/v1/me/assessment-signal-notice:
$ref: ./routes/candidate_assessment_signal_notice.yml
/api/v1/me/assessment-attempts:
$ref: ./routes/candidate_assessment_attempts.yml
/api/v1/me/assessment-attempts/{attempt_id}:
@@ -0,0 +1,71 @@
get:
operationId: GetMyAssessmentSignalNotice
summary: Read whether the current candidate acknowledged the signal notice.
description: |-
Requires the session cookie of a candidate account with a confirmed email; the candidate comes from the session. Returns the notice version that the server requires now and whether this candidate acknowledged it. The notice lists the signals that are collected during a real assessment attempt and states that images, sound, and clipboard contents are not collected. Client signals are the time away from the tab or window, copy, paste and cut with a size only, and exits from fullscreen mode. Server signals are the response time of each item measured by the server, a change of network address during the attempt, parallel sessions, and the comparison of answers to variants of the same task by candidates. The server stores for these only one-way keyed digests: it stores no network address, no session token, and no answer text. Client signals are stored only while the C3 consent is current. The client shows it before a real attempt starts and does not start the attempt until the notice is acknowledged.
The acknowledgement is stored on the server per account and notice version, so it survives a reload and a new browser. It is not a consent and never changes C3: the signal operation still requires a current C3 consent, and an unacknowledged notice does not make that operation fail. The demo_express training mode collects no signals and needs no acknowledgement.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account or an unconfirmed email answers 403 forbidden.
security:
- sessionCookie: []
tags:
- assessment
responses:
"200":
description: The notice version and the acknowledgement state of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalNotice
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
put:
operationId: AcknowledgeMyAssessmentSignalNotice
summary: Record that the current candidate read the signal notice.
description: |-
Requires the session cookie of a candidate account with a confirmed email, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body carries the notice version the candidate was shown. The server stores the acknowledgement for the account and that version; the response carries the server time of the first acknowledgement.
The operation needs no Idempotency-Key: it is idempotent. Repeating it for an acknowledged version changes nothing, keeps the first time, and answers 200, so a retry after a lost response succeeds. A version other than the one the server requires answers 409 state_conflict and stores nothing; the client reads the notice again.
The acknowledgement is not a consent. It does not grant, replace, or hide C3, and it does not affect the signal operation or any score, category, or quota. The body carries no signal, answer, or clipboard data.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account (403 forbidden), then the version (409).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalNoticeAcknowledgement
responses:
"200":
description: The stored acknowledgement, new or repeated.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalNotice
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"409":
$ref: ../components/responses.yml#/StateConflict
default:
$ref: ../components/responses.yml#/Problem