ops forgejo actions: add task list/view/logs verbs #109

Closed
opened 2026-05-27 02:35:15 +00:00 by coilysiren · 0 comments
Owner

Problem

coily ops forgejo has wrappers for issue, pr, label, release, repo, plus the in-pod CLI for admin and doctor - but nothing for the Actions surface. When a CI job fails (most recently bump-formula on every release, tracked at #107), there's no audited path to read the failure log. The current workaround is bare kubectl exec into the forgejo pod, which is denied at the lockdown layer, plus auto-mode safety walls when reaching for credentials.

Scope

Add coily ops forgejo actions with three leaves, all HTTP API calls reusing the existing forgejoAPIDo token path:

  • coily ops forgejo actions task list --repo <owner/name> [--limit N] - list recent action tasks (workflow runs). Maps to the existing /api/v1/repos/{owner}/{repo}/actions/tasks endpoint.
  • coily ops forgejo actions task view --repo <owner/name> --id <task_id> - inspect one task's metadata.
  • coily ops forgejo actions task logs --repo <owner/name> --id <task_id> - print the task's log to stdout. Forgejo stores logs zstd-compressed under /var/lib/gitea/actions_log/<owner>/<repo>/<hex>/<id>.log.zst in the forgejo pod. Implementation: ssh to kai-server, kubectl cp the log file out, zstdcat on kai-server, stream stdout back. Same audited remote-exec shape as the rest of ops forgejo admin verbs.

Why a coily verb, not bare API access

Every coilysiren CI failure investigation needs this. Without it, agents either fall back to noisy diagnosis paths (kubectl, raw curl with PAT) or hit safety walls. With it, "look at why job N failed" is one audited verb away.

Out of scope

  • Mutating Actions state (cancel, rerun, delete tasks).
  • Cross-runner inspection (runner-pod logs).
  • Anything beyond reading what already exists.

Acceptance

  • coily ops forgejo actions task logs --repo coilysiren/coily --id 97 prints the bump-formula failure log for the most recent failing run, ungated.
**Problem** `coily ops forgejo` has wrappers for `issue`, `pr`, `label`, `release`, `repo`, plus the in-pod CLI for `admin` and `doctor` - but nothing for the Actions surface. When a CI job fails (most recently `bump-formula` on every release, tracked at #107), there's no audited path to read the failure log. The current workaround is bare `kubectl exec` into the forgejo pod, which is denied at the lockdown layer, plus auto-mode safety walls when reaching for credentials. **Scope** Add `coily ops forgejo actions` with three leaves, all HTTP API calls reusing the existing `forgejoAPIDo` token path: - `coily ops forgejo actions task list --repo <owner/name> [--limit N]` - list recent action tasks (workflow runs). Maps to the existing `/api/v1/repos/{owner}/{repo}/actions/tasks` endpoint. - `coily ops forgejo actions task view --repo <owner/name> --id <task_id>` - inspect one task's metadata. - `coily ops forgejo actions task logs --repo <owner/name> --id <task_id>` - print the task's log to stdout. Forgejo stores logs zstd-compressed under `/var/lib/gitea/actions_log/<owner>/<repo>/<hex>/<id>.log.zst` in the forgejo pod. Implementation: ssh to kai-server, `kubectl cp` the log file out, `zstdcat` on kai-server, stream stdout back. Same audited remote-exec shape as the rest of `ops forgejo` admin verbs. **Why a coily verb, not bare API access** Every coilysiren CI failure investigation needs this. Without it, agents either fall back to noisy diagnosis paths (kubectl, raw curl with PAT) or hit safety walls. With it, "look at why job N failed" is one audited verb away. **Out of scope** - Mutating Actions state (cancel, rerun, delete tasks). - Cross-runner inspection (runner-pod logs). - Anything beyond reading what already exists. **Acceptance** - `coily ops forgejo actions task logs --repo coilysiren/coily --id 97` prints the bump-formula failure log for the most recent failing run, ungated.
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-bridge/coily#109
No description provided.