feat(assessment): watermark the task text of real attempts
This commit is contained in:
1 parent
24b64d698a
commit
c975a0d506
57 files changed
+2429
-92
No files matched your search
+2
-1
@@ -275,7 +275,7 @@ The `assessment` tag covers the assessment attempts of the current candidate (PR
|
||||
|
||||
Every operation also declares the `default` problem response.
|
||||
|
||||
The signal notice (`assessment-signal-notice`) lists the signals collected during a real attempt: browser events (focus loss, copy, paste and cut with a size, fullscreen exit; stored only while C3 is current) and server signals (response time, change of network address, parallel sessions, comparison of answer digests; only one-way keyed digests are stored, never addresses or session tokens). `GET` returns the notice version the server requires and whether the candidate acknowledged it; `PUT` stores the acknowledgement for the account and that version. The acknowledgement is a record that the candidate was informed, not a consent: it does not change C3, and the signal operation neither reads it nor refuses a batch without it. `PUT` needs no Idempotency-Key, because a repeat keeps the first time and answers 200; another version answers 409 `state_conflict`. The notice also lists the measures the page applies during a real attempt (fullscreen, covering the task, blocks on copying, selecting, and printing the task text, the paste rule, and a planned watermark); it is text version 2, and an acknowledgement of an earlier version never counts for the current one. The `demo_express` mode collects no signals and needs no acknowledgement.
|
||||
The signal notice (`assessment-signal-notice`) lists the signals collected during a real attempt: browser events (focus loss, copy, paste and cut with a size, fullscreen exit; stored only while C3 is current) and server signals (response time, change of network address, parallel sessions, comparison of answer digests; only one-way keyed digests are stored, never addresses or session tokens). `GET` returns the notice version the server requires and whether the candidate acknowledged it; `PUT` stores the acknowledgement for the account and that version. The acknowledgement is a record that the candidate was informed, not a consent: it does not change C3, and the signal operation neither reads it nor refuses a batch without it. `PUT` needs no Idempotency-Key, because a repeat keeps the first time and answers 200; another version answers 409 `state_conflict`. The notice also lists the measures the page applies during a real attempt (fullscreen, covering the task, blocks on copying, selecting, and printing the task text, the paste rule, and the watermark of the task screen and text); it is text version 3, and an acknowledgement of an earlier version never counts for the current one. The `demo_express` mode collects no signals and needs no acknowledgement.
|
||||
|
||||
Access:
|
||||
|
||||
@@ -314,6 +314,7 @@ Attempt lifecycle, with the commands each state accepts:
|
||||
Items and answers:
|
||||
|
||||
- An item has an `id` (the instance), `sequence`, a plain-text `prompt`, and `content` (`ItemContent`) in one of the formats `choice`, `number`, `string`, `order`, `find_error`, `configuration`, and `practice`. It never contains an answer key, a correct option, a score, a family or variant identifier, a seed, or a hidden check, and seed items look like scored ones. `multiple`, `max_selections`, and `max_length` are properties of the format or the task family and never derived from the key. The variant is fixed when first served, so a reload, a retry, or a resumed session returns the same instance.
|
||||
- Watermark. A real attempt (`root` or `corrective`) carries `watermark.code`, a keyed pseudonym of the attempt such as `7K3QD-9XM2T`, which the client shows with the time as a faint tile over the task screen; a `demo_express` attempt omits the field. The `prompt` of a real attempt also carries an invisible mark and interchangeable wordings chosen by the same server secret; they change neither the meaning nor the reference answer, and a client keeps the invisible characters (zero width space, non-joiner, joiner, word joiner) out of the accessibility tree. Neither the code nor the mark names the candidate, and no operation gives either to an employer. See [Watermark of the task text](../docs/en/ARCHITECTURE.md#watermark-of-the-task-text).
|
||||
- An answer (`AssessmentAnswer`) has the same seven formats and carries only the answer. Unknown fields such as `score`, `duration`, or `seed` answer 400. The server records the times and scores the answer with the key of the item instance; time never enters the grade decision. Responses never say whether an answer was correct.
|
||||
- The practice solution runs asynchronously in the sandbox against three hidden check groups; the client polls the attempt while it is `pending`. The verdict shows only the score 0-3 and the pass state of each group. Every outcome caused by the solution (a compilation or runtime error, a time or memory limit) is `finished` with groups not passed. `failed` (`sandbox_busy` or `sandbox_error`) means only that the infrastructure could not run it; it consumes nothing. This keeps `failed` from acting as an oracle for hidden checks and from allowing endless retries. After `finished` no other solution is accepted.
|
||||
- If the latest submission is still `failed` when the limit passes, the result is `not_determined` with the reason `sandbox_unavailable`. A practice never submitted gives `practice_incomplete`.
|
||||
|
||||
+2
-1
@@ -275,7 +275,7 @@ ML-сервис отвечает на ошибки той же схемой `Pro
|
||||
|
||||
Каждая операция также объявляет problem-ответ `default`.
|
||||
|
||||
Уведомление о сигналах (`assessment-signal-notice`) перечисляет сигналы, которые собираются во время реальной попытки: события браузера (потеря фокуса, копирование, вставка и вырезание с размером, выход из полноэкранного режима, сохраняются только при действующем C3) и серверные (время ответа, смена сетевого адреса, параллельные сессии, сравнение отпечатков ответов; хранятся только односторонние ключевые отпечатки, адреса и токены сессий не хранятся). `GET` возвращает версию уведомления, которую требует сервер, и признак, что кандидат ее подтвердил; `PUT` сохраняет подтверждение для аккаунта и этой версии. Подтверждение - запись о том, что кандидат ознакомлен, а не согласие: оно не меняет C3, и операция приема сигналов его не читает и не отклоняет пакет без него. `PUT` не требует Idempotency-Key: повтор сохраняет первое время и отвечает 200; другая версия отвечает 409 `state_conflict`. Уведомление также перечисляет меры, которые страница применяет во время реальной попытки (полноэкранный режим, скрытие задания, запрет копирования, выделения и печати текста задания, правило вставки и планируемый водяной знак); это версия 2 текста, и подтверждение более ранней версии для текущей никогда не засчитывается. Режим `demo_express` сигналы не собирает и подтверждения не требует.
|
||||
Уведомление о сигналах (`assessment-signal-notice`) перечисляет сигналы, которые собираются во время реальной попытки: события браузера (потеря фокуса, копирование, вставка и вырезание с размером, выход из полноэкранного режима, сохраняются только при действующем C3) и серверные (время ответа, смена сетевого адреса, параллельные сессии, сравнение отпечатков ответов; хранятся только односторонние ключевые отпечатки, адреса и токены сессий не хранятся). `GET` возвращает версию уведомления, которую требует сервер, и признак, что кандидат ее подтвердил; `PUT` сохраняет подтверждение для аккаунта и этой версии. Подтверждение - запись о том, что кандидат ознакомлен, а не согласие: оно не меняет C3, и операция приема сигналов его не читает и не отклоняет пакет без него. `PUT` не требует Idempotency-Key: повтор сохраняет первое время и отвечает 200; другая версия отвечает 409 `state_conflict`. Уведомление также перечисляет меры, которые страница применяет во время реальной попытки (полноэкранный режим, скрытие задания, запрет копирования, выделения и печати текста задания, правило вставки и водяной знак экрана и текста задания); это версия 3 текста, и подтверждение более ранней версии для текущей никогда не засчитывается. Режим `demo_express` сигналы не собирает и подтверждения не требует.
|
||||
|
||||
Доступ:
|
||||
|
||||
@@ -314,6 +314,7 @@ ML-сервис отвечает на ошибки той же схемой `Pro
|
||||
Задания и ответы:
|
||||
|
||||
- У задания есть `id` (экземпляр), `sequence`, `prompt` простым текстом и `content` (`ItemContent`) в одном из форматов `choice`, `number`, `string`, `order`, `find_error`, `configuration` и `practice`. Оно никогда не содержит ключ ответа, правильный вариант, балл, идентификатор семейства или варианта, seed или скрытую проверку, а посевные задания выглядят так же, как оцениваемые. `multiple`, `max_selections` и `max_length` - свойства формата или семейства заданий и никогда не выводятся из ключа. Вариант фиксируется при первой выдаче, поэтому перезагрузка, повтор запроса и возобновление сессии возвращают тот же экземпляр.
|
||||
- Водяной знак. Реальная попытка (`root` или `corrective`) несет `watermark.code` - ключевой псевдоним попытки вроде `7K3QD-9XM2T`, который клиент показывает вместе со временем бледной плиткой поверх экрана задания; у попытки `demo_express` поля нет. `prompt` реальной попытки также несет невидимую метку и взаимозаменяемые формулировки, выбранные тем же секретом сервера; они не меняют ни смысл, ни эталонный ответ, а клиент держит невидимые символы (пробел нулевой ширины, не-соединитель, соединитель, соединитель слов) вне дерева доступности. Ни код, ни метка не называют кандидата, и ни одна операция не отдает их работодателю. См. [Водяной знак текста задания](../docs/ru/ARCHITECTURE.md#водяной-знак-текста-задания).
|
||||
- Ответ (`AssessmentAnswer`) имеет те же семь форматов и несет только ответ. Неизвестные поля вроде `score`, `duration` или `seed` дают 400. Сервер сам записывает время и оценивает ответ по ключу экземпляра задания; время не входит в решение о грейде. Ответы API никогда не сообщают, был ли ответ правильным.
|
||||
- Решение практики исполняется в песочнице асинхронно на трех группах скрытых проверок; клиент опрашивает попытку, пока оно `pending`. Вердикт показывает только балл 0-3 и прохождение каждой группы. Любой исход, вызванный самим решением (ошибка компиляции или выполнения, лимит времени или памяти), - это `finished` с непройденными группами. `failed` (`sandbox_busy` или `sandbox_error`) означает только, что инфраструктура не смогла исполнить решение; он ничего не расходует. Так `failed` не становится оракулом для скрытых проверок и не дает бесконечных повторов. После `finished` другое решение не принимается.
|
||||
- Если к истечению лимита последняя отправка все еще `failed`, результат - `not_determined` с причиной `sandbox_unavailable`. Неотправленная практика дает `practice_incomplete`.
|
||||
|
||||
@@ -734,6 +734,21 @@ AssessmentAttemptCommon:
|
||||
description: Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.
|
||||
items:
|
||||
$ref: '#/AssessmentPractice'
|
||||
watermark:
|
||||
$ref: '#/AssessmentWatermark'
|
||||
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.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
minLength: 10
|
||||
maxLength: 11
|
||||
pattern: ^[0-9A-HJKMNP-TV-Z]{5}-?[0-9A-HJKMNP-TV-Z]{5}$
|
||||
description: Two groups of five symbols of Crockford base32, such as `7K3QD-9XM2T`.
|
||||
AssessmentQualifiedAttempt:
|
||||
allOf:
|
||||
- $ref: '#/AssessmentAttemptCommon'
|
||||
|
||||
@@ -813,6 +813,32 @@ schemas:
|
||||
exposes verdicts only after submission.
|
||||
items:
|
||||
$ref: "#/schemas/AssessmentPractice"
|
||||
watermark:
|
||||
$ref: "#/schemas/AssessmentWatermark"
|
||||
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.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
minLength: 10
|
||||
maxLength: 11
|
||||
pattern: "^[0-9A-HJKMNP-TV-Z]{5}-?[0-9A-HJKMNP-TV-Z]{5}$"
|
||||
description: Two groups of five symbols of Crockford base32, such as `7K3QD-9XM2T`.
|
||||
AssessmentQualifiedAttempt:
|
||||
allOf:
|
||||
- $ref: "#/schemas/AssessmentAttemptCommon"
|
||||
|
||||
@@ -10572,6 +10572,19 @@ components:
|
||||
- root
|
||||
- corrective
|
||||
- demo_express
|
||||
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.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
minLength: 10
|
||||
maxLength: 11
|
||||
pattern: ^[0-9A-HJKMNP-TV-Z]{5}-?[0-9A-HJKMNP-TV-Z]{5}$
|
||||
description: Two groups of five symbols of Crockford base32, such as `7K3QD-9XM2T`.
|
||||
AssessmentAttemptCommon:
|
||||
type: object
|
||||
description: Common state of an assessment attempt. Real assessments have a specialization and target grade; demo_express has neither. The attempt shows its fixed versions, server deadlines, session limit, progress, current item, and practices. It never contains answer keys, answer correctness, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.
|
||||
@@ -10664,6 +10677,8 @@ components:
|
||||
description: Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.
|
||||
items:
|
||||
$ref: '#/components/schemas/AssessmentPractice'
|
||||
watermark:
|
||||
$ref: '#/components/schemas/AssessmentWatermark'
|
||||
AssessmentQualifiedAttempt:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/AssessmentAttemptCommon'
|
||||
|
||||
Reference in new issue
Block a user