M36: Forgejo pull request blocks (attention, diff, checkout, drafts as asks) #88

Closed
opened 2026-10-03 02:06:49 +00:00 by jhgaylor · 1 comment
Owner

Blocked by: #87 (S23), #73 (M34's gate source) and #85 (M35's Api::Ask on non-terminal blocks). Plan: PLAN's "Forge track", M36.


BlockType::Forge with {provider: forgejo, host, repo, kind: pr, number}:

  • Reads through the provider adapter, polled while drawn or while it has attention. State: title, body, author, labels, draft, base/head, mergeable, reviews, checks, the newest timeline events.
  • Log: the timeline as an event stream in blocks/%N/, so history and search find it.
  • Attention through M34's gate source (forge) and M24's reasons:
    • review requested from you → ask;
    • your checks red → failed, with Rerun checks;
    • changes requested or a mention → input;
    • merged, or green → done.
  • Methods:
    • comment, approve, request_changes, merge, rerun_checks, refresh. An agent's write becomes a draft ask; a person's goes out as them. Owner and editors only.
    • diff: an M11 diff block on merge-base..head in a worktree of the head.
    • checkout: a terminal block in that worktree.
  • capture --text: the PR as text.
  • Ways in: illogical pr [URL | REPO#N | N], Open pull request…, PR links in terminals, MCP open_pr, and the swarm (kind pr).
  • Web: blocks/forge.tsx, plus the phone sheet (what waits on you first) and a TUI line.

Tests: adapter units on S23's fixtures; daemon tests for attention, drafts and viewer refusal against a fake Forgejo (with ETags); e2e.

Done when: on geek, a real PR on this repo's Forgejo opens as a block. A review requested from Jake reaches the rail and phone within about a minute, and approving it from the phone shows on Forgejo as Jake. Red checks show as Failed with Rerun checks. An agent's comment waits as a draft until Jake sends it.

**Blocked by:** #87 (S23), #73 (M34's gate `source`) and #85 (M35's `Api::Ask` on non-terminal blocks). **Plan:** PLAN's "Forge track", M36. --- `BlockType::Forge` with `{provider: forgejo, host, repo, kind: pr, number}`: - **Reads** through the provider adapter, polled while drawn or while it has attention. State: title, body, author, labels, draft, base/head, mergeable, reviews, checks, the newest timeline events. - **Log:** the timeline as an event stream in `blocks/%N/`, so `history` and `search` find it. - **Attention** through M34's gate `source` (`forge`) and M24's reasons: - review requested from you → `ask`; - your checks red → `failed`, with *Rerun checks*; - changes requested or a mention → `input`; - merged, or green → `done`. - **Methods:** - `comment`, `approve`, `request_changes`, `merge`, `rerun_checks`, `refresh`. An agent's write becomes a draft ask; a person's goes out as them. Owner and editors only. - `diff`: an M11 diff block on `merge-base..head` in a worktree of the head. - `checkout`: a terminal block in that worktree. - **`capture --text`:** the PR as text. - **Ways in:** `illogical pr [URL | REPO#N | N]`, *Open pull request…*, PR links in terminals, MCP `open_pr`, and the swarm (kind `pr`). - **Web:** `blocks/forge.tsx`, plus the phone sheet (what waits on you first) and a TUI line. **Tests:** adapter units on S23's fixtures; daemon tests for attention, drafts and viewer refusal against a fake Forgejo (with ETags); e2e. **Done when:** on geek, a real PR on this repo's Forgejo opens as a block. A review requested from Jake reaches the rail and phone within about a minute, and approving it from the phone shows on Forgejo as Jake. Red checks show as *Failed* with *Rerun checks*. An agent's `comment` waits as a draft until Jake sends it.
Author
Owner

Built and merged into main (forge track, released in v0.8.0). PLAN has an "as built" section for this milestone, with what landed, tests and what is not covered. The part of "done when" that writes to a real forge is in #93 for Jake.

Built and merged into main (forge track, released in v0.8.0). PLAN has an "as built" section for this milestone, with what landed, tests and what is not covered. The part of "done when" that writes to a real forge is in #93 for Jake.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
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
jhgaylor/illogical#88
No description provided.