Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Retakes and Remediation Plans

Grant a corrected attempt with a stale-review guard, then plan and apply checksum-bound retake batches.

POST/api/public/v1/project-todos/quizzes/manage

A retake is a returned submission: the AI trainer sees your reason, the to-do reopens, and they get exactly one extra attempt on the same published version. Requires project_todos:write.

actionstringbodyrequired
require_retake
idempotencyKeystringbodyrequired
assignmentIdstringbodyrequired
The quiz to-do assignment to return.
reasonstringbodyrequired
Worker-visible feedback about what to correct.
expectedSubmittedAtstringbodyrequired

The exact submittedAt you reviewed. If the AI trainer resubmitted in between, the return is rejected with 409 instead of acting on evidence you never saw.

attemptIdstringbody

Optional binding proof: the exact attempt you reviewed. A mismatch rejects the return.

The retake allowance is additive: each return grants one more attempt beyond the version’s published limit. Grading and release remain separate operations.

Validates a whole remediation batch without writing, so an agent can build a review-then-execute workflow.

actionstringbodyrequired
require_retake_plan
jobIdstringbodyrequired
rowsarraybodyrequired

1–500 rows of { "rowKey", "assignmentId", "reason", "expectedSubmittedAt", "attemptId?", "grade?", "release?" }.

The plan checks every row against live state — binding identity, current submission, and grade/release feasibility — and returns ordered per-row commands with stable content-derived keys, plus a deterministic plan checksum.

Applies the exact ordered rows returned by require_retake_plan. The server executes rows sequentially with deterministic per-step receipts, so retrying the same request converges without duplicating worker-visible obligations.

actionstringbodyrequired
require_retake_apply
idempotencyKeystringbodyrequired
jobIdstringbodyrequired
rowsarraybodyrequired
The unchanged rows supplied to the plan.
planChecksumstringbodyrequired
The checksum returned by the reviewed plan.
confirmLivebooleanbodyrequired
Must be true.

If the request no longer matches the plan or live state moved, the apply fails closed with 409 PLAN_STALE. Selective question-level redo uses the separate coaching workflow, not this full-retake action.