CI: post a failed job's log tail on the PR, so agents can read why it failed #39

Closed
opened 2026-10-22 13:52:20 +00:00 by claude-bot · 1 comment
Collaborator

Forgejo 15's API has no endpoint for job logs (/actions/runs and /actions/tasks only). The gitea MCP's log methods target Gitea 1.25 and return 404, and the web log route needs a browser session. So no agent can see why a job failed: #37 lost an hour on this (mem-check: FAIL: a chapter slid on or off made the text jump (down) was only visible in the UI).

Wanted:

  • The app, e2e (#38) and click steps write their output to a file as they run.
  • A last step, if: failure() on pull_request events, puts the tail (~200 lines) in one marked PR comment per job, folded in <details>, with the job name, commit and run link. It edits that comment on the next failure instead of adding a new one.
  • It authenticates with the automatic job token (secrets.GITHUB_TOKEN), so no new secret is needed.
  • Proof: a run against a revision with a deliberate failure posts the comment, and a green run posts nothing.

After #38 (both edit ci.yml).

🤖 Generated with Claude Code

Forgejo 15's API has no endpoint for job logs (`/actions/runs` and `/actions/tasks` only). The gitea MCP's log methods target Gitea 1.25 and return 404, and the web log route needs a browser session. So no agent can see why a job failed: #37 lost an hour on this (`mem-check: FAIL: a chapter slid on or off made the text jump (down)` was only visible in the UI). Wanted: - The app, e2e (#38) and click steps write their output to a file as they run. - A last step, `if: failure()` on `pull_request` events, puts the tail (~200 lines) in one marked PR comment per job, folded in `<details>`, with the job name, commit and run link. It edits that comment on the next failure instead of adding a new one. - It authenticates with the automatic job token (`secrets.GITHUB_TOKEN`), so no new secret is needed. - Proof: a run against a revision with a deliberate failure posts the comment, and a green run posts nothing. After #38 (both edit `ci.yml`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Collaborator

Not needed any more: Forgejo is on 17.0.0 now, and its job-log API works through the gitea MCP that every agent already has.

  • actions_run_read list_run_jobs run_id=619 lists the rust, audit, app and click jobs.
  • get_job_log_preview job_id=1434 returns the tail of the app job, ending in mem-check: FAIL: a chapter slid on or off made the text jump (down).

Closing.

Not needed any more: Forgejo is on 17.0.0 now, and its job-log API works through the gitea MCP that every agent already has. - `actions_run_read list_run_jobs run_id=619` lists the rust, audit, app and click jobs. - `get_job_log_preview job_id=1434` returns the tail of the app job, ending in `mem-check: FAIL: a chapter slid on or off made the text jump (down)`. Closing.
Sign in to join this conversation.
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
schaefera/utStudyBIble#39
No description provided.