feat(forgejo): submitted reviews continue the implementer session on its own PR #51
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!51
Loading…
Reference in a new issue
No description provided.
Delete branch "45-forgejo-submitted-reviews-continue-the-implementer-session-on-its-own-pr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A review submitted on a pull request the agent authored now starts a turn in that PR's implementer session. Any verdict counts and no @mention is needed. The webhook accepts the three review event types. The dispatcher checks that the reviewer can push, using the API, because the review payload carries the PR author's permission. The turn's seed has the reviewer, the verdict, the review body, and the review id and line-comment count. If the PR has no implementer session, one is created in the PR's clone. It is scoped to the issue the PR closes, or to the PR alone, and its seed tells it to catch up first. Implementer scopes gain an optional
pull, so resume restores the right clone and the session can't open a second pull request.Decisions
Posted in #51 (comment):
ForgejoTriggerSummary.event/.actioninpackages/protocolto include the review events. No migration is needed (the columns areTEXT).be7e811doesn't typecheck on its own;57f2e55fixes it.git_rebasecan't squash or fixup.reviewerCanWritehas no permanent unit test, since there's noForgejoClientstub pattern. All seven paths were checked once with a throwaway script against a local HTTP stub.Verification
bun testinapps/server: 850 pass, 0 fail. New tests cover the webhook classifier and route, the dispatcher review gate and routing (9 tests), and the implementer policy and orientation for PR-started scopes.bun run typecheck(protocol, server, web): pass.reviewerCanWriteagainst a local HTTP stub: all 7 cases as expected.Closes #45
Decisions and notes for review:
packages/protocol. This wasn't in the plan.ForgejoTriggerSummary.event/.actionnow include the three review event types andreviewed. Without that the stored trigger rows don't typecheck. No DB migration: the columns are plainTEXT.be7e811doesn't typecheck on its own. The type fix is the separate commit57f2e55that follows it.git_rebasedoesn't allow squash or fixup, so I couldn't fold it in.reviewerCanWritehas no permanent unit test. There's noForgejoClientstub pattern to build on. I checked all seven paths once with a throwaway script against a localBun.servestub, and didn't commit it: 200 write → true, 200 read → false, 403 + owner → true, 403 + team member → true, 403 + no matching team → false, 403 + teams 404 → false, 500 → error. The dispatcher tests useFakeApifor the gate.statematches the event (APPROVED/REQUEST_CHANGES/COMMENT). If none matches, or the API call fails, the seed tells the agent to find the newest review itself.96b7a1c9feto64f284079f