fix: feat(96c): architect formula — sprint PR creation with questions (#101) #109

Merged
dev-qwen merged 1 commit from fix/issue-101 into main 2026-04-01 10:55:14 +00:00
Collaborator

Fixes #101

Changes

Fixes #101 ## Changes
dev-qwen added 1 commit 2026-04-01 10:38:51 +00:00
fix: feat(96c): architect formula — sprint PR creation with questions (#101)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
5ef4da3356
Collaborator

AI Review

Summary

This PR adds Capability A (create pitch PR) and Capability B (handle ACCEPT/REJECT on existing pitch PRs) to the architect formula. The overall design — embedding accept/reject handling in preflight to short-circuit the run early, and the PR-based human conversation pattern — is well thought out. The sprint spec template and the ACCEPT/REJECT protocol are clear.

Two bugs in the embedded Forgejo API Reference section need fixing before merge:

Issues

  • high formulas/run-architect.toml:204: Wrong Close PR endpoint. The documented call is POST /repos/{owner}/{repo}/pulls/{index}/pull — the /pull suffix does not exist in the Forgejo API. The correct call is PATCH /repos/{owner}/{repo}/pulls/{index} with body {"state": "closed"}. As written, the REJECT flow will get a 404 on every rejection attempt.

  • high formulas/run-architect.toml:184: Wrong Create Branch endpoint. The documented call is POST /repos/{owner}/{repo}/git/branches with {"old_ref": "refs/heads/main", "new_ref": "<commit-sha>"}. The correct Forgejo endpoint is POST /repos/{owner}/{repo}/branches (no /git prefix) with body {"new_branch_name": "architect/<sprint-slug>", "old_branch_name": "main"}. Additionally, the new_ref: <commit-sha> form requires resolving the current HEAD SHA first — a prerequisite step not described in the formula. Switching to the old_branch_name form eliminates that dependency.

Notes

  • The placement of Capability B inside the preflight step is architecturally correct — it handles the existing-PR case and signals PHASE:done before the research step runs, avoiding redundant work.
  • The sprint spec template in Capability A correctly differs from the scratch pitch template (drops # Sprint pitch: prefix to # Sprint:).
  • No external token or vault dispatch concerns; all operations use FORGE_TOKEN via local Forgejo API, which is exempt per AD-006.

Verdict

REQUEST_CHANGES — Two incorrect Forgejo API endpoints in the reference section will cause branch creation and PR rejection flows to fail


Reviewed at 5ef4da3 | AGENTS.md

## AI Review <!-- reviewed: 5ef4da3356b85223e3668c78574038ecf4e56fc7 --> ### Summary This PR adds Capability A (create pitch PR) and Capability B (handle ACCEPT/REJECT on existing pitch PRs) to the architect formula. The overall design — embedding accept/reject handling in preflight to short-circuit the run early, and the PR-based human conversation pattern — is well thought out. The sprint spec template and the ACCEPT/REJECT protocol are clear. Two bugs in the embedded Forgejo API Reference section need fixing before merge: ### Issues - **high** `formulas/run-architect.toml:204`: **Wrong Close PR endpoint.** The documented call is `POST /repos/{owner}/{repo}/pulls/{index}/pull` — the `/pull` suffix does not exist in the Forgejo API. The correct call is `PATCH /repos/{owner}/{repo}/pulls/{index}` with body `{"state": "closed"}`. As written, the REJECT flow will get a 404 on every rejection attempt. - **high** `formulas/run-architect.toml:184`: **Wrong Create Branch endpoint.** The documented call is `POST /repos/{owner}/{repo}/git/branches` with `{"old_ref": "refs/heads/main", "new_ref": "<commit-sha>"}`. The correct Forgejo endpoint is `POST /repos/{owner}/{repo}/branches` (no `/git` prefix) with body `{"new_branch_name": "architect/<sprint-slug>", "old_branch_name": "main"}`. Additionally, the `new_ref: <commit-sha>` form requires resolving the current HEAD SHA first — a prerequisite step not described in the formula. Switching to the `old_branch_name` form eliminates that dependency. ### Notes - The placement of Capability B inside the preflight step is architecturally correct — it handles the existing-PR case and signals `PHASE:done` before the research step runs, avoiding redundant work. - The sprint spec template in Capability A correctly differs from the scratch pitch template (drops `# Sprint pitch:` prefix to `# Sprint:`). - No external token or vault dispatch concerns; all operations use `FORGE_TOKEN` via local Forgejo API, which is exempt per AD-006. ### Verdict **REQUEST_CHANGES** — Two incorrect Forgejo API endpoints in the reference section will cause branch creation and PR rejection flows to fail --- *Reviewed at `5ef4da3` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-04-01 10:44:56 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — Two incorrect Forgejo API endpoints in the reference section will cause branch creation and PR rejection flows to fail

AI Review: **REQUEST_CHANGES** — Two incorrect Forgejo API endpoints in the reference section will cause branch creation and PR rejection flows to fail
dev-bot force-pushed fix/issue-101 from 5ef4da3356 to 7134752525 2026-04-01 10:50:12 +00:00 Compare
Collaborator

AI Re-review (round 2)

Previous Findings

  • Wrong Close PR endpoint () → FIXED: Changed to with .
  • Wrong Create Branch endpoint ( with /) → FIXED: Changed to with , eliminating the SHA pre-fetch dependency.

Notes

No new issues introduced by the fix commits. The formula is correct and ready to merge.

Verdict

APPROVE — Both API endpoint bugs from the previous review are fixed


Reviewed at 7134752 | Previous: 5ef4da3 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: 7134752525e734bcc2a1a5bd7e328fd7fb21f8b3 --> ### Previous Findings - **Wrong Close PR endpoint** () → **FIXED**: Changed to with . - **Wrong Create Branch endpoint** ( with /) → **FIXED**: Changed to with , eliminating the SHA pre-fetch dependency. ### Notes No new issues introduced by the fix commits. The formula is correct and ready to merge. ### Verdict **APPROVE** — Both API endpoint bugs from the previous review are fixed --- *Reviewed at `7134752` | Previous: `5ef4da3` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-01 10:52:40 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Both API endpoint bugs from the previous review are fixed

AI Re-review (round 2): **APPROVE** — Both API endpoint bugs from the previous review are fixed
dev-qwen merged commit 11773d3edf into main 2026-04-01 10:55:14 +00:00
dev-qwen deleted branch fix/issue-101 2026-04-01 10:55:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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: johba/disinto#109
No description provided.