A gated dry run fails on purpose while it awaits its label, and no bot commit can satisfy a gate that needs a fresh human label per push, so sending its failure to the implementer loops. delivery-ci-checks now classifies a failure, error or warning on a dry-run-gated check as gated-failure: passing, never waited on, with its job link and one-line log cause. The Awaiting gate line becomes Human gate, carrying each check's state. The 0.7.0 rule ignoring skipped statuses on a gated check is unchanged. qa never fails on a gated-failure and reads dry-run output only on success; its human-gate line feeds the implement lead's Open questions. Review check 7 records a gated-failure as a non-blocking finding for the approver. The format's dry-run-gated definition is loosened to allow a failing status before the label. Refs: #225 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
4.2 KiB
Reading Gitea commit statuses
Response shape
mcp__gitea__commit_read method get_status, ref: <SHA> returns:
{"sha": "<SHA>", "state": "success", "total_count": 4, "statuses": [
{"context": "Flux Dry Run / flux_dry_run (pull_request)", "status": "success",
"description": "Successful in 2s", "target_url": "/<owner>/<repo>/actions/runs/4872/jobs/5907"},
{"context": "Molecule Role Tests / molecule (pull_request)", "status": "skipped",
"description": "Skipped", "target_url": ""}]}
contextis the status name. Gitea Actions names it<workflow name> / <job> (<event>), the same string the delivery doc lists.statusis the per-check state. Ignore the top-levelstate: it readspendingfor a commit with no statuses at all ("statuses": []).target_urlis relative to the forge root and points at the job, not the run. It is empty for a skipped check.- Confirm the response's
shaequals the pinned SHA before using it.
State mapping
Status status |
Classified as |
|---|---|
success |
success |
skipped |
skipped, passing |
failure, error, warning, role dry-run-gated |
gated-failure, passing |
failure, error, warning, any other role |
failure |
pending (Gitea Actions reports queued and running jobs as this), any other value |
pending |
no status whose context equals the listed name, role dry-run-gated |
awaiting-gate, passing |
no status whose context equals the listed name, any other role |
missing |
When two statuses share a context, use the one with the latest updated_at. For role
dry-run-gated, ignore its skipped statuses first and take the latest of the rest; none left →
awaiting-gate. A gated job whose label condition is unmet posts skipped, and a later label
event on the same SHA posts a newer skipped that would otherwise mask an earlier
gated-failure.
Gated dry runs
awaiting-gateis adry-run-gatedcheck with no non-skippedstatus on the pinned SHA: no human has added its label yet, and only a human can, so waiting for it is pointless. It is nevermissing.- A gated check whose latest non-
skippedstatus ispendingorsuccessis classified like any other check. gated-failureis a gated check whose latest non-skippedstatus isfailure,errororwarning. The workflow may fail on purpose while it awaits its label, or the dry run itself may have failed; either way a human reads it, never the implementer, and it is never waited on. ItsRunis the job link and itsCausefollows §Failure cause, e.g. "Awaiting the Dry run label from an allowlisted human" or "Infrastructure error in at least one stage".- Only the delivery doc gives roles, so a caller-supplied list never yields
awaiting-gateorgated-failure. - A gated status on an older commit is stale like any other. The label is needed fresh per push,
so after a push the check is
awaiting-gateagain until a human re-adds it. - The
Human gate:line names everyawaiting-gateandgated-failurerow with its state, e.g.Human gate: Ansible Dry Run / ansible_dry_run (pull_request_target) (gated-failure), elsenone.
Links
Build the absolute link from the forge's origin, the scheme and host of the PR's html_url or of
the API url fields, plus target_url:
https://git.example.org + /<owner>/<repo>/actions/runs/4872/jobs/5907.
A skipped, missing or awaiting-gate check has no job, so its Run cell is none.
Failure cause
The job id is the number after /jobs/ in target_url. Read the log tail filtered to error lines:
mcp__gitea__actions_run_read method get_job_log_preview, job_id <id>,
pattern '::error::|FAIL|Error|error:', context_lines 2, tail_lines 200
If the filtered read returns nothing, read once more without pattern. From what comes back, write
one line naming the failing step and its cause, e.g. "ansible-lint: roles/pihole/tasks/main.yml
uses a deprecated module". Do not quote more than a short identifier from the log. The evidence is
the job link, never pasted log text.
If the log is unreadable (expired, or the job was cancelled before any output), the cause is
log unavailable and the job link still goes in Run.