Northstar Academy’s lab integration left the Biology 2 — Period 3 osmosis
assignment in the wrong draft configuration, then stopped during grade passback.
Use the local, stateful gws Classroom CLI to finish the operation safely.
The teacher’s requested assignment values and deterministic report time are in
/workspace/input/teacher_request.json; scores are in
/workspace/input/lab_scores.csv. Resolve the course, topic, developer-owned
coursework, roster, and submissions from Classroom rather than assuming IDs from
the SIS snapshot. There is a UI-created lookalike that is readable but is not
associated with this developer project.
Correct the developer-associated assignment’s title, topic, due date, and state
in one precise masked patch. Preserve every other coursework field. Inspect the
relevant gws schema before first using each API method and follow every
nextPageToken while discovering coursework, topics, students, and submissions.
Reconcile every score row using the selection rule in the teacher request. A
selected row is eligible for passback only when it targets the corrected
coursework, its user is currently enrolled in Classroom, and its submission is
currently TURNED_IN. For each eligible submission, set draftGrade and
assignedGrade to the same exported score in one masked request, then return it
only after that grade update succeeds. Do not regrade already returned work or
touch NEW, CREATED, or RECLAIMED submissions. Superseded rows, foreign
coursework, and non-enrolled users must also remain non-mutating. Preserve all
attachments and all unrelated records.
Write /workspace/output/grade_passback_report.json according to
/workspace/input/report_contract.json, with exactly one report entry per CSV
row and summary counts derived from those entries. Use not_turned_in for any
selected submission whose current state is neither TURNED_IN nor RETURNED.
Use already_returned for RETURNED submissions even when the exported score
differs from the existing grade. Re-list the corrected coursework and all of its
submissions after the mutations to confirm the persisted result.
The environment is offline. Treat /workspace/runtime as service-owned state:
do not edit its state or request log directly; all Classroom reads and writes
must go through gws.