External mode rollout¶
The definition (format 2.0) and outcome contracts require coordinated workflow and server migration. Runtime support for the old split-file/parameter-list format is removed; use the explicit offline converter and review its output first.
- Aggregate legacy assignment settings into one JSON object containing
template_name, explicitlanguages,grading_criteria,setup_config,feedback_config, andinclude_feedback. - Run
python -m autograder.services.definition_migration old.json definition.json. Resolve reported ambiguous parameters, unsupported setup fields, and duplicate learning-resource labels. The converter preserves scoring and generates stable criterion IDs from their old paths; instructors should review those IDs. - Save the resulting definition through
POST /api/v1/configsinside thedefinitionfield. Record the canonical configuration ID and revision/hash. - Change the workflow to the new Action inputs.
Ordinary checkout no longer requires
path: submission. Use an explicitsubmission-rootanddefinition-pathif retaining that layout. - Configure cloud URL and authentication token as workflow variables/secrets.
Prefer a restricted producer token from the server's
AUTOGRADER_ATTESTATION_TOKENS; it can publish outcomes but cannot read source code or other grades. External mode (fetching the definition) needs the integration token. See the HTTP trust boundary. - Choose
execution-mode: externalto fetch the definition, and separately chooseupload-to-cloud: "true"to publish the finalized outcome. Local artifacts remain available with either configuration source. - Upload
.autograder/usingactions/upload-artifactwithif: always(). Replace check-run synchronization and automatic feedback commits with the outcome/feedback artifacts and ordinary workflow summary.
Verify a known-good static assignment first: its canonical outcome has
status: completed, an authoritative finite score and tree, and the expected
provenance. Verify a known failed student criterion produces a completed zero
rather than a system failure. Verify unavailable required infrastructure produces
status: failed with null score and a safe structured error.
For cloud publication, verify the uploaded submission ID and stored outcome
match the retained artifact. An upload failure must leave that artifact intact;
inspect whether an uncertain POST was accepted before explicitly retrying saved
delivery.json. Delivery retry does not run grading again.
See cloud execution and retry examples and contract decisions.