Attach a new source-code revision (fix_attempt)
POST/api/v1/assessments/:assessment_id/revisions
Attach a new fix_attempt CodeRevision to an assessment.
Decoupled "Update source code" path: stores the new source archive,
appends a row to the append-only CodeRevision series, and flips
Assessment.current_revision_id to point at it. Free; no spawn,
no credit spend, no fix-verify concurrency guard — storing source
is safe even while a verify is in-flight (the running verify
already pinned its own revision_id at spawn time and won't
re-pick the new head).
The companion endpoint POST /assessments/{id}/fix-verify runs
the verify workflow against the head revision; re-running it
against the same head is the supported "retry verify" flow.
- Scope required:
assessments:update+ assessment write access. - Rate-limit tier:
assessment_create(100/hour/user). - Allowed only when the assessment is in
completedstate.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 429
- 500
Successful Response
Bad request — malformed input or failed validation.
Missing, expired, or invalid credentials.
Authenticated but not authorized for this resource. Note: cross-organization reads return 404, not 403.
Resource not found, or hidden for tenant-enumeration safety (the caller lacks permission to know whether the resource exists).
Conflict — the current resource state does not allow this operation (e.g. assessment already started, email already in use).
Semantic validation failure — request shape was valid but contents were not.
Too many requests — rate limited. Retry after the window resets.
Internal server error — unexpected failure.