Skip to content

PIR's review prompt still hardcodes gh pr edit/view/merge after the newly-routed pr-create #1611

Open

Description

@waleedkadous

Problem

PR #1458 routes PR creation through the new pr-create forge concept, but pir/prompts/review.md still hardcodes gh for everything it does with the PR afterwards. On a Gitea or GitLab workspace, PIR now creates the PR through tea/glab and then immediately hits gh — so the protocol is broken end-to-end on exactly the forges the new concept exists to support.

Three sites in codev/protocols/pir/prompts/review.md (and its codev-skeleton/ twin):

Line (approx) Command Status
~124 gh pr edit <PR> --body-file … No concept exists — needs a new pr-edit concept
~212 gh pr view "$PR" --json state --jq .state pr-view is a known concept; this bypasses it
~218 gh pr merge "$PR" --merge pr-merge is a known concept; this bypasses it

The last two are the worse half: they bypass concepts that already ship, so a Gitea user's forge config is silently ignored at the merge — the accepted-then-not-performed failure class #1455 is about, at the second-most-important write in the protocol.

pr-edit is genuinely new work: it needs a contract in forge-contracts.ts, an entry in KNOWN_CONCEPTS, and github/gitea/gitlab scripts. Note the pr-edit call exists only as a fallback (used when the PR body somehow lacks Fixes #<N>), so it is the least urgent of the three.

Scope

  • Route ~212 and ~218 through the pr-view / pr-merge concepts. Note that pr_create_command is currently the only substitution porch/prompts.ts wires (prompts.ts:124), so this needs matching pr_view_command / pr_merge_command substitutions added alongside it.
  • Add a pr-edit concept, or drop the fallback in favor of getting the body right the first time.
  • Sweep the other protocols for the same pattern rather than fixing PIR alone.

Notes

Pre-existing — #1458 did not introduce it, and the contributor flagged it in the PR body. Deferred from that PR's review to keep it scoped; filed so it isn't lost.

Refs #1458, #1455.

Activity

  1. added
    area/protocols
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/protocols

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions