Summary
TestVendorFromSubdirectory frequently fails with:
Error: installation failed: layer workflows: committing scaffold files:
update ref: github api: 422 Update is not a fast forward
The .fullsend repo is freshly created, then scaffold files are committed via the Git Data API. When GitHub auto-initializes the repo with a default commit before the scaffold push lands, the ref update fails because it's not a fast-forward.
Affected runs
This is the most common e2e failure mode — appears in nearly every failed e2e run:
Also hits TestAdminInstallUninstall in run 27936617155.
Root cause
internal/forge/github/github.go:793 — the ref update payload only sends {"sha": "..."} without "force": true. When GitHub auto-creates a commit during repo initialization (README, license, etc.) before the scaffold push, the tree created by CommitFiles has a parent SHA that doesn't include this auto-commit, making the update non-fast-forward.
refPayload := map[string]string{
"sha": newCommit.SHA,
}
Possible fixes
- Set
force: true on the ref update for scaffold pushes (these target a brand-new repo we own, so force is safe)
- Create the repo with
auto_init: false to prevent GitHub from creating any initial commits
- Re-fetch the latest ref before creating the commit tree, so the scaffold commit properly parents on whatever GitHub created
Option 2 is likely the cleanest — avoids the race entirely.
Summary
TestVendorFromSubdirectoryfrequently fails with:The
.fullsendrepo is freshly created, then scaffold files are committed via the Git Data API. When GitHub auto-initializes the repo with a default commit before the scaffold push lands, the ref update fails because it's not a fast-forward.Affected runs
This is the most common e2e failure mode — appears in nearly every failed e2e run:
Also hits
TestAdminInstallUninstallin run 27936617155.Root cause
internal/forge/github/github.go:793— the ref update payload only sends{"sha": "..."}without"force": true. When GitHub auto-creates a commit during repo initialization (README, license, etc.) before the scaffold push, the tree created byCommitFileshas a parent SHA that doesn't include this auto-commit, making the update non-fast-forward.Possible fixes
force: trueon the ref update for scaffold pushes (these target a brand-new repo we own, so force is safe)auto_init: falseto prevent GitHub from creating any initial commitsOption 2 is likely the cleanest — avoids the race entirely.