Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
bbc8d1d
fix(admission): narrow a mint's scan to the bundle that publishes the…
wenzowski Sep 7, 2026
1a37871
fix(test): resolve the committed config through the Overrides the sig…
wenzowski Sep 7, 2026
07db14f
fix(land): resolve the clone's root, so the configured gate is actual…
wenzowski Sep 4, 2026
834a089
feat(land): the fast-forward protocol, keyed to the comment that asked
wenzowski Sep 4, 2026
85c1235
docs(core): map `fast_forward.rs`, the module the layering rule demanded
wenzowski Sep 4, 2026
a7178c3
feat(land): `fast-forward` as a verb, and one exhaustive match to slo…
wenzowski Sep 4, 2026
1529aae
feat(land): `lap` — the driver, and the table that says what each ans…
wenzowski Sep 4, 2026
f5851eb
feat(land): a freshness probe between the gate and the push
wenzowski Sep 4, 2026
d6368fa
refactor(shell): retire verified.sh onto `batten receipt verified`
wenzowski Sep 4, 2026
4b782d0
feat(land)!: the stale arm is main-watch's conditional poll, raced
wenzowski Sep 4, 2026
441da73
fix(spec): the committed surface set carries the three verbs this bra…
wenzowski Sep 4, 2026
87d5f45
feat(land): speculation — the bet on the base that is about to exist
wenzowski Sep 4, 2026
a292974
fix(land): speculation reads ancestry through gitwrite rather than op…
wenzowski Sep 4, 2026
32056b2
fix(surface): the three new verbs carry a pointer-only disposition
wenzowski Sep 4, 2026
e352356
feat(land): the lap ledger — spend is counted, never inferred
wenzowski Sep 4, 2026
93af256
feat(land): the lap's ready step, and the two orphaned gates it calls
wenzowski Sep 4, 2026
a0fc5d5
feat(lease): `carries` — the staleness row that was about to go silen…
wenzowski Sep 4, 2026
2899f00
fix(policy): restore the two trunk cases my rebase resolution truncated
wenzowski Sep 4, 2026
f80debf
feat(lease): `guard` — the step-0 precondition as one composite write
wenzowski Sep 4, 2026
908f22a
refactor(ci): the step-0 guard runs the compiled verb, at 16 sites
wenzowski Sep 4, 2026
273dd27
fix(lease): the status verdict, and the two columns that read it
wenzowski Sep 4, 2026
5a08186
fix(rest): the forge REST tier moves in process, and a gate over the …
wenzowski Sep 4, 2026
6de51c4
feat(land): abandon the matrix a red check made worthless
wenzowski Sep 4, 2026
b3d4024
fix(land): the abandon fixtures name no consumer's workflow
wenzowski Sep 4, 2026
68b9983
fix(policy): `rest` takes its place in the layering table
wenzowski Sep 4, 2026
08c88c6
fix(test): `rest` joins the declared network callers
wenzowski Sep 4, 2026
322c2f3
feat(land): the tap, the transient re-run, and the rate-limit backoff
wenzowski Sep 4, 2026
02a2c17
feat(land): the prune, conserving what `--prune` was load-bearing for
wenzowski Sep 4, 2026
21620c2
feat(lease): release notes the reclaim census, as the consumer declar…
wenzowski Sep 4, 2026
e3faf69
fix(main-watch): an empty base is never reported as movement
wenzowski Sep 4, 2026
9a70357
fix(land): an unset fan-in cancels nothing rather than guessing
wenzowski Sep 4, 2026
679c286
fix(lease): every health state names the admitted successor
wenzowski Sep 4, 2026
ff066af
feat(pipeline): the landing composition as a declared list
wenzowski Sep 5, 2026
beafd4d
feat(land): the driver runs the undos a lap owes
wenzowski Sep 5, 2026
c94f926
feat(land): the ready event, and pr_watch's last gh spawn retired
wenzowski Sep 5, 2026
bb983c2
fix(land): a red wait stops the lap instead of waiting out the hour
wenzowski Sep 5, 2026
f601267
feat(lease): the fast-forward carve-out, and the lane the shell missed
wenzowski Sep 5, 2026
1059464
fix(lease): the guard read no config at all, and CodeRabbit's ten others
wenzowski Sep 5, 2026
866bfac
fix(receipt): verified_by takes a default rather than refusing
wenzowski Sep 5, 2026
5b1c9ea
feat(land): the lap settles an outstanding speculation
wenzowski Sep 5, 2026
55a438f
feat(land): the lap places the speculation it settles
wenzowski Sep 5, 2026
607c582
refactor(lease): retire land-lock-check.sh onto `batten lease check`
wenzowski Sep 5, 2026
4c4a043
refactor(land)!: retire main-watch onto the lap's staleness precheck
wenzowski Sep 5, 2026
a68633a
fix(land)!: retire abandon-matrix, and the fan-in it was cancelling
wenzowski Sep 5, 2026
ed2a8c0
refactor(lease)!: retire ci-lease-precondition onto `batten lease guard`
wenzowski Sep 5, 2026
6b1447f
refactor(lease)!: retire land-lock, the cluster's largest program
wenzowski Sep 5, 2026
48ec91a
fix(land): close the outstanding review findings on #848
wenzowski Sep 5, 2026
cfabd9d
feat(land): the entry gates and the retirement of a landed branch
wenzowski Sep 5, 2026
81807eb
feat(land): a gate refusal says WHICH kind of refusal it was
wenzowski Sep 5, 2026
67915e8
refactor(shell): retire the lander, and 146 titles dispositioned one …
wenzowski Sep 5, 2026
098b877
fix(prune): refresh the floor basis this branch's own tiers moved
wenzowski Sep 5, 2026
b7e6ade
fix(land): a could-not-look trunk is not a moved trunk, and the fan-i…
wenzowski Sep 5, 2026
7adbc24
test(ci-parity): both tiers pin the fan-in binding, in both directions
wenzowski Sep 5, 2026
171c4f5
fix(land): the lander could not complete a single lap as shipped
wenzowski Sep 5, 2026
691bbbb
fix(land): the lap takes the lease, so the tap it declares can close
wenzowski Sep 5, 2026
bc67373
fix(rest): the retirement dropped a header the forge requires, and tw…
wenzowski Sep 5, 2026
a74867f
fix(land): a skipped bot run is not a merge, and six regressions of m…
wenzowski Sep 5, 2026
27c198a
fix(land): the lease is handed back, the backoff is honoured, the ref…
wenzowski Sep 5, 2026
3eb930a
fix(land): the losing arm of the race stops holding a finished landing
wenzowski Sep 5, 2026
26eee59
fix(land): a merged pull request is CLOSED, so the merge gate could n…
wenzowski Sep 5, 2026
22d866b
ci(lease): the guard never ran, and the reason was not the one on the…
wenzowski Sep 5, 2026
273542a
fix(rest): a dead clock is not an instant, and four more unreachable …
wenzowski Sep 5, 2026
e4bd43f
fix(land): thirteen findings, and three of them were gates deciding n…
wenzowski Sep 5, 2026
7756991
fix(land): six findings, and four were a mechanism written and never …
wenzowski Sep 5, 2026
f7a3e10
fix(mise): five censused gates whose programs this branch retired
wenzowski Sep 5, 2026
f0961d0
fix(land): the last lap's deferred undos, and a bet flag that outlive…
wenzowski Sep 5, 2026
1b85bed
fix(land): a destructive prune keyed to the wrong remote, and three r…
wenzowski Sep 5, 2026
ce9ee18
fix(lease): the guard skipped the lease it exists to read, and six more
wenzowski Sep 5, 2026
862145e
fix(lease): the pre-checkout guard had no lease to read, and six more
wenzowski Sep 6, 2026
65700d2
fix(exec): `reraise` did not type-check on the Windows target
wenzowski Sep 6, 2026
09ce95d
fix(hook): a newline inside a quoted argument was a line boundary, an…
wenzowski Sep 6, 2026
019d7b4
fix(engine): nine could-not-look collapses, each reported as a clean …
wenzowski Sep 6, 2026
cf8a710
fix(land): the lap held a 120s lease across a whole matrix, and thirt…
wenzowski Sep 6, 2026
a994f1c
test(trust): the new weakening kind ships with the case its census de…
wenzowski Sep 6, 2026
889f774
fix(provision): a re-link cannot write through the binary it is repla…
wenzowski Sep 6, 2026
e6223fb
fix(provision): the busy-target case is Unix-only, because its subjec…
wenzowski Sep 6, 2026
060f7c2
style(provision): close the doc comment the cfg gate split in two
wenzowski Sep 6, 2026
9e9d457
fix(lease): git-over-HTTP takes Basic, and the smart-HTTP client sent…
wenzowski Sep 6, 2026
e5f2cc7
fix(trust): the lane weakening priced INTRODUCING a gate, not widenin…
wenzowski Sep 6, 2026
4f86fe5
fix(config): rebase-not-hand-stepped denied its own remedy, so it warns
wenzowski Sep 6, 2026
1a6607f
test(install): BATTEN_VERSION_FROM_REF had no case anywhere
wenzowski Sep 6, 2026
37f32eb
style(install): shfmt refused a doubled blank line
wenzowski Sep 6, 2026
d38ca98
fix(config): a warn shape row is silent, and the comment claimed othe…
wenzowski Sep 6, 2026
1a11f23
refactor(hook): main landed CLOUD-1287 too, so the hand-rolled splitt…
wenzowski Sep 6, 2026
86c00ec
fix(config): the load-time census reads three loader bodies, not two
wenzowski Sep 6, 2026
90d0e0e
fix(land): the lap takes the singleton, registers, and reaps
wenzowski Sep 6, 2026
3b9af61
fix(config): a ban you can waive at will is not a ban
wenzowski Sep 6, 2026
dc084a5
fix(land): verify's exit 2 means main moved, and the port stopped on it
wenzowski Sep 6, 2026
2657b39
fix(land): a registration that never moves reads as a stall
wenzowski Sep 6, 2026
0cb4423
fix(land): the lock's binding is used now, so it loses its underscore
wenzowski Sep 6, 2026
4466db4
refactor(policy): withdraw the provision fence, it is CLOUD-1550's row
wenzowski Sep 7, 2026
8a50f1c
fix(policy): rebase-not-hand-stepped stays deny; warn was silence
wenzowski Sep 7, 2026
44b5ead
fix(config): drop the three verdict rows whose raiser was reverted
wenzowski Sep 7, 2026
4f2bfa5
fix(scratch): one owner for out-of-tree test scratch, reaped by liveness
wenzowski Sep 7, 2026
52a21c8
fix(test): clear $LAND_VERIFY from the census corpus, it was running …
wenzowski Sep 7, 2026
a30fb5b
fix(scratch): place the module and let its tests use expect
wenzowski Sep 7, 2026
a519bb9
fix(config): finish the revert d0c8cb90 claimed, egress-fencing's row
wenzowski Sep 7, 2026
c50f2f1
feat(land): race the gate against its base and cancel the loser
wenzowski Sep 7, 2026
a24c3ed
fix(land): refund the lap whose gate the race reclaimed
wenzowski Sep 7, 2026
8069e1b
fix(land): the raced gate was two dead mechanisms, and this makes bot…
wenzowski Sep 7, 2026
636bad6
fix(receipt): committed config is the working tree's, on both anchors
wenzowski Sep 7, 2026
093de41
fix(land): drop a commit whose change is already on the base
wenzowski Sep 7, 2026
b52bdcd
feat(land): give the loop's one human stop a route to take it
wenzowski Sep 7, 2026
eb69f22
fix(land): spend each resolution PATH once, not the whole offer at once
wenzowski Sep 7, 2026
6570704
fix(config): declare the three verdicts main's egress fence raises
wenzowski Sep 7, 2026
a2bd74a
chore(landing): restore main's landing-roster rows after the replay
wenzowski Sep 7, 2026
02a0f50
fix(prune): move the basis to the live stem count, and record the six…
wenzowski Sep 7, 2026
80ec96a
fix(provision): replace the cached binary rather than writing through it
wenzowski Sep 7, 2026
d4b12a1
fix(test): restore the provision-fence fixture main's module needs
wenzowski Sep 7, 2026
cef3d31
test(surface): record --resolve in the golden schema snapshot
wenzowski Sep 7, 2026
d5b8c5d
fix(test): declare the reinstall fixture's const before the statements
wenzowski Sep 7, 2026
b9c0985
chore(harness): allow every serena tool by pattern, not by enumeration
wenzowski Sep 7, 2026
297e7e5
revert(harness): restore the enumerated serena allow entries
wenzowski Sep 7, 2026
a20a482
docs(memory): the client re-reads permissions mid-session
wenzowski Sep 7, 2026
75de2c4
fix(gate): mcp-allow-check reads the tool segment, not just the server
wenzowski Sep 8, 2026
c42d7aa
revert(gate): the mcp-allow-check fix was the wrong shape
wenzowski Sep 8, 2026
d01bb06
fix(config): waive filed-and-left-open, the sibling arm CLOUD-1551 al…
wenzowski Sep 8, 2026
9ea4da6
fix(config): egress-fencing reads batten.toml again, so its second su…
wenzowski Sep 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/branch-hygiene.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,26 @@ jobs:
# LAND_LOCK_MAX_WAITS and stops with the saturation message inside ~16
# minutes. What this adds is the DIAGNOSIS — busy versus wedged — for the
# one state nothing else can distinguish.
- run: mise run land-lock-check
#
# THE SUCCESSOR IS THE ENGINE'S (CLOUD-1148). `mise-tasks/land-lock-check.sh`
# is retired; `batten lease check` decides the same six states through
# `lease::health`, which is the one implementation of that predicate rather
# than a second reader of the same ref.
#
# THE EXIT NUMBERS MOVED AND THIS CALLER CANNOT TELL. The predecessor
# answered `0` healthy, `1` wedged-or-garbage, `2` could not look; the engine
# has one table with no per-verb exception, so a verdict is `2` and a
# could-not-look is `3`. A step fails on any non-zero either way, so no shim
# is needed here — which is the whole reason this repointing is one line
# rather than a translation task.
#
# `./install.sh` RATHER THAN A BUILD, for `auto-bot-land.yml`'s reason: the
# job installs `gh` and `jq` deliberately and has no Rust toolchain, and the
# committed script is POSIX sh that verifies every asset against the digest
# the release API reports. Run from the checkout, so `install-check` still
# governs what this executes.
- name: Install the released batten, which the lease gate is now a verb of
env:
GH_TOKEN: ${{ github.token }}
run: ./install.sh
- run: batten lease check
153 changes: 123 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,35 +122,77 @@ jobs:
# CLOUD-420: THE LANDING LEASE, ENFORCED WHERE THE MONEY IS SPENT.
# First step, before any checkout or toolchain install, because a run this
# branch is not authorised to make should cost the rounding rather than a
# matrix. The body is `mise-tasks/ci-lease-precondition.sh` and every
# justification lives there; it is fetched from `main` rather than from
# this head, so a clone carrying stale rules cannot dodge the predicate by
# carrying a stale copy of it. An unreadable body runs — fail open, which
# is the whole posture: waving one matrix through costs one matrix, while
# a predicate that cannot read itself would stop the fleet.
# matrix. The body runs `batten lease guard`, installed from `main` and
# pinned to trunk's version rather than to this head's, so a clone
# carrying stale rules cannot dodge the predicate by carrying a stale copy
# of it. Every justification lives on `run_lease_guard`. THREE DIFFERENT
# FAILURES FAIL OPEN below, one `|| exit 0` each: a binary that will not
# download, a policy that will not fetch, and a guard that will not run.
# That is the whole posture — waving one matrix through costs one matrix,
# while a precondition that cannot reach its own inputs would stop the
# fleet. What keeps those three from reading as *ran and allowed* is
# trunk's installer refusing a binary that does not carry the verb
# (`BATTEN_REQUIRE`); until that installer IS trunk's, this step is
# vacuous by construction rather than by accident.
#
# AND IT WAS VACUOUS FOR A SECOND REASON THE PARAGRAPH ABOVE HID (review of
# #848). `$RUNNER_TEMP/batten-bin` is not on PATH, and `install.sh`'s
# off-PATH refusal is a `die 1` that fires BEFORE the `BATTEN_REQUIRE`
# check — so the `|| exit 0` ended the step at the install and the guard
# never ran, at any of the sites, whatever the installer's provenance. The
# bootstrap above is real and was not the reason; it just described the
# same silence convincingly enough that nobody looked further.
#
# `BATTEN_ALLOW_OFF_PATH=1` is the opt-out for exactly this shape and the
# binary is invoked by absolute path two lines down, so nothing here
# resolves `batten` by name and the refusal is protecting a caller that
# does not exist. Installing onto PATH instead would put a trunk-pinned
# binary ahead of the checkout's own for every later step in the job.
- name: Landing lease precondition
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
LEASE_HEAD_REF: ${{ github.head_ref }}
# The HEAD sha, never `github.sha`: on a pull_request event that is the
# merge commit, which carries trunk's `mise-tasks/land.sh` whenever this
# head did not touch it — and the staleness row reads exactly that file.
# merge commit, whose tree is trunk's wherever this head did not touch
# it — and the staleness read asks about the head's own landing paths.
LEASE_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
LEASE_RUN_ID: ${{ github.run_id }}
run: |
body=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/mise-tasks/ci-lease-precondition.sh?ref=main") || exit 0
# `|| exit 0` on BOTH lines, and the second is the one that was missing
# (CLOUD-420). A fetch that fails is handled; a fetch that SUCCEEDS with
# something that is not shell was not — a truncated body, a proxy error
# page returned 200, or a bad edit to the trunk copy makes this a syntax
# error in the FIRST step of every job. The step reds under the runner's
# default `bash -e {0}`, `final` fails its `needs:` assertion under
# `always()`, and `land` re-drafts a healthy PR — fleet-wide, from one bad
# response. The precondition's own header promises it never exits
# non-zero; this is what makes that true at the call site too.
bash -c "$body" || exit 0
# `|| exit 0` ON EVERY LINE, and the reason outlives the shell it was
# written for (CLOUD-420). A step that reds makes the RUN's conclusion
# `failure` rather than `cancelled`; `final` then runs under
# `!cancelled()`, fails its `needs:` assertion, and `land` re-drafts a
# healthy PR — fleet-wide, from one bad response. `batten lease guard`
# promises it never exits non-zero; these are what make that true at the
# call site too, for the cases the promise cannot cover: a binary that
# will not download and one that will not run are different failures
# from one that ran and decided.
#
# THE VERSION IS TRUNK'S, NEVER THIS HEAD'S. The installer comes from
# trunk and resolves the version from trunk's own manifest, which is the
# property the fetched-script design protected by reading its logic from
# trunk — a head cannot pin an older guard for itself.
installer=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/install.sh?ref=main") || exit 0
printf '%s\n' "$installer" | \
BATTEN_VERSION_FROM_REF=main BATTEN_INSTALL_DIR="$RUNNER_TEMP/batten-bin" \
BATTEN_ALLOW_OFF_PATH=1 BATTEN_REQUIRE="lease guard" sh || exit 0
# THE POLICY IS TRUNK'S TOO, AND IT HAD TO BE FETCHED. This step runs
# BEFORE any checkout, so the directory the guard stands in is empty and
# `config::load` found nothing — `[lease] landing_paths` read as *no
# paths declared* and the staleness half failed open on every run, which
# is the exact silence the row was written to end. Fetched from `main`
# for the installer's own reason, one line up: a head must not pin the
# policy it is judged by, and the only tree a checkout would offer here
# is the pull request's own.
mkdir -p "$RUNNER_TEMP/batten-config" || exit 0
gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/batten.toml?ref=main" \
>"$RUNNER_TEMP/batten-config/batten.toml" || exit 0
"$RUNNER_TEMP/batten-bin/batten" --config-in "$RUNNER_TEMP/batten-config" \
lease guard \
"$LEASE_HEAD_SHA" "$LEASE_HEAD_REF" "$LEASE_RUN_ID" || exit 0

