feat(assessment): define corrective and training attempt contracts
This commit is contained in:
1 parent
fade4e76e4
commit
20c03288d6
71 files changed
+14786
-1743
No files matched your search
@@ -31,6 +31,7 @@ lint: bundle ## Lint both bundled contracts
|
||||
check: lint ## Build and lint both contract bundles
|
||||
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_merge_schemas.py'
|
||||
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_contract_copies.py'
|
||||
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_assessment_contract.py'
|
||||
|
||||
.PHONY: check-compat
|
||||
check-compat: bundle ## Compare the public contract with API_BASE_REF
|
||||
|
||||
+13
-10
@@ -245,6 +245,7 @@ The `assessment` tag covers the assessment attempts of the current candidate (PR
|
||||
| `GET /api/v1/me/assessment-availability` | `GetMyAssessmentAvailability` | session | 200 `AssessmentAvailability`, `Cache-Control: no-store` | 401 `unauthenticated`, 403 `forbidden` |
|
||||
| `POST /api/v1/me/assessment-attempts` | `CreateMyAssessmentAttempt` | session and CSRF, Idempotency-Key | 201 `AssessmentAttempt`, `Cache-Control: no-store` | 400 `validation_failed`, 401, 403 `csrf_check_failed` or `forbidden`, 409 `state_conflict` or `idempotency_in_progress`, 422 `idempotency_key_reused`, 429 |
|
||||
| `GET /api/v1/me/assessment-attempts/{attempt_id}` | `GetMyAssessmentAttempt` | session | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 401, 403 `forbidden`, 404 `not_found` |
|
||||
| `POST /api/v1/me/assessment-attempts/{attempt_id}/sessions` | `StartMyAssessmentAttemptSession` | session and CSRF, Idempotency-Key | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 400, 401, 403, 404, 409 `state_conflict` or `idempotency_in_progress`, 412 `version_conflict`, 422, 429 |
|
||||
| `POST /api/v1/me/assessment-attempts/{attempt_id}/answers` | `SubmitMyAssessmentAnswer` | session and CSRF, Idempotency-Key | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 400, 401, 403, 404, 409 `state_conflict` or `idempotency_in_progress`, 412 `version_conflict`, 422, 429 |
|
||||
| `POST /api/v1/me/assessment-attempts/{attempt_id}/finalize` | `FinalizeMyAssessmentAttempt` | session and CSRF, Idempotency-Key | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 400, 401, 403, 404, 409 `state_conflict` or `idempotency_in_progress`, 412 `version_conflict`, 422 |
|
||||
| `GET /api/v1/me/assessment-attempts/{attempt_id}/result` | `GetMyAssessmentResult` | session | 200 `AssessmentResult`, `Cache-Control: no-store` | 401, 403 `forbidden`, 404 `not_found`, 409 `state_conflict` |
|
||||
@@ -254,13 +255,14 @@ Every operation also declares the `default` problem response.
|
||||
Access:
|
||||
|
||||
- The candidate comes only from the session; no operation takes a candidate identifier. An employer account answers 403 `forbidden`. An attempt of another candidate answers 404 `not_found`, the same as an unknown identifier, so attempt identifiers cannot be probed.
|
||||
- No operation offers an employer the answers, the attempt history, or anti-cheat signals. Employers will see only the current category through a separate projection.
|
||||
- No operation offers an employer answers, qualification evidence, attempt history, or anti-cheat signals. Employers will see only the current category through a separate projection.
|
||||
|
||||
Modes and versions:
|
||||
|
||||
- `mode` is `demo_basic` or `adaptive`. The server picks it from the published bank of the category; the client never sends it. `demo_basic` scores a fixed form of reviewed demo items by their keys against the pass mark of the versioned basic grading policy, computes no ability estimate, and decides in one step: it never offers an additional practice. `adaptive` is the adaptive test of FR04.
|
||||
- `kind` is required on creation: `root`, `corrective`, or `demo_express`. A real attempt uses `demo_basic` or `adaptive`; the server picks the mode from the published bank and the client never sends it. `demo_basic` scores a fixed form of reviewed demo items by their keys against the pass mark of the versioned basic grading policy, computes no ability estimate, and decides in one step: it never offers an additional practice. `adaptive` is the adaptive test of FR04. A candidate may explicitly request `demo_express`, a separate interactive 3 to 5 minute training run with no category, target grade, percentile, real-assessment quota, or qualification evidence.
|
||||
- A corrective real attempt includes `root_attempt_id`. The server allows only a strictly lower target grade not already tried in that chain. Creating the root reserves one slot in the three-root-attempts-per-180-days quota; corrections share that slot and the root's immutable `chain_deadline` (72 hours from the root start under the current policy), while keeping their own item, practice, and session limits. A correction spends no additional root slot, cannot extend the deadline, and does not reset the 30/90-day timers. A root preflight refusal creates no attempt and reserves no slot. An expired or incomplete attempt does not create a free new chain, and an insufficient bank does not grant another root slot. `demo_express` is outside correction chains and real-assessment availability.
|
||||
- Creation fixes `versions`: `policy_version` (the number of the `product` policy version), `bank_version`, and `algorithm_version`. The attempt and its result keep them, so a result is reproduced from the stored answers and these versions, and a later version never rewrites it.
|
||||
- The attempt `version` advances by exactly one with each committed change, including server-side transitions such as a verdict, a session start, expiry, or automatic finalization; a transition applied when the attempt is read is committed first and also advances it.
|
||||
- The attempt `version` advances by exactly one with each committed change, including a verdict, an explicit session start, expiry, or automatic finalization. GET operations are projections only: they never change the state, consume session quota, or advance the version. A command or background transition commits due outcomes.
|
||||
|
||||
Attempt lifecycle, with the commands each state accepts:
|
||||
|
||||
@@ -276,12 +278,12 @@ Attempt lifecycle, with the commands each state accepts:
|
||||
|
||||
- Additional practice (PRD FR04): with 0.50 <= P_G < 0.80 in the demo policy, the first finalize of an adaptive attempt completes nothing. It appends a practice of kind `additional` to `practices`, moves the attempt to `additional_practice_pending`, and returns the attempt. The practice continues the same attempt, keeps its time and session limits, and spends no new attempt. The next finalize after its verdict decides; P_G still below 0.80 gives `not_confirmed`. Finalizing without submitting it declines the offer with the same outcome. `practices` is a list with a `kind` rather than one more nullable field, so later practice kinds stay additive.
|
||||
- Finalize therefore always answers with `AssessmentAttempt`, never with a result or a `oneOf` of both. When the state is `completed`, the client reads `GetMyAssessmentResult`. One response type keeps generated clients unambiguous and leaves room for non-terminal decisions without a breaking change.
|
||||
- Limits: `expires_at` and `sessions` (`used`, `max`, `idle_timeout_seconds`, null when the policy defines no session limit) come from the policy version; PRD FR04 allows two sessions within 72 hours. Creation starts session 1. A read or command on the active attempt after `idle_timeout_seconds` without one starts the next session; one beyond `max` starts none, and the attempt becomes `expired`. Reading a terminal attempt or a result never starts a session.
|
||||
- At the limits: a practice already `pending` is graded first. Then `ready_to_finalize` is finalized by the server and becomes `completed`, an unsubmitted additional practice is declined (`completed`, `not_confirmed`), and `in_progress` and `practice_pending` become `expired`. A finalize after that answers 200 with the `completed` attempt; any other command answers 409 `state_conflict`.
|
||||
- Insufficient bank is a distinct state in two places. Before the start, `GetMyAssessmentAvailability` shows `insufficient_bank` for a grade without a published bank or without enough families that this candidate has not seen, and `CreateMyAssessmentAttempt` answers 409 `state_conflict` without creating anything. During an attempt, the terminal state `insufficient_bank` ends it without a confirmed grade instead of repeating families.
|
||||
- Limits: `expires_at` and `sessions` (`used`, `max`, `idle_timeout_seconds`, null when the policy defines no session limit) come from the policy version; PRD FR04 allows two sessions within 72 hours. Creation starts session 1. After an idle timeout the candidate explicitly calls `StartMyAssessmentAttemptSession` with the latest `expected_version`; it starts the next session only if quota and deadline allow. Calling it during an active session is a no-op. Session start does not extend `expires_at` or `chain_deadline`.
|
||||
- At the limits: a practice already `pending` is graded first. A command or background transition then finalizes `ready_to_finalize` as `completed`, declines an unsubmitted additional practice (`completed`, `not_confirmed`), or moves `in_progress` and `practice_pending` to `expired`. GET never commits these transitions. `GetMyAssessmentResult` answers 409 while a due transition has not yet been stored.
|
||||
- Insufficient bank is a distinct state in two places. Before a root attempt starts, `GetMyAssessmentAvailability` shows `insufficient_bank` for a grade without a published bank or enough unseen families, and `CreateMyAssessmentAttempt` answers 409 `state_conflict` without creating an attempt or reserving a root slot. A correction with an expired chain deadline or insufficient safe bank is also refused; it does not create a new chain. During an existing attempt, the terminal state `insufficient_bank` ends it without a confirmed grade instead of repeating families.
|
||||
- No new problem code is added, so attempt creation gets 409 `state_conflict` plus the availability status instead of a `bank_unavailable` code. The `ProblemCode` enum is copied byte-for-byte into the ML contract (`test_contract_copies.py`), so a new code would also change the ML contract and its generated models. The availability read also tells the client why an attempt cannot start and, for `cooldown`, from when, which a fixed problem detail cannot carry.
|
||||
- Availability shows the limits of each grade before the start: `time_limit_seconds`, `max_sessions`, `max_items`, and `practice_required`, null when unknown.
|
||||
- Counting against the retry rules (3 attempts per 180 days, the 30-day same-grade interval): an attempt that ends `not_determined` with the reason `expired` or `practice_incomplete` is the candidate's attempt and counts. `insufficient_bank` and `sandbox_unavailable` are platform faults: they never count and start no interval. After a failure, including the first test, a lower grade can be tested at once.
|
||||
- Root-attempt quota and retry timers are separate. Only root creation reserves one of the three root slots per 180 days; corrections in that chain do not reserve another. `insufficient_bank` or an unavailable sandbox does not create a new attempt or open a free chain. After a failure, including the first test, a strictly lower grade can be tested through the same chain; lower-grade corrections do not reset the 30-day same-grade or 90-day promotion timers.
|
||||
|
||||
Items and answers:
|
||||
|
||||
@@ -293,17 +295,18 @@ Items and answers:
|
||||
|
||||
Commands, retries, and versions:
|
||||
|
||||
- Create, answer, and finalize require Idempotency-Key with the 24-hour replay described above, so a repeated command returns the same outcome. Answers and finalize also carry `expected_version`, the attempt `version` the client read. Creation has no version to compare and relies on the key; the single active attempt per specialization is enforced by the state.
|
||||
- Create, start/resume session, answer, and finalize require Idempotency-Key with the 24-hour replay described above, so a repeated command returns the same outcome. Session start, answers, and finalize carry `expected_version`, the attempt `version` the client read. Creation has no version to compare and relies on the key; the single active real attempt per specialization is enforced by the state.
|
||||
- Each item accepts one answer. Sending the stored answer again, even with a new key or an older `expected_version`, stores nothing, keeps the version, and answers 200 with the current attempt. Equality is defined per format: sets for `option_ids` and `line_numbers`, the exact sequence for `element_ids`, numeric equality for `number`, identical text without normalization for `text` and `config`, and the same language with identical source for a practice. A different answer for an answered item answers 409 `state_conflict` with the current version; with a stale version the version check comes first and answers 412.
|
||||
- Exception: a practice whose latest verdict is `failed` is outside the repeat rule. A submission with the same or a different solution and the current version queues it again and advances the version.
|
||||
- Finalizing a `completed` attempt answers 200 with that attempt, so the result is computed once. A retry of the finalize that offered an additional practice, sent with a new key, carries the old version and answers 412, so it never declines the offer by accident.
|
||||
- A stale `expected_version` answers 412 `version_conflict`, not 409. It keeps the repository rule above and the questionnaire precedent: `version_conflict` is 412 for If-Match and for a body `expected_version` alike, because the client action is the same, to read the resource again. 409 `state_conflict` is kept for a command that the attempt state does not allow at the current version: the item is not current or has another answer, the attempt is terminal or past its limits, a practice verdict is pending, or the attempt is not ready to finalize. The two codes therefore lead to different client actions.
|
||||
- A stale `expected_version` answers 412 `version_conflict`, not 409. This keeps the repository rule and questionnaire precedent: `version_conflict` is 412 for If-Match and for a body `expected_version` alike, because the client action is to read the resource again. 409 `state_conflict` is kept for a command that the attempt state does not allow at the current version: the work session ended, the item is not current or has another answer, the attempt is terminal or past its limits, a practice verdict is pending, or the attempt is not ready to finalize. The two codes lead to different client actions.
|
||||
- A premature finalize answers 409 `state_conflict` without listing the unfinished items, because `Problem` allows no extension fields. The client reads them from the attempt: `state`, `progress`, `current_item`, and `practices`.
|
||||
- Order of checks for a command: session (401), CSRF and Origin (403), request validation (400), account scenario (403 `forbidden`), the Idempotency-Key (422, 409 `idempotency_in_progress`, replay), the attempt (404, after any due transition), the repeat of a stored answer or of finalize on a completed attempt (200), the version (412), the state (409 `state_conflict`), then domain rules (400 with pointers such as `/answer/option_ids/0`). Following the Idempotency-Key convention, 404 and 409 `state_conflict` are stored under the key and replayed, while 400, including domain rules, 412, 429, and 5xx are not. Create and answers are rate-limited (429 with `Retry-After`), which also limits sandbox load. `TestAssessmentSchemaValidationPrecedesImplementation` checks the schema rejections through the generated server.
|
||||
- Order of checks for a command: session (401), CSRF and Origin (403), request validation (400), account scenario (403 `forbidden`), the Idempotency-Key (422, 409 `idempotency_in_progress`, replay), attempt ownership (404), the attempt version (412 when supplied), due time or session transitions, then the command state (409 `state_conflict`) and domain rules (400 with pointers such as `/answer/option_ids/0`). An explicit session-start command returns the updated attempt when it commits a due terminal transition. Following the Idempotency-Key convention, stored 404 and 409 responses replay under the key; 400, 412, 429, and 5xx are not stored. Create and answers are rate-limited (429 with `Retry-After`), which also limits sandbox load. `TestAssessmentSchemaValidationPrecedesImplementation` checks the schema rejections through the generated server.
|
||||
|
||||
Result:
|
||||
|
||||
- `GetMyAssessmentResult` answers for a terminal attempt and 409 `state_conflict` for an active one, including `additional_practice_pending`. `outcome` is `confirmed`, `not_confirmed`, or `not_determined` with `not_determined_reason` (`expired`, `practice_incomplete`, `insufficient_bank`, `sandbox_unavailable`). A result never lowers a confirmed grade: `previous_confirmed_grade` stays in force when the attempt confirmed nothing.
|
||||
- Attempt and result responses carry the `kind` discriminator: `root`, `corrective`, or `demo_express`. Real results always include the correction-chain field pair: both are null for a root attempt, and both are populated for a corrective result. A `demo_express` result is a separate educational shape with a short summary and `demonstration_only`; it has null category, target grade, confirmed grade, strength, uncertainty, and score, and empty practices, gaps, and next steps. It cannot be used as qualification evidence and is never visible to employers.
|
||||
- `calibration_status` and `limitations` describe the method. Fields that the method does not compute are null, never zero: `demo_basic` has null `uncertainty` and `strength`, and `adaptive` has null `basic_score`. `uncertainty` holds `theta`, `standard_error`, `interval_95`, and `p_grade`. `practices` lists the verdicts by kind. `durations` is a separate label and never enters the decision.
|
||||
- `next_steps` come from the server: `retake_same_grade`, `take_lower_grade`, `accept_lower_grade` (the command is planned), and `take_higher_grade`. A first confirmation is not a promotion, so `take_higher_grade` after it has a null `available_at`; after a promotion the next one waits for the 90-day promotion interval.
|
||||
- The result never contains answers, per-item correctness, keys, seeds, hidden checks, or anti-cheat signals.
|
||||
|
||||
+13
-10
@@ -245,6 +245,7 @@ ML-сервис отвечает на ошибки той же схемой `Pro
|
||||
| `GET /api/v1/me/assessment-availability` | `GetMyAssessmentAvailability` | сессия | 200 `AssessmentAvailability`, `Cache-Control: no-store` | 401 `unauthenticated`, 403 `forbidden` |
|
||||
| `POST /api/v1/me/assessment-attempts` | `CreateMyAssessmentAttempt` | сессия и CSRF, Idempotency-Key | 201 `AssessmentAttempt`, `Cache-Control: no-store` | 400 `validation_failed`, 401, 403 `csrf_check_failed` или `forbidden`, 409 `state_conflict` или `idempotency_in_progress`, 422 `idempotency_key_reused`, 429 |
|
||||
| `GET /api/v1/me/assessment-attempts/{attempt_id}` | `GetMyAssessmentAttempt` | сессия | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 401, 403 `forbidden`, 404 `not_found` |
|
||||
| `POST /api/v1/me/assessment-attempts/{attempt_id}/sessions` | `StartMyAssessmentAttemptSession` | сессия и CSRF, Idempotency-Key | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 400, 401, 403, 404, 409 `state_conflict` или `idempotency_in_progress`, 412 `version_conflict`, 422, 429 |
|
||||
| `POST /api/v1/me/assessment-attempts/{attempt_id}/answers` | `SubmitMyAssessmentAnswer` | сессия и CSRF, Idempotency-Key | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 400, 401, 403, 404, 409 `state_conflict` или `idempotency_in_progress`, 412 `version_conflict`, 422, 429 |
|
||||
| `POST /api/v1/me/assessment-attempts/{attempt_id}/finalize` | `FinalizeMyAssessmentAttempt` | сессия и CSRF, Idempotency-Key | 200 `AssessmentAttempt`, `Cache-Control: no-store` | 400, 401, 403, 404, 409 `state_conflict` или `idempotency_in_progress`, 412 `version_conflict`, 422 |
|
||||
| `GET /api/v1/me/assessment-attempts/{attempt_id}/result` | `GetMyAssessmentResult` | сессия | 200 `AssessmentResult`, `Cache-Control: no-store` | 401, 403 `forbidden`, 404 `not_found`, 409 `state_conflict` |
|
||||
@@ -254,13 +255,14 @@ ML-сервис отвечает на ошибки той же схемой `Pro
|
||||
Доступ:
|
||||
|
||||
- Кандидат берется только из сессии; ни одна операция не принимает идентификатор кандидата. Аккаунт работодателя получает 403 `forbidden`. Попытка другого кандидата дает 404 `not_found`, как и неизвестный идентификатор, поэтому идентификаторы попыток нельзя перебирать.
|
||||
- Ни одна операция не дает работодателю ответы, историю попыток или античит-сигналы. Работодатель будет видеть только текущую категорию через отдельную проекцию.
|
||||
- Ни одна операция не дает работодателю ответы, квалификационные данные, историю попыток или античит-сигналы. Работодатель будет видеть только текущую категорию через отдельную проекцию.
|
||||
|
||||
Режимы и версии:
|
||||
|
||||
- `mode` - это `demo_basic` или `adaptive`. Сервер выбирает его по опубликованному банку категории; клиент режим не передает. `demo_basic` оценивает фиксированную форму проверенных демо-заданий по их ключам относительно проходного балла версионированной базовой политики, не вычисляет оценку способности и решает за один шаг: дополнительную практику он не предлагает. `adaptive` - адаптивный тест из FR04.
|
||||
- При создании обязательно передается `kind`: `root`, `corrective` или `demo_express`. Реальная попытка использует `demo_basic` или `adaptive`; сервер выбирает режим по опубликованному банку, клиент его не передает. `demo_basic` оценивает фиксированную форму проверенных демо-заданий по их ключам относительно проходного балла версионированной базовой политики, не вычисляет оценку способности и решает за один шаг: дополнительную практику он не предлагает. `adaptive` - адаптивный тест из FR04. Кандидат может явно запросить `demo_express` - отдельный интерактивный учебный запуск на 3-5 минут без категории, целевого грейда, перцентиля, квоты реальных оценок или квалификационных данных.
|
||||
- Корректирующая реальная попытка содержит `root_attempt_id`. Сервер разрешает только строго меньший целевой грейд, который еще не проверялся в этой цепочке. Создание корневой попытки резервирует один слот квоты из трех корневых попыток за 180 дней; корректировки используют этот же слот и неизменяемый `chain_deadline` корневой попытки (72 часа от ее старта по текущей политике), но имеют собственные лимиты заданий, практики и сессий. Корректировка не списывает еще один слот, не продлевает срок и не сбрасывает таймеры 30/90 дней. Предварительный отказ в запуске корневой попытки не создает попытку и не резервирует слот. Истечение или незавершенная практика не открывают бесплатную новую цепочку, а недостаточный банк не дает дополнительную корневую квоту. `demo_express` не входит в цепочки корректировок и доступность реальных оценок.
|
||||
- Создание фиксирует `versions`: `policy_version` (номер версии политики `product`), `bank_version` и `algorithm_version`. Попытка и ее результат хранят их, поэтому результат воспроизводится по сохраненным ответам и этим версиям, а более поздняя версия его не переписывает.
|
||||
- `version` попытки растет ровно на единицу с каждым зафиксированным изменением, включая серверные переходы: вердикт, начало сессии, истечение, автоматическое завершение. Переход, примененный при чтении попытки, фиксируется до ответа и тоже увеличивает версию.
|
||||
- `version` попытки растет ровно на единицу с каждым зафиксированным изменением: вердикт, явное начало сессии, истечение или автоматическое завершение. GET-операции возвращают только проекцию: они не меняют состояние, не расходуют квоту сессий и не увеличивают версию. Назревшие исходы фиксирует команда или фоновый переход.
|
||||
|
||||
Жизненный цикл попытки и команды, которые принимает каждое состояние:
|
||||
|
||||
@@ -276,12 +278,12 @@ ML-сервис отвечает на ошибки той же схемой `Pro
|
||||
|
||||
- Дополнительная практика (FR04 в PRD): при 0.50 <= P_G < 0.80 в демо-политике первое завершение adaptive-попытки ничего не решает. Оно добавляет в `practices` практику вида `additional`, переводит попытку в `additional_practice_pending` и возвращает попытку. Практика продолжает ту же попытку, сохраняет ее лимиты времени и сессий и не расходует новую попытку. Следующее завершение после ее вердикта принимает решение; если P_G остается ниже 0.80, итог `not_confirmed`. Завершение без отправки практики отклоняет предложение с тем же итогом. `practices` - список с полем `kind`, а не еще одно nullable-поле, поэтому новые виды практики добавляются без ломающих изменений.
|
||||
- Поэтому завершение всегда отвечает `AssessmentAttempt`, а не результатом и не `oneOf` из двух схем. Когда состояние `completed`, клиент читает `GetMyAssessmentResult`. Один тип ответа делает сгенерированные клиенты однозначными и оставляет место для незавершающих решений без ломающих изменений.
|
||||
- Лимиты: `expires_at` и `sessions` (`used`, `max`, `idle_timeout_seconds`; null, если политика не задает лимит сессий) берутся из версии политики; FR04 в PRD допускает две сессии в пределах 72 часов. Создание начинает сессию 1. Чтение или команда по активной попытке после `idle_timeout_seconds` без них начинает следующую сессию; сессия сверх `max` не начинается, и попытка становится `expired`. Чтение терминальной попытки или результата сессию не начинает.
|
||||
- При достижении лимитов практика в статусе `pending` сначала оценивается. Затем сервер сам завершает `ready_to_finalize` и переводит в `completed`, неотправленная дополнительная практика считается отклоненной (`completed`, `not_confirmed`), а `in_progress` и `practice_pending` становятся `expired`. Завершение после этого дает 200 с попыткой в `completed`; любая другая команда дает 409 `state_conflict`.
|
||||
- Недостаточный банк - отдельное состояние в двух местах. До старта `GetMyAssessmentAvailability` показывает `insufficient_bank` для грейда без опубликованного банка или без достаточного числа семейств, которых кандидат еще не видел, а `CreateMyAssessmentAttempt` отвечает 409 `state_conflict` и ничего не создает. Во время попытки терминальное состояние `insufficient_bank` завершает ее без подтвержденного грейда вместо повтора семейств.
|
||||
- Лимиты: `expires_at` и `sessions` (`used`, `max`, `idle_timeout_seconds`; null, если политика не задает лимит сессий) берутся из версии политики; FR04 в PRD допускает две сессии в пределах 72 часов. Создание начинает сессию 1. После простоя кандидат явно вызывает `StartMyAssessmentAttemptSession` с последним `expected_version`; следующая сессия начинается только если позволяют квота и срок. Вызов во время активной сессии ничего не меняет. Начало сессии не продлевает `expires_at` или `chain_deadline`.
|
||||
- При достижении лимитов практика, уже имеющая статус `pending`, сначала оценивается. Затем команда или фоновый переход завершает `ready_to_finalize` как `completed`, отклоняет неотправленную дополнительную практику (`completed`, `not_confirmed`) или переводит `in_progress` и `practice_pending` в `expired`. GET не фиксирует эти переходы. `GetMyAssessmentResult` отвечает 409, пока назревший переход не сохранен.
|
||||
- Недостаточный банк - отдельное состояние в двух местах. До старта корневой попытки `GetMyAssessmentAvailability` показывает `insufficient_bank` для грейда без опубликованного банка или достаточного числа невиденных семейств, а `CreateMyAssessmentAttempt` отвечает 409 `state_conflict`, не создавая попытку и не резервируя корневой слот. Корректировка также отклоняется, если срок цепочки истек или безопасного банка недостаточно; новая цепочка не создается. Во время существующей попытки терминальное состояние `insufficient_bank` завершает ее без подтвержденного грейда вместо повтора семейств.
|
||||
- Новый код проблемы не добавлен, поэтому создание попытки получает 409 `state_conflict` и статус доступности вместо кода `bank_unavailable`. Перечисление `ProblemCode` побайтно скопировано в ML-контракт (`test_contract_copies.py`), поэтому новый код изменил бы и ML-контракт, и его сгенерированные модели. Чтение доступности к тому же объясняет клиенту, почему попытка не может начаться, и для `cooldown` - с какого момента; фиксированный detail проблемы этого передать не может.
|
||||
- Доступность показывает лимиты каждого грейда до старта: `time_limit_seconds`, `max_sessions`, `max_items` и `practice_required`; null, если значение неизвестно.
|
||||
- Учет в правилах повтора (3 попытки за 180 дней, 30 дней до повтора того же грейда): попытка с итогом `not_determined` по причине `expired` или `practice_incomplete` - попытка кандидата и учитывается. `insufficient_bank` и `sandbox_unavailable` - сбои платформы: они не учитываются и не запускают интервал. После неудачи, включая первый тест, меньший грейд можно проверить сразу.
|
||||
- Корневая квота и таймеры повторов разделены. Только запуск корневой попытки резервирует один из трех слотов на 180 дней; корректировки этой цепочки не резервируют дополнительные слоты. `insufficient_bank` или недоступность песочницы не создают новую попытку и не открывают бесплатную цепочку. После неудачи, включая первый тест, строго меньший грейд можно проверить в той же цепочке; корректировки не сбрасывают 30-дневный таймер повтора того же грейда или 90-дневный таймер повышения.
|
||||
|
||||
Задания и ответы:
|
||||
|
||||
@@ -293,17 +295,18 @@ ML-сервис отвечает на ошибки той же схемой `Pro
|
||||
|
||||
Команды, повторы и версии:
|
||||
|
||||
- Создание, ответ и завершение требуют Idempotency-Key с 24-часовым повтором, описанным выше, поэтому повтор команды возвращает тот же исход. Ответ и завершение также передают `expected_version` - прочитанную клиентом `version` попытки. У создания нет версии для сравнения, оно опирается на ключ; единственную активную попытку по специализации обеспечивает состояние.
|
||||
- Создание, начало или возобновление сессии, ответ и завершение требуют Idempotency-Key с 24-часовым повтором, описанным выше, поэтому повтор команды возвращает тот же исход. Начало сессии, ответ и завершение также передают `expected_version` - прочитанную клиентом `version` попытки. У создания нет версии для сравнения, оно опирается на ключ; единственную активную реальную попытку по специализации обеспечивает состояние.
|
||||
- Каждое задание принимает один ответ. Повторная отправка сохраненного ответа, даже с новым ключом или старым `expected_version`, ничего не сохраняет, не меняет версию и дает 200 с текущей попыткой. Равенство определено для каждого формата: множества для `option_ids` и `line_numbers`, точная последовательность для `element_ids`, числовое равенство для `number`, совпадение текста без нормализации для `text` и `config`, тот же язык и совпадающий исходный код для практики. Другой ответ на уже отвеченное задание дает 409 `state_conflict` при текущей версии; при устаревшей версии ее проверка идет раньше и дает 412.
|
||||
- Исключение: практика, последний вердикт которой `failed`, не подпадает под правило повтора. Отправка того же или другого решения с текущей версией снова ставит его в очередь и увеличивает версию.
|
||||
- Завершение попытки в `completed` дает 200 с этой попыткой, поэтому результат вычисляется один раз. Повтор завершения, которое предложило дополнительную практику, с новым ключом несет старую версию и получает 412, поэтому он не может случайно отклонить предложение.
|
||||
- Устаревший `expected_version` дает 412 `version_conflict`, а не 409. Так сохраняется правило репозитория выше и прецедент анкеты: `version_conflict` - это 412 и для If-Match, и для `expected_version` в теле, потому что действие клиента одно - прочитать ресурс снова. 409 `state_conflict` оставлен для команды, которую состояние попытки не допускает при текущей версии: задание не текущее или уже имеет другой ответ, попытка терминальная или вышла за лимиты, вердикт практики еще не готов или попытка не готова к завершению. Поэтому два кода ведут к разным действиям клиента.
|
||||
- Устаревший `expected_version` дает 412 `version_conflict`, а не 409. Так сохраняется правило репозитория и прецедент анкеты: `version_conflict` - это 412 и для If-Match, и для `expected_version` в теле, потому что действие клиента - прочитать ресурс снова. 409 `state_conflict` оставлен для команды, которую состояние попытки не допускает при текущей версии: рабочая сессия закончилась, задание не текущее или уже имеет другой ответ, попытка терминальная или вышла за лимиты, вердикт практики еще не готов или попытка не готова к завершению. Коды ведут к разным действиям клиента.
|
||||
- Преждевременное завершение дает 409 `state_conflict` без перечня незавершенных заданий, потому что `Problem` не допускает дополнительных полей. Клиент берет их из попытки: `state`, `progress`, `current_item` и `practices`.
|
||||
- Порядок проверок команды: сессия (401), CSRF и Origin (403), валидация запроса (400), сценарий аккаунта (403 `forbidden`), Idempotency-Key (422, 409 `idempotency_in_progress`, повтор), попытка (404, после всех назревших переходов), повтор сохраненного ответа или завершения завершенной попытки (200), версия (412), состояние (409 `state_conflict`), затем доменные правила (400 с pointer вроде `/answer/option_ids/0`). По соглашению об Idempotency-Key 404 и 409 `state_conflict` сохраняются под ключом и повторяются, а 400 (включая доменные правила), 412, 429 и 5xx - нет. Создание и ответы ограничены по частоте (429 с `Retry-After`), что ограничивает и нагрузку на песочницу. `TestAssessmentSchemaValidationPrecedesImplementation` проверяет отказы схемы через сгенерированный сервер.
|
||||
- Порядок проверок команды: сессия (401), CSRF и Origin (403), валидация запроса (400), сценарий аккаунта (403 `forbidden`), Idempotency-Key (422, 409 `idempotency_in_progress`, повтор), принадлежность попытки (404), версия попытки (412, если передана), переходы по сроку или лимиту сессий, затем состояние команды (409 `state_conflict`) и доменные правила (400 с pointer вроде `/answer/option_ids/0`). Команда начала сессии возвращает обновленную попытку, если она зафиксировала наступивший терминальный переход. По соглашению об Idempotency-Key сохраненные 404 и 409 повторяются под ключом; 400, 412, 429 и 5xx не сохраняются. Создание и ответы ограничены по частоте (429 с `Retry-After`), что ограничивает и нагрузку на песочницу. `TestAssessmentSchemaValidationPrecedesImplementation` проверяет отказы схемы через сгенерированный сервер.
|
||||
|
||||
Результат:
|
||||
|
||||
- `GetMyAssessmentResult` отвечает для терминальной попытки и дает 409 `state_conflict` для активной, включая `additional_practice_pending`. `outcome` - это `confirmed`, `not_confirmed` или `not_determined` с `not_determined_reason` (`expired`, `practice_incomplete`, `insufficient_bank`, `sandbox_unavailable`). Результат никогда не понижает подтвержденный грейд: если попытка ничего не подтвердила, действует `previous_confirmed_grade`.
|
||||
- В ответах попытки и результата есть дискриминатор `kind`: `root`, `corrective` или `demo_express`. Реальный результат всегда содержит пару полей цепочки корректировок: у корневой попытки оба поля null, у корректирующей оба заполнены. Для `demo_express` используется отдельная учебная схема с кратким резюме и `demonstration_only`: категория, целевой и подтвержденный грейды, сила, неопределенность и балл равны null, списки практик, пробелов и следующих шагов пусты. Этот режим не создает квалификационных данных и не виден работодателю.
|
||||
- `calibration_status` и `limitations` описывают метод. Поля, которые метод не вычисляет, равны null, а не нулю: у `demo_basic` null в `uncertainty` и `strength`, у `adaptive` - null в `basic_score`. `uncertainty` содержит `theta`, `standard_error`, `interval_95` и `p_grade`. `practices` перечисляет вердикты по видам. `durations` - отдельная метка, которая не входит в решение.
|
||||
- `next_steps` приходят с сервера: `retake_same_grade`, `take_lower_grade`, `accept_lower_grade` (команда запланирована) и `take_higher_grade`. Первое подтверждение - не повышение, поэтому `take_higher_grade` после него имеет null в `available_at`; после повышения следующее ждет 90-дневный интервал повышения.
|
||||
- Результат никогда не содержит ответы, правильность отдельных заданий, ключи, seed, скрытые проверки или античит-сигналы.
|
||||
|
||||
@@ -509,6 +509,7 @@ AssessmentAvailability:
|
||||
AssessmentAttemptCreateBackendJunior:
|
||||
summary: Start Backend junior with Go tasks
|
||||
value:
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: junior
|
||||
task_language: go
|
||||
@@ -524,9 +525,12 @@ AssessmentAttemptCreated:
|
||||
value:
|
||||
id: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
||||
version: 1
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: junior
|
||||
task_language: go
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: demo_basic
|
||||
state: in_progress
|
||||
versions:
|
||||
@@ -560,6 +564,86 @@ AssessmentAttemptCreated:
|
||||
- id: c4
|
||||
text: "500"
|
||||
practices: []
|
||||
AssessmentCorrectiveAttemptCreated:
|
||||
summary: Corrective attempt shares the root chain deadline
|
||||
value:
|
||||
id: 01928f7e-8888-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 1
|
||||
kind: corrective
|
||||
specialization: backend
|
||||
target_grade: junior
|
||||
task_language: go
|
||||
root_attempt_id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
chain_deadline: "2026-11-23T09:00:00Z"
|
||||
mode: adaptive
|
||||
state: in_progress
|
||||
versions:
|
||||
policy_version: 2
|
||||
bank_version: backend.2026-11.3
|
||||
algorithm_version: irt-1pl-eap.1
|
||||
started_at: "2026-11-22T10:00:00Z"
|
||||
expires_at: "2026-11-23T09:00:00Z"
|
||||
sessions:
|
||||
used: 1
|
||||
max: 2
|
||||
idle_timeout_seconds: 1800
|
||||
finished_at: null
|
||||
progress:
|
||||
answered_items: 0
|
||||
max_items: 25
|
||||
current_item:
|
||||
id: 01928f7e-9999-7a2b-8c3d-4e5f6a7b8c01
|
||||
sequence: 1
|
||||
prompt: "What does an HTTP 412 response indicate for expected_version?"
|
||||
content:
|
||||
format: choice
|
||||
multiple: false
|
||||
options:
|
||||
- id: a1
|
||||
text: The version is stale.
|
||||
- id: b2
|
||||
text: The request is malformed.
|
||||
practices: []
|
||||
AssessmentExpressAttemptCreated:
|
||||
summary: Short training attempt without a qualification category
|
||||
value:
|
||||
id: 01928f7f-9999-7a2b-8c3d-4e5f6a7b8c01
|
||||
version: 1
|
||||
kind: demo_express
|
||||
specialization: null
|
||||
target_grade: null
|
||||
task_language: null
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: demo_express
|
||||
state: in_progress
|
||||
versions:
|
||||
policy_version: 1
|
||||
bank_version: express-demo.2026-10.1
|
||||
algorithm_version: express-interactive.1
|
||||
started_at: "2026-10-08T10:00:00Z"
|
||||
expires_at: "2026-10-08T10:05:00Z"
|
||||
sessions:
|
||||
used: 1
|
||||
max: 1
|
||||
idle_timeout_seconds: 300
|
||||
finished_at: null
|
||||
progress:
|
||||
answered_items: 0
|
||||
max_items: 5
|
||||
current_item:
|
||||
id: 01928f7f-aaaa-7a2b-8c3d-4e5f6a7b8c01
|
||||
sequence: 1
|
||||
prompt: "Choose the status code that signals a version conflict."
|
||||
content:
|
||||
format: choice
|
||||
multiple: false
|
||||
options:
|
||||
- id: c3
|
||||
text: "412"
|
||||
- id: d4
|
||||
text: "200"
|
||||
practices: []
|
||||
AssessmentAnswerAccepted:
|
||||
summary: Answer to item 1 stored; item 2 follows
|
||||
description: >-
|
||||
@@ -572,9 +656,12 @@ AssessmentAnswerAccepted:
|
||||
value:
|
||||
id: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
||||
version: 2
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: junior
|
||||
task_language: go
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: demo_basic
|
||||
state: in_progress
|
||||
versions:
|
||||
@@ -612,9 +699,12 @@ AssessmentAttemptCompleted:
|
||||
value:
|
||||
id: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
||||
version: 14
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: junior
|
||||
task_language: go
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: demo_basic
|
||||
state: completed
|
||||
versions:
|
||||
@@ -643,9 +733,12 @@ AssessmentAttemptResumed:
|
||||
value:
|
||||
id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 7
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
task_language: python
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: adaptive
|
||||
state: in_progress
|
||||
versions:
|
||||
@@ -701,9 +794,12 @@ AssessmentAttemptPracticePending:
|
||||
value:
|
||||
id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 16
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
task_language: python
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: adaptive
|
||||
state: practice_pending
|
||||
versions:
|
||||
@@ -743,9 +839,12 @@ AssessmentAttemptPracticeVerdictPending:
|
||||
value:
|
||||
id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 17
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
task_language: python
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: adaptive
|
||||
state: practice_pending
|
||||
versions:
|
||||
@@ -779,9 +878,12 @@ AssessmentAttemptSandboxFailed:
|
||||
value:
|
||||
id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 18
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
task_language: python
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: adaptive
|
||||
state: practice_pending
|
||||
versions:
|
||||
@@ -821,9 +923,12 @@ AssessmentAttemptReadyToFinalize:
|
||||
value:
|
||||
id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 20
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
task_language: python
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: adaptive
|
||||
state: ready_to_finalize
|
||||
versions:
|
||||
@@ -870,9 +975,12 @@ AssessmentAttemptAdditionalPracticePending:
|
||||
value:
|
||||
id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 21
|
||||
kind: root
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
task_language: python
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: adaptive
|
||||
state: additional_practice_pending
|
||||
versions:
|
||||
@@ -932,9 +1040,12 @@ AssessmentAttemptInsufficientBank:
|
||||
value:
|
||||
id: 01928f7c-5555-7a2b-8c3d-4e5f6a7b8c9d
|
||||
version: 10
|
||||
kind: root
|
||||
specialization: network_engineer
|
||||
target_grade: middle
|
||||
task_language: null
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
mode: adaptive
|
||||
state: insufficient_bank
|
||||
versions:
|
||||
@@ -1048,6 +1159,9 @@ AssessmentDemoBasicResult:
|
||||
attempt_id: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
||||
specialization: backend
|
||||
target_grade: junior
|
||||
kind: root
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
task_language: go
|
||||
mode: demo_basic
|
||||
versions:
|
||||
@@ -1090,6 +1204,9 @@ AssessmentAdaptiveResult:
|
||||
attempt_id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
kind: root
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
task_language: python
|
||||
mode: adaptive
|
||||
versions:
|
||||
@@ -1157,6 +1274,9 @@ AssessmentNotConfirmedResult:
|
||||
attempt_id: 01928f7d-7777-7a2b-8c3d-4e5f6a7b8c9d
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
kind: root
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
task_language: go
|
||||
mode: adaptive
|
||||
versions:
|
||||
@@ -1224,6 +1344,9 @@ AssessmentInsufficientBankResult:
|
||||
attempt_id: 01928f7c-5555-7a2b-8c3d-4e5f6a7b8c9d
|
||||
specialization: network_engineer
|
||||
target_grade: middle
|
||||
kind: root
|
||||
root_attempt_id: null
|
||||
chain_deadline: null
|
||||
task_language: null
|
||||
mode: adaptive
|
||||
versions:
|
||||
@@ -1246,6 +1369,73 @@ AssessmentInsufficientBankResult:
|
||||
practice_seconds: null
|
||||
next_steps: []
|
||||
decided_at: "2026-11-21T12:31:00Z"
|
||||
AssessmentCorrectiveResult:
|
||||
summary: Corrective result retains its root and fixed deadline
|
||||
value:
|
||||
attempt_id: 01928f7e-8888-7a2b-8c3d-4e5f6a7b8c9d
|
||||
specialization: backend
|
||||
target_grade: middle
|
||||
kind: corrective
|
||||
root_attempt_id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
chain_deadline: "2026-11-23T09:00:00Z"
|
||||
task_language: go
|
||||
mode: adaptive
|
||||
versions:
|
||||
policy_version: 2
|
||||
bank_version: backend.2026-11.3
|
||||
algorithm_version: irt-1pl-eap.1
|
||||
outcome: not_confirmed
|
||||
not_determined_reason: null
|
||||
confirmed_grade: null
|
||||
previous_confirmed_grade: junior
|
||||
strength: null
|
||||
calibration_status: uncalibrated
|
||||
limitations: [uncalibrated_thresholds, unproctored]
|
||||
uncertainty:
|
||||
theta: 0.21
|
||||
standard_error: 0.25
|
||||
interval_95:
|
||||
low: -0.28
|
||||
high: 0.70
|
||||
p_grade: 0.62
|
||||
basic_score: null
|
||||
practices: []
|
||||
gaps: []
|
||||
durations:
|
||||
items_seconds: 1500
|
||||
practice_seconds: 900
|
||||
next_steps: []
|
||||
decided_at: "2026-11-22T11:00:00Z"
|
||||
AssessmentExpressResult:
|
||||
summary: Short training result with no qualification evidence
|
||||
value:
|
||||
attempt_id: 01928f7f-9999-7a2b-8c3d-4e5f6a7b8c9d
|
||||
specialization: null
|
||||
target_grade: null
|
||||
task_language: null
|
||||
kind: demo_express
|
||||
mode: demo_express
|
||||
versions:
|
||||
policy_version: 1
|
||||
bank_version: express-demo.2026-10.1
|
||||
algorithm_version: express-interactive.1
|
||||
outcome: demonstration
|
||||
not_determined_reason: null
|
||||
confirmed_grade: null
|
||||
previous_confirmed_grade: null
|
||||
strength: null
|
||||
calibration_status: uncalibrated
|
||||
limitations: [demonstration_only]
|
||||
uncertainty: null
|
||||
basic_score: null
|
||||
practices: []
|
||||
gaps: []
|
||||
durations:
|
||||
items_seconds: 260
|
||||
practice_seconds: null
|
||||
next_steps: []
|
||||
summary: The run demonstrates the task flow and creates no qualification evidence.
|
||||
decided_at: "2026-11-22T11:00:00Z"
|
||||
AssessmentSpecializationNotInQuestionnaire:
|
||||
summary: The specialization is not in the questionnaire
|
||||
value:
|
||||
|
||||
+410
-22
@@ -33,23 +33,39 @@ CandidateHandle:
|
||||
- cand_7Qm2xVb9Lr4Kp0Zt
|
||||
AssessmentMode:
|
||||
type: string
|
||||
description: 'Measurement method of an attempt. The server selects it from the published task bank of the category; the client never chooses it.
|
||||
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.
|
||||
|
||||
|
||||
- demo_basic: a fixed form of reviewed demo items scored by their keys against the pass mark of the versioned basic grading policy. It computes no ability estimate, standard error, or probability, so every uncertainty field of its result is null, its thresholds are uncalibrated, and its decision is binary: it never offers an additional practice.
|
||||
|
||||
- adaptive: the adaptive test on task families with an ability estimate, its standard error, and the probability of reaching the grade threshold, as the versioned assessment policy defines them. A probability in the band below confirmation offers one additional practice in the same attempt.
|
||||
|
||||
- demo_express: an interactive 3 to 5 minute training run under a separate policy. It does not assign a category or percentile, count toward the real-assessment quota, or create qualification evidence.
|
||||
|
||||
|
||||
Adding a value is a contract change.'
|
||||
enum:
|
||||
- demo_basic
|
||||
- demo_express
|
||||
- adaptive
|
||||
AssessmentRealMode:
|
||||
type: string
|
||||
description: Server-selected mode available to a real category assessment.
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
AssessmentAttemptKind:
|
||||
type: string
|
||||
description: Assessment track that distinguishes root, corrective, and training attempts.
|
||||
enum:
|
||||
- root
|
||||
- corrective
|
||||
- demo_express
|
||||
AssessmentAttemptVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
description: 'Version of an assessment attempt. A new attempt has version 1, and each committed change advances it by exactly one: an accepted answer, a practice submission or resubmission, a verdict, a decision of finalize, a session start, and a server-side transition such as expiry or automatic finalization. A transition that the server applies when the attempt is read is committed before the response and also advances it. A rejected command and a repeat that stores nothing leave it unchanged. Commands send the version they read as `expected_version`.'
|
||||
description: 'Version of an assessment attempt. A new attempt has version 1, and each committed change advances it by exactly one: an accepted answer, a practice submission or resubmission, a verdict, a decision of finalize, an explicit work-session start, and a server-side transition such as expiry or automatic finalization. Reads never change the attempt. A rejected command and a repeat that stores nothing leave it unchanged. Commands send the version they read as `expected_version`.'
|
||||
examples:
|
||||
- 4
|
||||
AssessmentAttemptState:
|
||||
@@ -72,7 +88,7 @@ AssessmentAttemptState:
|
||||
- insufficient_bank: the published bank could not supply the items required for coverage within the limit, and the attempt ended without a confirmed grade instead of repeating families. The result is available.
|
||||
|
||||
|
||||
When `expires_at` passes or the session limit is reached, a practice submitted before that and still `pending` is graded first. Then the server decides without another command: `ready_to_finalize` is finalized and becomes `completed`; `additional_practice_pending` with the additional practice not submitted is finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the reason `sandbox_unavailable`, which is not the candidate''s fault. `completed`, `expired`, and `insufficient_bank` are terminal and accept no command except the repeat of finalize described on FinalizeMyAssessmentAttempt. Adding a value is a contract change.'
|
||||
When `expires_at` passes or the session limit is reached, a read returns the stored state without changing it. A command or background transition commits any due outcome and advances the version. A practice submitted before the limit and still `pending` is graded first. Then `ready_to_finalize` becomes `completed`; `additional_practice_pending` with the additional practice not submitted is finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the reason `sandbox_unavailable`, which is not the candidate''s fault. `completed`, `expired`, and `insufficient_bank` are terminal and accept no command except the repeat of finalize described on FinalizeMyAssessmentAttempt. Adding a value is a contract change.'
|
||||
enum:
|
||||
- in_progress
|
||||
- practice_pending
|
||||
@@ -110,7 +126,7 @@ AssessmentSessions:
|
||||
description: 'Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.
|
||||
|
||||
|
||||
A session starts with the creation of the attempt or, after the previous session ended, with the next GetMyAssessmentAttempt or command on the active attempt. It ends after `idle_timeout_seconds` without such a request. A request that would start a session beyond `max_sessions` starts none: the server moves the attempt to `expired` and answers with it (a read) or with 409 state_conflict (a command). Reading a terminal attempt or a result never starts a session.'
|
||||
Session 1 starts with attempt creation. After it ends due to `idle_timeout_seconds` of inactivity, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. GetMyAssessmentAttempt and GetMyAssessmentResult are read-only and never start a session. The session command checks the attempt deadline and `max_sessions`; when either limit has passed, it records the due terminal transition and returns the resulting attempt. Reads of terminal attempts do not change them.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- used
|
||||
@@ -135,14 +151,32 @@ AssessmentSessions:
|
||||
maximum: 86400
|
||||
description: Inactivity after which the current session ends.
|
||||
AssessmentAttemptCreate:
|
||||
description: Start a real assessment, a corrective attempt in an existing chain, or an explicit training run. The required `kind` discriminator selects one of the three request shapes; `mode` remains server-selected for real assessments.
|
||||
oneOf:
|
||||
- $ref: '#/AssessmentQualifiedAttemptCreate'
|
||||
- $ref: '#/AssessmentCorrectiveAttemptCreate'
|
||||
- $ref: '#/AssessmentExpressAttemptCreate'
|
||||
discriminator:
|
||||
propertyName: kind
|
||||
mapping:
|
||||
root: '#/AssessmentQualifiedAttemptCreate'
|
||||
corrective: '#/AssessmentCorrectiveAttemptCreate'
|
||||
demo_express: '#/AssessmentExpressAttemptCreate'
|
||||
AssessmentQualifiedAttemptCreate:
|
||||
type: object
|
||||
description: 'Category to assess: a specialization and the target grade, with the task language. The candidate comes from the session. The mode and versions are chosen by the server; unknown fields such as `mode`, `seed`, or `score` are rejected.'
|
||||
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.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
description: Start a real-assessment chain and reserve one root quota slot.
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
target_grade:
|
||||
@@ -152,6 +186,56 @@ AssessmentAttemptCreate:
|
||||
oneOf:
|
||||
- $ref: '#/TaskLanguage'
|
||||
- type: 'null'
|
||||
AssessmentCorrectiveAttemptCreate:
|
||||
type: object
|
||||
description: Start a corrective real assessment at a lower target grade in the chain rooted at root_attempt_id. The server validates that this grade is strictly below the preceding grade and that the chain remains within its existing deadline and quota. chain_deadline is derived from the root attempt and is never supplied by the client.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- root_attempt_id
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- corrective
|
||||
description: Continue the existing real-assessment chain without reserving another root slot.
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
target_grade:
|
||||
$ref: '#/GradeCode'
|
||||
task_language:
|
||||
description: Task language of the attempt, or null when the bank offers no choice.
|
||||
oneOf:
|
||||
- $ref: '#/TaskLanguage'
|
||||
- type: 'null'
|
||||
root_attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Root real-assessment attempt whose quota and deadline this attempt shares.
|
||||
AssessmentExpressAttemptCreate:
|
||||
type: object
|
||||
description: Explicitly start the short training run. It has no specialization or target grade, uses its separate demo policy, and does not consume a real-assessment attempt.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
description: Explicitly request the training run; real modes cannot be selected by the client.
|
||||
AssessmentAttemptSessionStart:
|
||||
type: object
|
||||
description: Start or resume a work session using the attempt version last read by the candidate.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: '#/AssessmentAttemptVersion'
|
||||
AssessmentItemId:
|
||||
type: string
|
||||
format: uuid
|
||||
@@ -547,8 +631,20 @@ AssessmentPractice:
|
||||
- $ref: '#/PracticeFailureReason'
|
||||
- type: 'null'
|
||||
AssessmentAttempt:
|
||||
description: Candidate view of a real assessment, a corrective real assessment, or a demo_express training run. The variants keep training output separate from qualification attempts.
|
||||
oneOf:
|
||||
- $ref: '#/AssessmentQualifiedAttempt'
|
||||
- $ref: '#/AssessmentCorrectiveAttempt'
|
||||
- $ref: '#/AssessmentExpressAttempt'
|
||||
discriminator:
|
||||
propertyName: kind
|
||||
mapping:
|
||||
root: '#/AssessmentQualifiedAttempt'
|
||||
corrective: '#/AssessmentCorrectiveAttempt'
|
||||
demo_express: '#/AssessmentExpressAttempt'
|
||||
AssessmentAttemptCommon:
|
||||
type: object
|
||||
description: Assessment attempt of the current candidate for one category, a specialization and a target grade. It shows the state, the fixed versions, the server deadline `expires_at` from the policy version, which the client clock never extends, the session limit, the progress, the item to answer now, and the practices. It never contains answer keys, the correctness of submitted answers, scores of single items, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.
|
||||
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.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
@@ -556,6 +652,7 @@ AssessmentAttempt:
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- kind
|
||||
- mode
|
||||
- state
|
||||
- versions
|
||||
@@ -574,14 +671,35 @@ AssessmentAttempt:
|
||||
version:
|
||||
$ref: '#/AssessmentAttemptVersion'
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
description: Null only for demo_express, which has no qualification category.
|
||||
oneOf:
|
||||
- $ref: '#/SpecializationCode'
|
||||
- type: 'null'
|
||||
target_grade:
|
||||
$ref: '#/GradeCode'
|
||||
description: Null only for demo_express, which has no qualification category.
|
||||
oneOf:
|
||||
- $ref: '#/GradeCode'
|
||||
- type: 'null'
|
||||
task_language:
|
||||
description: Task language of the attempt, or null when the bank offers no choice.
|
||||
description: Task language of the attempt, or null when none is selected.
|
||||
oneOf:
|
||||
- $ref: '#/TaskLanguage'
|
||||
- type: 'null'
|
||||
kind:
|
||||
$ref: '#/AssessmentAttemptKind'
|
||||
root_attempt_id:
|
||||
description: Present only for a corrective real assessment. It identifies the root attempt whose quota and chain deadline this attempt shares.
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: 'null'
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
description: Present only for a corrective real assessment. It is the immutable deadline derived from the root attempt and is not extended by a lower target grade.
|
||||
oneOf:
|
||||
- $ref: '#/Timestamp'
|
||||
- type: 'null'
|
||||
readOnly: true
|
||||
mode:
|
||||
$ref: '#/AssessmentMode'
|
||||
state:
|
||||
@@ -591,9 +709,10 @@ AssessmentAttempt:
|
||||
started_at:
|
||||
$ref: '#/Timestamp'
|
||||
expires_at:
|
||||
description: Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective assessment it does not exceed chain_deadline.
|
||||
$ref: '#/Timestamp'
|
||||
sessions:
|
||||
description: Session limit of the attempt, or null when its policy version defines none.
|
||||
description: Session limit of the attempt, or null when its policy defines none.
|
||||
oneOf:
|
||||
- $ref: '#/AssessmentSessions'
|
||||
- type: 'null'
|
||||
@@ -612,9 +731,103 @@ AssessmentAttempt:
|
||||
practices:
|
||||
type: array
|
||||
maxItems: 5
|
||||
description: 'Practices in the order they were assigned: the `main` practice first, then an `additional` practice once finalize offers it. Empty only for a demo_basic attempt while code practice is disabled until the sandbox isolation is verified; its result then lists the `practice_not_included` limitation. A list rather than one field leaves room for more practices without a breaking change.'
|
||||
description: Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.
|
||||
items:
|
||||
$ref: '#/AssessmentPractice'
|
||||
AssessmentQualifiedAttempt:
|
||||
allOf:
|
||||
- $ref: '#/AssessmentAttemptCommon'
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
target_grade:
|
||||
$ref: '#/GradeCode'
|
||||
root_attempt_id:
|
||||
type: 'null'
|
||||
description: Root attempts have no parent attempt.
|
||||
chain_deadline:
|
||||
type: 'null'
|
||||
description: A root attempt has no correction-chain deadline.
|
||||
required:
|
||||
- kind
|
||||
- mode
|
||||
- specialization
|
||||
- target_grade
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentCorrectiveAttempt:
|
||||
allOf:
|
||||
- $ref: '#/AssessmentAttemptCommon'
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- corrective
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
target_grade:
|
||||
$ref: '#/GradeCode'
|
||||
root_attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
$ref: '#/Timestamp'
|
||||
readOnly: true
|
||||
required:
|
||||
- kind
|
||||
- mode
|
||||
- specialization
|
||||
- target_grade
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentExpressAttempt:
|
||||
allOf:
|
||||
- $ref: '#/AssessmentAttemptCommon'
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
specialization:
|
||||
type: 'null'
|
||||
target_grade:
|
||||
type: 'null'
|
||||
task_language:
|
||||
type: 'null'
|
||||
root_attempt_id:
|
||||
type: 'null'
|
||||
chain_deadline:
|
||||
type: 'null'
|
||||
required:
|
||||
- kind
|
||||
- mode
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
ChoiceAnswer:
|
||||
type: object
|
||||
description: 'Selected options of a choice item: exactly one unless the item allows several. Two answers are equal when they select the same set of options, in any order.'
|
||||
@@ -797,16 +1010,16 @@ AssessmentOutcome:
|
||||
- not_determined
|
||||
AssessmentNotDeterminedReason:
|
||||
type: string
|
||||
description: 'Why an attempt gives no decision, and whether it counts against the retry rules.
|
||||
description: 'Why an attempt gives no decision. One root quota slot is reserved when a real root attempt starts; corrective checks in its chain do not reserve another slot.
|
||||
|
||||
|
||||
- expired: the time or session limit passed before the candidate finished the item part. It is the candidate''s attempt: it counts toward the attempt limit and starts the same-grade retry interval.
|
||||
- expired: the time or session limit passed before the candidate finished the item part. Retry timing follows the recorded policy; a correction uses the existing root slot and does not reset the chain deadline or 30/90-day timers.
|
||||
|
||||
- practice_incomplete: the item part was done, but the candidate did not submit the main practice before the limit. It counts like `expired`.
|
||||
- practice_incomplete: the item part was done, but the candidate did not submit the main practice before the limit. Retry timing follows the recorded policy; a correction uses the existing root slot and does not reset the chain deadline or 30/90-day timers.
|
||||
|
||||
- insufficient_bank: the bank could not supply the required coverage within the limit. It is a platform limitation: it never counts toward the attempt limit and starts no retry interval.
|
||||
- insufficient_bank: the bank could not supply required coverage. A preflight refusal creates no attempt or root slot; a bank failure in an existing chain does not create a free new chain or another root slot.
|
||||
|
||||
- sandbox_unavailable: the latest submission of a required or additional practice ended `failed` because of the sandbox infrastructure, and the limit passed before a verdict. It is a platform fault: it never counts toward the attempt limit and starts no retry interval.'
|
||||
- sandbox_unavailable: the latest submission of a required or additional practice ended `failed` because of the sandbox infrastructure, and the limit passed before a verdict. It is a platform fault and does not create a new root slot or a free chain.'
|
||||
enum:
|
||||
- expired
|
||||
- practice_incomplete
|
||||
@@ -826,7 +1039,7 @@ CalibrationStatus:
|
||||
- calibrated
|
||||
AssessmentLimitation:
|
||||
type: string
|
||||
description: 'Known limitation of the method behind a result, shown with the result.
|
||||
description: 'Known limitation of the method behind a real-assessment result, shown with the result.
|
||||
|
||||
|
||||
- uncalibrated_thresholds: the thresholds are not yet validated on a pilot.
|
||||
@@ -837,7 +1050,6 @@ AssessmentLimitation:
|
||||
|
||||
- unproctored: the attempt was taken online without supervision.
|
||||
|
||||
|
||||
Adding a value is a contract change.'
|
||||
enum:
|
||||
- uncalibrated_thresholds
|
||||
@@ -990,14 +1202,27 @@ AssessmentNextStep:
|
||||
- $ref: '#/Timestamp'
|
||||
- type: 'null'
|
||||
AssessmentResult:
|
||||
description: Immutable result of a terminal assessment attempt. The result shape distinguishes real grade decisions from demo_express training output.
|
||||
oneOf:
|
||||
- $ref: '#/AssessmentQualifiedResult'
|
||||
- $ref: '#/AssessmentCorrectiveResult'
|
||||
- $ref: '#/AssessmentExpressResult'
|
||||
discriminator:
|
||||
propertyName: kind
|
||||
mapping:
|
||||
root: '#/AssessmentQualifiedResult'
|
||||
corrective: '#/AssessmentCorrectiveResult'
|
||||
demo_express: '#/AssessmentExpressResult'
|
||||
AssessmentRealResultCommon:
|
||||
type: object
|
||||
description: 'Immutable result of a terminal attempt, visible only to its candidate. It records the method, the versions, the decision, its uncertainty, and its limitations; a later policy, bank, or algorithm version never changes it. It never contains answers, per-item correctness, answer keys, seeds, hidden checks, or anti-cheat signals. Fields that the method does not compute are null, never zero: demo_basic has null `uncertainty` and `strength`, and adaptive has null `basic_score`.'
|
||||
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.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- attempt_id
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- kind
|
||||
- mode
|
||||
- versions
|
||||
- outcome
|
||||
@@ -1022,12 +1247,33 @@ AssessmentResult:
|
||||
$ref: '#/SpecializationCode'
|
||||
target_grade:
|
||||
$ref: '#/GradeCode'
|
||||
root_attempt_id:
|
||||
description: Root attempt of a corrective check, or null when this is not a corrective result. The corrective attempt keeps this link.
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: 'null'
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
description: Immutable deadline shared by a corrective chain, or null when this result is not from a corrective check.
|
||||
oneOf:
|
||||
- $ref: '#/Timestamp'
|
||||
- type: 'null'
|
||||
readOnly: true
|
||||
task_language:
|
||||
oneOf:
|
||||
- $ref: '#/TaskLanguage'
|
||||
- type: 'null'
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
- corrective
|
||||
mode:
|
||||
$ref: '#/AssessmentMode'
|
||||
type: string
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
versions:
|
||||
$ref: '#/AssessmentVersions'
|
||||
outcome:
|
||||
@@ -1091,6 +1337,148 @@ AssessmentResult:
|
||||
$ref: '#/AssessmentNextStep'
|
||||
decided_at:
|
||||
$ref: '#/Timestamp'
|
||||
AssessmentQualifiedResult:
|
||||
description: Result of a real assessment that is not a corrective attempt. The correction-chain fields are explicitly null.
|
||||
allOf:
|
||||
- $ref: '#/AssessmentRealResultCommon'
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
root_attempt_id:
|
||||
type: 'null'
|
||||
chain_deadline:
|
||||
type: 'null'
|
||||
required:
|
||||
- kind
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentCorrectiveResult:
|
||||
description: Result of a corrective real assessment. Both chain fields are present and identify the same immutable correction chain.
|
||||
allOf:
|
||||
- $ref: '#/AssessmentRealResultCommon'
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- corrective
|
||||
root_attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
$ref: '#/Timestamp'
|
||||
readOnly: true
|
||||
required:
|
||||
- kind
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentExpressResult:
|
||||
type: object
|
||||
description: Immutable educational result of a demo_express run. It includes a short summary but cannot report a category, percentile, uncertainty, grade, strength, or qualification evidence. The result belongs only to the training mode and does not consume a real-assessment quota.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- attempt_id
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- kind
|
||||
- mode
|
||||
- versions
|
||||
- outcome
|
||||
- not_determined_reason
|
||||
- confirmed_grade
|
||||
- previous_confirmed_grade
|
||||
- strength
|
||||
- calibration_status
|
||||
- limitations
|
||||
- uncertainty
|
||||
- basic_score
|
||||
- practices
|
||||
- gaps
|
||||
- durations
|
||||
- next_steps
|
||||
- summary
|
||||
- decided_at
|
||||
properties:
|
||||
attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
specialization:
|
||||
type: 'null'
|
||||
description: Express training does not assess a specialization.
|
||||
target_grade:
|
||||
type: 'null'
|
||||
description: Express training does not assess a target grade.
|
||||
task_language:
|
||||
type: 'null'
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
versions:
|
||||
$ref: '#/AssessmentVersions'
|
||||
outcome:
|
||||
type: string
|
||||
enum:
|
||||
- demonstration
|
||||
not_determined_reason:
|
||||
type: 'null'
|
||||
confirmed_grade:
|
||||
type: 'null'
|
||||
description: Express training never confirms a grade.
|
||||
previous_confirmed_grade:
|
||||
type: 'null'
|
||||
strength:
|
||||
type: 'null'
|
||||
calibration_status:
|
||||
type: string
|
||||
enum:
|
||||
- uncalibrated
|
||||
limitations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 1
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- demonstration_only
|
||||
uncertainty:
|
||||
type: 'null'
|
||||
description: Express training computes no ability estimate or percentile.
|
||||
basic_score:
|
||||
type: 'null'
|
||||
practices:
|
||||
type: array
|
||||
maxItems: 0
|
||||
items:
|
||||
$ref: '#/AssessmentPracticeResult'
|
||||
gaps:
|
||||
type: array
|
||||
maxItems: 0
|
||||
items:
|
||||
$ref: '#/AssessmentGap'
|
||||
durations:
|
||||
$ref: '#/AssessmentDurations'
|
||||
next_steps:
|
||||
type: array
|
||||
maxItems: 0
|
||||
items:
|
||||
$ref: '#/AssessmentNextStep'
|
||||
summary:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 2000
|
||||
description: Short educational feedback about this training run.
|
||||
decided_at:
|
||||
$ref: '#/Timestamp'
|
||||
AssessmentGradeAvailabilityStatus:
|
||||
type: string
|
||||
description: 'Whether an attempt for the grade can start now.
|
||||
@@ -1127,9 +1515,9 @@ AssessmentGradeAvailability:
|
||||
status:
|
||||
$ref: '#/AssessmentGradeAvailabilityStatus'
|
||||
mode:
|
||||
description: Mode that an attempt would use, or null when the status is `insufficient_bank`.
|
||||
description: Real-assessment mode that the server would use, or null when the status is `insufficient_bank`. `demo_express` is not a category assessment and is never returned here.
|
||||
oneOf:
|
||||
- $ref: '#/AssessmentMode'
|
||||
- $ref: '#/AssessmentRealMode'
|
||||
- type: 'null'
|
||||
available_at:
|
||||
description: When the status is `cooldown`, the first time the attempt can start; otherwise null.
|
||||
|
||||
@@ -2,15 +2,30 @@ schemas:
|
||||
AssessmentMode:
|
||||
type: string
|
||||
description: |-
|
||||
Measurement method of an attempt. The server selects it from the published task bank of the category; the client never chooses it.
|
||||
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.
|
||||
|
||||
- demo_basic: a fixed form of reviewed demo items scored by their keys against the pass mark of the versioned basic grading policy. It computes no ability estimate, standard error, or probability, so every uncertainty field of its result is null, its thresholds are uncalibrated, and its decision is binary: it never offers an additional practice.
|
||||
- adaptive: the adaptive test on task families with an ability estimate, its standard error, and the probability of reaching the grade threshold, as the versioned assessment policy defines them. A probability in the band below confirmation offers one additional practice in the same attempt.
|
||||
- demo_express: an interactive 3 to 5 minute training run under a separate policy. It does not assign a category or percentile, count toward the real-assessment quota, or create qualification evidence.
|
||||
|
||||
Adding a value is a contract change.
|
||||
enum:
|
||||
- demo_basic
|
||||
- demo_express
|
||||
- adaptive
|
||||
AssessmentRealMode:
|
||||
type: string
|
||||
description: Server-selected mode available to a real category assessment.
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
AssessmentAttemptKind:
|
||||
type: string
|
||||
description: Assessment track that distinguishes root, corrective, and training attempts.
|
||||
enum:
|
||||
- root
|
||||
- corrective
|
||||
- demo_express
|
||||
AssessmentAttemptVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -19,12 +34,10 @@ schemas:
|
||||
Version of an assessment attempt. A new attempt has version 1, and each
|
||||
committed change advances it by exactly one: an accepted answer, a
|
||||
practice submission or resubmission, a verdict, a decision of
|
||||
finalize, a session start, and a server-side transition such as
|
||||
expiry or automatic finalization. A transition that the server applies
|
||||
when the attempt is read is committed before the response and also
|
||||
advances it. A rejected command and a repeat that stores nothing leave
|
||||
it unchanged. Commands send the version they read as
|
||||
`expected_version`.
|
||||
finalize, an explicit work-session start, and a server-side transition
|
||||
such as expiry or automatic finalization. Reads never change the
|
||||
attempt. A rejected command and a repeat that stores nothing leave it
|
||||
unchanged. Commands send the version they read as `expected_version`.
|
||||
examples:
|
||||
- 4
|
||||
AssessmentAttemptState:
|
||||
@@ -40,7 +53,7 @@ schemas:
|
||||
- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.
|
||||
- insufficient_bank: the published bank could not supply the items required for coverage within the limit, and the attempt ended without a confirmed grade instead of repeating families. The result is available.
|
||||
|
||||
When `expires_at` passes or the session limit is reached, a practice submitted before that and still `pending` is graded first. Then the server decides without another command: `ready_to_finalize` is finalized and becomes `completed`; `additional_practice_pending` with the additional practice not submitted is finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the reason `sandbox_unavailable`, which is not the candidate's fault. `completed`, `expired`, and `insufficient_bank` are terminal and accept no command except the repeat of finalize described on FinalizeMyAssessmentAttempt. Adding a value is a contract change.
|
||||
When `expires_at` passes or the session limit is reached, a read returns the stored state without changing it. A command or background transition commits any due outcome and advances the version. A practice submitted before the limit and still `pending` is graded first. Then `ready_to_finalize` becomes `completed`; `additional_practice_pending` with the additional practice not submitted is finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the reason `sandbox_unavailable`, which is not the candidate's fault. `completed`, `expired`, and `insufficient_bank` are terminal and accept no command except the repeat of finalize described on FinalizeMyAssessmentAttempt. Adding a value is a contract change.
|
||||
enum:
|
||||
- in_progress
|
||||
- practice_pending
|
||||
@@ -87,7 +100,7 @@ schemas:
|
||||
description: |-
|
||||
Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.
|
||||
|
||||
A session starts with the creation of the attempt or, after the previous session ended, with the next GetMyAssessmentAttempt or command on the active attempt. It ends after `idle_timeout_seconds` without such a request. A request that would start a session beyond `max_sessions` starts none: the server moves the attempt to `expired` and answers with it (a read) or with 409 state_conflict (a command). Reading a terminal attempt or a result never starts a session.
|
||||
Session 1 starts with attempt creation. After it ends due to `idle_timeout_seconds` of inactivity, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. GetMyAssessmentAttempt and GetMyAssessmentResult are read-only and never start a session. The session command checks the attempt deadline and `max_sessions`; when either limit has passed, it records the due terminal transition and returns the resulting attempt. Reads of terminal attempts do not change them.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- used
|
||||
@@ -112,18 +125,41 @@ schemas:
|
||||
maximum: 86400
|
||||
description: Inactivity after which the current session ends.
|
||||
AssessmentAttemptCreate:
|
||||
description: >-
|
||||
Start a real assessment, a corrective attempt in an existing chain, or
|
||||
an explicit training run. The required `kind` discriminator selects
|
||||
one of the three request shapes; `mode` remains server-selected for
|
||||
real assessments.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/AssessmentQualifiedAttemptCreate"
|
||||
- $ref: "#/schemas/AssessmentCorrectiveAttemptCreate"
|
||||
- $ref: "#/schemas/AssessmentExpressAttemptCreate"
|
||||
discriminator:
|
||||
propertyName: kind
|
||||
mapping:
|
||||
root: "#/schemas/AssessmentQualifiedAttemptCreate"
|
||||
corrective: "#/schemas/AssessmentCorrectiveAttemptCreate"
|
||||
demo_express: "#/schemas/AssessmentExpressAttemptCreate"
|
||||
AssessmentQualifiedAttemptCreate:
|
||||
type: object
|
||||
description: >-
|
||||
Category to assess: a specialization and the target grade, with the
|
||||
task language. The candidate comes from the session. The mode and
|
||||
versions are chosen by the server; unknown fields such as `mode`,
|
||||
`seed`, or `score` are rejected.
|
||||
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.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
description: Start a real-assessment chain and reserve one root quota slot.
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
target_grade:
|
||||
@@ -137,6 +173,64 @@ schemas:
|
||||
oneOf:
|
||||
- $ref: "./catalog_schemas.yml#/schemas/TaskLanguage"
|
||||
- type: "null"
|
||||
AssessmentCorrectiveAttemptCreate:
|
||||
type: object
|
||||
description: >-
|
||||
Start a corrective real assessment at a lower target grade in the
|
||||
chain rooted at root_attempt_id. The server validates that this grade
|
||||
is strictly below the preceding grade and that the chain remains
|
||||
within its existing deadline and quota. chain_deadline is derived
|
||||
from the root attempt and is never supplied by the client.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- root_attempt_id
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- corrective
|
||||
description: Continue the existing real-assessment chain without reserving another root slot.
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
target_grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
task_language:
|
||||
description: Task language of the attempt, or null when the bank offers no choice.
|
||||
oneOf:
|
||||
- $ref: "./catalog_schemas.yml#/schemas/TaskLanguage"
|
||||
- type: "null"
|
||||
root_attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Root real-assessment attempt whose quota and deadline this attempt shares.
|
||||
AssessmentExpressAttemptCreate:
|
||||
type: object
|
||||
description: >-
|
||||
Explicitly start the short training run. It has no specialization or
|
||||
target grade, uses its separate demo policy, and does not consume a
|
||||
real-assessment attempt.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
description: Explicitly request the training run; real modes cannot be selected by the client.
|
||||
AssessmentAttemptSessionStart:
|
||||
type: object
|
||||
description: Start or resume a work session using the attempt version last read by the candidate.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: "#/schemas/AssessmentAttemptVersion"
|
||||
AssessmentItemId:
|
||||
type: string
|
||||
format: uuid
|
||||
@@ -593,16 +687,29 @@ schemas:
|
||||
- $ref: "#/schemas/PracticeFailureReason"
|
||||
- type: "null"
|
||||
AssessmentAttempt:
|
||||
description: >-
|
||||
Candidate view of a real assessment, a corrective real assessment, or
|
||||
a demo_express training run. The variants keep training output separate
|
||||
from qualification attempts.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/AssessmentQualifiedAttempt"
|
||||
- $ref: "#/schemas/AssessmentCorrectiveAttempt"
|
||||
- $ref: "#/schemas/AssessmentExpressAttempt"
|
||||
discriminator:
|
||||
propertyName: kind
|
||||
mapping:
|
||||
root: "#/schemas/AssessmentQualifiedAttempt"
|
||||
corrective: "#/schemas/AssessmentCorrectiveAttempt"
|
||||
demo_express: "#/schemas/AssessmentExpressAttempt"
|
||||
AssessmentAttemptCommon:
|
||||
type: object
|
||||
description: >-
|
||||
Assessment attempt of the current candidate for one category, a
|
||||
specialization and a target grade. It shows the state, the fixed
|
||||
versions, the server deadline `expires_at` from the policy version,
|
||||
which the client clock never extends, the session limit, the
|
||||
progress, the item
|
||||
to answer now, and the practices. It never contains answer keys, the
|
||||
correctness of submitted answers, scores of single items, family or
|
||||
variant identifiers, seeds, hidden checks, or anti-cheat signals.
|
||||
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.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
@@ -610,6 +717,7 @@ schemas:
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- kind
|
||||
- mode
|
||||
- state
|
||||
- versions
|
||||
@@ -628,14 +736,40 @@ schemas:
|
||||
version:
|
||||
$ref: "#/schemas/AssessmentAttemptVersion"
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
description: Null only for demo_express, which has no qualification category.
|
||||
oneOf:
|
||||
- $ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
- type: "null"
|
||||
target_grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
description: Null only for demo_express, which has no qualification category.
|
||||
oneOf:
|
||||
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
- type: "null"
|
||||
task_language:
|
||||
description: Task language of the attempt, or null when the bank offers no choice.
|
||||
description: Task language of the attempt, or null when none is selected.
|
||||
oneOf:
|
||||
- $ref: "./catalog_schemas.yml#/schemas/TaskLanguage"
|
||||
- type: "null"
|
||||
kind:
|
||||
$ref: "#/schemas/AssessmentAttemptKind"
|
||||
root_attempt_id:
|
||||
description: >-
|
||||
Present only for a corrective real assessment. It identifies the
|
||||
root attempt whose quota and chain deadline this attempt shares.
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: "null"
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
description: >-
|
||||
Present only for a corrective real assessment. It is the immutable
|
||||
deadline derived from the root attempt and is not extended by a
|
||||
lower target grade.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
readOnly: true
|
||||
mode:
|
||||
$ref: "#/schemas/AssessmentMode"
|
||||
state:
|
||||
@@ -645,18 +779,18 @@ schemas:
|
||||
started_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
expires_at:
|
||||
description: >-
|
||||
Server deadline. For demo_express it is 180 to 300 seconds after
|
||||
started_at; for a corrective assessment it does not exceed
|
||||
chain_deadline.
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
sessions:
|
||||
description: >-
|
||||
Session limit of the attempt, or null when its policy version
|
||||
defines none.
|
||||
description: Session limit of the attempt, or null when its policy defines none.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/AssessmentSessions"
|
||||
- type: "null"
|
||||
finished_at:
|
||||
description: >-
|
||||
Time the attempt reached a terminal state, or null while it is
|
||||
active.
|
||||
description: Time the attempt reached a terminal state, or null while it is active.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
@@ -675,14 +809,104 @@ schemas:
|
||||
type: array
|
||||
maxItems: 5
|
||||
description: >-
|
||||
Practices in the order they were assigned: the `main` practice
|
||||
first, then an `additional` practice once finalize offers it. Empty
|
||||
only for a demo_basic attempt while code practice is disabled until
|
||||
the sandbox isolation is verified; its result then lists the
|
||||
`practice_not_included` limitation. A list rather than one field
|
||||
leaves room for more practices without a breaking change.
|
||||
Practices in the order assigned by the mode policy. The list
|
||||
exposes verdicts only after submission.
|
||||
items:
|
||||
$ref: "#/schemas/AssessmentPractice"
|
||||
AssessmentQualifiedAttempt:
|
||||
allOf:
|
||||
- $ref: "#/schemas/AssessmentAttemptCommon"
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
target_grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
root_attempt_id:
|
||||
type: "null"
|
||||
description: Root attempts have no parent attempt.
|
||||
chain_deadline:
|
||||
type: "null"
|
||||
description: A root attempt has no correction-chain deadline.
|
||||
required:
|
||||
- kind
|
||||
- mode
|
||||
- specialization
|
||||
- target_grade
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentCorrectiveAttempt:
|
||||
allOf:
|
||||
- $ref: "#/schemas/AssessmentAttemptCommon"
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- corrective
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
target_grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
root_attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
readOnly: true
|
||||
required:
|
||||
- kind
|
||||
- mode
|
||||
- specialization
|
||||
- target_grade
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentExpressAttempt:
|
||||
allOf:
|
||||
- $ref: "#/schemas/AssessmentAttemptCommon"
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
specialization:
|
||||
type: "null"
|
||||
target_grade:
|
||||
type: "null"
|
||||
task_language:
|
||||
type: "null"
|
||||
root_attempt_id:
|
||||
type: "null"
|
||||
chain_deadline:
|
||||
type: "null"
|
||||
required:
|
||||
- kind
|
||||
- mode
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
ChoiceAnswer:
|
||||
type: object
|
||||
description: >-
|
||||
@@ -894,12 +1118,12 @@ schemas:
|
||||
AssessmentNotDeterminedReason:
|
||||
type: string
|
||||
description: |-
|
||||
Why an attempt gives no decision, and whether it counts against the retry rules.
|
||||
Why an attempt gives no decision. One root quota slot is reserved when a real root attempt starts; corrective checks in its chain do not reserve another slot.
|
||||
|
||||
- expired: the time or session limit passed before the candidate finished the item part. It is the candidate's attempt: it counts toward the attempt limit and starts the same-grade retry interval.
|
||||
- practice_incomplete: the item part was done, but the candidate did not submit the main practice before the limit. It counts like `expired`.
|
||||
- insufficient_bank: the bank could not supply the required coverage within the limit. It is a platform limitation: it never counts toward the attempt limit and starts no retry interval.
|
||||
- sandbox_unavailable: the latest submission of a required or additional practice ended `failed` because of the sandbox infrastructure, and the limit passed before a verdict. It is a platform fault: it never counts toward the attempt limit and starts no retry interval.
|
||||
- expired: the time or session limit passed before the candidate finished the item part. Retry timing follows the recorded policy; a correction uses the existing root slot and does not reset the chain deadline or 30/90-day timers.
|
||||
- practice_incomplete: the item part was done, but the candidate did not submit the main practice before the limit. Retry timing follows the recorded policy; a correction uses the existing root slot and does not reset the chain deadline or 30/90-day timers.
|
||||
- insufficient_bank: the bank could not supply required coverage. A preflight refusal creates no attempt or root slot; a bank failure in an existing chain does not create a free new chain or another root slot.
|
||||
- sandbox_unavailable: the latest submission of a required or additional practice ended `failed` because of the sandbox infrastructure, and the limit passed before a verdict. It is a platform fault and does not create a new root slot or a free chain.
|
||||
enum:
|
||||
- expired
|
||||
- practice_incomplete
|
||||
@@ -926,13 +1150,12 @@ schemas:
|
||||
AssessmentLimitation:
|
||||
type: string
|
||||
description: |-
|
||||
Known limitation of the method behind a result, shown with the result.
|
||||
Known limitation of the method behind a real-assessment result, shown with the result.
|
||||
|
||||
- uncalibrated_thresholds: the thresholds are not yet validated on a pilot.
|
||||
- demo_bank: the result comes from the small reviewed demo bank.
|
||||
- practice_not_included: the attempt had no code practice because the sandbox was not enabled.
|
||||
- unproctored: the attempt was taken online without supervision.
|
||||
|
||||
Adding a value is a contract change.
|
||||
enum:
|
||||
- uncalibrated_thresholds
|
||||
@@ -1093,21 +1316,36 @@ schemas:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
AssessmentResult:
|
||||
description: >-
|
||||
Immutable result of a terminal assessment attempt. The result shape
|
||||
distinguishes real grade decisions from demo_express training output.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/AssessmentQualifiedResult"
|
||||
- $ref: "#/schemas/AssessmentCorrectiveResult"
|
||||
- $ref: "#/schemas/AssessmentExpressResult"
|
||||
discriminator:
|
||||
propertyName: kind
|
||||
mapping:
|
||||
root: "#/schemas/AssessmentQualifiedResult"
|
||||
corrective: "#/schemas/AssessmentCorrectiveResult"
|
||||
demo_express: "#/schemas/AssessmentExpressResult"
|
||||
AssessmentRealResultCommon:
|
||||
type: object
|
||||
description: >-
|
||||
Immutable result of a terminal attempt, visible only to its candidate.
|
||||
It records the method, the versions, the decision, its uncertainty,
|
||||
and its limitations; a later policy, bank, or algorithm version never
|
||||
changes it. It never contains answers, per-item correctness, answer
|
||||
keys, seeds, hidden checks, or anti-cheat signals. Fields that the
|
||||
method does not compute are null, never zero: demo_basic has null
|
||||
`uncertainty` and `strength`, and adaptive has null `basic_score`.
|
||||
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.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- attempt_id
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- kind
|
||||
- mode
|
||||
- versions
|
||||
- outcome
|
||||
@@ -1132,12 +1370,37 @@ schemas:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
target_grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
root_attempt_id:
|
||||
description: >-
|
||||
Root attempt of a corrective check, or null when this is not a
|
||||
corrective result. The corrective attempt keeps this link.
|
||||
oneOf:
|
||||
- type: string
|
||||
format: uuid
|
||||
- type: "null"
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
description: >-
|
||||
Immutable deadline shared by a corrective chain, or null when
|
||||
this result is not from a corrective check.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
readOnly: true
|
||||
task_language:
|
||||
oneOf:
|
||||
- $ref: "./catalog_schemas.yml#/schemas/TaskLanguage"
|
||||
- type: "null"
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
- corrective
|
||||
mode:
|
||||
$ref: "#/schemas/AssessmentMode"
|
||||
type: string
|
||||
enum:
|
||||
- demo_basic
|
||||
- adaptive
|
||||
versions:
|
||||
$ref: "#/schemas/AssessmentVersions"
|
||||
outcome:
|
||||
@@ -1209,6 +1472,156 @@ schemas:
|
||||
$ref: "#/schemas/AssessmentNextStep"
|
||||
decided_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
AssessmentQualifiedResult:
|
||||
description: >-
|
||||
Result of a real assessment that is not a corrective attempt. The
|
||||
correction-chain fields are explicitly null.
|
||||
allOf:
|
||||
- $ref: "#/schemas/AssessmentRealResultCommon"
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- root
|
||||
root_attempt_id:
|
||||
type: "null"
|
||||
chain_deadline:
|
||||
type: "null"
|
||||
required:
|
||||
- kind
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentCorrectiveResult:
|
||||
description: >-
|
||||
Result of a corrective real assessment. Both chain fields are present
|
||||
and identify the same immutable correction chain.
|
||||
allOf:
|
||||
- $ref: "#/schemas/AssessmentRealResultCommon"
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- corrective
|
||||
root_attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
readOnly: true
|
||||
chain_deadline:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
readOnly: true
|
||||
required:
|
||||
- kind
|
||||
- root_attempt_id
|
||||
- chain_deadline
|
||||
AssessmentExpressResult:
|
||||
type: object
|
||||
description: >-
|
||||
Immutable educational result of a demo_express run. It includes a
|
||||
short summary but cannot report a category, percentile, uncertainty,
|
||||
grade, strength, or qualification evidence. The result belongs only
|
||||
to the training mode and does not consume a real-assessment quota.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- attempt_id
|
||||
- specialization
|
||||
- target_grade
|
||||
- task_language
|
||||
- kind
|
||||
- mode
|
||||
- versions
|
||||
- outcome
|
||||
- not_determined_reason
|
||||
- confirmed_grade
|
||||
- previous_confirmed_grade
|
||||
- strength
|
||||
- calibration_status
|
||||
- limitations
|
||||
- uncertainty
|
||||
- basic_score
|
||||
- practices
|
||||
- gaps
|
||||
- durations
|
||||
- next_steps
|
||||
- summary
|
||||
- decided_at
|
||||
properties:
|
||||
attempt_id:
|
||||
type: string
|
||||
format: uuid
|
||||
specialization:
|
||||
type: "null"
|
||||
description: Express training does not assess a specialization.
|
||||
target_grade:
|
||||
type: "null"
|
||||
description: Express training does not assess a target grade.
|
||||
task_language:
|
||||
type: "null"
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
mode:
|
||||
type: string
|
||||
enum:
|
||||
- demo_express
|
||||
versions:
|
||||
$ref: "#/schemas/AssessmentVersions"
|
||||
outcome:
|
||||
type: string
|
||||
enum:
|
||||
- demonstration
|
||||
not_determined_reason:
|
||||
type: "null"
|
||||
confirmed_grade:
|
||||
type: "null"
|
||||
description: Express training never confirms a grade.
|
||||
previous_confirmed_grade:
|
||||
type: "null"
|
||||
strength:
|
||||
type: "null"
|
||||
calibration_status:
|
||||
type: string
|
||||
enum:
|
||||
- uncalibrated
|
||||
limitations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 1
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- demonstration_only
|
||||
uncertainty:
|
||||
type: "null"
|
||||
description: Express training computes no ability estimate or percentile.
|
||||
basic_score:
|
||||
type: "null"
|
||||
practices:
|
||||
type: array
|
||||
maxItems: 0
|
||||
items:
|
||||
$ref: "#/schemas/AssessmentPracticeResult"
|
||||
gaps:
|
||||
type: array
|
||||
maxItems: 0
|
||||
items:
|
||||
$ref: "#/schemas/AssessmentGap"
|
||||
durations:
|
||||
$ref: "#/schemas/AssessmentDurations"
|
||||
next_steps:
|
||||
type: array
|
||||
maxItems: 0
|
||||
items:
|
||||
$ref: "#/schemas/AssessmentNextStep"
|
||||
summary:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 2000
|
||||
description: Short educational feedback about this training run.
|
||||
decided_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
AssessmentGradeAvailabilityStatus:
|
||||
type: string
|
||||
description: |-
|
||||
@@ -1247,10 +1660,11 @@ schemas:
|
||||
$ref: "#/schemas/AssessmentGradeAvailabilityStatus"
|
||||
mode:
|
||||
description: >-
|
||||
Mode that an attempt would use, or null when the status is
|
||||
`insufficient_bank`.
|
||||
Real-assessment mode that the server would use, or null when the
|
||||
status is `insufficient_bank`. `demo_express` is not a category
|
||||
assessment and is never returned here.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/AssessmentMode"
|
||||
- $ref: "#/schemas/AssessmentRealMode"
|
||||
- type: "null"
|
||||
available_at:
|
||||
description: When the status is `cooldown`, the first time the attempt can start; otherwise null.
|
||||
|
||||
+892
-227
File diff suppressed because it is too large.
Load diff
@@ -105,6 +105,8 @@ paths:
|
||||
$ref: ./routes/candidate_assessment_attempts.yml
|
||||
/api/v1/me/assessment-attempts/{attempt_id}:
|
||||
$ref: ./routes/candidate_assessment_attempt.yml
|
||||
/api/v1/me/assessment-attempts/{attempt_id}/sessions:
|
||||
$ref: ./routes/candidate_assessment_attempt_sessions.yml
|
||||
/api/v1/me/assessment-attempts/{attempt_id}/answers:
|
||||
$ref: ./routes/candidate_assessment_attempt_answers.yml
|
||||
/api/v1/me/assessment-attempts/{attempt_id}/finalize:
|
||||
@@ -353,6 +355,8 @@ components:
|
||||
$ref: ./components/schemas.yml#/AssessmentSessions
|
||||
AssessmentAttemptCreate:
|
||||
$ref: ./components/schemas.yml#/AssessmentAttemptCreate
|
||||
AssessmentAttemptSessionStart:
|
||||
$ref: ./components/schemas.yml#/AssessmentAttemptSessionStart
|
||||
AssessmentItemId:
|
||||
$ref: ./components/schemas.yml#/AssessmentItemId
|
||||
AssessmentOptionId:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
get:
|
||||
operationId: GetMyAssessmentAttempt
|
||||
summary: Read or resume an assessment attempt of the current candidate.
|
||||
summary: Read an assessment attempt of the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account. Returns the attempt with its state, fixed versions, time and session limits, progress, the item to answer now, and the practices. A reload, a retried request, or a new session returns the same item instance with the same text and option order; a lost connection never creates a new attempt. The response never says whether an earlier answer was correct and never contains answer keys, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.
|
||||
Requires the session cookie of a candidate account. Returns the stored attempt projection with its state, fixed versions, time and session limits, progress, the item to answer now, and the practices. This GET is read-only: it never starts or resumes a work session, consumes session quota, advances the version, or commits expiry or finalization. A reload, a retried request, or a new session returns the same item instance with the same text and option order; a lost connection never creates a new attempt. After `idle_timeout_seconds`, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. The response never says whether an earlier answer was correct and never contains answer keys, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.
|
||||
|
||||
Reading an active attempt counts as activity: after the previous session ended it starts the next session, and when that would exceed the session limit it starts none and the attempt becomes `expired`. Before it answers, the server commits any transition that is due, with a new version: past `expires_at`, `ready_to_finalize` becomes `completed`, an unsubmitted additional practice is declined and the attempt becomes `completed`, and the other active states become `expired`; a practice still `pending` is graded first. The client polls this operation while a practice is `pending`. Reading a terminal attempt changes nothing.
|
||||
When the deadline passes, this read still returns the stored state and deadline. A command or background transition commits the due outcome; if the stored state is still active, GetMyAssessmentResult answers 409 until that transition is committed. The client polls this operation while a practice is `pending`, but polling alone never changes attempt state.
|
||||
|
||||
The attempt must belong to the candidate of the session: an attempt of another candidate answers 404 not_found, the same as an unknown identifier, so identifiers cannot be probed. An employer account answers 403 forbidden; no operation gives an employer the answers or the attempt history.
|
||||
The attempt must belong to the candidate of the session: an attempt of another candidate answers 404 not_found, the same as an unknown identifier, so identifiers cannot be probed. An employer account answers 403 forbidden; no operation gives an employer the answers, qualification evidence, or attempt history.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
|
||||
@@ -6,6 +6,8 @@ post:
|
||||
|
||||
The response is the attempt with the next item to answer. It never says whether the answer was correct. Items are answered in order and each answer is final.
|
||||
|
||||
A work command requires an active session. After `idle_timeout_seconds` of inactivity, the candidate calls StartMyAssessmentAttemptSession to explicitly start or resume a session; this answer command never starts one or consumes session quota. Reading the attempt or result is always read-only. A command that finds a due deadline transition may commit it before returning; a command that finds an expired idle session answers 409 until the candidate explicitly starts the next session.
|
||||
|
||||
Practice: an answer with format `practice` submits the solution of the main or the additional practice. It is stored, and the sandbox runs it asynchronously against the hidden check groups; the response shows the practice `pending`, and the client polls GetMyAssessmentAttempt for the verdict. Only the score 0-3 and the pass state of each group are shown, never the checks, error output, or seeds. Every outcome caused by the solution, such as a compilation error, a crash, or a time or memory limit, is a `finished` verdict. A `failed` verdict means only that the sandbox infrastructure could not run it; it consumes nothing. After `finished` the practice accepts no other solution, so hidden group results cannot be used to tune it. Debug runs of the candidate's own tests and the public examples are unlimited apart from the sandbox rate limit and never show hidden group results; they are planned as a separate operation.
|
||||
|
||||
Repeats and conflicts, per item:
|
||||
@@ -16,7 +18,7 @@ post:
|
||||
|
||||
Optimistic concurrency: `expected_version` must equal the current attempt version, otherwise the server answers 412 version_conflict and stores nothing; the client reads the attempt again. 412 is the repository status for a stale version, also used by SaveMyQuestionnaire; 409 state_conflict is kept for commands that the attempt state does not allow at the current 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 for an unknown attempt or one of another candidate; the server first commits any due transition such as expiry, and the request counts as activity for the session limit), the repeat of the stored answer (200, skipped for a practice whose latest verdict is `failed`), the version (412), the state (409 state_conflict: the attempt is terminal, the item is not current, the item has a different answer, or the practice verdict is pending or finished), then the answer against the item (400 with a pointer such as `/answer/format` or `/answer/option_ids/0`). Following the Idempotency-Key convention, 404 and 409 state_conflict are stored under the key and replayed; 400, 412, 429, and 5xx are not. The rate limit can answer 429 with Retry-After before any check.
|
||||
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 for an unknown attempt or one of another candidate; a due deadline transition may be committed, but this request never starts a work session), the repeat of the stored answer (200, skipped for a practice whose latest verdict is `failed`), the version (412), the state (409 state_conflict: the attempt is terminal, the work session ended, the item is not current, the item has a different answer, or the practice verdict is pending or finished), then the answer against the item (400 with a pointer such as `/answer/format` or `/answer/option_ids/0`). Following the Idempotency-Key convention, 404 and 409 state_conflict are stored under the key and replayed; 400, 412, 429, and 5xx are not. The rate limit can answer 429 with Retry-After before any check.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
|
||||
@@ -4,16 +4,18 @@ post:
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. Finalize always answers with the attempt, never with the result: the decision may continue the attempt, and one response type keeps that unambiguous for every generated client. When the returned state is `completed`, the client reads the result with GetMyAssessmentResult.
|
||||
|
||||
Finalize is a work command and requires an active session. After `idle_timeout_seconds` of inactivity, the candidate first calls StartMyAssessmentAttemptSession with the latest `expected_version`; finalize never starts a session. GET attempt and result operations do not change state. A command or background transition may commit a due deadline outcome.
|
||||
|
||||
Allowed in `ready_to_finalize`, where every required part is done, and in `additional_practice_pending` while the additional practice is `not_started` or `failed`. The server decides from the stored answers with the policy, bank, and algorithm versions fixed at creation:
|
||||
- `demo_basic` compares the raw score with the pass mark of the recorded basic grading policy and completes the attempt. It never offers an additional practice.
|
||||
- `adaptive` applies the probability bands of the recorded policy. Confirmation or rejection completes the attempt. A probability in the band below confirmation (0.50 to below 0.80 in the demo policy) on the first finalize, while time and sessions remain, completes nothing: the server appends an `additional` practice, moves the attempt to `additional_practice_pending`, and answers 200 with it. The additional practice continues the same attempt, keeps its limits, and spends no new attempt. The next finalize, after its verdict, decides with the added evidence; a probability still below confirmation gives `not_confirmed`. An attempt offers at most one additional practice.
|
||||
- Finalize in `additional_practice_pending` declines the offer and gives `not_confirmed` with the current evidence. A retry of the first finalize with a new key cannot decline by accident: it carries the version from before the offer and answers 412.
|
||||
|
||||
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, the server finalizes `ready_to_finalize` itself, without offering an additional practice, so a finalize after that also answers 200 with the `completed` attempt.
|
||||
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.
|
||||
|
||||
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, after any due transition), the repeat on a `completed` attempt (200), the version (412), then the state (409 state_conflict). 404 and 409 state_conflict are stored under the key; 400 and 412 are not.
|
||||
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:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
|
||||
@@ -2,11 +2,11 @@ get:
|
||||
operationId: GetMyAssessmentResult
|
||||
summary: Read the result of an assessment attempt of the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account. Returns the immutable result of a terminal attempt: `completed`, `expired`, or `insufficient_bank`. It records the mode, the policy, bank, and algorithm versions, the decision, the previously confirmed grade, the calibration status and limitations of the method, the uncertainty where the method computes it, the practice verdicts, the weak domains, the working time as a separate label, and the next steps that the server allows. A later policy, bank, or algorithm version never changes it.
|
||||
Requires the session cookie of a candidate account. Returns the immutable result of a terminal attempt: `completed`, `expired`, or `insufficient_bank`. A real result records the mode, policy, bank, and algorithm versions, decision, previously confirmed grade, calibration status and limitations, uncertainty where the method computes it, practice verdicts, weak domains, working time as a separate label, and allowed next steps. A corrective result also carries the root attempt and its immutable chain deadline. A `demo_express` result is a short educational summary only: it has no category, percentile, confirmed grade, score, uncertainty, or qualification evidence. A later policy, bank, or algorithm version never changes a result.
|
||||
|
||||
Fields that the method does not compute are null and never zero: a `demo_basic` result has null `uncertainty` and `strength`. The result never contains answers, per-item correctness, answer keys, seeds, hidden checks, or anti-cheat signals.
|
||||
|
||||
An active attempt answers 409 state_conflict; an attempt in `additional_practice_pending` is active and has no result yet. The server first commits any due transition, so an attempt past its limits is read as terminal. An attempt of another candidate answers 404 not_found, the same as an unknown identifier. An employer account answers 403 forbidden; employers see only the current category through a separate projection, never this result or the attempt history.
|
||||
An active attempt answers 409 state_conflict; an attempt in `additional_practice_pending` is active and has no result yet. This GET is read-only and never commits a due transition. If a deadline has passed but the due transition is not yet stored by a command or background worker, the attempt remains active for this read and answers 409; wait for the transition and retry. An attempt of another candidate answers 404 not_found, the same as an unknown identifier. An employer account answers 403 forbidden; employers see only the current category through a separate projection, never this result or the attempt history.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
@@ -32,6 +32,10 @@ get:
|
||||
$ref: ../components/examples.yml#/AssessmentNotConfirmedResult
|
||||
insufficient_bank:
|
||||
$ref: ../components/examples.yml#/AssessmentInsufficientBankResult
|
||||
corrective:
|
||||
$ref: ../components/examples.yml#/AssessmentCorrectiveResult
|
||||
demo_express:
|
||||
$ref: ../components/examples.yml#/AssessmentExpressResult
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
post:
|
||||
operationId: StartMyAssessmentAttemptSession
|
||||
summary: Start or resume a work session for the current candidate's attempt.
|
||||
description: |-
|
||||
Requires a candidate session, its CSRF token in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The body carries the attempt version the candidate last read. The server checks ownership, idempotency, and `expected_version` atomically before starting a session; a stale version answers 412 and consumes no session. Repeating the same key and body within 24 hours replays the stored response.
|
||||
|
||||
Creation starts session 1. After `idle_timeout_seconds` of inactivity, the candidate uses this command to start the next session. Calling it while a session is already active returns the current attempt without consuming another session or advancing its version. Starting a session advances the version once. The command cannot extend `expires_at` or `chain_deadline`.
|
||||
|
||||
If the attempt deadline or session budget has passed, this command commits the due terminal transition and returns the resulting attempt. A pending practice submitted before the limit is graded first. `GetMyAssessmentAttempt` and `GetMyAssessmentResult` remain read-only: they never start a session or commit a due transition. A background transition may persist a due outcome independently; after that, this command returns the stored terminal attempt without changing it.
|
||||
|
||||
The attempt must belong to the candidate of the session. An attempt of another candidate answers 404 not_found, the same as an unknown identifier. An employer account answers 403 forbidden; no operation gives an employer answers, qualification evidence, or attempt history.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- assessment
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/AssessmentAttemptId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/AssessmentAttemptSessionStart
|
||||
example:
|
||||
expected_version: 7
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The current attempt after starting or resuming work, or after a due
|
||||
terminal transition was committed. A replay returns the stored body.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/AssessmentAttempt
|
||||
examples:
|
||||
resumed:
|
||||
$ref: ../components/examples.yml#/AssessmentAttemptResumed
|
||||
terminal:
|
||||
$ref: ../components/examples.yml#/AssessmentAttemptCompleted
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/AssessmentCommandConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/AssessmentVersionConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -1,12 +1,12 @@
|
||||
post:
|
||||
operationId: CreateMyAssessmentAttempt
|
||||
summary: Start an assessment attempt for a category of the current candidate.
|
||||
summary: Start a real, corrective, or training assessment attempt.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The body names the category, a specialization of the questionnaire and a target grade, and the task language. The server picks the mode from the published bank, `demo_basic` or `adaptive`, and fixes the policy, bank, and algorithm versions, the time and session limits, and the item variants in one transaction; the client never sends a mode, a seed, or a version. Creation starts session 1. The self-assessed grade only chooses where the test starts and adds no points. An adaptive retest starts from the previous ability estimate of the specialization, adjusted for the time passed, so a new attempt adds evidence instead of starting the measurement over.
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The request is one of three disjoint shapes. A real assessment names a specialization, target grade, and task language; the server picks `demo_basic` or `adaptive` and fixes the policy, bank, and algorithm versions, limits, and item variants. A corrective real assessment also names `root_attempt_id`; the server verifies the lower-grade chain and reuses its fixed quota and deadline. The client never sends a real mode, a seed, a version, or a chain deadline. Explicit `demo_express` starts a separate interactive training run that lasts 3 to 5 minutes, has no category or target grade, and creates no qualification evidence or percentile. Creation starts session 1. The self-assessed grade only chooses where a real test starts and adds no points. An adaptive retest starts from the previous ability estimate of the specialization, adjusted for the time passed, so a new attempt adds evidence instead of starting the measurement over.
|
||||
|
||||
A specialization has at most one active attempt. A new attempt cannot start while one is active, during a retry or promotion interval or past the attempt limit of the policy, or when the bank is insufficient; each answers 409 state_conflict and creates nothing, not even a placeholder attempt. GetMyAssessmentAvailability tells which case applies and when a blocked attempt opens. After a failure, including the first test, a lower grade can be tested at once. An attempt that ends as `expired` or with the reason `practice_incomplete` counts toward the attempt limit and starts the same-grade retry interval; one that ends as `insufficient_bank` or with the reason `sandbox_unavailable` counts toward neither.
|
||||
A specialization has at most one active real attempt. A new root attempt cannot start while one is active, during a retry or promotion interval, past the root quota, or when the bank is insufficient; each such preflight refusal answers 409 state_conflict and creates nothing or consumes no root slot. Starting a root attempt reserves one slot in the root quota. A corrective attempt must reference its root, target a strictly lower grade not already attempted in that chain, and remain inside the root's fixed quota and deadline (72 hours from the root start in the current policy). It gets its own item, practice, and session limits, but spends no additional root slot and cannot reset the chain deadline or any 30/90-day timer. After a failure, including the first test, a lower grade can be tested at once. An expired or incomplete attempt does not create a free new chain; an insufficient bank or sandbox failure does not grant another root slot. `demo_express` is outside real-assessment availability, quotas, retry intervals, and qualification history.
|
||||
|
||||
The limits are server-side: `expires_at` and `sessions` come from the policy version, the client clock never extends them, and after them the attempt accepts no command. Within them the attempt is also bounded by the item limit of the policy.
|
||||
The limits are server-side: `expires_at` and `sessions` come from the policy version, the client clock never extends them, and after them the attempt accepts no work command. For a corrective attempt, `expires_at` is no later than the root's immutable `chain_deadline`. Within these limits the attempt is also bounded by the item limit of its policy.
|
||||
|
||||
Idempotency: a retry with the same key and body within 24 hours replays the stored 201 or 409 state_conflict response and creates nothing, so a lost response never creates a second attempt. A different body with the same key answers 422 idempotency_key_reused. 400 is never stored, so a corrected retry is evaluated again.
|
||||
|
||||
@@ -27,6 +27,18 @@ post:
|
||||
examples:
|
||||
backend_junior_go:
|
||||
$ref: ../components/examples.yml#/AssessmentAttemptCreateBackendJunior
|
||||
corrective_backend_junior_go:
|
||||
summary: Start a lower-grade assessment inside an existing correction chain
|
||||
value:
|
||||
kind: corrective
|
||||
specialization: backend
|
||||
target_grade: junior
|
||||
task_language: go
|
||||
root_attempt_id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
|
||||
demo_express:
|
||||
summary: Start a short educational training run
|
||||
value:
|
||||
kind: demo_express
|
||||
responses:
|
||||
"201":
|
||||
description: >-
|
||||
@@ -42,6 +54,10 @@ post:
|
||||
examples:
|
||||
demo_basic_created:
|
||||
$ref: ../components/examples.yml#/AssessmentAttemptCreated
|
||||
corrective_created:
|
||||
$ref: ../components/examples.yml#/AssessmentCorrectiveAttemptCreated
|
||||
demo_express_created:
|
||||
$ref: ../components/examples.yml#/AssessmentExpressAttemptCreated
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/AssessmentAttemptCreateValidationFailed
|
||||
"401":
|
||||
|
||||
@@ -3,3 +3,4 @@ extends:
|
||||
rules:
|
||||
info-license: off
|
||||
operation-4xx-response: off
|
||||
no-invalid-media-type-examples: error
|
||||
Reference in new issue
Block a user