aosguard: the Forgejo Actions log verbs JSON-decode a plaintext and a ZIP response #1061

Closed
opened 2026-08-15 15:35:11 +00:00 by coilyco-ops · 1 comment
Member

aosguard ops forgejo action-job logs and action-run logs both fail on every call, because the renderer JSON-decodes a response neither endpoint returns as JSON.

Reproduce

aosguard ops forgejo action-job logs coilyco-gaming sirens-echo 33913
aosguard: invalid character '-' after top-level value

aosguard ops forgejo action-run logs coilyco-gaming sirens-echo 20594
aosguard: invalid character 'P' looking for beginning of value

The resolved request is correct. --dry-run gives:

method: GET
url: https://forgejo.coilysiren.me/api/v1/repos/coilyco-gaming/sirens-echo/actions/jobs/33913/logs

Diagnosis

Both errors are the JSON decoder reading a non-JSON body.

  • action-job logs returns plaintext. The first line starts with an ISO timestamp, so the decoder reads 2026 as a top-level number and then hits the - of -08-15.
  • action-run logs returns a ZIP. P is the first byte of the PK magic.

The verbs' own descriptions say so: "exact plaintext bytes for one Actions job" and "exact ZIP bytes containing every job log in one Actions run". The spec knows the content type. The renderer does not honour it.

--output text does not help, which is the tell that the decode happens before format selection rather than inside it.

Why it matters

coilyco-gaming/sirens-echo#91 recorded that this Forgejo instance predated the Actions log endpoints, both returned 404, and therefore "an agent cannot self-diagnose a CI failure in this repo. That is worth solving on its own." Forgejo 16 shipped the endpoints and these verbs were mounted for them. The capability is present at the API and unreachable through the guard.

Hit while closing sirens-echo#787: the image-build job passed, and reading its log was the acceptance check #91 asked for ("The first run of the new job is checked against real logs before it is relied on"). The job conclusion was the only evidence available.

Suggested shape

Pass the body through unparsed when the spec marks a response non-JSON: plaintext to stdout as-is, ZIP as bytes so a caller can redirect to a file. A byte-range option is already advertised on action-job logs, which only makes sense against an unparsed stream.

Filed by an agent that hit the wall rather than routed around it.

`aosguard ops forgejo action-job logs` and `action-run logs` both fail on every call, because the renderer JSON-decodes a response neither endpoint returns as JSON. ## Reproduce ``` aosguard ops forgejo action-job logs coilyco-gaming sirens-echo 33913 aosguard: invalid character '-' after top-level value aosguard ops forgejo action-run logs coilyco-gaming sirens-echo 20594 aosguard: invalid character 'P' looking for beginning of value ``` The resolved request is correct. `--dry-run` gives: ``` method: GET url: https://forgejo.coilysiren.me/api/v1/repos/coilyco-gaming/sirens-echo/actions/jobs/33913/logs ``` ## Diagnosis Both errors are the JSON decoder reading a non-JSON body. - `action-job logs` returns plaintext. The first line starts with an ISO timestamp, so the decoder reads `2026` as a top-level number and then hits the `-` of `-08-15`. - `action-run logs` returns a ZIP. `P` is the first byte of the `PK` magic. The verbs' own descriptions say so: "exact plaintext bytes for one Actions job" and "exact ZIP bytes containing every job log in one Actions run". The spec knows the content type. The renderer does not honour it. `--output text` does not help, which is the tell that the decode happens before format selection rather than inside it. ## Why it matters coilyco-gaming/sirens-echo#91 recorded that this Forgejo instance predated the Actions log endpoints, both returned 404, and therefore "an agent cannot self-diagnose a CI failure in this repo. That is worth solving on its own." Forgejo 16 shipped the endpoints and these verbs were mounted for them. The capability is present at the API and unreachable through the guard. Hit while closing sirens-echo#787: the `image-build` job passed, and reading its log was the acceptance check #91 asked for ("The first run of the new job is checked against real logs before it is relied on"). The job conclusion was the only evidence available. ## Suggested shape Pass the body through unparsed when the spec marks a response non-JSON: plaintext to stdout as-is, ZIP as bytes so a caller can redirect to a file. A byte-range option is already advertised on `action-job logs`, which only makes sense against an unparsed stream. Filed by an agent that hit the wall rather than routed around it.
Author
Member

Duplicate of #1044, which filed the same defect two days earlier with a live-incident case behind it. My mistake: I filed before searching.

The one thing here that was not already in #1044, the sibling action-run logs verb failing identically on a ZIP body, is now a comment there. Closing this.

Duplicate of #1044, which filed the same defect two days earlier with a live-incident case behind it. My mistake: I filed before searching. The one thing here that was not already in #1044, the sibling `action-run logs` verb failing identically on a ZIP body, is now a comment there. Closing this.
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
coilyco-flight-deck/agentic-os#1061
No description provided.