Re-express agent_upgrade.go Forgejo release check as ward-kdl forgejo guardfile (retire its bespoke HTTP client) #172

Closed
opened 2026-06-18 07:43:25 +00:00 by coilysiren · 1 comment
Owner

What

cmd/ward/agent_upgrade.go carries its own hand-rolled Forgejo REST client (net/http GET against /api/v1/repos/<owner>/<repo>/releases/latest) to check whether a newer ward release exists. It is a second HTTP client, separate from cmd/ward/forgejo_issue.go.

The ward-kdl forgejo guardfile (cmd/ward-kdl/ward-kdl.forgejo.guardfile.kdl) already grants can get release / can list release. So this release-latest lookup is a ward-kdl specverb call, not a bespoke client.

Why this is its own issue

ward#92 ("cut the binary over to the ward-kdl forgejo guardfile and retire forgejo_issue.go") scopes only the forgejo_issue.go client. It does not touch agent_upgrade.go, which holds a duplicate HTTP path. If #92 lands as written, this second client survives and the "no hand-rolled Forgejo HTTP in ward" goal is incomplete.

Asked-for change

  • Re-express the agent-upgrade release check as a ward-kdl forgejo get release (latest) call.
  • Delete the bespoke net/http client in agent_upgrade.go.
  • Confirm no third hand-rolled Forgejo client remains (grep api/v1 under cmd/ward/).

Part of the coily -> ward -> ward-kdl consolidation (epic ward#91, milestone #6).

## What `cmd/ward/agent_upgrade.go` carries its **own** hand-rolled Forgejo REST client (`net/http` GET against `/api/v1/repos/<owner>/<repo>/releases/latest`) to check whether a newer `ward` release exists. It is a second HTTP client, separate from `cmd/ward/forgejo_issue.go`. The ward-kdl forgejo guardfile (`cmd/ward-kdl/ward-kdl.forgejo.guardfile.kdl`) already grants `can get release` / `can list release`. So this release-latest lookup is a ward-kdl specverb call, not a bespoke client. ## Why this is its own issue ward#92 ("cut the binary over to the ward-kdl forgejo guardfile and **retire forgejo_issue.go**") scopes only the `forgejo_issue.go` client. It does **not** touch `agent_upgrade.go`, which holds a duplicate HTTP path. If #92 lands as written, this second client survives and the "no hand-rolled Forgejo HTTP in ward" goal is incomplete. ## Asked-for change - Re-express the agent-upgrade release check as a ward-kdl forgejo `get release` (latest) call. - Delete the bespoke `net/http` client in `agent_upgrade.go`. - Confirm no third hand-rolled Forgejo client remains (grep `api/v1` under `cmd/ward/`). Part of the coily -> ward -> ward-kdl consolidation (epic ward#91, milestone #6).
Member

🔒 Reserved by ward agent claude — container ward-ward-issue-172-claude-deb1963a on host kais-macbook-pro.local is carrying this issue (reserved 2026-06-18T08:51:48Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent claude` — container `ward-ward-issue-172-claude-deb1963a` on host `kais-macbook-pro.local` is carrying this issue (reserved 2026-06-18T08:51:48Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Sign in to join this conversation.
No project
No assignees
2 participants
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/ward#172
No description provided.