feat: per-assignment submission triggers — modes and milestone tags (#477) - #531
Open
joshkaplan-dev wants to merge 5 commits into
Open
feat: per-assignment submission triggers — modes and milestone tags (#477)#531joshkaplan-dev wants to merge 5 commits into
joshkaplan-dev wants to merge 5 commits into
Conversation
# Conflicts: # cli/gh-teacher/init_skeleton_test.go # cli/gh-teacher/skeleton/dotgithub/workflows/autograde-runner.yaml
- web: pass submission_tags to the per-row trigger retrofit (SubmissionsPage -> SubmissionsTable) so a row-level update no longer erases milestone patterns from the shim - web: pin the shim retrofit's read-rewrite-commit cycle to one resolved tip SHA (read-after-write lag misreport; mirrors the Go retrofitShim fix) - web: run the bulk trigger retrofit serially (REPO_WRITE_CONCURRENCY=1) — 3-step git-data writes, matching the CLI's serial rate-limit stance - python: add the charset fail-closed gate to both matcher copies (regrade_repos.py, autograde-runner.yaml) matching Go/TS IsSafeSubmissionTagPattern, and pin it with new charset-unsafe + unclosed-bracket golden fixture cases (all four sides re-verified) - web: add the submission_tags schema-parity vitest the Go comment already claimed existed (cap + charset vs assignments-v1.schema.json) - go: point shimTriggerBlock at its web SHIM_TRIGGER_BLOCK mirror; extend the --empty-repo mutual-exclusion text to the new submission flags (help + wiki) - fixture: correct the _comment (four implementations, submissiontags.go)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds per-assignment control over when the autograder runs, completing #477 in
two parts delivered together: a submission mode (every push vs. submit-only)
and teacher-named milestone tags that trigger grading.
By default every push grades, spending Actions minutes on every work-in-progress
commit. This PR adds two levers:
submission_mode—every-push(default, unchanged) ortag(onlysubmit/*tag pushes grade; a plaingit pushcosts no Actions minutes).submission_tags— optional tag patterns (e.g.phase1,phase2) thatalso trigger grading. A student pushing a matching tag gets that commit graded
with plain git — no CLI required.
Milestone tags trigger;
submit/*records. A milestone tag can move betweencommits, so a milestone-tag push triggers grading and the runner mints the
canonical immutable
submit/<UTC-timestamp>-<short-sha>tag at that commit andpublishes the release there. The collector, regrade, web views, and download are
unchanged — all still key on
submit/*. (This is why the issue's migration stepis unnecessary:
submit/*stays infrastructure, not config.)Also in this PR — the retrofit tooling (
gh teacher assignment submission-mode+ web bulk/per-row actions) that rewrites existing repos'shims; the runner-side stale-shim and foreign-tag suppression; and a few fixes
found during live testing:
claim; latest = most recent submission.
commit outcome.
refusal, keeps the old release, warns.
comma-vs-newline hint.
Design deviations from the issue: no config migration
(obsoleted by the triggers-vs-records design) and no default
submissiontag(absent = no milestone tags).
Deferred (per the issue):
tags-ignore/exclude patterns, custom branch triggers, drift-detection UI.
Closes #477
Type of change
Checklist
go build ./... && go test ./... && golangci-lint runin the module dir (cli/gh-teacher,cli/gh-student, orcli/shared)cd web && npm run checkpython3 -m pytest cli/gh-teacher/skeleton_tests -qschemas/*.schema.jsonand every mirror (Go / Python / TypeScript), and the parity tests pass.feat(web): ...,fix(gh-teacher): ...).