mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-09 18:28:15 +01:00
v1.94.1.0 stamp: merge main 4ec1722ecb into #3893 (land)
This commit is contained in:
commit
adcf98741c
66 files changed
+2392
-193
No files matched your search
+117
-2
@@ -90,6 +90,7 @@ the byte-pinned `/ship` renders in `test/fixtures/golden/`).
|
||||
| `remote_gate` | the repo's remote test gate command; under 8 cores the local test tier becomes a `requires-remote` obligation naming it, and `--remote` runs it (see [remote gate](#remote-gate)) |
|
||||
| `run_profiles` | name → `{ workflow, events, jobs, artifact, max_age_hours?, os? }`: the GitHub Actions runs `clear --run` verifies as evidence on the identical tree; a profile named after a lane (`free-tests.yml/macos-named-regressions`) clears that lane (see [run evidence](#run-evidence)). `--from-run` and the main-push reuse job verify runs against them too ([from-run](#from-run), [CI reuse](#ci-reuse)) |
|
||||
| `remote_gate_runs` | `{ profiles, inventory, skipped? }`: the run profiles that together clear `pregate.json/remote_gate`, the command that prints the remote gate's test files, one per line, which their runs must cover, and an optional command that prints which selected files the gate itself never runs (see [run evidence](#run-evidence)) |
|
||||
| `ship_lanes_from` | maps each exact /ship lane command to `{ profiles, inventory }`: the run profiles whose verified runs at HEAD's clean tree carry that lane instead of running it, and the command listing its test files, which their runs must cover (see [CI carry](#ci-carry)); read from the base branch only |
|
||||
| `allowlist` | `[{ finding, paths?, pattern?, reason }]`: benign findings the `secrets` check accepts and names as allowlisted, by gstack-redact finding id or non-secret category, path globs and a pattern anchored at the finding; never `env.value` (see [allowlist](#allowlist)) |
|
||||
|
||||
Only the `origin/<base>` copy or the user-owned file below is honoured, so a
|
||||
@@ -173,7 +174,7 @@ The list lives in its own file, not in `pregate.json`, because older pregate rea
|
||||
|
||||
```
|
||||
gstack-pregate [--stage preflight|tests|all] [--only <check,..>] [--allow-repo-commands] [--policy-from base|head]
|
||||
[--timeout <s>] [--stall-timeout <s>] [--remote --spend-cap <usd>] [--run <id>] [--from-run <id|url>] [--explain] [--json]
|
||||
[--timeout <s>] [--stall-timeout <s>] [--remote --spend-cap <usd>] [--run <id>] [--from-run <id|url>] [--no-ci-carry] [--explain] [--json]
|
||||
gstack-pregate verify | clear --remote <workflow.yml/job> --run-url <url> | lanes | validate | init
|
||||
```
|
||||
|
||||
@@ -493,8 +494,15 @@ the selected local files as a `requires-remote` obligation with the command to
|
||||
run, `pregate.json/remote_gate` (the declared command) or
|
||||
`test_backend/<backend>` (gstack's `scripts/ubicloud/ubi-runner.sh run --src
|
||||
<repo> -- '<runner> <files>'`). Without either, the tier runs locally under
|
||||
the supervision above. Close the obligation one of three ways:
|
||||
the supervision above. Close the obligation one of four ways:
|
||||
|
||||
- by default, when the base declares `remote_gate_runs`, let CI clear it: the
|
||||
tests stage clears it on its own from a verified run at this exact tree
|
||||
([CI carry](#ci-carry)), and the uncleared obligation's detail names that
|
||||
route first (`push, then gstack-ci-carry wait --base <base> and rerun
|
||||
gstack-pregate --allow-repo-commands`, the whole pregate, so the record keeps
|
||||
its preflight checks) and the VM only as the opt-in (under `--no-ci-carry` it
|
||||
names the VM route); or
|
||||
- after running it, `gstack-pregate clear --remote pregate.json/remote_gate
|
||||
--receipt <file>` with the gate's output, validated as `--remote` validates it
|
||||
(a run URL is refused, `PREGATE_RECEIPT_INVALID` for a bad receipt; a receipt
|
||||
@@ -907,6 +915,113 @@ as a usage error. It changes nothing in the preflight stage: with `--stage all`
|
||||
the preflight checks, the secrets scan included, run as before, and
|
||||
`--stage tests` runs no preflight check in that invocation, with or without it.
|
||||
|
||||
<a id="ci-carry"></a>
|
||||
### CI carry: pregate and /ship use CI's run instead of running again (GSTA-258)
|
||||
|
||||
CI is the one full test run. When a verified run already passed at the exact
|
||||
tree being tested, pregate's tests stage and /ship's test lanes use it instead
|
||||
of running the suite a second time. `lib/ci-carry.ts` `findCarry` decides, and
|
||||
it accepts a run only when all of these hold:
|
||||
|
||||
- The working tree is HEAD's committed tree (the `gstack-wtree` fingerprint
|
||||
equals `HEAD^{tree}`), read before the lookup and again after it. A dirty
|
||||
tree, an untracked file or an edit made during the lookup never carries.
|
||||
- The newest of HEAD's runs (up to 10) under each named profile passes
|
||||
`verifyRun` above: same-repository head (a fork run never counts), the
|
||||
profile's workflow, event and jobs, the newest attempt, no newer red or
|
||||
running run on HEAD, within `max_age_hours`, and a `tree.json` naming HEAD's
|
||||
tree. A `pull_request` run counts only when the pull request already
|
||||
contained its base.
|
||||
- Every run executed tests, and with an inventory command, the runs'
|
||||
`tree.json` files cover every file it prints. Each run is read once more
|
||||
afterward (`run_changed`).
|
||||
|
||||
Security and advisory scans, the sealed guard, guards and every preflight-stage
|
||||
check always run; only test lanes carry.
|
||||
|
||||
**The tests stage.** Without `--from-run`, when the base branch declares
|
||||
`run_profiles`, `gstack-pregate` looks up the newest verified run at HEAD under
|
||||
the profiles `--from-run` would use and applies it as `--from-run` does: the
|
||||
selected local files its `tree.json` lists count as passed, and only the rest
|
||||
run. On a small machine a selection the run covers records no remote gate
|
||||
obligation. It prints `CI_CARRY: accepted <receipt>` or `CI_CARRY: none
|
||||
(<reason>)` on stderr; `--no-ci-carry` skips the lookup.
|
||||
|
||||
When files are left over, the remote gate obligation still clears from the
|
||||
same run when the base declares `remote_gate_runs` naming that run's profile:
|
||||
the run must pass every `clear --run` check, with the carried files counted
|
||||
as selected files. So a remainder of only files the gate's `skipped` command
|
||||
names (gstack's paid evals, which the gate itself reports as
|
||||
`PREGATE_REMOTE_PAID_ONLY` with `tests=0`) clears with `skipped=<n>` in the
|
||||
receipt instead of becoming an obligation nothing can clear. The line is
|
||||
`CI_CARRY: cleared pregate.json/remote_gate <receipt>`, or `CI_CARRY:
|
||||
pregate.json/remote_gate stays uncleared (<reason>)` when a check refuses, for
|
||||
example a gate inventory file missing from the run's `tree.json`.
|
||||
|
||||
**gstack's own gate.** gstack's `.gstack/pregate.json` declares
|
||||
`remote_gate_runs` with the `ci-reuse/free-tests` profile, so on gstack a green
|
||||
Free Tests run at the same tree is how the remote gate obligation clears, and
|
||||
the Ubicloud VM (`gstack-pregate --stage tests --remote`) is an opt-in for when
|
||||
no such run exists. The order after a push: wait for Free Tests
|
||||
(`gstack-ci-carry wait --base main`), then `gstack-pregate
|
||||
--allow-repo-commands`. A `pull_request` run tests GitHub's merge commit, so on
|
||||
a branch that does not contain the base tip it tested another tree and
|
||||
`CI_CARRY` says `none (no_verified_run: … tree_mismatch)`: dispatch Free Tests
|
||||
on the branch
|
||||
(`gh workflow run free-tests.yml --ref <branch>`), which tests HEAD's own tree,
|
||||
and wait again. The preflight stage (generated-file freshness, secrets, strays
|
||||
and the other mechanical checks) and the sealed guard are unchanged and always
|
||||
run here. The macOS and Windows lane
|
||||
obligations still clear with `gstack-pregate clear --remote <lane> --run-url
|
||||
<url>` from their CI runs.
|
||||
|
||||
**/ship lanes: `ship_lanes_from`.** A lane carries only when the base branch's
|
||||
`.gstack/pregate.json` maps its exact command (the evidence ledger binds the
|
||||
command's sha256; a label alone never carries) to the profiles whose runs carry
|
||||
it and the command that lists its test files:
|
||||
|
||||
```json
|
||||
"ship_lanes_from": {
|
||||
"bun run test": { "profiles": ["ci-reuse/free-tests"], "inventory": "bun --no-env-file --config=/dev/null run scripts/test-free-shards.ts --list | sed -n 's/^ //p'" }
|
||||
}
|
||||
```
|
||||
|
||||
A carried lane prints `LANE: <label> carried run=<id>/<attempt> tests_ran=<n>`
|
||||
and writes an explicit CI-sourced ledger row (`gstack-evidence record-ci
|
||||
--label <label> --base <base> -- <command>`, which finds and verifies the run
|
||||
itself, so no caller hands it run ids or a test count: `source: "ci"`, its runs
|
||||
and profiles, the run's finish time as `ts`, bound to the clean tree), never a
|
||||
fictitious local run. `gstack-evidence check` grades it
|
||||
like any row and names `source=ci runs=…`, so `finish`'s FRESH check and the
|
||||
24-hour age limit apply to the CI run's own time. A mapped lane that cannot
|
||||
carry prints `CI_CARRY: none label=<label> (<reason>)` and runs here. Every
|
||||
other lane runs through `gstack-evidence run --reuse`: the newest row for its
|
||||
label, command and working tree is reused when it passed with a counted run
|
||||
under the same runtime (bun and node versions, OS, architecture, runner image)
|
||||
within 24 hours; a newer failure on that tree vetoes an older pass, and the
|
||||
reused copy keeps the original timestamp. The cache is this machine's ledger
|
||||
only; across machines, CI is the trust boundary.
|
||||
|
||||
**Finish, push and accept.** `gstack-ship-release finish` commits the release
|
||||
metadata, so the stamped tree has no CI run yet. A mapped lane that is not
|
||||
already FRESH is deferred (`EVIDENCE: DEFERRED`), and the pregate runs only its
|
||||
preflight stage on the stamped tree, written to its own file so the full
|
||||
`.gstack/tmp/pregate.json` stays in place until `accept` replaces it. `gstack-ship-release push --early` (the
|
||||
Phase 2 push that lets CI run beside the review) runs the secrets scan and the
|
||||
sealed guard before it pushes. After the final push,
|
||||
`gstack-ship-release accept --base <base> --lane …` waits (bounded by `--wait`)
|
||||
for the run at the pushed HEAD, stops on a red or still-running run, carries
|
||||
each mapped lane from the green run at that exact tree, reuses or runs the rest,
|
||||
checks every lane FRESH and reruns the pregate there, whose tests stage carries
|
||||
the same run. `gstack-ship-receipt write` records the carried runs as
|
||||
`ci_carried: [{ lane, run, attempt, tree }]`, and the `SHIP_RECEIPT:` line names
|
||||
them (`ci_carried=<lane>:<run>/<attempt>`).
|
||||
|
||||
**`gstack-ci-carry`.** `find [--profile <name>]… [--command <exact lane command>
|
||||
--allow-repo-commands]` prints the verdict for HEAD; `wait [--timeout <s>]`
|
||||
polls the newest run at HEAD until it completes (run it in the background) and
|
||||
prints `CI_WAIT: green|red|running|none`, then `find`'s verdict on green.
|
||||
|
||||
<a id="ci-reuse"></a>
|
||||
### Main pushes reuse the merged pull request's run
|
||||
|
||||
|
||||
@@ -139,7 +139,9 @@ harness-generic; only the thread and the PR tool are Capy.
|
||||
default branch.
|
||||
4. **Run `/ship` unattended** with the `GSTACK_LAUNCH` assignments
|
||||
exported: it runs the pregate (on a machine under 8 cores the test tier
|
||||
needs `gstack-pregate --stage tests --remote`, about $0.06 on a Ubicloud VM
|
||||
clears from a verified CI run at the pushed tree when the base declares
|
||||
`remote_gate_runs` ([CI carry](pregate.md#ci-carry)); otherwise it needs
|
||||
`gstack-pregate --stage tests --remote`, about $0.06 on a Ubicloud VM
|
||||
or free locally for small selections), both reviews, the gate-integrity
|
||||
list, the docs audit, and writes the ship receipt into the PR body
|
||||
(`gstack-ship-receipt write --pr <n>`). With `queue_mode:
|
||||
|
||||
+18
-9
@@ -601,22 +601,30 @@ ones, and the arm lost blockers. `bin/gstack-review-dispatch` closes both ends:
|
||||
second line for the same field starts another: `Severity` sets its label (a label leading the finding stays its floor),
|
||||
`Blocks: yes` makes it CRITICAL and `Blocks: no` never lowers it; an inline
|
||||
`Blocks: yes` is CRITICAL too, and with no finding above it is one. The native
|
||||
adversarial voice's FIXABLE collects as CRITICAL (normalizer v2, GSTA-167) unless collect `--manifest` names this
|
||||
ledger's pass and its plan is the code or docs class with only `runtime=<n>` depth reasons (no `risk:`, `error:`,
|
||||
`history:` or `floor:` reason). On such a plan a native finding's own `Severity` field decides and FIXABLE beside it
|
||||
raises nothing once it also states `Blocks: no`; a native FIXABLE finding without `Blocks: no`, with no `Severity` field,
|
||||
or whose field names only FIXABLE or INVESTIGATE still collects as CRITICAL (GST-987). An unnumbered, unlabeled bullet with no file:line
|
||||
adversarial voice's FIXABLE collects as CRITICAL (normalizer v2, GSTA-167), except that on every class a native
|
||||
finding that states `Blocks: no` and one `Severity` field collects at that field (GST-1031 ruling A); a native FIXABLE
|
||||
finding without `Blocks: no`, with no `Severity` field, or whose field names only FIXABLE or INVESTIGATE still collects
|
||||
as CRITICAL. On a code or docs plan with only `runtime=<n>` depth reasons (collect `--manifest` naming this ledger's
|
||||
pass; GST-987) FIXABLE also raises nothing through a label heading or a leading tag. A numbered finding heading keeps
|
||||
every unlabeled line under it (located or numbered bullets, a bold subheading, a located paragraph) until its
|
||||
`Severity` or `Blocks` line comes, so those fields never split off as a second record (GST-1031). An unnumbered, unlabeled bullet with no file:line
|
||||
under a paragraph finding whose Severity or Blocks line has not come yet is that finding's detail, so the field line after it
|
||||
lands on the finding; a numbered item is its own finding.
|
||||
A negated severity word still collects at its label ("found nothing CRITICAL", "No P0/P1 issues"), so a reader's
|
||||
closing summary is a known phantom: it stays at that label in the judged set, lead judgment can fold it only into a
|
||||
finding at least as severe, and it counts toward what blocks. GST-766 skipped negated labels and lost
|
||||
closing summary is a known phantom: it collects at that label. When it is a summary candidate (no lead label, no
|
||||
`Severity` or `Blocks` field, and no file:line or exception clause in any sentence naming a label: "so nothing is
|
||||
CRITICAL", "the test covers the CRITICAL fix"), collect marks it `summary_candidate` and lead judgment may lower it
|
||||
with a reason, which judge records as `dismissed` (GST-1031); otherwise lead judgment can fold it only into a finding
|
||||
at least as severe, and it counts toward what blocks. GST-766 skipped negated labels and lost
|
||||
real blockers named in an exception clause ("No CRITICAL issues except the token leak in log.ts:3"); GSTA-167
|
||||
reverted that. Each prose finding's line also
|
||||
records the Severity and Blocks its own text states as `stated`, beside the collected label and never in its place;
|
||||
a classified finding that carries `stated` shows it in its deferred-review issue next to the label ("CRITICAL (the
|
||||
reviewer wrote Severity: Low, Blocks: no)"). /ship's Step 9.4 does not copy `stated` into its findings file yet: that
|
||||
instruction lives in a reviewer brief that changes only after a no-loss replay. What blocks is unchanged.
|
||||
instruction lives in a reviewer brief that changes only after a no-loss replay. A CRITICAL whose own text writes the
|
||||
field `Blocks: no` (colon required, and no `Blocks: yes`) is not counted as a blocker by the ledger count, nor by the
|
||||
review-log count or classify when the finding carries `stated` (GST-1031); lead judgment that raises such a line above
|
||||
its label counts it again.
|
||||
A phantom finding costs a fold; a lost one costs the gate.
|
||||
A reply with no finding counts as a review only with the clean marker its own brief asks for: `NO FINDINGS` alone on a
|
||||
line for the specialists, the batched specialist, the targeted reader, the Red Team and fix-check, the `Recommendation:`
|
||||
@@ -690,7 +698,8 @@ ones, and the arm lost blockers. `bin/gstack-review-dispatch` closes both ends:
|
||||
working directory) and stops when that is another checkout or cannot be read: run /ship in the thread's own checkout.
|
||||
A start directory outside any checkout, such as a multi-repo workspace root, holds no tree to review by mistake and
|
||||
dispatches. Step 11's voices take the `adversarial-review` start
|
||||
token by default, and a `logStart` list without it stops before anything runs.
|
||||
token by default, and a `logStart` list without it stops before anything runs. Decision 3.5's fix-check pass turns a
|
||||
`review` start into `review-fix-check`, so its row is never a pass (GST-1031).
|
||||
|
||||
## Where this is enforced
|
||||
|
||||
|
||||
+2
-1
@@ -1503,6 +1503,7 @@ receipt when the base moves:
|
||||
| a rebase or force-push onto a tree the receipt covers, product diff against the new base unchanged | carries (`carry.ancestry: rewritten`) |
|
||||
| any other rebase or force-push | a fresh /ship (`RECEIPT_CARRY_TREE_MISMATCH`) |
|
||||
| a stacked PR whose parent landed (squash or merge), retargeted to the base with the base merged in, HEAD's product diff exactly the one reviewed against the parent branch | carries (reason `stack parent <branch> landed`) |
|
||||
| a stamp on the branch's own rows in a stamp file the branch also changed as product: every changed line at a branch-added position, the file's mode unchanged, the base not touching it, the rest of the product diff unchanged | carries (reason `a stamp on the branch's own rows (<file>)`) |
|
||||
|
||||
**Stacked PRs (#3570).** A child PR's receipt is written against its parent
|
||||
branch, so its `base` names that branch and its `product_patch_id` is the
|
||||
@@ -1673,7 +1674,7 @@ Stages, each journaled in `.gstack/tmp/restamp-journal.json`:
|
||||
1. **version**: `gstack-version-bump write --version <X>` in the staging worktree (VERSION, the manifest, npm lockfiles); skipped when `restamp_command` owns the version. The manifest gets the npm-valid three-part form, except when the policy lists it in `stamp_paths` or `stamp_files` and its copy at the base holds four parts (gbrain's convention): then it keeps the full version (`--manifest-form full`) and the stage detail says so.
|
||||
2. **release_tool**: the policy command, under the contract below.
|
||||
3. **changelog**: the PR's `[Unreleased]` or old-version section moves to the top under `<X>`, above its predecessor's entry. A duplicate heading the PR introduces (`CHANGELOG_DUPLICATE_HEADING`: the headings are counted against the base's CHANGELOG at `origin/<base>` and at the fork point, so a version the base already heads twice passes as long as the PR adds no further copy) and a top entry that is not `<X>` (`CHANGELOG_TOP_MISMATCH`) are errors; the section being re-headed itself may exist only once.
|
||||
4. **stamp_paths**: exact `(was X)`, `since: X` and `vX` rewrites, plus every `stamp_patterns` template, within `stamp_paths` and `stamp_files`. A quote around X in the first two forms is part of the form and is kept as written: `since: 'X'`, `since: "X"`, `(was 'X')` and `(was "X")` move like the bare ones (the shape of a quoted source row such as gbrain's `{ since: '0.60.468.0', … }`), an opened quote must close right after X (`since: '1.2.3-beta'` and `since: '1.2.3"` are not the form, in the writer and in the tree receipt alike), and `vX` already accepts a quote before the `v`. Which X moves is decided by provenance. The branch's own tentative stamp (its VERSION when it moved past base) and `--was <X>`, when given, are each rewritten on every line of every stamp file. Beyond that, only lines the branch itself added are read, by their position in the file (`git diff --unified=0` from the fork point), so a base line with the same text, or a CRLF checkout whose diff is LF-normalized, is told apart: a stamp-form mention there of a version newer than the version at the branch's fork point is a tentative stamp and moves (this is what finds a quoted row after a lost slot and a merge of the base, since the base's release is newer than the fork point), and so does one of the fork-point version itself (a row the branch wrote at the version it forked from instead of a next version is its own stale stamp; a branch-added mention older than the fork point stays), and when the branch has no stamp of its own because its VERSION equals the base's and its fork point is the base itself (a branch rebased onto the base after it reached X, or one never stamped) a mention of the base version on a line it added is its stale stamp and moves too, while the same version on a line the base already carries is the base's release and stays. The stage detail names both counts per file (`VERSION equals base X, so X moved only on lines this branch added and stayed on the base's own lines (<file>: N moved, M kept)`), so the stamp commit shows which lines moved and why. A line the base added since the fork point is the base's even when that diff shows it (a merge of the base on the branch, committed or still staged, brings every line the base added since the fork into the diff from the fork point, main's own release keys included): it is left out, the detail says `N line(s) the base added since the fork point are the base's, not this branch's, and stay (<file>: N)`, and a base diff git cannot run refuses the stage (`POLICY_SOURCE_UNAVAILABLE`, `cannot diff <since>..<base> for the stamp_paths stage`) rather than reading as an empty set that would move the base's lines again. The rule reads line ownership, not meaning: a branch-added line inside `stamp_paths` that means the base's own release in a stamp form (`Requires vX or later` written on a branch forked at X) moves with it, which the `--dry-run` diff and the per-file counts show before anything is written; write such a reference outside a stamp form, or keep that file out of `stamp_paths`. `--was X` is the opposite tool: it rewrites X everywhere, the base's own lines included, and re-heads the CHANGELOG section `## [X]`. Only the repo's own version width counts, so a 3-digit dependency pin in a 4-digit repo is never a candidate. The checks that accept a stamp commit read the same bound as the writer (`stampOnlyLine` with the branch's side in `lib/stamp-only.ts`): the tree receipt behind `stamp`, `verify` and the gate-ahead replay, the merge train's stamp and verify checks (each reading the slot's predecessor, the gated commit's first parent, as the base), and finish's route each take a moved version on a line the branch added at or above the fork-point version, and on any other line at or above the gated head's VERSION. A base line whose text duplicates a line the branch added gets the branch's bound too, because the checks match branch lines by text, not position (GST-979). The /ship receipt carry can still refuse the move (`RECEIPT_CARRY_PRODUCT_CHANGED`), and when the branch keeps its VERSION claim, carry and finish still route the move as behavior (GST-980).
|
||||
4. **stamp_paths**: exact `(was X)`, `since: X` and `vX` rewrites, plus every `stamp_patterns` template, within `stamp_paths` and `stamp_files`. A quote around X in the first two forms is part of the form and is kept as written: `since: 'X'`, `since: "X"`, `(was 'X')` and `(was "X")` move like the bare ones (the shape of a quoted source row such as gbrain's `{ since: '0.60.468.0', … }`), an opened quote must close right after X (`since: '1.2.3-beta'` and `since: '1.2.3"` are not the form, in the writer and in the tree receipt alike), and `vX` already accepts a quote before the `v`. Which X moves is decided by provenance. The branch's own tentative stamp (its VERSION when it moved past base) and `--was <X>`, when given, are each rewritten on every line of every stamp file. Beyond that, only lines the branch itself added are read, by their position in the file (`git diff --unified=0` from the fork point), so a base line with the same text, or a CRLF checkout whose diff is LF-normalized, is told apart: a stamp-form mention there of a version newer than the version at the branch's fork point is a tentative stamp and moves (this is what finds a quoted row after a lost slot and a merge of the base, since the base's release is newer than the fork point), and so does one of the fork-point version itself (a row the branch wrote at the version it forked from instead of a next version is its own stale stamp; a branch-added mention older than the fork point stays), and when the branch has no stamp of its own because its VERSION equals the base's and its fork point is the base itself (a branch rebased onto the base after it reached X, or one never stamped) a mention of the base version on a line it added is its stale stamp and moves too, while the same version on a line the base already carries is the base's release and stays. The stage detail names both counts per file (`VERSION equals base X, so X moved only on lines this branch added and stayed on the base's own lines (<file>: N moved, M kept)`), so the stamp commit shows which lines moved and why. A line the base added since the fork point is the base's even when that diff shows it (a merge of the base on the branch, committed or still staged, brings every line the base added since the fork into the diff from the fork point, main's own release keys included): it is left out, the detail says `N line(s) the base added since the fork point are the base's, not this branch's, and stay (<file>: N)`, and a base diff git cannot run refuses the stage (`POLICY_SOURCE_UNAVAILABLE`, `cannot diff <since>..<base> for the stamp_paths stage`) rather than reading as an empty set that would move the base's lines again. The rule reads line ownership, not meaning: a branch-added line inside `stamp_paths` that means the base's own release in a stamp form (`Requires vX or later` written on a branch forked at X) moves with it, which the `--dry-run` diff and the per-file counts show before anything is written; write such a reference outside a stamp form, or keep that file out of `stamp_paths`. `--was X` is the opposite tool: it rewrites X everywhere, the base's own lines included, and re-heads the CHANGELOG section `## [X]`. Only the repo's own version width counts, so a 3-digit dependency pin in a 4-digit repo is never a candidate. The checks that accept a stamp commit read the same bound as the writer (`stampOnlyLine` with the branch's side in `lib/stamp-only.ts`): the tree receipt behind `stamp`, `verify` and the gate-ahead replay, the merge train's stamp and verify checks (each reading the slot's predecessor, the gated commit's first parent, as the base), the /ship receipt carry, and finish's route each take a moved version on a line the branch added at or above the fork-point version, and on any other line at or above the gated head's VERSION. A branch line is named by its position in the gated file, so a base line whose text duplicates a line the branch added keeps the gated head's bound (GST-979). When the stamp keeps the VERSION (a slot that keeps its claim), only the branch's own lines may move, so a base line moved by hand is refused. The carry follows a stamp on the branch's own rows in a stamp file the branch also changed as product when every changed line of that file sits at a branch-added position, the file keeps its mode, the base did not touch it and the rest of the product diff is unchanged (`a stamp on the branch's own rows` in the carry reason, GST-980).
|
||||
5. **mirror**: tier 2; declared and validated, reported as not run.
|
||||
6. **apply**: every changed file is written to the branch only after all stages validated, each against the fingerprinted preimage; a file edited meanwhile is `RESTAMP_CONFLICT` and the applied writes roll back (rollback refuses to overwrite a file whose bytes differ from the recorded postimage).
|
||||
|
||||
|
||||
@@ -146,7 +146,9 @@ record. Another successful fetch alone cannot certify corrupted history.
|
||||
|
||||
Outside reviews send your diff, plan or question to a second AI provider. Their
|
||||
verdict comes from `lib/outside-review-result.ts`, which prints
|
||||
`VERDICT: clean|findings|unverified|unavailable`. A `findings` verdict with a
|
||||
`VERDICT: clean|findings|unverified|unavailable`. When given an events file, it
|
||||
also prints `OUTSIDE_USAGE:` with the token counters Codex reported, or
|
||||
`OUTSIDE_USAGE: unknown` when it reported none. A `findings` verdict with a
|
||||
P0 or P1 finding blocks exactly like a native P0/P1. `unverified` and
|
||||
`unavailable` are missing coverage: /ship and /review continue, show the gap in
|
||||
the readiness dashboard and the PR body, and never count it as a pass.
|
||||
@@ -5987,8 +5989,10 @@ retargeted stacked PR the parent branch and the base.
|
||||
conflict-only base merge, a test-only change, release metadata, a registered
|
||||
output the pregate's regen check proved, a rebase onto a covered tree with
|
||||
the recorded product diff, a stacked PR's retarget once its parent fully
|
||||
landed on the base, or base context next to unchanged hunks after a clean
|
||||
scoped review ([`RECEIPT_CARRY_SCOPED_REVIEW`](#receipt-carry-scoped-review)), which the
|
||||
landed on the base, a stamp on the branch's own rows in a stamp file it also
|
||||
changed as product (every changed line at a branch-added position, the mode
|
||||
unchanged, the base not touching the file), or base context next to unchanged
|
||||
hunks after a clean scoped review ([`RECEIPT_CARRY_SCOPED_REVIEW`](#receipt-carry-scoped-review)), which the
|
||||
`carry` object in the carried receipt records with the product patch-id and
|
||||
the range-diff evidence ([unattended.md](unattended.md#the-terminal-line)).
|
||||
|
||||
|
||||
+13
-3
@@ -216,8 +216,9 @@ review-log row is the same row every Step 11 pass writes
|
||||
(the outside provider that reviewed, with the model recorded, for the
|
||||
cross-family subagent; `codex` for completed Codex CLI output, as
|
||||
`ship/sections/adversarial.md` prescribes),
|
||||
`outside_provider` (the provider the host would have used, as the generated
|
||||
prose names it), `outside_status` (`completed` for a finished outside pass;
|
||||
`outside_provider` (on Capy, `host-subagent`, with `outside_model`, both copied
|
||||
from the pass program's `OUTSIDE_RECORD:` line; elsewhere the provider the
|
||||
generated prose names), `outside_status` (`completed` for a finished outside pass;
|
||||
`unavailable` when neither the CLI nor a subagent completed, the cause on the
|
||||
`gstack-outside-voice run:` stderr line and in `<out>.meta.json` rather than
|
||||
in the row; `disabled` under
|
||||
@@ -237,7 +238,16 @@ when `input.models['outside-voice']` is empty and the lane model is
|
||||
rounds ran. Any other lane must name a model. An outside voice from the same
|
||||
provider as the lane model or the native voice stops the pass (`STOP:`) before
|
||||
either voice is created, including on a rerun, and each outside voice prints an
|
||||
`OUTSIDE_VOICE:` line saying whether it is the certified configuration.
|
||||
`OUTSIDE_VOICE:` line saying whether it is the certified configuration. An
|
||||
outside voice still running with no output after `input.stuckMs` (20 minutes by
|
||||
default) is stopped, and one that stops or fails without leaving findings, or
|
||||
finishes empty, is collected as unavailable coverage (`COLLECT_UNAVAILABLE:`)
|
||||
instead of stopping the pass, so Step 11 goes on to judge the native voice. A
|
||||
stopped or failed outside voice whose reply holds findings is collected like any
|
||||
finished one, so its findings are kept; one whose reply holds none is unavailable. That outside voice then gets its own
|
||||
row (`source: "host-subagent"`, `status: "unavailable"`, `completed` and
|
||||
`converged` false, written without `--finish` before the native row), so a
|
||||
missing voice never reads as converged or as an unavailable Codex CLI.
|
||||
|
||||
### The carry across a base merge or a test-only fix
|
||||
|
||||
|
||||
Reference in new issue
Block a user