mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-24 09:01:28 +01:00
/ship reruns the test gate when its record was taken against a different base branch (GST-3493) (#4706)
/ship no longer accepts a test-gate record taken against a different base branch: it reruns the gate against the base it ships to. Why: a record cleared while a pull request was stacked on another branch still verified after the pull request was retargeted at main with the same code, though it used the other branch's policy and CI run profiles. Nothing to do. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#2 reader=testing Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/specialist-batched#1 reader=security Review-Finding: p1/adversarial-native#1 reader=adversarial-native Review-Finding: p1/outside-voice#2 reader=outside-voice
This commit is contained in:
1 parent
45e33b5e7b
commit
17afb6831b
11 files changed
+187
-17
No files matched your search
+2
-1
@@ -489,7 +489,8 @@ from a `--only` or `--stage preflight|tests` run that is missing checks is
|
||||
`PREGATE_INCOMPLETE` ("pregate.json holds checks=1 of 8 (missing: …)"): run
|
||||
`gstack-pregate --allow-repo-commands` with neither flag at that tree. The ship
|
||||
receipt then carries `pregate` and `requires_remote`. `gstack-pregate verify`
|
||||
runs the same check standalone.
|
||||
runs the same check standalone; with `--base <branch>` it also refuses a record
|
||||
taken against another base branch (`PREGATE_STALE`).
|
||||
|
||||
<a id="same-tree-checks"></a>
|
||||
**A staged rerun keeps the rest.** A `--only` or `--stage preflight|tests` run
|
||||
|
||||
@@ -5146,10 +5146,14 @@ tell the two apart and knows which to confirm elsewhere first.
|
||||
fingerprint than the one being published (the final stamp, a regen, any edit),
|
||||
or the user-owned policy it ran under was edited or deleted (or one appeared,
|
||||
or a symlink on its path started pointing nowhere, after a run under the
|
||||
defaults).
|
||||
defaults), or, when the step names a base (`gstack-pregate verify --base`,
|
||||
`gstack-ship-receipt write --base`, `gstack-ship-queue ready`), the record was
|
||||
taken against another base branch, so its checks and clears used that branch's
|
||||
policy and run profiles.
|
||||
|
||||
**Fix.** Rerun `gstack-pregate` after the final generation and stamp; Step 18
|
||||
refuses to write the ship receipt otherwise.
|
||||
refuses to write the ship receipt otherwise. For a base mismatch, rerun
|
||||
`gstack-pregate --base <the PR's real base>`.
|
||||
|
||||
<a id="pregate-remote-uncleared"></a>
|
||||
### `PREGATE_REMOTE_UNCLEARED`
|
||||
@@ -7212,7 +7216,9 @@ base (the PR's base from `gh`, else the remote's live HEAD from
|
||||
`git ls-remote --symref`, else `origin/main`, else `origin/master`). For
|
||||
a pull request's head the queue refuses whenever the base contains it. On the
|
||||
base branch itself, on a detached HEAD, and on a fresh branch with no commits
|
||||
past its base, the step runs as before. `gstack-diff-scope` reports it as
|
||||
past its base, the step runs as before, except `gstack-pregate clear`, which
|
||||
refuses a base that contains the recorded head on a branch or a detached
|
||||
checkout, before it reads that base's policy. `gstack-diff-scope` reports it as
|
||||
`SCOPE_ERROR=base_contains_head` (all flags false, exit 2) with the reason on a
|
||||
comment line.
|
||||
|
||||
|
||||
Reference in new issue
Block a user