fix(cli): honor repository default branch and satisfy evidence schema #357

Open
opened 2026-08-17 15:12:28 +00:00 by gmackie · 0 comments
Owner

Observed while landing GenTrellis PR 65f1308d-76d2-4afa-9e3e-23850a7f9dcf on 2026-08-17.

  1. forge pr create via POST /api/fg/prs created a JJ changeset with source_branch set to the JJ change ID and target_branch left at the database default main, even though repository metadata correctly reports defaultBranch master and the pushed bookmark was supplied. forge pr merge then failed because Forgejo could not find base main. The route should resolve the repository before insert and set sourceBranch to the supplied JJ bookmark plus targetBranch to repositories.defaultBranch. Add a regression test for a master repository.

  2. forge evidence push for junit and log files received HTTP 400 because the request omitted server-required status and externalRunId, and status was not one of queued/running/passed/failed/cancelled. Align CLI request generation with the current evidence API schema and add an end-to-end contract test.

A narrowly scoped production changeset correction was required to complete the approved merge. No git history was bypassed.

Observed while landing GenTrellis PR 65f1308d-76d2-4afa-9e3e-23850a7f9dcf on 2026-08-17. 1. `forge pr create` via POST /api/fg/prs created a JJ changeset with source_branch set to the JJ change ID and target_branch left at the database default `main`, even though repository metadata correctly reports defaultBranch `master` and the pushed bookmark was supplied. `forge pr merge` then failed because Forgejo could not find base `main`. The route should resolve the repository before insert and set sourceBranch to the supplied JJ bookmark plus targetBranch to repositories.defaultBranch. Add a regression test for a `master` repository. 2. `forge evidence push` for junit and log files received HTTP 400 because the request omitted server-required `status` and `externalRunId`, and status was not one of queued/running/passed/failed/cancelled. Align CLI request generation with the current evidence API schema and add an end-to-end contract test. A narrowly scoped production changeset correction was required to complete the approved merge. No git history was bypassed.
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
gmackie/ForgeGraph#357
No description provided.