Implement stage for the delivery team: delivery-implement-lead runs test-author -> implementer -> qa in sequence on a draft WIP: PR and removes WIP: when qa passes, starting review. delivery-test-first turns acceptance criteria into acceptance checks committed under the Delivery-Stage: test-author trailer; delivery-ci-checks reads a PR's or commit's CI by the names in docs/agents/delivery.md. Agents follow ADR-0016 (no tools: lists, disallowedTools fences on the lead and qa) and pin Claude model aliases without model-policy; Copilot limitations are documented in docs/runtimes.md. delivery 0.4.0. Refs: #192 ADR: ADR-0016, ADR-0031, ADR-0032 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
2.4 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 |
failure |
pending (Gitea Actions reports queued and running jobs as this), any other value |
pending |
no status whose context equals the listed name |
missing |
When two statuses share a context, use the one with the latest updated_at.
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 or missing 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.