A failed merge links its failed check by a path with no host #131

Closed
opened 2026-10-02 22:55:05 -04:00 by cmoriarty · 1 comment
Owner

Since #129, git.pr.merge fails with Forgejo's reason and with each check that did not succeed, together with its link. But Forgejo Actions writes a commit status's target_url as a path, not a URL, so the link Braid prints has no host. Run 38 failed this way on 2026-10-02 at 22:37:

Checks that did not succeed: CI / full (pull_request) failure /cmoriarty/soundcheck/actions/runs/145/jobs/1

In the console, that is text that cannot be opened as it stands.

What to change

  • When a check's target_url is a path, prefix the forge's base URL before printing it (_check_list in src/osf/forgejo.py), so the line reads https://forgejo.underthere.xyz/cmoriarty/soundcheck/actions/runs/145/jobs/1. Leave a full URL as it is.
  • Look for the same gap anywhere else a commit status's target_url is shown, for example the CI fold in src/osf/pipeline/ci.py.

To verify, add a test in tests/unit/test_landing.py in which the fake forge serves a target_url that is a path. Then check on production at the next refused merge.

Since #129, `git.pr.merge` fails with Forgejo's reason and with each check that did not succeed, together with its link. But Forgejo Actions writes a commit status's `target_url` as a path, not a URL, so the link Braid prints has no host. Run 38 failed this way on 2026-10-02 at 22:37: ``` Checks that did not succeed: CI / full (pull_request) failure /cmoriarty/soundcheck/actions/runs/145/jobs/1 ``` In the console, that is text that cannot be opened as it stands. ## What to change - When a check's `target_url` is a path, prefix the forge's base URL before printing it (`_check_list` in `src/osf/forgejo.py`), so the line reads `https://forgejo.underthere.xyz/cmoriarty/soundcheck/actions/runs/145/jobs/1`. Leave a full URL as it is. - Look for the same gap anywhere else a commit status's `target_url` is shown, for example the CI fold in `src/osf/pipeline/ci.py`. To verify, add a test in `tests/unit/test_landing.py` in which the fake forge serves a `target_url` that is a path. Then check on production at the next refused merge.
Author
Owner

Shipped in 02440a6. Deployed in deploy 97 (76eaaae, 01:47 on 2026-10-03). Archived in 3b488cc as absolute-check-links.

When the client reads a commit's statuses, a target_url that Forgejo gives as a path (/owner/repo/actions/runs/N/jobs/M) is now put on the forge's address. A full URL is left as it is. So the reason a refused merge gives names a link that opens. The run-landing spec says so, with a scenario for it.

Checked on production after the deploy: the client in the osfd container read the checks on soundcheck PR 72's head. Forgejo gave every link as a path. The client returned each one on https://forgejo.underthere.xyz, such as https://forgejo.underthere.xyz/cmoriarty/soundcheck/actions/runs/145/jobs/1 for the failed CI / full (pull_request).

Shipped in 02440a6. Deployed in deploy 97 (76eaaae, 01:47 on 2026-10-03). Archived in 3b488cc as `absolute-check-links`. When the client reads a commit's statuses, a `target_url` that Forgejo gives as a path (`/owner/repo/actions/runs/N/jobs/M`) is now put on the forge's address. A full URL is left as it is. So the reason a refused merge gives names a link that opens. The run-landing spec says so, with a scenario for it. Checked on production after the deploy: the client in the osfd container read the checks on soundcheck PR 72's head. Forgejo gave every link as a path. The client returned each one on `https://forgejo.underthere.xyz`, such as `https://forgejo.underthere.xyz/cmoriarty/soundcheck/actions/runs/145/jobs/1` for the failed `CI / full (pull_request)`.
Sign in to join this conversation.
No labels
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
cmoriarty/braid#131
No description provided.