Skip to content
GitmoapAPIBeta
Planissue-criteria
GET/repositories/{repo_id}/issues/{issue_id}/regression

The suspect commits behind a regression — the last-green→first-red range, one of which broke it

get_issue_regression
  • issue:read
    A token needs the issue:read scope: Read work items and their settingsGranted by mcp_agent, mcp_agent_write, read_api, read_repository, write_api, write_repository.Every operation this scope unlocks

For a regressed work item, returns the commits after the last passing commit up to and including the first failing one, newest first, with the required criteria now failing. At most 100 suspects are listed; total and truncated say how many there were. You need to be able to read the repository's code as well as its work items, and a work item that is not regressed is refused.

Parameters

Path
  • repo_idRepositoryId (string · uuid)Repository ID
  • issue_idIssueId (integer · int64)Work-item iid

Responses

200The last-green→first-red commit range and the failing criteria, one commit of which caused the regressionapplication/json
  • failing_criteriaarray of CriterionViewThe required criteria currently Failing — what regressed.
    • The CriterionView schema
    • created_atstring
    • criterion_idCriterionId (string · uuid)The criterion's identifier. It never changes, so rewording or re-binding a criterion keeps its identity and its evidence.
    • issue_uidIssueUid (string · uuid)
    • satisfiedboolean
    • stateCriterionStateunverifiedpassingfailingstalemanualA criterion's verdict.
    • textstringThe human statement — the criterion's title. The label, not the identity.
    • updated_atstring
    • bindingCriterionBinding or nulloptional
    • binding_exprstring or nulloptionalThe binding's @-expression, as written. Absent for a manual criterion.
    • binding_keystring or nulloptionalThe normalised form of binding_expr, which two equivalent spellings share. Absent for a manual criterion.
    • checkedbooleanoptionalWhether the box is ticked. Meaningful only for a manual criterion — a bound one is ticked by its state, and ticking it by hand is refused with a 409.
    • descriptionstring or nulloptionalAn optional longer description (markdown) — the per-criterion detail a flat checkbox could never hold.
    • evidenceEvidence or nulloptional
      • The Evidence schema
      • commit_shaCommitHash (string)
      • observed_atstringWhen the run that produced the evidence finished, RFC 3339.
      • pipeline_idPipelineId (string · uuid)
      • pipeline_run_idPipelineRunId (string · uuid)
      • node_run_idNodeRunId (string · uuid) or nulloptional
      • valuenumber · double or nulloptional
    • facet_categoryFacetCategory (string) or nulloptional
    • facet_keyFacetKey (string) or nulloptionalThe blueprint facet this criterion belongs to, when a blueprint added it. Absent for a criterion written directly. A facet's state is rolled up from the criteria carrying its key.
    • last_evidence_atstring or nulloptional
    • last_evidence_commit_shaCommitHash (string) or nulloptional
    • last_evidence_node_run_idNodeRunId (string · uuid) or nulloptional
    • last_evidence_pipeline_idPipelineId (string · uuid) or nulloptionalThe pipeline whose run last provided evidence for this criterion. Only a later run of the same pipeline can make the criterion stale.
    • last_evidence_run_idPipelineRunId (string · uuid) or nulloptional
    • last_evidence_valuenumber · double or nulloptionalThe observed value, for a Metric or Coverage binding.
    • ordinalinteger · int32optional0–∞Position in the description, so the list round-trips in authoring order.
    • required_for_closebooleanoptional@optional opts out. Everything else in a Definition of Done is required by definition.
  • suspectsarray of SuspectCommitThe commits in (from_sha, to_sha], newest first — one of them broke it.
    • The SuspectCommit schema
    • shaCommitHash (string)
    • commitCommit or nulloptionalThe commit's author, message and date. Absent when the commit can no longer be read — a force-push removed it, or the work item has moved to another repository since it regressed.
      • The Commit schema
      • author_emailEmail (string)
      • author_namestring
      • authored_atstring
      • commit_shaCommitHash (string)
      • committed_atstring
      • committer_emailEmail (string)
      • committer_namestring
      • repository_idRepositoryId (string · uuid)
      • short_shaShortCommitHash (string)
      • titlestring
      • author_avatar_urlstring or nulloptional
      • committer_avatar_urlstring or nulloptional
      • messagestring or nulloptional
      • parent_shasarray of CommitHash (string)optional
      • tagsarray of TagName (string)optional
  • totalinteger0–∞How many commits the range holds, including any not listed in suspects.
  • truncatedbooleantrue when the range holds more than 100 commits and suspects lists only the newest 100.
  • uidIssueUid (string · uuid)
  • from_shaCommitHash (string) or nulloptionalThe last commit the item was Verified at — the range's exclusive lower bound.
  • to_shaCommitHash (string) or nulloptionalThe commit whose evidence proved the regression — the range's inclusive upper bound. Absent for an older regression that did not record it.
200 exampleSynthesized example
{
"failing_criteria": [
{
"created_at": "2026-10-10T17:12:26Z",
"criterion_id": "fc516c5c-db3f-48d2-b196-fe449e0196dd",
"issue_uid": "6c420207-94c0-4328-a047-6d8d6a2128cc",
"satisfied": false,
"state": "unverified",
"text": "text-ceca",
"updated_at": "2026-10-15T07:33:26Z"
},
{
"created_at": "2026-10-16T11:25:58Z",
"criterion_id": "dce2a1e9-8253-4d34-a9c1-26f30c8f0e31",
"issue_uid": "e7b6c3bc-6136-4e1a-abf8-a9822202f912",
"satisfied": false,
"state": "unverified",
"text": "text-f473",
"updated_at": "2026-10-11T07:50:52Z"
}
],
"suspects": [
{
"sha": "54d0fb68e9f359ae9671b5a297018b783644bd98"
}
],
"total": 2,
"truncated": false,
"uid": "7514a29a-e440-4b45-bf5c-6f7d8001b095",
"from_sha": "409a67c28c481f1e2960b1c706608020c35f6fd5",
"to_sha": "839ca54a7b7c3bb5fac88a0a4cbd8791ddb769cc"
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-73e2",
"message": "Label every synthesized example"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-8b68",
"message": "Draw the region map from operation density"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-a147",
"message": "Label every synthesized example"
}
}
404Work item not foundapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-4ab3",
"message": "Inline scalar newtypes but keep their brand"
}
}
409The work item is not in a Regressed verification stateapplication/json
Error codes
  • CONFLICTThe request conflicts with the resource's current state; reason says how
  • NOT_REGRESSEDThe work item's verification has not regressed, so there is nothing to clear
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
409 exampleSynthesized example
{
"error": {
"code": "code-9243",
"message": "Pin a page's payload to the build that rendered it"
}
}

CLI

gitmoap issue-criteria get-issue-regression

  • --repo-ididRepository ID (id or owner/repo path)
  • --issue-ididWork-item iid

Used in these guides