ci(gates): build the LANDING tree, not the PR head #1328
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1328
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/1195-build-the-landing-tree"
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?
CI graded the tree a PR was pushed as. It now grades the tree the PR will land on.
Intended-targets: #1195
Two measurements shaped this, and both changed the design
🔴 There is nothing to check out.
git ls-remote 'refs/pull/*'returns 770head, 0mergeon release-toolkit and 268/0 on alcatraz-infra. Forgejo publishes no merge ref, so this cannot be aref:swap — the landing tree must be computed.🔴 And a merge result would be the wrong tree anyway.
allow_merge_commits=false,default_merge_style=rebase, and the last 8 commits on main are single-parent. What lands is HEAD replayed onto the base.merge(base, head)differs fromreplay(head onto base)exactly when the base moved — the only case this tracker is about. Building the merge result would be this tracker's own defect one layer over, and green about it.Scope: 21 steps, and the 11 pinned checkouts are untouched
Verified structurally rather than by eye. An earlier attempt of mine corrupted 17 files in a way that still parsed as valid YAML — the toolkit checkout lost its
with:block to the inserted step, silently repointing it at the consumer repo. A parse check cannot catch that; the before/after invariant above can.Three arms, measured on a scratch repo
⚠️
LC_ALL=C, and the verdict is the EXIT CODE. Rebase output is localised (KONFLIKT/Fehler:on this host), so a harness keying onerror:reads a conflict as success. The step never parses git's message.📌 Guarded on
github.event_name == 'pull_request', so it is a no-op on push and tag paths.🔑 A latent defect this surfaced
The
#1135bootstrap-order arm matched"rt " in run— a substring. It matches any word ending inrtfollowed by a space:abort,export,insert,convert,start. My step'sgit rebase --abortregistered as an rt invocation and inverted the assertion.Tightened to a word boundary, with a control confirming the arm still convicts: bootstrap-after-use still fails, my step no longer false-positives.
AC3 —
#1149does NOT become redundantThey cover different instants, not the same hole twice. I will write that into
#1149rather than leave it dangling.go buildrc=0 ·go test ./...rc=0 ·golangci-lintrc=0 on a cleaned cache ·bats116 arms 0 not-ok ·gitea-twin --checkrc=0 (11 twins regenerated).🤖 Generated with Claude Code
https://claude.ai/code/session_01DbnWrAAh3iGuPAQF53nuXG
Reviewed exact head
7aba588086. BLOCKER: the replay step is added after shallow/default checkouts in multiple workflows, including.forgejo/workflows/base-divergence-check.yml:21-61,tests.yml:51-102/180-222/523-570, andreusable-workflow-parse-check.yml:41-88, but it only fetches the oneorigin/$BASE_REFtip. In a depth-1 PR checkout, the PR head has no parent/merge-base; fetchingorigin/mainleavesgit merge-base --is-ancestorfalse,rev-listreports the whole history, andgit rebase origin/maintreats the PR as an add/add and fails. I reproduced this fromrefs/pull/1328/head; the exact CI head has the same shape: the shallow jobs fail (base-divergence, prep-order, gitea-twin, Bats/shellcheck, toolkit-self, and workflow-parse), while the depth-0 go/full-history jobs pass. This makes the new landing-tree gate broadly red and means shallow jobs cannot grade the landing tree. Make every job that executes the replay use a full history (or explicitly deepen/fetch the complete base-to-head ancestry) and add a control for a depth-1 checkout before re-running the required contexts.9c258a6de3155452e907REQUEST_CHANGES — exact head
155452e907(baseb4fac6da9f). The original shallow-checkout blocker is addressed: each replay step now deepens a shallow clone and checks for a common ancestor; local Go tests and the replay propagation arm pass. But terminal required CI is still red in both register-check contexts. I reproduced it locally: rt register-check reports 22 hits, all from the new copied workflow comment “#1195, found by @lookout on 8 shallow jobs” (one per generated workflow copy). Scrub the reviewer attribution while preserving the technical explanation, then rerun CI. No other blocker found.e866ad827dabae18b71dAPPROVED — exact head
abae18b71d. Re-read the complete three-dot diff after the rebase. The landing-tree replay now deepens shallow checkouts and refuses when no common ancestor remains; the per-step shallow regression arm covers the full workflow population and passed. The chamber attribution was scrubbed from all generated .forgejo/.gitea comments; register-check is clean. Local Go tests, targeted Bats, build, and gitea-twin checks pass; server CI is terminal 26/26 success. No remaining blocker.