# RECLAIM RUNNER DISK, BEFORE ANYTHING WRITES ITS OWN GIGABYTES.
#
Expand Down Expand Up @@ -641,9 +683,26 @@ jobs:
LEASE_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
LEASE_RUN_ID: ${{ github.run_id }}
run: |
body=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/mise-tasks/ci-lease-precondition.sh?ref=main") || exit 0
bash -c "$body" || exit 0
installer=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/install.sh?ref=main") || exit 0
printf '%s\n' "$installer" | \
BATTEN_VERSION_FROM_REF=main BATTEN_INSTALL_DIR="$RUNNER_TEMP/batten-bin" \
BATTEN_ALLOW_OFF_PATH=1 BATTEN_REQUIRE="lease guard" sh || exit 0
# THE POLICY IS TRUNK'S TOO, AND IT HAD TO BE FETCHED. This step runs
# BEFORE any checkout, so the directory the guard stands in is empty and
# `config::load` found nothing — `[lease] landing_paths` read as *no
# paths declared* and the staleness half failed open on every run, which
# is the exact silence the row was written to end. Fetched from `main`
# for the installer's own reason, one line up: a head must not pin the
# policy it is judged by, and the only tree a checkout would offer here
# is the pull request's own.
mkdir -p "$RUNNER_TEMP/batten-config" || exit 0
gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/batten.toml?ref=main" \
>"$RUNNER_TEMP/batten-config/batten.toml" || exit 0
"$RUNNER_TEMP/batten-bin/batten" --config-in "$RUNNER_TEMP/batten-config" \
lease guard \
"$LEASE_HEAD_SHA" "$LEASE_HEAD_REF" "$LEASE_RUN_ID" || exit 0

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
Expand Down Expand Up @@ -774,9 +833,26 @@ jobs:
LEASE_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
LEASE_RUN_ID: ${{ github.run_id }}
run: |
body=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/mise-tasks/ci-lease-precondition.sh?ref=main") || exit 0
bash -c "$body" || exit 0
installer=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/install.sh?ref=main") || exit 0
printf '%s\n' "$installer" | \
BATTEN_VERSION_FROM_REF=main BATTEN_INSTALL_DIR="$RUNNER_TEMP/batten-bin" \
BATTEN_ALLOW_OFF_PATH=1 BATTEN_REQUIRE="lease guard" sh || exit 0
# THE POLICY IS TRUNK'S TOO, AND IT HAD TO BE FETCHED. This step runs
# BEFORE any checkout, so the directory the guard stands in is empty and
# `config::load` found nothing — `[lease] landing_paths` read as *no
# paths declared* and the staleness half failed open on every run, which
# is the exact silence the row was written to end. Fetched from `main`
# for the installer's own reason, one line up: a head must not pin the
# policy it is judged by, and the only tree a checkout would offer here
# is the pull request's own.
mkdir -p "$RUNNER_TEMP/batten-config" || exit 0
gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/batten.toml?ref=main" \
>"$RUNNER_TEMP/batten-config/batten.toml" || exit 0
"$RUNNER_TEMP/batten-bin/batten" --config-in "$RUNNER_TEMP/batten-config" \
lease guard \
"$LEASE_HEAD_SHA" "$LEASE_HEAD_REF" "$LEASE_RUN_ID" || exit 0

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
Expand Down Expand Up @@ -927,9 +1003,26 @@ jobs:
LEASE_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
LEASE_RUN_ID: ${{ github.run_id }}
run: |
body=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/mise-tasks/ci-lease-precondition.sh?ref=main") || exit 0
bash -c "$body" || exit 0
installer=$(gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/install.sh?ref=main") || exit 0
printf '%s\n' "$installer" | \
BATTEN_VERSION_FROM_REF=main BATTEN_INSTALL_DIR="$RUNNER_TEMP/batten-bin" \
BATTEN_ALLOW_OFF_PATH=1 BATTEN_REQUIRE="lease guard" sh || exit 0
# THE POLICY IS TRUNK'S TOO, AND IT HAD TO BE FETCHED. This step runs
# BEFORE any checkout, so the directory the guard stands in is empty and
# `config::load` found nothing — `[lease] landing_paths` read as *no
# paths declared* and the staleness half failed open on every run, which
# is the exact silence the row was written to end. Fetched from `main`
# for the installer's own reason, one line up: a head must not pin the
# policy it is judged by, and the only tree a checkout would offer here
# is the pull request's own.
mkdir -p "$RUNNER_TEMP/batten-config" || exit 0
gh api -H "Accept: application/vnd.github.raw" \
"repos/$GH_REPO/contents/batten.toml?ref=main" \
>"$RUNNER_TEMP/batten-config/batten.toml" || exit 0
"$RUNNER_TEMP/batten-bin/batten" --config-in "$RUNNER_TEMP/batten-config" \
lease guard \
"$LEASE_HEAD_SHA" "$LEASE_HEAD_REF" "$LEASE_RUN_ID" || exit 0

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
Expand Down Expand Up @@ -1077,7 +1170,7 @@ jobs:
# `success` is the only conclusion GitHub lets a job report as "fine", so a
# run that was DECLINED must report something else, and red is the only
# something else a job that ran can produce. The misleading part of that red
# is answered where it belongs — `ci-lease-precondition` emits an `::error::`
# is answered where it belongs — `batten lease guard` emits an `::error::`
# annotation naming the lease and the remedy, so the run says why.
#
# This is also why `always()` is not merely the old value restored: it now
Expand Down
Loading
Loading