Add ward ops forgejo pr edit #1062

Closed
opened 2026-07-10 17:45:34 +00:00 by coilyco-ops · 2 comments
Member

Problem

Director surfaces currently have to use ward ops forgejo issue edit when the thing being edited is a pull request body. That works only because Forgejo stores PRs as issues, but it leaks an implementation detail into operator workflows and makes PR-gate edits look like issue edits.

The immediate trigger was PR #1058, where the director needed to remove or change a ward.workflow merge-gate marker while reviewing PR contents. The available surface is:

  • ward ops forgejo pr view
  • ward ops forgejo pr list
  • ward ops forgejo issue edit

There should be a PR-native edit verb.

Desired behavior

Add ward ops forgejo pr edit for PATCH /repos/{owner}/{repo}/pulls/{index}.

It should support at least the fields needed for director merge gating:

  • --title
  • --body
  • --state if Forgejo supports it for pull request edit
  • --base and --head only if those are already safe/generated in the existing Forgejo API surface

Do not make directors use issue edit to mutate pull request metadata.

Acceptance

  • ward ops forgejo pr --help lists edit alongside view and list.
  • ward ops forgejo pr edit coilyco-flight-deck ward 1058 --body ... patches the PR body through the pull-request endpoint, not the issues endpoint.
  • The generated/request projection keeps the same auth and dry-run behavior as nearby Forgejo ops verbs.
  • Tests or generated-fixture coverage prove the pr edit verb is present and wired to the PR endpoint.

Priority and mode

P1, headless. This is small operator-surface plumbing and unblocks safer director handling of PR merge markers.

## Problem Director surfaces currently have to use `ward ops forgejo issue edit` when the thing being edited is a pull request body. That works only because Forgejo stores PRs as issues, but it leaks an implementation detail into operator workflows and makes PR-gate edits look like issue edits. The immediate trigger was PR #1058, where the director needed to remove or change a `ward.workflow` merge-gate marker while reviewing PR contents. The available surface is: - `ward ops forgejo pr view` - `ward ops forgejo pr list` - `ward ops forgejo issue edit` There should be a PR-native edit verb. ## Desired behavior Add `ward ops forgejo pr edit` for `PATCH /repos/{owner}/{repo}/pulls/{index}`. It should support at least the fields needed for director merge gating: - `--title` - `--body` - `--state` if Forgejo supports it for pull request edit - `--base` and `--head` only if those are already safe/generated in the existing Forgejo API surface Do not make directors use `issue edit` to mutate pull request metadata. ## Acceptance - `ward ops forgejo pr --help` lists `edit` alongside `view` and `list`. - `ward ops forgejo pr edit coilyco-flight-deck ward 1058 --body ...` patches the PR body through the pull-request endpoint, not the issues endpoint. - The generated/request projection keeps the same auth and dry-run behavior as nearby Forgejo ops verbs. - Tests or generated-fixture coverage prove the `pr edit` verb is present and wired to the PR endpoint. ## Priority and mode P1, headless. This is small operator-surface plumbing and unblocks safer director handling of PR merge markers.
Author
Member

WARD-RESERVATION: held 🔒

reservation details

Holder: container engineer-codex-ward-1062 on host kais-macbook-pro-2.local.

Reserved by ward agent --harness codex (reserved 2026-07-10T17:45:48Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (1h TTL). --force overrides.

Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).

run seed context — what this run is carrying (ward#609)
  • Resolved: coilyco-flight-deck/ward#1062 · branch issue-1062 · harness codex · workflow pull-requests-and-merge
  • Run: engineer-codex-ward-1062 · ward v0.584.0 · dispatched 2026-07-10T17:45:48Z
  • Comment thread: 0 included in the pre-flight read, 0 stripped (ward's own automated comments).

Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.584.0).

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-ward-1062` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness codex` (reserved 2026-07-10T17:45:48Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (1h TTL). `--force` overrides. **Do not comment on or edit this issue to steer the run while it is reserved.** The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a **new issue, dispatched fresh**. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494). <details><summary>run seed context — what this run is carrying (ward#609)</summary> - **Resolved:** `coilyco-flight-deck/ward#1062` · branch `issue-1062` · harness `codex` · workflow `pull-requests-and-merge` - **Run:** `engineer-codex-ward-1062` · ward `v0.584.0` · dispatched `2026-07-10T17:45:48Z` - **Comment thread:** 0 included in the pre-flight read, 0 stripped (ward's own automated comments). Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.584.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-OUTCOME: merge-ready

details

workflow: pull-requests-and-merge; review summary: review gate skipped by ~/.ward/config.yaml default
implementation felt straightforward once the generated Forgejo surface and broker routing were aligned.
confidence: high
surprise: Forgejo already exposes PR metadata through the shared issue payload, so the executor can route PR edits by probing the issue record first.
follow-ups: none

WARD-OUTCOME: merge-ready <details><summary>details</summary> workflow: pull-requests-and-merge; review summary: review gate skipped by ~/.ward/config.yaml default implementation felt straightforward once the generated Forgejo surface and broker routing were aligned. confidence: high surprise: Forgejo already exposes PR metadata through the shared issue payload, so the executor can route PR edits by probing the issue record first. follow-ups: none </details>
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/ward#1062
No description provided.