feat(assessment): record capture hints and keep one window per attempt

This commit is contained in:
shira committed 2026-10-11 13:16:52 +03:00
1 parent c975a0d506
commit bb917bf62e
108 files changed
+6649 -139

No files matched your search

+37
View File
@@ -736,6 +736,22 @@ AssessmentAttemptCommon:
$ref: '#/AssessmentPractice'
watermark:
$ref: '#/AssessmentWatermark'
AssessmentWorkSession:
type: object
description: The work session of a real attempt that the calling page holds. It is a one-page-at-a-time rule for the attempt, not a score or a signal, and it changes no result.
additionalProperties: false
required:
- held_until
- renew_after_seconds
properties:
held_until:
$ref: '#/Timestamp'
renew_after_seconds:
type: integer
format: int32
minimum: 1
maximum: 3600
description: How often the page repeats the hold. It is well below the hold time, so a page whose timer is slowed down in the background still renews before its hold expires.
AssessmentWatermark:
type: object
description: 'Visible mark of a real attempt. The client shows `code` with the current time as a faint tile over the task screen, so that a screenshot or a photo of the screen can be traced back to the attempt by an operator. The code is a keyed pseudonym derived on the server: it carries no name, contact, or identifier of the account, and it cannot be computed without the server secret. The task text of such an attempt also carries an invisible mark and interchangeable wordings chosen by the same secret; they change neither the meaning of a task nor its reference answer, and the client keeps the invisible characters out of the accessibility tree. Training runs (`demo_express`) carry no watermark. It is evidence for a manual review and an appeal, never an automatic decision.'
@@ -1744,6 +1760,7 @@ AssessmentSignalEvent:
- $ref: '#/AssessmentFocusLossSignal'
- $ref: '#/AssessmentClipboardSignal'
- $ref: '#/AssessmentFullscreenExitSignal'
- $ref: '#/AssessmentCaptureSignal'
discriminator:
propertyName: kind
mapping:
@@ -1752,6 +1769,8 @@ AssessmentSignalEvent:
paste: '#/AssessmentClipboardSignal'
cut: '#/AssessmentClipboardSignal'
fullscreen_exit: '#/AssessmentFullscreenExitSignal'
screenshot_key: '#/AssessmentCaptureSignal'
devtools_open: '#/AssessmentCaptureSignal'
AssessmentFocusLossSignal:
type: object
additionalProperties: false
@@ -1816,6 +1835,24 @@ AssessmentFullscreenExitSignal:
$ref: '#/AssessmentItemId'
occurred_at:
$ref: '#/Timestamp'
AssessmentCaptureSignal:
type: object
description: 'A hint that the screen may be captured or inspected. `screenshot_key` is a key or key combination that the browser saw and that usually takes a screenshot (PrintScreen, Cmd+Shift+3, 4, or 5 on macOS, Win+Shift+S); `devtools_open` is the result of a heuristic that guesses that the developer tools are open (a docked panel changes the window size, or the console reads an object). Both are weak: a browser does not see every screenshot, an operating system can take one without a key the page sees, a phone photo is invisible to the page, and the heuristic gives false positives. They lead to attention in a manual review at most, never to a score change, and they carry no measurement.'
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
properties:
kind:
type: string
enum:
- screenshot_key
- devtools_open
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.