Land checks a PR whose base moved in a separate clone, then with full CI, before merging (GST-1766) (#4649)

When main has moved since a PR's last CI run, `gstack-ship-queue land`
now runs its local merge checks in a throwaway clone and can then run
the full CI suite on the merged code before it merges.

Why: the old checks shared the checkout's git directory, so a PR's own
test commands could plant a hook that later ran with land's tokens, and
a PR could reach main on a base its full suite never saw.

Nothing to do: gstack's own policy turns the CI run on; other repos opt
in with `land.merged_ci`.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=security
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#3 reader=red-team
Review-Finding: p2/specialist-batched#1 reader=security
Review-Finding: p2/red-team#1 reader=red-team
Review-Finding: p2/red-team#2 reader=red-team
Review-Finding: p2/outside-voice#1 reader=outside-voice
Review-Finding: p2/outside-voice#2 reader=outside-voice
Review-Finding: p2/adversarial-native#1 reader=adversarial-native
Review-Finding: p2/adversarial-native#2 reader=adversarial-native
Review-Finding: p2/adversarial-native#3 reader=adversarial-native
Review-Finding: p2/adversarial-native#4 reader=adversarial-native
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-22 01:27:38 +00:00
1 parent d8abe59096
commit abdc09dad1
12 files changed
+649 -60

No files matched your search

+2 -1
View File
@@ -21,7 +21,8 @@
"bun run typecheck",
"bun run gen:skill-docs --host all && test -z \"$(git status --porcelain -- . ':(exclude)node_modules')\"",
"bun run scripts/test-free-shards.ts --files-from test/land-merged-checks.txt --wall-timeout 600"
]
],
"merged_ci": { "workflow": "free-tests.yml", "profile": "ci-reuse/free-tests" }
},
"release_gate": { "cadence_hours": 8, "gate_workflow": "evals.yml", "branch": "main", "stable_ref": "stable", "check_name": "main-backstop", "on_red": "hold-release", "bisect_spend_cap_usd": 80 },
"min_gstack_version": "1.96.0.0"