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
@@ -8,165 +8,350 @@ import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const assessmentAttemptVersionsBankVersionMax = 64;
|
||||
export const assessmentAttemptOneOneVersionsBankVersionMax = 64;
|
||||
|
||||
|
||||
export const assessmentAttemptVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptVersionsAlgorithmVersionMax = 64;
|
||||
export const assessmentAttemptOneOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptOneOneVersionsAlgorithmVersionMax = 64;
|
||||
|
||||
|
||||
export const assessmentAttemptVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptSessionsOneUsedMax = 10;
|
||||
export const assessmentAttemptOneOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptOneOneSessionsOneUsedMax = 10;
|
||||
|
||||
export const assessmentAttemptSessionsOneMaxMax = 10;
|
||||
export const assessmentAttemptOneOneSessionsOneMaxMax = 10;
|
||||
|
||||
export const assessmentAttemptSessionsOneIdleTimeoutSecondsMin = 60;
|
||||
export const assessmentAttemptSessionsOneIdleTimeoutSecondsMax = 86400;
|
||||
export const assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMin = 60;
|
||||
export const assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMax = 86400;
|
||||
|
||||
export const assessmentAttemptProgressAnsweredItemsMin = 0;
|
||||
export const assessmentAttemptProgressAnsweredItemsMax = 100;
|
||||
export const assessmentAttemptOneOneProgressAnsweredItemsMin = 0;
|
||||
export const assessmentAttemptOneOneProgressAnsweredItemsMax = 100;
|
||||
|
||||
export const assessmentAttemptProgressMaxItemsMax = 100;
|
||||
export const assessmentAttemptOneOneProgressMaxItemsMax = 100;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneSequenceMax = 100;
|
||||
export const assessmentAttemptOneOneCurrentItemOneSequenceMax = 100;
|
||||
|
||||
export const assessmentAttemptCurrentItemOnePromptMax = 20000;
|
||||
export const assessmentAttemptOneOneCurrentItemOnePromptMax = 20000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentOneOptionsItemIdMax = 32;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentOneOptionsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptCurrentItemOneContentOneOptionsItemTextMax = 2000;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemTextMax = 2000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentOneOptionsMin = 2;
|
||||
export const assessmentAttemptCurrentItemOneContentOneOptionsMax = 10;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsMin = 2;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsMax = 10;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentTwoUnitMax = 32;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentTwoUnitMax = 32;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentThreeMaxLengthMax = 500;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentThreeMaxLengthMax = 500;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFourElementsItemIdMax = 32;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFourElementsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptCurrentItemOneContentFourElementsItemTextMax = 2000;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsItemTextMax = 2000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFourElementsMin = 2;
|
||||
export const assessmentAttemptCurrentItemOneContentFourElementsMax = 20;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsMin = 2;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsMax = 20;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFiveSyntaxMax = 32;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFiveSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptCurrentItemOneContentFiveLinesItemNumberMax = 500;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemNumberMax = 500;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFiveLinesItemTextMax = 1000;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemTextMax = 1000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFiveLinesMax = 500;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFiveLinesMax = 500;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentFiveMaxSelectionsMax = 10;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentFiveMaxSelectionsMax = 10;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSixSyntaxMax = 32;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSixSyntaxMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSixSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptCurrentItemOneContentSixInitialConfigMax = 20000;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSixSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSixInitialConfigMax = 20000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSixMaxLengthMax = 20000;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSixMaxLengthMax = 20000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSevenLanguagesMax = 2;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSevenLanguagesMax = 2;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSevenPublicExamplesItemInputMax = 10000;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemInputMax = 10000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax = 10000;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax = 10000;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSevenPublicExamplesMax = 10;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesMax = 10;
|
||||
|
||||
export const assessmentAttemptCurrentItemOneContentSevenMaxSourceLengthMax = 65536;
|
||||
export const assessmentAttemptOneOneCurrentItemOneContentSevenMaxSourceLengthMax = 65536;
|
||||
|
||||
export const assessmentAttemptPracticesItemVerdictOneScoreMin = 0;
|
||||
export const assessmentAttemptPracticesItemVerdictOneScoreMax = 3;
|
||||
export const assessmentAttemptOneOnePracticesItemVerdictOneScoreMin = 0;
|
||||
export const assessmentAttemptOneOnePracticesItemVerdictOneScoreMax = 3;
|
||||
|
||||
export const assessmentAttemptPracticesItemVerdictOneMaxScoreMin = 3;
|
||||
export const assessmentAttemptPracticesItemVerdictOneMaxScoreMax = 3;
|
||||
export const assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMin = 3;
|
||||
export const assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMax = 3;
|
||||
|
||||
export const assessmentAttemptPracticesItemVerdictOneGroupsItemGroupMax = 3;
|
||||
export const assessmentAttemptOneOnePracticesItemVerdictOneGroupsItemGroupMax = 3;
|
||||
|
||||
export const assessmentAttemptPracticesItemVerdictOneGroupsMin = 3;
|
||||
export const assessmentAttemptPracticesItemVerdictOneGroupsMax = 3;
|
||||
export const assessmentAttemptOneOnePracticesItemVerdictOneGroupsMin = 3;
|
||||
export const assessmentAttemptOneOnePracticesItemVerdictOneGroupsMax = 3;
|
||||
|
||||
export const assessmentAttemptPracticesMax = 5;
|
||||
export const assessmentAttemptOneOnePracticesMax = 5;
|
||||
|
||||
|
||||
export const AssessmentAttempt = zod.object({
|
||||
|
||||
export const assessmentAttemptTwoOneVersionsBankVersionMax = 64;
|
||||
|
||||
|
||||
export const assessmentAttemptTwoOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptTwoOneVersionsAlgorithmVersionMax = 64;
|
||||
|
||||
|
||||
export const assessmentAttemptTwoOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptTwoOneSessionsOneUsedMax = 10;
|
||||
|
||||
export const assessmentAttemptTwoOneSessionsOneMaxMax = 10;
|
||||
|
||||
export const assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMin = 60;
|
||||
export const assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMax = 86400;
|
||||
|
||||
export const assessmentAttemptTwoOneProgressAnsweredItemsMin = 0;
|
||||
export const assessmentAttemptTwoOneProgressAnsweredItemsMax = 100;
|
||||
|
||||
export const assessmentAttemptTwoOneProgressMaxItemsMax = 100;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneSequenceMax = 100;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOnePromptMax = 20000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemTextMax = 2000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMin = 2;
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMax = 10;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentTwoUnitMax = 32;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentThreeMaxLengthMax = 500;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemTextMax = 2000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsMin = 2;
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsMax = 20;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemNumberMax = 500;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemTextMax = 1000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFiveLinesMax = 500;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentFiveMaxSelectionsMax = 10;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSixInitialConfigMax = 20000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSixMaxLengthMax = 20000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSevenLanguagesMax = 2;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemInputMax = 10000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax = 10000;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesMax = 10;
|
||||
|
||||
export const assessmentAttemptTwoOneCurrentItemOneContentSevenMaxSourceLengthMax = 65536;
|
||||
|
||||
export const assessmentAttemptTwoOnePracticesItemVerdictOneScoreMin = 0;
|
||||
export const assessmentAttemptTwoOnePracticesItemVerdictOneScoreMax = 3;
|
||||
|
||||
export const assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMin = 3;
|
||||
export const assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMax = 3;
|
||||
|
||||
export const assessmentAttemptTwoOnePracticesItemVerdictOneGroupsItemGroupMax = 3;
|
||||
|
||||
export const assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMin = 3;
|
||||
export const assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMax = 3;
|
||||
|
||||
export const assessmentAttemptTwoOnePracticesMax = 5;
|
||||
|
||||
|
||||
|
||||
export const assessmentAttemptThreeOneVersionsBankVersionMax = 64;
|
||||
|
||||
|
||||
export const assessmentAttemptThreeOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptThreeOneVersionsAlgorithmVersionMax = 64;
|
||||
|
||||
|
||||
export const assessmentAttemptThreeOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const assessmentAttemptThreeOneSessionsOneUsedMax = 10;
|
||||
|
||||
export const assessmentAttemptThreeOneSessionsOneMaxMax = 10;
|
||||
|
||||
export const assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMin = 60;
|
||||
export const assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMax = 86400;
|
||||
|
||||
export const assessmentAttemptThreeOneProgressAnsweredItemsMin = 0;
|
||||
export const assessmentAttemptThreeOneProgressAnsweredItemsMax = 100;
|
||||
|
||||
export const assessmentAttemptThreeOneProgressMaxItemsMax = 100;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneSequenceMax = 100;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOnePromptMax = 20000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemTextMax = 2000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMin = 2;
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMax = 10;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentTwoUnitMax = 32;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentThreeMaxLengthMax = 500;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemTextMax = 2000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsMin = 2;
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsMax = 20;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemNumberMax = 500;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemTextMax = 1000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFiveLinesMax = 500;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentFiveMaxSelectionsMax = 10;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxMax = 32;
|
||||
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSixInitialConfigMax = 20000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSixMaxLengthMax = 20000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSevenLanguagesMax = 2;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemInputMax = 10000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax = 10000;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesMax = 10;
|
||||
|
||||
export const assessmentAttemptThreeOneCurrentItemOneContentSevenMaxSourceLengthMax = 65536;
|
||||
|
||||
export const assessmentAttemptThreeOnePracticesItemVerdictOneScoreMin = 0;
|
||||
export const assessmentAttemptThreeOnePracticesItemVerdictOneScoreMax = 3;
|
||||
|
||||
export const assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMin = 3;
|
||||
export const assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMax = 3;
|
||||
|
||||
export const assessmentAttemptThreeOnePracticesItemVerdictOneGroupsItemGroupMax = 3;
|
||||
|
||||
export const assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMin = 3;
|
||||
export const assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMax = 3;
|
||||
|
||||
export const assessmentAttemptThreeOnePracticesMax = 5;
|
||||
|
||||
|
||||
export const AssessmentAttempt = zod.union([zod.object({
|
||||
"id": zod.uuid().describe('Attempt identifier.'),
|
||||
"version": zod.int().min(1).describe('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`.'),
|
||||
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
|
||||
"target_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
|
||||
"task_language": zod.union([zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.'),zod.null()]).describe('Task language of the attempt, or null when the bank offers no choice.'),
|
||||
"mode": zod.enum(['demo_basic', 'adaptive']).describe('Measurement method of an attempt. The server selects it from the published task bank of the category; the client never chooses it.\n\n- 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.\n- 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.\n\nAdding a value is a contract change.'),
|
||||
"state": zod.enum(['in_progress', 'practice_pending', 'additional_practice_pending', 'ready_to_finalize', 'completed', 'expired', 'insufficient_bank']).describe('Lifecycle state of an attempt and the commands it accepts.\n\n- in_progress: items are being answered; `current_item` is the item to answer. Accepts SubmitMyAssessmentAnswer for that item.\n- practice_pending: the item part is finished, and the main practice has no finished verdict yet: it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished, even when the adaptive stop rule has already ended the item part.\n- additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade in the band below confirmation, so the attempt offers one additional practice without spending a new attempt; it keeps the time and session limits of the attempt. Accepts SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and decides `not_confirmed` with the current evidence.\n- ready_to_finalize: every required part is done, including a submitted additional practice with a finished verdict. Accepts FinalizeMyAssessmentAttempt.\n- completed: a decision was made; the result is available.\n- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.\n- 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.\n\nWhen `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.'),
|
||||
"version": zod.int().min(1).describe('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`.'),
|
||||
"specialization": zod.union([zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
|
||||
"target_grade": zod.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
|
||||
"task_language": zod.union([zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.'),zod.null()]).describe('Task language of the attempt, or null when none is selected.'),
|
||||
"kind": zod.enum(['root', 'corrective', 'demo_express']).describe('Assessment track that distinguishes root, corrective, and training attempts.'),
|
||||
"root_attempt_id": zod.union([zod.uuid(),zod.null()]).describe('Present only for a corrective real assessment. It identifies the root attempt whose quota and chain deadline this attempt shares.'),
|
||||
"chain_deadline": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('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.'),
|
||||
"mode": zod.enum(['demo_basic', 'demo_express', 'adaptive']).describe('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.\n\n- 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.\n- 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.\n- 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.\n\nAdding a value is a contract change.'),
|
||||
"state": zod.enum(['in_progress', 'practice_pending', 'additional_practice_pending', 'ready_to_finalize', 'completed', 'expired', 'insufficient_bank']).describe('Lifecycle state of an attempt and the commands it accepts.\n\n- in_progress: items are being answered; `current_item` is the item to answer. Accepts SubmitMyAssessmentAnswer for that item.\n- practice_pending: the item part is finished, and the main practice has no finished verdict yet: it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished, even when the adaptive stop rule has already ended the item part.\n- additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade in the band below confirmation, so the attempt offers one additional practice without spending a new attempt; it keeps the time and session limits of the attempt. Accepts SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and decides `not_confirmed` with the current evidence.\n- ready_to_finalize: every required part is done, including a submitted additional practice with a finished verdict. Accepts FinalizeMyAssessmentAttempt.\n- completed: a decision was made; the result is available.\n- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.\n- 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.\n\nWhen `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.'),
|
||||
"versions": zod.object({
|
||||
"policy_version": zod.int().min(1).describe('Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item limits, time and session limits, and retry intervals.'),
|
||||
"bank_version": zod.string().min(1).max(assessmentAttemptVersionsBankVersionMax).regex(assessmentAttemptVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
|
||||
"algorithm_version": zod.string().min(1).max(assessmentAttemptVersionsAlgorithmVersionMax).regex(assessmentAttemptVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
|
||||
"bank_version": zod.string().min(1).max(assessmentAttemptOneOneVersionsBankVersionMax).regex(assessmentAttemptOneOneVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
|
||||
"algorithm_version": zod.string().min(1).max(assessmentAttemptOneOneVersionsAlgorithmVersionMax).regex(assessmentAttemptOneOneVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
|
||||
}).describe('Versions fixed when the attempt was created. They never change during the attempt, and a result is always reproduced from the stored answers with these versions; a later policy, bank, or algorithm version does not rewrite it.'),
|
||||
"started_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
|
||||
"expires_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
|
||||
"expires_at": zod.iso.datetime({"offset":true}).describe('Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective assessment it does not exceed chain_deadline.'),
|
||||
"sessions": zod.union([zod.object({
|
||||
"used": zod.int().min(1).max(assessmentAttemptSessionsOneUsedMax).describe('Sessions started so far, including the current one.'),
|
||||
"max": zod.int().min(1).max(assessmentAttemptSessionsOneMaxMax),
|
||||
"idle_timeout_seconds": zod.int().min(assessmentAttemptSessionsOneIdleTimeoutSecondsMin).max(assessmentAttemptSessionsOneIdleTimeoutSecondsMax).describe('Inactivity after which the current session ends.')
|
||||
}).describe('Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.\n\nA 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.'),zod.null()]).describe('Session limit of the attempt, or null when its policy version defines none.'),
|
||||
"used": zod.int().min(1).max(assessmentAttemptOneOneSessionsOneUsedMax).describe('Sessions started so far, including the current one.'),
|
||||
"max": zod.int().min(1).max(assessmentAttemptOneOneSessionsOneMaxMax),
|
||||
"idle_timeout_seconds": zod.int().min(assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMin).max(assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMax).describe('Inactivity after which the current session ends.')
|
||||
}).describe('Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.\n\nSession 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.'),zod.null()]).describe('Session limit of the attempt, or null when its policy defines none.'),
|
||||
"finished_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time the attempt reached a terminal state, or null while it is active.'),
|
||||
"progress": zod.object({
|
||||
"answered_items": zod.int().min(assessmentAttemptProgressAnsweredItemsMin).max(assessmentAttemptProgressAnsweredItemsMax),
|
||||
"max_items": zod.int().min(1).max(assessmentAttemptProgressMaxItemsMax).describe('Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items together in adaptive.')
|
||||
"answered_items": zod.int().min(assessmentAttemptOneOneProgressAnsweredItemsMin).max(assessmentAttemptOneOneProgressAnsweredItemsMax),
|
||||
"max_items": zod.int().min(1).max(assessmentAttemptOneOneProgressMaxItemsMax).describe('Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items together in adaptive.')
|
||||
}).describe('Progress of the item part. It counts seed items like scored ones, so it does not reveal which items are scored. An adaptive attempt may end its item part before `max_items` by its stop rule. A finalize refused as premature does not list the unfinished parts; the client reads them here, in `current_item`, and in `practices`.'),
|
||||
"current_item": zod.union([zod.object({
|
||||
"id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
|
||||
"sequence": zod.int().min(1).max(assessmentAttemptCurrentItemOneSequenceMax).describe('Position of the item in the attempt, from 1.'),
|
||||
"prompt": zod.string().min(1).max(assessmentAttemptCurrentItemOnePromptMax).describe('Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.'),
|
||||
"sequence": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneSequenceMax).describe('Position of the item in the attempt, from 1.'),
|
||||
"prompt": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOnePromptMax).describe('Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.'),
|
||||
"content": zod.union([zod.object({
|
||||
"format": zod.enum(['choice']),
|
||||
"options": zod.array(zod.object({
|
||||
"id": zod.string().min(1).max(assessmentAttemptCurrentItemOneContentOneOptionsItemIdMax).regex(assessmentAttemptCurrentItemOneContentOneOptionsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptCurrentItemOneContentOneOptionsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptCurrentItemOneContentOneOptionsMin).max(assessmentAttemptCurrentItemOneContentOneOptionsMax).describe('Options in the order of this instance.'),
|
||||
"id": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdMax).regex(assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptOneOneCurrentItemOneContentOneOptionsMin).max(assessmentAttemptOneOneCurrentItemOneContentOneOptionsMax).describe('Options in the order of this instance.'),
|
||||
"multiple": zod.boolean().describe('Whether more than one option may be selected. It is a property of the task family, fixed for every variant, and never derived from the key: a multiple-choice variant may have a single correct option.')
|
||||
}).describe('Choose one option, or several when `multiple` is true. The content never says which options are correct or how many are.'),zod.object({
|
||||
"format": zod.enum(['number']),
|
||||
"unit": zod.string().min(1).max(assessmentAttemptCurrentItemOneContentTwoUnitMax).nullable().describe('Unit of the expected value, for example `ms`, or null.')
|
||||
"unit": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentTwoUnitMax).nullable().describe('Unit of the expected value, for example `ms`, or null.')
|
||||
}).describe('Enter a number, optionally in the given unit.'),zod.object({
|
||||
"format": zod.enum(['string']),
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptCurrentItemOneContentThreeMaxLengthMax).describe('Maximum length of the answer in characters. It is an input limit of the task family, never derived from the key, so it does not reveal the length of the correct answer.')
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentThreeMaxLengthMax).describe('Maximum length of the answer in characters. It is an input limit of the task family, never derived from the key, so it does not reveal the length of the correct answer.')
|
||||
}).describe('Enter a short string, such as a command, a header name, or an address.'),zod.object({
|
||||
"format": zod.enum(['order']),
|
||||
"elements": zod.array(zod.object({
|
||||
"id": zod.string().min(1).max(assessmentAttemptCurrentItemOneContentFourElementsItemIdMax).regex(assessmentAttemptCurrentItemOneContentFourElementsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptCurrentItemOneContentFourElementsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptCurrentItemOneContentFourElementsMin).max(assessmentAttemptCurrentItemOneContentFourElementsMax)
|
||||
"id": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdMax).regex(assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFourElementsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptOneOneCurrentItemOneContentFourElementsMin).max(assessmentAttemptOneOneCurrentItemOneContentFourElementsMax)
|
||||
}).describe('Put every element into the right order. The elements arrive in the order of this instance, which is never the answer.'),zod.object({
|
||||
"format": zod.enum(['find_error']),
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptCurrentItemOneContentFiveSyntaxMax).regex(assessmentAttemptCurrentItemOneContentFiveSyntaxRegExp).nullable().describe('Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.'),
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxMax).regex(assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxRegExp).nullable().describe('Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.'),
|
||||
"lines": zod.array(zod.object({
|
||||
"number": zod.int().min(1).max(assessmentAttemptCurrentItemOneContentFiveLinesItemNumberMax),
|
||||
"text": zod.string().max(assessmentAttemptCurrentItemOneContentFiveLinesItemTextMax)
|
||||
}).describe('One numbered line of a code or configuration fragment. Plain text.')).min(1).max(assessmentAttemptCurrentItemOneContentFiveLinesMax).describe('Lines numbered from 1 in order.'),
|
||||
"max_selections": zod.int().min(1).max(assessmentAttemptCurrentItemOneContentFiveMaxSelectionsMax).describe('Maximum number of lines the answer may select. It is a limit of the task family, fixed for every variant and never derived from the key; it is not the number of wrong lines.')
|
||||
"number": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemNumberMax),
|
||||
"text": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemTextMax)
|
||||
}).describe('One numbered line of a code or configuration fragment. Plain text.')).min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveLinesMax).describe('Lines numbered from 1 in order.'),
|
||||
"max_selections": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveMaxSelectionsMax).describe('Maximum number of lines the answer may select. It is a limit of the task family, fixed for every variant and never derived from the key; it is not the number of wrong lines.')
|
||||
}).describe('Find the lines with the error in a code or configuration fragment and select up to `max_selections` line numbers.'),zod.object({
|
||||
"format": zod.enum(['configuration']),
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptCurrentItemOneContentSixSyntaxMax).regex(assessmentAttemptCurrentItemOneContentSixSyntaxRegExp).describe('Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.'),
|
||||
"initial_config": zod.string().max(assessmentAttemptCurrentItemOneContentSixInitialConfigMax).describe('Starting text to edit; empty when the candidate writes it from scratch.'),
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptCurrentItemOneContentSixMaxLengthMax).describe('Maximum length of the submitted configuration in characters, an input limit of the task family that is never derived from the key.')
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentSixSyntaxMax).regex(assessmentAttemptOneOneCurrentItemOneContentSixSyntaxRegExp).describe('Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.'),
|
||||
"initial_config": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentSixInitialConfigMax).describe('Starting text to edit; empty when the candidate writes it from scratch.'),
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentSixMaxLengthMax).describe('Maximum length of the submitted configuration in characters, an input limit of the task family that is never derived from the key.')
|
||||
}).describe('Write or fix a configuration. The server checks the submitted text with the computed key or reference check of the task family; it never executes it as code.'),zod.object({
|
||||
"format": zod.enum(['practice']),
|
||||
"languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(assessmentAttemptCurrentItemOneContentSevenLanguagesMax).describe('Languages the solution may use. Empty when the task does not offer a choice; the submission then sends a null language.'),
|
||||
"languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(assessmentAttemptOneOneCurrentItemOneContentSevenLanguagesMax).describe('Languages the solution may use. Empty when the task does not offer a choice; the submission then sends a null language.'),
|
||||
"public_examples": zod.array(zod.object({
|
||||
"input": zod.string().max(assessmentAttemptCurrentItemOneContentSevenPublicExamplesItemInputMax),
|
||||
"expected_output": zod.string().max(assessmentAttemptCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax)
|
||||
}).describe('Public example of the practice task: an input and its expected output. Hidden checks are never listed.')).max(assessmentAttemptCurrentItemOneContentSevenPublicExamplesMax),
|
||||
"max_source_length": zod.int().min(1).max(assessmentAttemptCurrentItemOneContentSevenMaxSourceLengthMax).describe('Maximum length of the solution source in characters.')
|
||||
"input": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemInputMax),
|
||||
"expected_output": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax)
|
||||
}).describe('Public example of the practice task: an input and its expected output. Hidden checks are never listed.')).max(assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesMax),
|
||||
"max_source_length": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentSevenMaxSourceLengthMax).describe('Maximum length of the solution source in characters.')
|
||||
}).describe('Code practice. The candidate submits one final solution, which runs in the isolated sandbox against three groups of hidden checks. The content lists only the statement, the allowed languages, and public examples; hidden checks, their inputs, and seeds never reach the client.')]).describe('Format-specific part of an item, selected by `format`. It holds only what the candidate needs to answer: never an answer key, a correct option, a score, a family or variant identifier, a seed, or a hidden check. Limits such as `multiple`, `max_selections`, and `max_length` belong to the format or the task family and never reveal the key.')
|
||||
}).describe('Item instance served to the candidate. The variant is fixed when it is first served: a reload, a retried request, or a resumed session returns the same instance with the same text and option order. The item never says whether an earlier answer was correct, and seed items, which are not scored, are indistinguishable from scored ones.'),zod.null()]).describe('Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending` or `additional_practice_pending` while that practice is `not_started` or `failed`, and null otherwise.'),
|
||||
"practices": zod.array(zod.object({
|
||||
@@ -175,16 +360,222 @@ export const AssessmentAttempt = zod.object({
|
||||
"status": zod.enum(['not_started', 'pending', 'finished', 'failed']).describe('State of a practice.\n\n- not_started: no solution was submitted yet.\n- pending: the submitted solution is queued or running in the sandbox.\n- finished: the sandbox ran the solution and returned a verdict; `verdict` holds it. Every outcome caused by the solution itself, such as a compilation error, a runtime error, a time limit, or a memory limit, is `finished` with the affected groups not passed.\n- failed: the sandbox infrastructure could not run the solution, for example because its queue was full or an executor broke, independently of the solution. The failure is not the candidate\'s and consumes nothing; the practice can be submitted again.'),
|
||||
"submitted_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the latest submission, or null before the first one.'),
|
||||
"verdict": zod.union([zod.object({
|
||||
"score": zod.int().min(assessmentAttemptPracticesItemVerdictOneScoreMin).max(assessmentAttemptPracticesItemVerdictOneScoreMax),
|
||||
"max_score": zod.int().min(assessmentAttemptPracticesItemVerdictOneMaxScoreMin).max(assessmentAttemptPracticesItemVerdictOneMaxScoreMax),
|
||||
"score": zod.int().min(assessmentAttemptOneOnePracticesItemVerdictOneScoreMin).max(assessmentAttemptOneOnePracticesItemVerdictOneScoreMax),
|
||||
"max_score": zod.int().min(assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMin).max(assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMax),
|
||||
"groups": zod.array(zod.object({
|
||||
"group": zod.int().min(1).max(assessmentAttemptPracticesItemVerdictOneGroupsItemGroupMax),
|
||||
"group": zod.int().min(1).max(assessmentAttemptOneOnePracticesItemVerdictOneGroupsItemGroupMax),
|
||||
"passed": zod.boolean()
|
||||
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentAttemptPracticesItemVerdictOneGroupsMin).max(assessmentAttemptPracticesItemVerdictOneGroupsMax)
|
||||
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentAttemptOneOnePracticesItemVerdictOneGroupsMin).max(assessmentAttemptOneOnePracticesItemVerdictOneGroupsMax)
|
||||
}).describe('Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group. The hidden checks, their inputs and outputs, error output, and seeds are never returned.'),zod.null()]).describe('The verdict when `status` is `finished`, otherwise null.'),
|
||||
"failure_reason": zod.union([zod.enum(['sandbox_busy', 'sandbox_error']).describe('Why the sandbox infrastructure returned no verdict: `sandbox_busy` when its queue was full, `sandbox_error` for an infrastructure failure such as a broken executor. Neither depends on the solution; a solution that fails to compile, crashes, or exceeds a limit gets a `finished` verdict instead, so a failure never acts as an oracle for hidden checks.'),zod.null()]).describe('The reason when `status` is `failed`, otherwise null.')
|
||||
}).describe('Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept as a separate label and never enters the ability estimate or the grade decision.')).max(assessmentAttemptPracticesMax).describe('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.')
|
||||
}).describe('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.')
|
||||
}).describe('Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept as a separate label and never enters the ability estimate or the grade decision.')).max(assessmentAttemptOneOnePracticesMax).describe('Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.')
|
||||
}).describe('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.').and(zod.object({
|
||||
"kind": zod.enum(['root']),
|
||||
"mode": zod.enum(['demo_basic', 'adaptive']),
|
||||
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
|
||||
"target_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
|
||||
"root_attempt_id": zod.null().describe('Root attempts have no parent attempt.'),
|
||||
"chain_deadline": zod.null().describe('A root attempt has no correction-chain deadline.')
|
||||
})).and(zod.object({
|
||||
"kind": zod.enum(['root'])
|
||||
})),zod.object({
|
||||
"id": zod.uuid().describe('Attempt identifier.'),
|
||||
"version": zod.int().min(1).describe('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`.'),
|
||||
"specialization": zod.union([zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
|
||||
"target_grade": zod.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
|
||||
"task_language": zod.union([zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.'),zod.null()]).describe('Task language of the attempt, or null when none is selected.'),
|
||||
"kind": zod.enum(['root', 'corrective', 'demo_express']).describe('Assessment track that distinguishes root, corrective, and training attempts.'),
|
||||
"root_attempt_id": zod.union([zod.uuid(),zod.null()]).describe('Present only for a corrective real assessment. It identifies the root attempt whose quota and chain deadline this attempt shares.'),
|
||||
"chain_deadline": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('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.'),
|
||||
"mode": zod.enum(['demo_basic', 'demo_express', 'adaptive']).describe('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.\n\n- 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.\n- 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.\n- 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.\n\nAdding a value is a contract change.'),
|
||||
"state": zod.enum(['in_progress', 'practice_pending', 'additional_practice_pending', 'ready_to_finalize', 'completed', 'expired', 'insufficient_bank']).describe('Lifecycle state of an attempt and the commands it accepts.\n\n- in_progress: items are being answered; `current_item` is the item to answer. Accepts SubmitMyAssessmentAnswer for that item.\n- practice_pending: the item part is finished, and the main practice has no finished verdict yet: it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished, even when the adaptive stop rule has already ended the item part.\n- additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade in the band below confirmation, so the attempt offers one additional practice without spending a new attempt; it keeps the time and session limits of the attempt. Accepts SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and decides `not_confirmed` with the current evidence.\n- ready_to_finalize: every required part is done, including a submitted additional practice with a finished verdict. Accepts FinalizeMyAssessmentAttempt.\n- completed: a decision was made; the result is available.\n- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.\n- 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.\n\nWhen `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.'),
|
||||
"versions": zod.object({
|
||||
"policy_version": zod.int().min(1).describe('Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item limits, time and session limits, and retry intervals.'),
|
||||
"bank_version": zod.string().min(1).max(assessmentAttemptTwoOneVersionsBankVersionMax).regex(assessmentAttemptTwoOneVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
|
||||
"algorithm_version": zod.string().min(1).max(assessmentAttemptTwoOneVersionsAlgorithmVersionMax).regex(assessmentAttemptTwoOneVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
|
||||
}).describe('Versions fixed when the attempt was created. They never change during the attempt, and a result is always reproduced from the stored answers with these versions; a later policy, bank, or algorithm version does not rewrite it.'),
|
||||
"started_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
|
||||
"expires_at": zod.iso.datetime({"offset":true}).describe('Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective assessment it does not exceed chain_deadline.'),
|
||||
"sessions": zod.union([zod.object({
|
||||
"used": zod.int().min(1).max(assessmentAttemptTwoOneSessionsOneUsedMax).describe('Sessions started so far, including the current one.'),
|
||||
"max": zod.int().min(1).max(assessmentAttemptTwoOneSessionsOneMaxMax),
|
||||
"idle_timeout_seconds": zod.int().min(assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMin).max(assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMax).describe('Inactivity after which the current session ends.')
|
||||
}).describe('Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.\n\nSession 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.'),zod.null()]).describe('Session limit of the attempt, or null when its policy defines none.'),
|
||||
"finished_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time the attempt reached a terminal state, or null while it is active.'),
|
||||
"progress": zod.object({
|
||||
"answered_items": zod.int().min(assessmentAttemptTwoOneProgressAnsweredItemsMin).max(assessmentAttemptTwoOneProgressAnsweredItemsMax),
|
||||
"max_items": zod.int().min(1).max(assessmentAttemptTwoOneProgressMaxItemsMax).describe('Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items together in adaptive.')
|
||||
}).describe('Progress of the item part. It counts seed items like scored ones, so it does not reveal which items are scored. An adaptive attempt may end its item part before `max_items` by its stop rule. A finalize refused as premature does not list the unfinished parts; the client reads them here, in `current_item`, and in `practices`.'),
|
||||
"current_item": zod.union([zod.object({
|
||||
"id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
|
||||
"sequence": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneSequenceMax).describe('Position of the item in the attempt, from 1.'),
|
||||
"prompt": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOnePromptMax).describe('Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.'),
|
||||
"content": zod.union([zod.object({
|
||||
"format": zod.enum(['choice']),
|
||||
"options": zod.array(zod.object({
|
||||
"id": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdMax).regex(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMin).max(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMax).describe('Options in the order of this instance.'),
|
||||
"multiple": zod.boolean().describe('Whether more than one option may be selected. It is a property of the task family, fixed for every variant, and never derived from the key: a multiple-choice variant may have a single correct option.')
|
||||
}).describe('Choose one option, or several when `multiple` is true. The content never says which options are correct or how many are.'),zod.object({
|
||||
"format": zod.enum(['number']),
|
||||
"unit": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentTwoUnitMax).nullable().describe('Unit of the expected value, for example `ms`, or null.')
|
||||
}).describe('Enter a number, optionally in the given unit.'),zod.object({
|
||||
"format": zod.enum(['string']),
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentThreeMaxLengthMax).describe('Maximum length of the answer in characters. It is an input limit of the task family, never derived from the key, so it does not reveal the length of the correct answer.')
|
||||
}).describe('Enter a short string, such as a command, a header name, or an address.'),zod.object({
|
||||
"format": zod.enum(['order']),
|
||||
"elements": zod.array(zod.object({
|
||||
"id": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdMax).regex(assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptTwoOneCurrentItemOneContentFourElementsMin).max(assessmentAttemptTwoOneCurrentItemOneContentFourElementsMax)
|
||||
}).describe('Put every element into the right order. The elements arrive in the order of this instance, which is never the answer.'),zod.object({
|
||||
"format": zod.enum(['find_error']),
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxMax).regex(assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxRegExp).nullable().describe('Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.'),
|
||||
"lines": zod.array(zod.object({
|
||||
"number": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemNumberMax),
|
||||
"text": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemTextMax)
|
||||
}).describe('One numbered line of a code or configuration fragment. Plain text.')).min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveLinesMax).describe('Lines numbered from 1 in order.'),
|
||||
"max_selections": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveMaxSelectionsMax).describe('Maximum number of lines the answer may select. It is a limit of the task family, fixed for every variant and never derived from the key; it is not the number of wrong lines.')
|
||||
}).describe('Find the lines with the error in a code or configuration fragment and select up to `max_selections` line numbers.'),zod.object({
|
||||
"format": zod.enum(['configuration']),
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxMax).regex(assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxRegExp).describe('Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.'),
|
||||
"initial_config": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentSixInitialConfigMax).describe('Starting text to edit; empty when the candidate writes it from scratch.'),
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentSixMaxLengthMax).describe('Maximum length of the submitted configuration in characters, an input limit of the task family that is never derived from the key.')
|
||||
}).describe('Write or fix a configuration. The server checks the submitted text with the computed key or reference check of the task family; it never executes it as code.'),zod.object({
|
||||
"format": zod.enum(['practice']),
|
||||
"languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(assessmentAttemptTwoOneCurrentItemOneContentSevenLanguagesMax).describe('Languages the solution may use. Empty when the task does not offer a choice; the submission then sends a null language.'),
|
||||
"public_examples": zod.array(zod.object({
|
||||
"input": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemInputMax),
|
||||
"expected_output": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax)
|
||||
}).describe('Public example of the practice task: an input and its expected output. Hidden checks are never listed.')).max(assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesMax),
|
||||
"max_source_length": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentSevenMaxSourceLengthMax).describe('Maximum length of the solution source in characters.')
|
||||
}).describe('Code practice. The candidate submits one final solution, which runs in the isolated sandbox against three groups of hidden checks. The content lists only the statement, the allowed languages, and public examples; hidden checks, their inputs, and seeds never reach the client.')]).describe('Format-specific part of an item, selected by `format`. It holds only what the candidate needs to answer: never an answer key, a correct option, a score, a family or variant identifier, a seed, or a hidden check. Limits such as `multiple`, `max_selections`, and `max_length` belong to the format or the task family and never reveal the key.')
|
||||
}).describe('Item instance served to the candidate. The variant is fixed when it is first served: a reload, a retried request, or a resumed session returns the same instance with the same text and option order. The item never says whether an earlier answer was correct, and seed items, which are not scored, are indistinguishable from scored ones.'),zod.null()]).describe('Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending` or `additional_practice_pending` while that practice is `not_started` or `failed`, and null otherwise.'),
|
||||
"practices": zod.array(zod.object({
|
||||
"kind": zod.enum(['main', 'additional']).describe('Role of a practice in the attempt.\n\n- main: the practice that every attempt with practice requires before a decision.\n- additional: adaptive only; offered by finalize when the probability of reaching the grade is in the band below confirmation. It continues the same attempt and spends no new attempt.\n\nAdding a value is a contract change.'),
|
||||
"item_id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
|
||||
"status": zod.enum(['not_started', 'pending', 'finished', 'failed']).describe('State of a practice.\n\n- not_started: no solution was submitted yet.\n- pending: the submitted solution is queued or running in the sandbox.\n- finished: the sandbox ran the solution and returned a verdict; `verdict` holds it. Every outcome caused by the solution itself, such as a compilation error, a runtime error, a time limit, or a memory limit, is `finished` with the affected groups not passed.\n- failed: the sandbox infrastructure could not run the solution, for example because its queue was full or an executor broke, independently of the solution. The failure is not the candidate\'s and consumes nothing; the practice can be submitted again.'),
|
||||
"submitted_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the latest submission, or null before the first one.'),
|
||||
"verdict": zod.union([zod.object({
|
||||
"score": zod.int().min(assessmentAttemptTwoOnePracticesItemVerdictOneScoreMin).max(assessmentAttemptTwoOnePracticesItemVerdictOneScoreMax),
|
||||
"max_score": zod.int().min(assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMin).max(assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMax),
|
||||
"groups": zod.array(zod.object({
|
||||
"group": zod.int().min(1).max(assessmentAttemptTwoOnePracticesItemVerdictOneGroupsItemGroupMax),
|
||||
"passed": zod.boolean()
|
||||
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMin).max(assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMax)
|
||||
}).describe('Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group. The hidden checks, their inputs and outputs, error output, and seeds are never returned.'),zod.null()]).describe('The verdict when `status` is `finished`, otherwise null.'),
|
||||
"failure_reason": zod.union([zod.enum(['sandbox_busy', 'sandbox_error']).describe('Why the sandbox infrastructure returned no verdict: `sandbox_busy` when its queue was full, `sandbox_error` for an infrastructure failure such as a broken executor. Neither depends on the solution; a solution that fails to compile, crashes, or exceeds a limit gets a `finished` verdict instead, so a failure never acts as an oracle for hidden checks.'),zod.null()]).describe('The reason when `status` is `failed`, otherwise null.')
|
||||
}).describe('Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept as a separate label and never enters the ability estimate or the grade decision.')).max(assessmentAttemptTwoOnePracticesMax).describe('Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.')
|
||||
}).describe('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.').and(zod.object({
|
||||
"kind": zod.enum(['corrective']),
|
||||
"mode": zod.enum(['demo_basic', 'adaptive']),
|
||||
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
|
||||
"target_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
|
||||
"root_attempt_id": zod.uuid(),
|
||||
"chain_deadline": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.')
|
||||
})).and(zod.object({
|
||||
"kind": zod.enum(['corrective'])
|
||||
})),zod.object({
|
||||
"id": zod.uuid().describe('Attempt identifier.'),
|
||||
"version": zod.int().min(1).describe('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`.'),
|
||||
"specialization": zod.union([zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
|
||||
"target_grade": zod.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
|
||||
"task_language": zod.union([zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.'),zod.null()]).describe('Task language of the attempt, or null when none is selected.'),
|
||||
"kind": zod.enum(['root', 'corrective', 'demo_express']).describe('Assessment track that distinguishes root, corrective, and training attempts.'),
|
||||
"root_attempt_id": zod.union([zod.uuid(),zod.null()]).describe('Present only for a corrective real assessment. It identifies the root attempt whose quota and chain deadline this attempt shares.'),
|
||||
"chain_deadline": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('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.'),
|
||||
"mode": zod.enum(['demo_basic', 'demo_express', 'adaptive']).describe('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.\n\n- 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.\n- 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.\n- 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.\n\nAdding a value is a contract change.'),
|
||||
"state": zod.enum(['in_progress', 'practice_pending', 'additional_practice_pending', 'ready_to_finalize', 'completed', 'expired', 'insufficient_bank']).describe('Lifecycle state of an attempt and the commands it accepts.\n\n- in_progress: items are being answered; `current_item` is the item to answer. Accepts SubmitMyAssessmentAnswer for that item.\n- practice_pending: the item part is finished, and the main practice has no finished verdict yet: it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished, even when the adaptive stop rule has already ended the item part.\n- additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade in the band below confirmation, so the attempt offers one additional practice without spending a new attempt; it keeps the time and session limits of the attempt. Accepts SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and decides `not_confirmed` with the current evidence.\n- ready_to_finalize: every required part is done, including a submitted additional practice with a finished verdict. Accepts FinalizeMyAssessmentAttempt.\n- completed: a decision was made; the result is available.\n- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.\n- 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.\n\nWhen `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.'),
|
||||
"versions": zod.object({
|
||||
"policy_version": zod.int().min(1).describe('Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item limits, time and session limits, and retry intervals.'),
|
||||
"bank_version": zod.string().min(1).max(assessmentAttemptThreeOneVersionsBankVersionMax).regex(assessmentAttemptThreeOneVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
|
||||
"algorithm_version": zod.string().min(1).max(assessmentAttemptThreeOneVersionsAlgorithmVersionMax).regex(assessmentAttemptThreeOneVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
|
||||
}).describe('Versions fixed when the attempt was created. They never change during the attempt, and a result is always reproduced from the stored answers with these versions; a later policy, bank, or algorithm version does not rewrite it.'),
|
||||
"started_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
|
||||
"expires_at": zod.iso.datetime({"offset":true}).describe('Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective assessment it does not exceed chain_deadline.'),
|
||||
"sessions": zod.union([zod.object({
|
||||
"used": zod.int().min(1).max(assessmentAttemptThreeOneSessionsOneUsedMax).describe('Sessions started so far, including the current one.'),
|
||||
"max": zod.int().min(1).max(assessmentAttemptThreeOneSessionsOneMaxMax),
|
||||
"idle_timeout_seconds": zod.int().min(assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMin).max(assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMax).describe('Inactivity after which the current session ends.')
|
||||
}).describe('Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.\n\nSession 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.'),zod.null()]).describe('Session limit of the attempt, or null when its policy defines none.'),
|
||||
"finished_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time the attempt reached a terminal state, or null while it is active.'),
|
||||
"progress": zod.object({
|
||||
"answered_items": zod.int().min(assessmentAttemptThreeOneProgressAnsweredItemsMin).max(assessmentAttemptThreeOneProgressAnsweredItemsMax),
|
||||
"max_items": zod.int().min(1).max(assessmentAttemptThreeOneProgressMaxItemsMax).describe('Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items together in adaptive.')
|
||||
}).describe('Progress of the item part. It counts seed items like scored ones, so it does not reveal which items are scored. An adaptive attempt may end its item part before `max_items` by its stop rule. A finalize refused as premature does not list the unfinished parts; the client reads them here, in `current_item`, and in `practices`.'),
|
||||
"current_item": zod.union([zod.object({
|
||||
"id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
|
||||
"sequence": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneSequenceMax).describe('Position of the item in the attempt, from 1.'),
|
||||
"prompt": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOnePromptMax).describe('Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.'),
|
||||
"content": zod.union([zod.object({
|
||||
"format": zod.enum(['choice']),
|
||||
"options": zod.array(zod.object({
|
||||
"id": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdMax).regex(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMin).max(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMax).describe('Options in the order of this instance.'),
|
||||
"multiple": zod.boolean().describe('Whether more than one option may be selected. It is a property of the task family, fixed for every variant, and never derived from the key: a multiple-choice variant may have a single correct option.')
|
||||
}).describe('Choose one option, or several when `multiple` is true. The content never says which options are correct or how many are.'),zod.object({
|
||||
"format": zod.enum(['number']),
|
||||
"unit": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentTwoUnitMax).nullable().describe('Unit of the expected value, for example `ms`, or null.')
|
||||
}).describe('Enter a number, optionally in the given unit.'),zod.object({
|
||||
"format": zod.enum(['string']),
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentThreeMaxLengthMax).describe('Maximum length of the answer in characters. It is an input limit of the task family, never derived from the key, so it does not reveal the length of the correct answer.')
|
||||
}).describe('Enter a short string, such as a command, a header name, or an address.'),zod.object({
|
||||
"format": zod.enum(['order']),
|
||||
"elements": zod.array(zod.object({
|
||||
"id": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdMax).regex(assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
|
||||
"text": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
|
||||
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptThreeOneCurrentItemOneContentFourElementsMin).max(assessmentAttemptThreeOneCurrentItemOneContentFourElementsMax)
|
||||
}).describe('Put every element into the right order. The elements arrive in the order of this instance, which is never the answer.'),zod.object({
|
||||
"format": zod.enum(['find_error']),
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxMax).regex(assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxRegExp).nullable().describe('Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.'),
|
||||
"lines": zod.array(zod.object({
|
||||
"number": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemNumberMax),
|
||||
"text": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemTextMax)
|
||||
}).describe('One numbered line of a code or configuration fragment. Plain text.')).min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveLinesMax).describe('Lines numbered from 1 in order.'),
|
||||
"max_selections": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveMaxSelectionsMax).describe('Maximum number of lines the answer may select. It is a limit of the task family, fixed for every variant and never derived from the key; it is not the number of wrong lines.')
|
||||
}).describe('Find the lines with the error in a code or configuration fragment and select up to `max_selections` line numbers.'),zod.object({
|
||||
"format": zod.enum(['configuration']),
|
||||
"syntax": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxMax).regex(assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxRegExp).describe('Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.'),
|
||||
"initial_config": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentSixInitialConfigMax).describe('Starting text to edit; empty when the candidate writes it from scratch.'),
|
||||
"max_length": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentSixMaxLengthMax).describe('Maximum length of the submitted configuration in characters, an input limit of the task family that is never derived from the key.')
|
||||
}).describe('Write or fix a configuration. The server checks the submitted text with the computed key or reference check of the task family; it never executes it as code.'),zod.object({
|
||||
"format": zod.enum(['practice']),
|
||||
"languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(assessmentAttemptThreeOneCurrentItemOneContentSevenLanguagesMax).describe('Languages the solution may use. Empty when the task does not offer a choice; the submission then sends a null language.'),
|
||||
"public_examples": zod.array(zod.object({
|
||||
"input": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemInputMax),
|
||||
"expected_output": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax)
|
||||
}).describe('Public example of the practice task: an input and its expected output. Hidden checks are never listed.')).max(assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesMax),
|
||||
"max_source_length": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentSevenMaxSourceLengthMax).describe('Maximum length of the solution source in characters.')
|
||||
}).describe('Code practice. The candidate submits one final solution, which runs in the isolated sandbox against three groups of hidden checks. The content lists only the statement, the allowed languages, and public examples; hidden checks, their inputs, and seeds never reach the client.')]).describe('Format-specific part of an item, selected by `format`. It holds only what the candidate needs to answer: never an answer key, a correct option, a score, a family or variant identifier, a seed, or a hidden check. Limits such as `multiple`, `max_selections`, and `max_length` belong to the format or the task family and never reveal the key.')
|
||||
}).describe('Item instance served to the candidate. The variant is fixed when it is first served: a reload, a retried request, or a resumed session returns the same instance with the same text and option order. The item never says whether an earlier answer was correct, and seed items, which are not scored, are indistinguishable from scored ones.'),zod.null()]).describe('Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending` or `additional_practice_pending` while that practice is `not_started` or `failed`, and null otherwise.'),
|
||||
"practices": zod.array(zod.object({
|
||||
"kind": zod.enum(['main', 'additional']).describe('Role of a practice in the attempt.\n\n- main: the practice that every attempt with practice requires before a decision.\n- additional: adaptive only; offered by finalize when the probability of reaching the grade is in the band below confirmation. It continues the same attempt and spends no new attempt.\n\nAdding a value is a contract change.'),
|
||||
"item_id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
|
||||
"status": zod.enum(['not_started', 'pending', 'finished', 'failed']).describe('State of a practice.\n\n- not_started: no solution was submitted yet.\n- pending: the submitted solution is queued or running in the sandbox.\n- finished: the sandbox ran the solution and returned a verdict; `verdict` holds it. Every outcome caused by the solution itself, such as a compilation error, a runtime error, a time limit, or a memory limit, is `finished` with the affected groups not passed.\n- failed: the sandbox infrastructure could not run the solution, for example because its queue was full or an executor broke, independently of the solution. The failure is not the candidate\'s and consumes nothing; the practice can be submitted again.'),
|
||||
"submitted_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the latest submission, or null before the first one.'),
|
||||
"verdict": zod.union([zod.object({
|
||||
"score": zod.int().min(assessmentAttemptThreeOnePracticesItemVerdictOneScoreMin).max(assessmentAttemptThreeOnePracticesItemVerdictOneScoreMax),
|
||||
"max_score": zod.int().min(assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMin).max(assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMax),
|
||||
"groups": zod.array(zod.object({
|
||||
"group": zod.int().min(1).max(assessmentAttemptThreeOnePracticesItemVerdictOneGroupsItemGroupMax),
|
||||
"passed": zod.boolean()
|
||||
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMin).max(assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMax)
|
||||
}).describe('Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group. The hidden checks, their inputs and outputs, error output, and seeds are never returned.'),zod.null()]).describe('The verdict when `status` is `finished`, otherwise null.'),
|
||||
"failure_reason": zod.union([zod.enum(['sandbox_busy', 'sandbox_error']).describe('Why the sandbox infrastructure returned no verdict: `sandbox_busy` when its queue was full, `sandbox_error` for an infrastructure failure such as a broken executor. Neither depends on the solution; a solution that fails to compile, crashes, or exceeds a limit gets a `finished` verdict instead, so a failure never acts as an oracle for hidden checks.'),zod.null()]).describe('The reason when `status` is `failed`, otherwise null.')
|
||||
}).describe('Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept as a separate label and never enters the ability estimate or the grade decision.')).max(assessmentAttemptThreeOnePracticesMax).describe('Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.')
|
||||
}).describe('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.').and(zod.object({
|
||||
"kind": zod.enum(['demo_express']),
|
||||
"mode": zod.enum(['demo_express']),
|
||||
"specialization": zod.null(),
|
||||
"target_grade": zod.null(),
|
||||
"task_language": zod.null(),
|
||||
"root_attempt_id": zod.null(),
|
||||
"chain_deadline": zod.null()
|
||||
})).and(zod.object({
|
||||
"kind": zod.enum(['demo_express'])
|
||||
}))]).describe('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.')
|
||||
|
||||
export type AssessmentAttempt = zod.input<typeof AssessmentAttempt>;
|
||||
export type AssessmentAttemptOutput = zod.output<typeof AssessmentAttempt>;
|
||||
Reference in new issue
Block a user