feat(actions): wire log/artifact tools to v16 token REST API + add run-cancel tool #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
This fork exposes
get_job_logs,get_run_logs, and artifact-download tools, but they do not work against our instance on Forgejo v14. On v14 there is no token-authenticatable REST endpoint for Action job/run logs or artifact download — the web log route requires a session cookie, so a PAT gets a 404. Today we route around this with the "upload artifact → also attach to an issue/release → pull via the token-readable attachment API" workaround. The tools exist but hit a wall.Unblocked by Forgejo v16
Forgejo v16 (GA ~2026-07-16) ships token-authenticated REST endpoints for exactly this (v16 milestone #70071; May-2026 monthly report):
GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs— plaintext, supports?step=Nand HTTPRange:(PR #12666).GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs— zip of all job logs in the run.GET /repos/{owner}/{repo}/actions/runs/{id}/jobs— list a run's jobs.actions/download-artifact-compatible — the client must not assume drop-in v4 behavior.POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel— new run-cancel endpoint.Scope
get_job_logs/get_run_logs(and artifact download) to the v16 token REST endpoints; remove the cookie/attachment workaround path once verified.cancel_workflow_runtool on the v16 cancel endpoint. This gives us a clean tool-call for the ENOSPC→deadlock and zombie-run hygiene that we currently fix via SQL-cancel + runner restart. (This is infra hygiene, NOT the E2E-behavior fix — that lives in#13, the merge-gating issue.)list_run_jobsif not already present.Depends on
Philflow/flow.raven-deployment#267(server upgrade v14 → v16). This work cannot be verified until v16 is live onforgejo.philflow.me. Can be developed/branched earlier againstv16.next.forgejo.org.Acceptance criteria
get_job_logs/get_run_logsreturn real logs against the v16 instance using only a PAT (no cookie).download-artifact-compat caveat is handled/documented.cancel_workflow_runtool cancels an in-flight run via PAT.References
Philflow/flow.raven-deployment#267(Forgejo v16 upgrade).#13(this repo) — the merge-gating fix (independent of the upgrade).