windows-stale-processes.ps1 wrote stale-processes.json only after the settle
poll. If a later Get-CimInstance call threw, the error left the script before
the write, so the full record of the process it had already seen (untruncated
command line, CreationDate) was lost, and a process that exits before the
finally-block evidence collector runs cannot be read again (Greptile and Sol
on #161139).
Catch a failed re-read, keep the last records read, save the report with the
error as queryError, and then fail the check with that error. A failed first
read still throws as before: nothing was seen yet.
The new platforms("windows") test fails on the previous head (no
stale-processes.json) and passes here on Windows PowerShell 5.1.
In the rc.1-v0.23.6 Windows x64 update E2E leg (run 24066510747),
`tests/install/windows-bundled-e2e.ps1` threw a bare
`Old payload processes remain alive` immediately after the new package
relaunched, without waiting briefly for post-swap process teardown or
recording which process(es) under OLD's InstallLocation were still alive.
The `finally` evidence collector (`windows-update-evidence.ps1`) also saved
only `AppInstaller` processes, leaving the failing process's PID, PPID,
executable path, and command line absent from both the job log and uploaded
proof artifacts.
- Add `tests/install/e2e-assets/windows-stale-processes.ps1`: scans
`Win32_Process` under `$OldInstallLocation\`, polls up to `-SettleSeconds`
(default 15s) if any are initially alive, writes full process identity
(`ProcessId`, `ParentProcessId`, `Name`, `CreationDate`, `ExecutablePath`,
`CommandLine`) to `proof/stale-processes.json` whenever any stale process
was sighted, logs the initial/remaining records to stdout, and includes
the surviving process summary in the thrown error.
- Update `tests/install/e2e-assets/windows-update-evidence.ps1` to accept
optional `-OldInstallLocation` and record matching processes under OLD/NEW
package install roots or matching `$Identity`/`hermes` to `processes.json`
and stdout (recording `processes-error.txt` without aborting other
evidence on WMI failure).
- Wire both into `tests/install/windows-bundled-e2e.ps1` (initializing
`$old = $null` before `try` so `finally` is strict-mode safe on early
failures) and cover with `platforms("windows")` PowerShell 5.1 tests.
Three guards from #158714 could each be removed with every test still
passing: the Windows stager's refusal of a symlink named like the MSIX,
the macOS stager's check that each blockmap has its package beside it,
and release_channel's refusal of a commit tag, which keeps a commit
claim's manifest from reading as stable in publish and promote.
The trust-boundary test now plants a symlink in place of a package
(Windows and macOS) and an orphan Other-…-mac-arm64.dmg.blockmap, and a
new pipeline test asserts that publish and promote refuse a commit tag.
With each guard removed in turn, the old tests pass (55) and exactly one
new case fails; with the guards in place all 59 pass.
Found by @unsupportedpastels on #158714, whose patch this is.
Co-authored-by: unsupportedpastels <274530371+unsupportedpastels@users.noreply.github.com>
Address the non-blocking review nits on #160857 from @c2h5oh and @yoniebans:
- Block ruamel imports in tests/ci/test_protected_canary_publication.py's shared
fake python driver unless invoked through scripts.ci.python_packages
ruamel.yaml==... --, turning the existing darwin canary and candidate cases
into bare-Python regression guards.
- Move macOS channel-record bare-Python coverage out of
tests/scripts/test_macos_channel_artifact_record.py into
tests/ci/test_protected_canary_publication.py (reusing the canary fixture,
native_leg, and module-top imports per AGENTS.md).
- Discover macOS release_artifacts record steps structurally from
desktop-bundled-release.yml via desktop_release_roles so any future macOS
record step outside commit-claim stagers cannot slip past untested.
Refs #160857
Refs #159962
Commit 33522e6dee made scripts/bundles/release_artifacts.py::_verify_mac_feed_dmg
call scripts.releases.darwin.parse_mac_feed, which imports hermes_yaml (ruamel.yaml).
The macOS bundled build job runs on bare bootstrap Python (stdlib only), so
Stage macOS packages and feed inputs to R2 failed on Canary 95 and Canary 96
with ModuleNotFoundError: No module named 'ruamel'.
Invoke scripts.bundles.release_artifacts record --platform macos through
scripts.ci.python_packages ruamel.yaml==0.18.17 -- in both macOS staging steps
(matching stable-release.yml, canary-release.yml, and
stable-release-publication.yml), update the protected-canary test driver shim to
handle scripts.ci.python_packages, and add a workflow-step regression test that
blocks ruamel unless provisioned via scripts.ci.python_packages.
Refs #159962
The merge of main moved the autocrlf flags into _write_git_archive(), which
also archives scripts/whatsapp-bridge back in after scripts/ is excluded.
The eol test snapshotted without excludes, so it only ever exercised the
first pass.
The fixture now snapshots with INERT_SNAPSHOT_DIRS and commits an
unattributed text file under scripts/whatsapp-bridge. Its bytes must come
through unchanged. Mutants of scripts/bundles/payload.py:
- the runtime pass archived without the flags: the old test passes, the new
one fails;
- the flags removed from the helper: both fail;
- unmutated: both pass.
Found by the sol-loop self-review on #159146.
Conflict:
- scripts/bundles/payload.py: main (79c00f3aa2, 1b39ecabee) moved the git
archive call out of snapshot() into _write_git_archive(). That lets it
archive scripts/whatsapp-bridge back in after the exclude, and it adds a
timeout. This PR (fea697d62c) had added -c core.autocrlf=false
-c core.eol=lf to the old inline call, so that a Windows builder's
autocrlf doesn't rewrite the payload's bytes. Main's snapshot() body is
taken as is, and the PR's flags and comment move into _write_git_archive().
That also covers main's new runtime-tree archive, which ships to the same
payload.
Auto-merged without conflict: scripts/render-builds-table.py (the PR's
shutil.which("gh") lookup survives main's rewrite and still feeds both
gh calls), tests/ci/test_stable_release_graph.py,
tests/scripts/test_bundle_payload.py, tests/scripts/test_release_artifacts.py
and tests/scripts/test_render_builds_publication.py. Every line the PR added
in those files is present in the merge.
_verify_macos_dmg returned early when the root held neither a DMG nor a
*-mac.yml, so a tagged, channel or signedDmg commit-claim record whose
root carried only the update ZIP passed with no outer DMG check at all.
The workflow's own guards (the feed rename's test -s, the commit-claim
DMG count) keep that shape out of CI today, but the recorder is the gate
publish trusts, so it now fails closed on its own inputs: whenever the
outer check applies, exactly one *-mac-<arch>.dmg must be present.
The feed stays required only for tagged releases. Channel builds write
latest-mac.yml, but their staging step never stages or publishes a feed,
so requiring one would gate on a file nothing downstream reads; a feed
that is present is still checked.
The existing ZIP-only fixtures gain the DMG, blockmap and (tagged) feed a
real build produces. _write_mac_feed now streams its hashes, since the
Squirrel-limit fixture is a sparse 1 GiB ZIP.
44379fa174 put a uname shim first on PATH so that check_platform in
install.sh saw Linux on Windows. tests/AGENTS.md forbids faking the host.
With the shim, the plain-Linux check asserts a host fact the test supplied
itself, and the repository-stage test runs install.sh on a host where it
refuses to run.
Drop the shim. Mark the repository-stage test platforms("posix"), since
install.sh supports both Linux and macOS, and the plain-Linux platform
check platforms("linux"). On Windows both now skip; the install.ps1
repository-stage test in the same file covers that host.
The macOS lane now imports the repository-stage test. Its scenario,
replayed on a Darwin arm64 host under /bin/bash 3.2 with a throwaway
HOME, exits 0 and parks the local commit on a
refs/hermes-update-backups/diverged-main-* ref, as on Linux.
Reported by Greptile and the sol-loop review on #159146.
Address CI failure and validated review findings on outer macOS DMG
signing, notarization, recording, and smoke verification:
- Update tests/ci/test_protected_canary_publication.py's darwin transport
fixture to write a real gzipped .dmg.blockmap and parse_mac_feed-valid
canary-mac.yml matching the recorded ZIP and DMG bytes.
- Reuse the exact certificate identity and keychain selected for the .app
by recording them in apps/desktop/scripts/mac-sign.mjs (getAppSigningResult)
instead of re-querying security find-identity in notarize-dmg.mjs.
- Share one combined 300-minute notarization budget across afterSign and
notarize-dmg.mjs (with a 15-minute reserve for verification/metadata) so
DMG waiting cannot outlast the 330-minute CI step.
- Require .dmg.blockmap presence and validate tagged *-mac.yml feeds via
parse_mac_feed (exact ZIP + single DMG entries) in
scripts/bundles/release_artifacts.py, keeping the no-feed path explicit
for commit and channel builds.
- Align commit-claim outer DMG verification across release_artifacts.py
and tests/install/macos-bundle-smoke.sh via a sealed signedDmg: true
field in darwin bundled install-stamp.json: releases, canaries,
channels, and signedDmg commit claims enforce outer DMG verification,
while older pre-PR and legacy commit claims still verify the inner .app.
When the stable page already described a newer release, b1469d1641 left
it in place but still read it back through the public origin. If the
public copy was still catching up, the read-back failed after the feeds
and DMG alias had moved and before the head advanced, over a page this
promotion never wrote.
_check_stable_page_state now returns None for the page bytes in that
case. publish_page then neither writes nor reads back. A page this
promotion writes, or finds already in place, is still verified. In
test_stable_promotion_rejects_stale_order_for_dmg_and_page the
page-ahead case now serves a stale public page; it failed on 86ba6e6244
with "Channel read-back differs" and passes now.
`python -m scripts.releases.channel_releases stable` called
publish_release("stable-release") directly. That skipped advance_stable's
check of the candidate digest against the final release receipt and ran
outside the stable-release concurrency group. It reached the same stable
feeds, and with this PR the DMG alias and downloads page, that
ff616309d5 closed off in the release_artifacts CLI. No workflow, test or
doc uses that role; stable-release.yml calls only `channel_releases
canary`.
The CLI now refuses `stable` with the reason (exit 2) and publishes
canary as before. test_channel_releases_cli_publishes_canary_and_refuses_stable
did not raise on f4785e7bee and does now.
b1469d1641 left the stable downloads page alone whenever supersedes()
said the promoted tag could not replace it. supersedes() also says no
when the page at the stable key records a canary build, so that wrong
page was kept, with only a warning, while the stable head advanced.
The skip now applies only to a newer stable release, the renderer's
page-ahead case. A canary marker at the stable key fails closed before
any write. test_stable_promotion_refuses_a_canary_page_at_the_stable_key
did not raise on a906c2b033 and does now.
copy_source kept whatever ETag the source HEAD returned, and copy_object
sent x-amz-copy-source-if-match only when there was one. A HEAD without
an ETag therefore made the copy unconditional, and a same-size
replacement of the source would pass the destination's size check.
copy_source now refuses a source with no ETag. CopySource.etag is always
set, and copy_object always sends the condition. The no-ETag case in
test_copy_object_sends_signed_server_side_copy_and_verifies_destination
did not raise on b1469d1641 and does now.
The stable downloads page has a second writer on main: render-builds-table
in stable-release.yml's `complete` step renders a full-desktop release's
page before the ordered publication pass runs. If an older published
release's advance was still pending, that step put the page ahead of it.
The sequencer advances oldest first, so StableDownloads.prepare for the
older release then refused with "Refusing to move the stable downloads
page backward", on every rerun. Since the standalone CLI no longer
promotes stable, nothing could clear it.
Feed order is checked before promotion, so a page describing a newer
release can only be that renderer's. _check_stable_page_state now leaves
it as it is with a warning, as the renderer's own write_channel_page does,
and returns the bytes that should be live plus the write conditions (None:
no write). The older advance moves the feeds and the DMG alias, and the
public read-back checks the page that is actually live. The page is still
never moved backward.
In test_stable_promotion_rejects_stale_order_for_dmg_and_page, the
page-only-ahead case raised on 274bc33a78 and now promotes the older
release while leaving the newer page alone. stable-releases.md no longer
says the page changes only with promotion.
Sign, notarize, staple, and Gatekeeper-verify the outer macOS .dmg
container in an electron-builder artifactBuildCompleted hook while
keeping inner .app notarization (afterSign) intact for Squirrel.Mac .zip
updates.
- Reuse notarize.mjs auth resolution and 4h LOST_CONTACT / CloudKit
retry logic in apps/desktop/scripts/notarize-dmg.mjs, signing the
outer .dmg with Developer ID Application + --timestamp (which
dmg-builder's built-in dmg.sign omits) using the packager's active
codeSigningInfo keychain.
- Verify codesign, stapler validate (with LOST_CONTACT retries), and
spctl -a -vv -t open --context context:primary-signature, then rebuild
.dmg.blockmap and update event.updateInfo before artifactCreated fires
so PublishManager writes post-staple sha512/size to *-mac.yml.
- Enforce outer DMG codesign, team match, .dmg.blockmap size, and
*-mac.yml consistency in scripts/bundles/release_artifacts.py, and
verify outer DMG signature, stapler ticket, Gatekeeper policy, and
team match before mounting in tests/install/macos-bundle-smoke.sh.
StableDownloads.prepare HEADed the source DMG and compared its size, but
the 5 GiB single-copy limit was applied only inside copy_object, which
ran after finalize had moved the macOS feed. A DMG over the limit would
stop promotion with the feed already pointing at the new release.
copy_object also HEADed the source again and copied against that fresh
ETag rather than the object prepare had checked.
r2.copy_source now runs every source check once: the path, the
single-copy limit, existence and receipt size. It returns a CopySource
holding the key, size and ETag. prepare calls it before any write, and
copy_object takes the CopySource and copies on its ETag, so a source
that changed after the check fails with 412 instead of being copied.
With the limit below the staged DMG's size, the new stable promotion
test fails on c1494b2ff2 (feed PUTs were sent before the error) and
passes now.
When ff616309d5 moved the renderer harness off the refused CLI, the
admission test's fault loop kept only the renderer step. Its helper hashed
the bytes it had just read and called promote_stable_feeds directly, so no
test sent a legacy, smoke-less, failed, wrong-identity or tampered manifest
through the controller's own check.
The helper now promotes the way publish_release does: accepted_stable
against a digest pinned separately from the stored bytes, then
promote_stable_feeds. The fault loop sends every bad manifest through it,
checking the controller's message and that nothing was written, before
running the renderer step. With accepted_stable reduced to an unpinned,
unvalidated read, the ff616309d5 test passes and this one fails.
python -m scripts.bundles.release_artifacts promote checked the pinned
candidate digest but neither required the published release nor ran
inside the stable-release concurrency group. A manual replay could
therefore pass the stable DMG alias's order check and then overwrite a
newer alias that a concurrent controller promotion had just copied. R2's
CopyObject takes no destination If-Match, so the copy itself cannot be a
compare-and-swap. Promoting a staged draft needed no race at all.
The CLI now refuses a stable candidate, payload tag or attempt ref,
before it reads anything. Stable promotion runs only through the Stable
Release Publication sequencer (channel_releases.advance_stable ->
publish_release -> promote_stable_feeds), which already requires the
published release and serializes every stable writer. Canary candidates
still promote through the CLI. The renderer harness test now promotes
through promote_stable_feeds, as the sequencer does, instead of the CLI.
stable-releases.md says only the controller promotes stable, and that a
partial publication is repaired by running Stable Release Publication
again.
render-builds-table.py imported recorded_build only so three tests could
reach it through the script after it moved to downloads_page.py, and it
still imported smoke_rows, which nothing in the script uses. Both imports
are gone; test_render_builds_binding, test_render_builds_publication and
test_canary_page_history import recorded_build from downloads_page.
The read-back test failed at copy_object's signed R2 HEAD, so deleting
StableDownloads.publish_dmg's public-origin HEAD left every test green.
The new test lets R2 take the copy while the public origin serves another
size for the alias, and checks promotion stops before the App Installer
pointer and the page move. It fails with that HEAD removed.
The receipt-only rendering test seeded a Linux AppImage orphan, which the
shared table drops whatever it is given, so the assertion held even for a
page built from a bucket listing. A same-version Hermes Light MSIX would
render if listed: with a renderer that also lists the archive, the old
test passes and this one fails.
publish_release refused a stale release before the feed writes with its
own copy of the ordering rule, read from the live build's request.json.
ChannelPublisher._promote applies the real rule later: the digest-checked
live manifest, the native versions, and the allocation sequence. The copy
had no sequence check, so a newer release allocated before an older one
published (its retry keeps the lower sequence it was pinned to) passed the
early gate, moved the stable feeds, DMG alias and page, and was then
refused by the head update. That leaves the feeds on an archive the
retention pointer does not protect.
ChannelPublisher.require_protected_successor now runs the head update's
ordering check (sequence, then versions against the digest-verified live
manifest) without writing, and _promote calls the same helper, so the
rule lives in one place for both the canary and stable policies.
copy_object retried a 5xx CopyObject three times, and each attempt went
through signed_request's own three tries, so a run of R2 503s sent nine
copies and held the release job for the summed back-off. signed_request
now gets tries=1, as multipart completion does, and copy_object's loop
owns the budget for HTTP errors, error documents sent with HTTP 200, and
dropped connections, which signed_request used to retry on its own.
test_owner_creation_time_is_read_for_system_processes flaked on the first
attempt in every Windows lane of every head of this PR, while main passes
it first time. All five retries in _live_protected_owner() ended with "no
live SYSTEM/protected process stayed CIM-readable". The scan treats a
process whose StartTime it cannot read as the A1 case, and a process that
exits during the scan reads the same way. On the elevated Windows 11 ARM64
VM no live process hides its StartTime, so under churn the exited
processes were the only such rows, and they outrank the limited-rights
fallback. Every retry's fresh scan picked another process that was
already gone.
Drop a row whose StartTime read failed when Get-Process no longer finds
the pid. The CIM re-read stays: it is also the liveness check, and a pick
that dies after the scan is still retried.
On the VM, with 16 threads spawning short-lived cmd.exe processes:
- _live_protected_owner() failed 7 of 8 times on 864fa61bf8, and every
pick was a churned cmd.exe. With this change it failed 0 of 8, and every
pick was smss.exe.
- Both test_owner_creation_time_is_read_for_system_processes cases failed
on 864fa61bf8 with file retries off, and both pass with this change. The
whole file passes (18 passed, 1 skipped because node was not on PATH).
Reported by @Ooriginador on #159146.
The release_body fixture made shutil.which miss, so render-builds-table.py
fell back to bare "gh" and the tests passed even with the PATH/PATHEXT
lookup removed. No test covered that fix after test_tag_builds_summary.py
was deleted on main.
The fixture now resolves gh to a fake path, and the fake accepts only that
path for both the view and the edit. A mutant that goes back to bare "gh"
fails 9 of 18 tests, and so does one where only the edit uses bare "gh".
The old fixture passed 18/18 on both.
Found by the sol-loop review on #159146.
1427067f05 made _creation_time() return None on a failed CIM read so the
protected-owner pick could retry, but every other marker test also builds
its ct: line from it. A failed read then wrote "ct:None", which marker.ps1
parses as a v1 marker with no creation time, and the ct_matches=True cases
passed on liveness alone without checking the creation time.
_creation_time() raises again, as on main, and only _live_protected_owner()
catches the failed read and moves on to the next pid. On the Windows 11 ARM64
VM, with the CIM read forced to fail, the ct_matches=True foreign-owner case
passed on the previous head with body "...ct:None" and now fails with
CalledProcessError.
Reported by Greptile on #159146.
The pre-build dispatch log must not fail the build: admission, the next
step, refuses bad inputs with its own error. Since 19f57f1649 a tagless
commit dispatch off main builds its replay through
tagless_dispatch_command, whose require_commit raises on a malformed
BUILD_COMMIT, so the log step failed first with a less useful message.
Channel replays had the same exposure through channel_build's
dispatch_command.
release_command now returns no replay when building it raises
ValueError, for both kinds.
Found by the Sol review loop on #158714.
Since 36d5ae1303, release.py --build-commit dispatches the tagless
desktop-bundled-release.yml build when the repository's default branch
isn't main. The pre-build dispatch log still called every tagless commit
dispatch a legacy one that no release.py command recreates, so the run
started by that fallback printed no replay command.
dispatch_log.release_command now returns commit_build's
tagless_dispatch_command for a tagless commit dispatch whose default
branch isn't main (same all-jobs, no-upgrade, no-upload conditions as a
channel replay), and report prints its release.py and workflow lines.
From main it still says the run is one release.py no longer sends.
Found by the Sol review loop on #158714.
372116c747 answered Greptile's renamed-branch finding by refusing
--build-commit outright when the repository's default branch isn't the
Stable Release controller branch, so a fork defaulting to develop lost
the commit build that main gave it.
On such a repository --build-commit now dispatches the tagless
desktop-bundled-release.yml build on the default branch, exactly what
main did (commit_build.admit accepts the default branch there). No
claim is created, because Stable Release would refuse its run.
--only/--with/--without need Stable Release, so they are still refused
there before anything is dispatched. The page is the tagless
releases/commit/<sha>/index.html.
Reported by @kshitijk4poor on #158714.
commit_supports_claim_tag chose the claim path when a commit's tree had
the three claim-tag readers (is_commit_tag, COMMIT_TAG_RE, the
canary|commit pattern). The PR's own first commit, bd507fa031, has all
three but none of the packaging: its desktop_inputs still pops
HERMES_BUILD_COMMIT for every tag and desktop_prepare reads only
canary_timestamp, so a claim on it failed its native builds with
"stable preparation requires its exact claim tag" instead of taking the
tagless path. Any git show failure also returned "legacy", so a failed
read looked like an old commit.
A claimed tree now declares the contract its packaging honours in
scripts/releases/commit_claim_build.txt, read with git (never by running
the tree). No file means the tagless path; a contract outside
stable.CLAIM_BUILD_VERSIONS, or any failed read, raises and stops the
run in stable verify. Every commit of this PR before this one now builds
as legacy, which works for all of them.
Reported by @kshitijk4poor on #158714.
In no-push commit mode, a GHCR miss previously built and passed a
job-local image tag (hermes-termux-builder-local:<short>) to
termux_build.sh, which unconditionally runs `docker pull` and inspects
`RepoDigests[0]`. Both fail on a local-only tag.
Fall back directly to the checkout's digest-pinned base image
(termux/termux-docker@<digest>) on a GHCR miss in both
scripts/termux/build_builder_image.sh (--no-push /
TERMUX_BUILDER_NO_PUSH=1) and .github/actions/build-termux-deb/action.yml
(for pre-PR checkouts). termux_build.sh pulls that pinned image, records
its RepoDigests[0], and provisions the container build toolchain when
clang/git are absent.
Add end-to-end replay tests through the real termux_build.sh wheelhouse
step for both current and pre-PR checkouts.
Addresses Sol S9 on #158714.
Extract the shared secret-free Termux payload staging, builder-image
setup, wheelhouse build, and .deb assembly steps from termux-deb-release
and termux-deb-commit into .github/actions/build-termux-deb/action.yml,
checked out from github.sha via sparse-checkout so both release lines and
pre-PR commit claims resolve the controller's action.
Literal cache-mode, job permissions, setup-pm cache flags,
archive_inputs, and APT GPG signing steps stay in the separate release
and commit jobs; termux-deb-commit passes save-caches: false,
push-builder-image: false, and no github-token.
Addresses Greptile P2 thread on #158714.
termux-deb-commit previously inherited the workflow-wide permissions
(including packages: write and contents: write), inherited job-level
GH_TOKEN and R2 credentials from termux-deb-release, and handed
GITHUB_TOKEN to the claimed checkout's build_builder_image.sh, letting
unreviewed commit code overwrite the shared GHCR builder image that
trusted release builds consume.
- Give termux-deb-commit explicit read-only permissions (contents: read,
packages: read) and keep GH_TOKEN and R2 secrets out of its job-level
env.
- Add --no-push / TERMUX_BUILDER_NO_PUSH=1 support to
scripts/termux/build_builder_image.sh so registry misses build and
smoke a job-local image (hermes-termux-builder-local:<short>) without
docker login or docker push.
- Run termux-deb-commit's builder-image step with no GITHUB_TOKEN and a
local-only fallback for pre-PR checkouts lacking TERMUX_BUILDER_NO_PUSH.
Addresses Sol S2 on #158714.
A commit build's only output is the page of the bundles it built, but
--build-commit --only smoke (or --without both desktop lanes) selected
no bundle lane. The CLI still pushed a claim, dispatched a run in which
no job ran, and printed a builds-page URL that never appears.
require_allowed now refuses a commit lane set with no bundle lane. It
backs both lanes.select (the CLI, before any tag exists) and
stable.stamped_claim (admission), so a hand-written claim is refused
too. Termux alone still counts as a bundle.
--build-commit dispatches Stable Release on the repository's default
branch, but stable.check_controller admits only the main-branch
controller. In a repository whose default branch is not main, the CLI
pushed the claim tag and the run then failed admission, leaving the
claim behind.
Refuse before the claim exists, naming both branches. Stable and canary
claims already require main; commit claims now share that controller.
A claim of a commit from before claims builds Termux through that tree's
tagless --commit path, whose build_deb.sh stamps X.Y.Z+commit<sha12>
(since 063cf4428a, the first tree with a commit mode). The recorder and
the candidate validator both expected X.Y.Z-1, so every legacy claim
that selected Termux failed at staging.
Expect X.Y.Z+commit<sha12> in both. The recorder test builds a real .deb
with dpkg-deb, and the validator fixture now carries that version.
commit_supports_claim_tag looked for a quoted "commit" literal in
scripts/termux/deb_version.py, which the file never contains: it reads
claim tags through the canary|commit alternation in _TAG_RE. Every claim
of a current commit therefore came out legacy and built through the
tagless --commit path with plain versions.
Look for the alternation instead, and test the check against the real
HEAD tree rather than invented source strings, so a later rename of any
marker fails here instead of silently turning claims legacy.
Routes commit. and channel. claims to cache-mode: read native legs (Windows, macOS, and a split termux-deb-commit leg with no APT GPG signing key access), closes main's win32-assembly-v1 prefix restore-keys gap, keeps pre-claim commits buildable via trusted controller checkouts and legacyCommitBuild metadata, and renders every staged commit-claim asset (.msixbundle, .msix, .dmg, .zip, .deb) on the claim page.
Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
lanes: add the commit policy restricted strictly to bundles + smoke
(COMMIT_ALLOWED = windows, macos-arm64, termux, smoke; default COMMIT =
windows, macos-arm64, smoke; COMMIT_REFUSED excludes ci, docker, nix,
pm-bundle, windows-live, install-e2e, bootstrap-version, termux-checks,
windows-store, linux and upgrade). POLICY_JOBS adds publish-commit for commit
and limits publish-docker to stable/canary.
stable: generalize canary_claim into stamped_claim (validating bundleEnv for
commit claims), require write/maintain/admin actor permission via
commit_actor_permissions, admit commit claims without a GitHub release, emit
bundle-env and refuse mismatched BUNDLE_ENV_JSON in verify.
commit_build / release / dispatch_log / r2 / stable-release-publication:
--build-commit claims an annotated commit.<stamp>-v<version> tag (advancing
past local same-second stamps) and dispatches stable-release.yml; legacy
tagless commit dispatches no longer mint receipts; r2 prune and --prune-canaries
keep commit builds for 90 days; the stable publication reconciler ignores
'Commit release ' runs in both concurrency and reconcile.if.
Salvaged from ca37ec5974, 37ca767d2a, 7e9f76ad80, 0f11098f12 and 4df7a745a0
in #145680, tightening commit policy to bundles + smoke only.
Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
A commit claim versions packages from its tag stamp like a canary
(X.Y.Z+commit.<stamp>, stamped Windows quad and release epoch) while keeping
the Commit<sha7> identity, no feed and source commit-build via HERMES_BUILD_COMMIT.
handoff accepts commit.<stamp>-vX.Y.Z archives without letting the exported
HERMES_BUILD_COMMIT fall back into tagless commit mode.
r2.channel_for_tag, release_artifacts.release_channel and darwin.merge_mac_feeds
fail closed on commit claims so commit builds can never publish to a release
channel or feed; docker stays closed to commit tags as well.
Salvaged from c15b3c7f91, df7ae5e79c, 784aeb43d9, fdcaa79d68, ad1efe0f25 and
f161e6618d in #145680, keeping docker closed to commit claims.
Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
A commit build's claim tag has the canary claim shape with the commit kind;
its version is X.Y.Z+commit.<stamp> (Termux X.Y.Z~commit.<stamp>-1; APT repo
staging keeps refusing commit claims). release_version/tag_core/releaseVersion/
releaseTagVersion/deb_version accept it; tag_kind names the kind.
Install stamps and icon generation of a commit build may carry its own claim tag
and still say source commit-build, so every updater keeps refusing it; a commit
tag without HERMES_BUILD_COMMIT is refused by the stamp writers and product
identity rather than falling through to the stable identity and its latest feed.
Salvaged from 98ee7de7c6, f8a42b0cc9, d9ead4e507, f161e6618d and 0f11098f12
in #145680, keeping stage_apt_repo closed to commit claims.
Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
The x64 Windows CI lane failed test_owner_creation_time_is_read_for_
system_processes[True] with CalledProcessError from the creation-time
helper: on a busy runner (16 workers) the scan can pick a short-lived
SYSTEM process that exits — or WMI refuses the re-read — between the scan
and the query, leaving a null CreationDate and a non-zero powershell exit.
_creation_time now returns None instead of raising on a vanished or
unreadable pid, and the scenario picks its owner through
_live_protected_owner(): pick, read, and exclude each vanished pid,
retrying, so the marker scenario starts from a protected process that
actually outlives it. Both ct_matches arms use the same live owner —
the A1 verdict only means anything for a live one.
Full marker file on a native Windows 11 arm64 host: 19 passed, 0 failed.
(cherry picked from commit c03ec83d7f616e8bf21e596b04f5c325b8466ab1)
The review on #146657 flagged the parametrized cache-redirect test for
patching sys.platform to run both branches on every host; tests/AGENTS.md
requires host-specific behavior to run ON that host via platforms(...),
never by faking the interpreter's platform.
Split into a windows arm (%LOCALAPPDATA%\hermes\pycache) and a posix arm
($HOME/.cache/hermes-pycache), each with a single platforms() marker and
no sys.platform patching. On a native Windows host the win32 arm runs and
the posix arm skips at collection; the lanes import the file for both.
(cherry picked from commit d974ac7c21fce329af0c0e984252b103280321b4)