mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 08:31:44 +01:00
A used review grant can no longer be claimed again, plus two /ship finish fixes (GST-3560) (#4722)
A grant for one follow-up review of a fix can no longer be claimed again once that review ran, so one grant still buys one round. /ship finish no longer calls the docs audit stale for a file a clean follow-up review read, and the CI-record timeout no longer counts local test runs. Nothing to do: the merge checks only get stricter, and the timeout setting keeps its name and default. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: pass1/outside-voice#1 reader=outside-voice Review-Finding: pass1/outside-voice#2 reader=outside-voice Review-Finding: pass1/outside-voice#3 reader=outside-voice Review-Finding: pass2/outside-voice#2 reader=outside-voice
This commit is contained in:
1 parent
79f3052f35
commit
ccd80de8eb
15 files changed
+198
-36
No files matched your search
+4
-2
@@ -1474,8 +1474,10 @@ them (`ci_carried=<lane>:<run>/<attempt>`). A run whose `tree.json` lists
|
||||
from its job log adds `tree_source: "job-log"` to its entries and
|
||||
`tree_source=job-log` after them ([tree_log_step](#tree-log-step)). Each `record-ci` gets the base
|
||||
policy's [`ci_record_timeout_s`](ship-policy.md#ci-record-timeout) (600 s by
|
||||
default, 3600 s at most), in preflight's Step 5 and finish as well as in accept, and accept and
|
||||
preflight print it as `CI_RECORD_TIMEOUT:`.
|
||||
default, 3600 s at most) to find and verify the CI run, in preflight's Step 5 and finish as well as in accept, and accept and
|
||||
preflight print it as `CI_RECORD_TIMEOUT:`. The local runs that follow
|
||||
`CI_RECORD_PHASE: local` (a `per_file` remainder or an exception preflight)
|
||||
don't count against it and get up to an hour more.
|
||||
|
||||
<a id="record-ci-reuse"></a>**record-ci reuses its own row at the same tree (GST-1795).** Step 5's
|
||||
carry and accept both call `record-ci`, so at an unchanged pushed tree the
|
||||
|
||||
@@ -230,7 +230,9 @@ caught on another crew's PRs.
|
||||
An extra-round grant never answers a stop.
|
||||
A run whose flags name a grant runs `gstack-ship-receipt claim` before its
|
||||
first dispatch, which writes a grant record into the runs block; a grant
|
||||
another run claimed is refused (`GRANT_SPENT`), a voided run's claim still
|
||||
another run claimed, or a fix-check grant a counted fix-check already read
|
||||
under (one carrying no grant and logged after it included), is refused (`GRANT_SPENT`), a
|
||||
voided run's claim still
|
||||
spends it, and stop and grant records are never trimmed from the block. When
|
||||
the run record cannot save the claim, claim fails and the run starts no
|
||||
reviewers; rerun claim with the same `--run` once the record is writable, since
|
||||
@@ -1005,7 +1007,10 @@ fix-check read after a base merge also edited it (GST-1195), routes as
|
||||
`fix_checked=` in `ROUTE:` and is listed on a
|
||||
`FIX_CHECK: reviewed` line, a gate-edited test included. The line names the
|
||||
grant whose stop head is newest in that range, the fix-check's own when several
|
||||
grants fall inside it (GST-1610). Authored docs keep the
|
||||
grants fall inside it (GST-1610). A `fix_checked` path the Step 14.5 audit
|
||||
hashed also doesn't stale that audit at stage 3: `DOCS: fresh` counts it as
|
||||
`fix_checked=<n>` in its carried list, since a clean fix-check read its current
|
||||
bytes and the path is unchanged since that read (GST-3560). Authored docs keep the
|
||||
stage 2.2 recheck, and a path the branch edited after the fix-check still routes by the
|
||||
rules above. Any other row prints
|
||||
`FIX_CHECK: not counted (<reason>)` and changes nothing. `gstack-review-log`
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ branch that changes the policy.
|
||||
| `mechanical_retake` | `[{ path, template, fields, regen }]` | `[]` | A version or rules constant a branch may have to retake after a base merge, next to `bookkeeping`'s bounded kind: `path` is one literal file, `template` the whole line with one `{n}` (`const RULE_NUMBERS := {n}`), `fields` the `{ glob, field }` fixture fields that carry the same value, and `regen` the [`.gstack/generated.json`](pregate.md#generated) entry ids whose command regenerates its goldens. A post-review edit finish proves to be only that retake routes as `mechanical=`, with no reader and no review round; see [mechanical retakes](#mechanical-retake). At most 8 constants and 16 fields or ids each; no glob, `..`, `.gstack/` or `.github/` path. Read from the base revision only. Needs `min_gstack_version`. |
|
||||
| `test_code` | glob list | `[]` | Root-anchored globs of test code the built-in test names miss, never under `.gstack/` or `.github/`, and never matching a file there (`["tests/**/*.gd"]` for GDScript checks). A matching file changed after review routes as test code, one scoped reader of its test hunks, instead of behavior, beside the built-in globs; shared `helpers/` and `fixtures/` files stay behavior. See [test code and Godot UID sidecars](#test-code). Read from the base revision only. Needs `min_gstack_version`. |
|
||||
| `plan_record` | `off` \| `warn` \| `require` | `off` | <a id="plan-record"></a>Whether `gstack-ship-queue ready` and `land` (direct, stamp and train land) and `/ship`'s `gstack-ship-release finish --plan "<line>"` check the PR body's `Plan:` line (GST-1751). The line is the brief's (`Plan: approved: <run id or row id>`, `Plan: exempt: <reason>` or `Plan: required`), written under `## Approvals` by `gstack-approvals render --plan`. `ready` resolves it with lib/plan-record.ts against every branch's approval rows on the lane machine: a run id needs the newest gate revision's plan approval answered `approved`, in the owner's words, with no decision of that revision left unanswered; a row id needs an approved row that is not a ruling or grant, and a row from an autoplan run stands for that run's gate the same way; a broken or unreadable store refuses (`PLAN_STORE_UNAVAILABLE`) and never throws, and under `off` changes nothing; an exemption must be one crew/docs/captain.md lists or `crew:<rule>`; a diff of changelog fragments only needs no line. `finish` resolves the brief's line the same way before its first stage. `ready` (train ready included) prints `PLAN:` and writes the resolved record into the READY note; `land` checks that the note carries the PR body's current line and never reads the store. `warn` prints and continues; `require` refuses (`PLAN_RECORD_MISSING`, `PLAN_UNRESOLVED`, `PLAN_NOT_APPROVED`, `PLAN_EXEMPT_UNKNOWN`, `PLAN_STORE_UNAVAILABLE`, `QUEUE_PLAN_MISMATCH`). When this key is `off` or absent, the mode comes from `GSTACK_PLAN_RECORD` (a crew's opt-in), then `plan_record` in `<state root>/config.yaml` (`gstack-config set plan_record off|warn|require`: the untracked source for a repo that commits no `.gstack/`; a typo is rejected, and the `PLAN:` line names the file), then `warn` in a Capy session (`GSTACK_CAPY=1`), then `off`; a machine's key never loosens a tracked `warn` or `require`. A repo with no tracked policy gets the check at `ready` and `finish` only: ready writes no READY note there and `land` refuses before its plan step. Capy's state root does not survive a fresh machine, so a Capy crew that wants more than `warn` sets `GSTACK_PLAN_RECORD` in its project env. On a public or unknown-visibility repository `render --plan` writes `Plan: approved (record r-<12 hex>)`, an opaque id of the approval row (opaque, not secret), so no run id, row id or path reaches the PR body or the READY note pushed to origin; `ready` resolves it by hashing every row id it reads and then applies the row-id rules, and render refuses with no output when an approved line does not resolve. gstack never infers a feature from the diff, title or changelog. Read from the base revision only. Needs `min_gstack_version`. |
|
||||
| `ci_record_timeout_s` | integer seconds, at least 60 | `600` | <a id="ci-record-timeout"></a>How long one `gstack-evidence record-ci` may run before it stops that lane, in `gstack-ship-release accept` and finish and in `gstack-ship-preflight`'s Step 5. A value over 3600 is clamped to 3600. accept and preflight print the bound they used as `CI_RECORD_TIMEOUT: <n>s (default)`, `(origin/<base> ci_record_timeout_s)` or `(… <value> is over the 3600s ceiling)`. Raise it when record-ci runs long, for example when it reruns a per_file remainder of CI-skipped files here (harness-evals #271 needed about 745 s). Read from the base revision only, so a branch can't raise its own bound. Needs `min_gstack_version`. |
|
||||
| `ci_record_timeout_s` | integer seconds, at least 60 | `600` | <a id="ci-record-timeout"></a>How long one `gstack-evidence record-ci` may spend finding and verifying the CI run before it stops that lane as `ci_record_timeout`, in `gstack-ship-release accept` and finish and in `gstack-ship-preflight`'s Step 5. A value over 3600 is clamped to 3600. accept and preflight print the bound they used as `CI_RECORD_TIMEOUT: <n>s (default)`, `(origin/<base> ci_record_timeout_s)` or `(… <value> is over the 3600s ceiling)`. The local runs that follow, a per_file remainder of CI-skipped files or an exception preflight, start once record-ci prints `CI_RECORD_PHASE: local`; they don't count against it and get up to an hour more, so a long remainder no longer needs a higher bound (harness-evals #538 ran 445 remainder tests in about 880 s against 900). Read from the base revision only, so a branch can't raise its own bound. Needs `min_gstack_version`. |
|
||||
| `base_red` | `{ setup, select, timeout_sec }` or `null` | `null` | How `/ship` Step 5 proves a failure is the base branch's own before pausing on it; see [base_red](#base-red). Read from the base revision only. Needs `min_gstack_version`. |
|
||||
| `changelog_fragments` | `{ dir, required_checks? }` or `null` | `null` | PRs carry unversioned [CHANGELOG fragments](#changelog-fragments) in `dir` (one flat, repo-relative directory, no `..`) and the merge step ([`land`](#land)) assigns the version (under `merge: direct`, the [release PR](#release-stamp) does). `required_checks` (up to 50 distinct names) are the checks [`train land`](#stamped-trains-under-changelog_fragments-train-land) requires present and green on a stamp commit. `null` keeps `[Unreleased]` sections and per-PR stamps. Needs `min_gstack_version`. |
|
||||
|
||||
|
||||
@@ -8015,8 +8015,13 @@ The digest binds the abandon to the bytes you inspected.
|
||||
### `GRANT_SPENT`
|
||||
|
||||
**Meaning.** `gstack-ship-receipt claim` found another `/ship` run's grant
|
||||
record for this round grant in the PR body's runs block. A grant buys one round,
|
||||
and a voided run's claim still spends it. Within the run that claimed it, a
|
||||
record for this round grant in the PR body's runs block, or, for a fix-check
|
||||
grant, a counted fix-check in the review log that already read under it: a row
|
||||
carrying the grant, or one carrying no grant logged after the grant was recorded
|
||||
(a row stamped with another grant was that grant's read). The second case
|
||||
catches a fix-check that ran with no claim (an owner's `review_loop_grant` row or
|
||||
a round grant planned through `gstack-review-plan --grant`). A grant buys one
|
||||
round, and a voided run's claim still spends it. Within the run that claimed it, a
|
||||
fix-check row that doesn't count (`converged:false`, partial hunks) spends
|
||||
nothing: log a correct row in the same run instead of asking for a new grant
|
||||
([review-policy.md](review-policy.md#one-grant-path)).
|
||||
|
||||
Reference in new issue
Block a user