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.
- stable-release.yml concurrency: commit builds do publish (their claim
archive and builds page) and do read shared caches; they write none.
- "publishes nowhere" in lanes.py, stable.py, update_channel.py and
stable-release.yml's publish-commit: no channel, feed, GitHub release,
Docker tag or Store, but the claim archive.
- desktop-bundled-release.yml and commit_build.main on the removed
receipt: the tagless build_commit run still exists and has no claim.
- build_builder_image.sh usage: --no-push still uses an already
published image and falls back to the base image only on a miss.
Comment-only. Reported by @kshitijk4poor on #158714.
_write_tag_page built a mixed-type dict and splatted it into
render_page, which ty reports as three invalid-argument-type errors
(the file has one diagnostic on main and four on the PR head). The
three keyword arguments now pass by name, None for every non-commit
page, which is what render_page's defaults gave before, so the
rendered pages are unchanged.
Reported by @kshitijk4poor 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.
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 Rollstack and pstack-hermes rows exempt files that fetch nothing or
only fetch a pinned tool through mise, so the comment above
_SELF_UPDATER_ALLOWLIST now says the list covers both kinds.
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
skills/statechart/scripts/run.ts in khaeransori/pstack-hermes at a977cb5 is
the statechart skill's model-check runner. It asks the user's mise to install
TLA+ tla2tools v1.7.4 (sha256-pinned in the mise spec) and a Temurin JDK into
mise's own store, and writes only temporary .cfg/.tla files under a mkdtemp
directory. It never fetches or replaces plugin code. The gate reads the
releases URL plus writeFileSync in one file as a self-updater, which blocks
the pstack-hermes catalog entry (#158523). Keyed by repo, pin, path and
file sha256 like the Rollstack row.
scripts/build-index.mjs in Rollstack/skills at 9aeb656 only writes
.well-known/agent-skills/index.json from the repo's own SKILL.md files.
The raw.githubusercontent.com string it contains is the URL it records
in that index; it fetches nothing and Hermes never runs it. The gate
reads "GitHub URL + file write" in one script as a self-updater, which
blocks the rollstack catalog entry (#157088). The row is keyed by repo,
pin, path and file sha256, so any edit or re-pin is gated again.
5a93368019 redacted the key file's own lines from notarytool's output
before logging it. That still missed key material echoed at other line
widths, and because it ran before classification, a key-file line such
as a preamble reading "403" turned "HTTP status code: 403. Forbidden."
into a warning.
Classify notarytool's raw output and log only the controlled verdict and
its exit status; no notarytool text reaches the job log, so nothing in
it needs redacting (redact_secrets and the PEM block pattern go). The
operator still gets the HTTP status and the remedy from the verdict, and
the unchanged notarize hook logs its own notarytool run.
The test echoes the key body re-wrapped at 40 columns on HTTP 401 and
HTTP 500 and checks that a key file with a "403" preamble still fails
closed on 403. The previous helper leaks the re-wrapped body on 401 and
warns on that 403; logging the raw output or its last line is caught.
Found by a gpt-6.2-sol review round.
The envelope check from the previous commit accepted any PKCS#8
PrivateKeyInfo, including an empty AlgorithmIdentifier or a well-formed
key of the wrong type. The realistic case is the wrong secret: a
Developer ID RSA key or another EC curve pasted into APPLE_API_KEY_P8
passed locally and left the verdict to notarytool's wording.
App Store Connect API keys are ES256, so require the AlgorithmIdentifier
to be exactly id-ecPublicKey with the prime256v1 curve. The private key
payload inside intact framing is still not parsed: only a bit flip can
damage it there, and notarytool's CryptoKit parse or Apple's 401 rejects
that, both classified as auth failures.
The previous helper accepts a generated RSA key, a generated P-384 key
and an empty AlgorithmIdentifier; all three fail now, while a generated
P-256 key and the App Store Connect-shaped fixture pass. Each bad
envelope breaks one rule of an otherwise valid P-256 key, and every
mutant of the check (exact fill, outer tag, element bound, field tags,
algorithm, curve, the call) is caught.
Found by a gpt-6.2-sol review round.
The preflight logs notarytool's output on both the error and the warning
path after removing complete PEM blocks and the exact key ID and issuer.
Key material echoed without its BEGIN/END markers matched neither, so it
would have reached the public job log.
Redact each body line of the key file the preflight already read, so the
rest of notarytool's message stays as the diagnostic (it is the only
clue on the warn-and-continue path, which is why the output is kept
rather than dropped). The test echoes the body lines without markers on
HTTP 401 and on HTTP 500; the previous helper leaked them on 401.
Found by a gpt-6.2-sol review round.
validate_p8_pem accepted any base64 body of 32 bytes or more whose first
byte was 0x30. A .p8 secret that lost a body line still decodes cleanly
and still starts with the SEQUENCE tag, so it passed the local check and
its rejection depended on notarytool's wording: an unrecognised parse
error warns and the build runs for ten minutes, as it did before the
preflight.
Read the DER envelope instead: one definite-length SEQUENCE that fills
the decoded body exactly and opens with INTEGER version, SEQUENCE
algorithm and OCTET STRING privateKey (PKCS#8 PrivateKeyInfo). Stdlib
only, and nothing from the key reaches the output.
The test fixture is now laid out like an App Store Connect P-256 key, a
disposable key from cryptography must pass, and a lost body line, a
SEQUENCE of the wrong fields, a SET, trailing bytes and a field that
overruns the SEQUENCE must fail. The previous helper accepts the first
two; each of five mutants of the new check (exact fill, outer tag,
element bound, field tags, the call itself) is caught.
Found by a gpt-6.2-sol review round.
Canary runs 44784160658 and 44876973873 spent ~10 minutes building,
signing, and zipping Hermes Agent Canary.app before `xcrun notarytool
submit` failed in seconds with HTTP 401 Unauthenticated.
Add a pre-build credential preflight (`scripts/ci/check_macos_notary_auth.py`)
and wire it into `.github/workflows/desktop-bundled-release.yml` immediately
after `Write App Store Connect key for notarytool` on both darwin legs
(release and commit/channel, sharing `&darwin-steps`):
- Validates that `APPLE_API_KEY`, `APPLE_API_KEY_ID`, and
`APPLE_API_ISSUER` are set and that `apple-api-key.p8` contains a single
DER-encoded PKCS#8 PEM private key before invoking `xcrun`.
- Runs `xcrun notarytool history --key ... --key-id ... --issuer ...
--output-format json` with a 30 s timeout and redacts key IDs, issuer
UUIDs, and PEM blocks from any logged output.
- Fails fast (exit 1, `::error::`) only on deterministic credential errors:
HTTP 401/403 (revoked key, wrong role, expired/missing Apple legal
agreements), invalid PEM, or local `notarytool` key/argument errors.
- Treats transient Apple failures (HTTP 5xx/429 including Apple's HTTP 500
"Error communicating with authentication service", `NSURLErrorDomain`
lost-contact errors, subprocess timeouts, `OSError`, and unrecognized
non-zero exits) as non-fatal warnings (`:⚠️:`, exit 0) so
`Build and package` keeps its full retry path and post-build Gatekeeper
verification.
- On channel builds, prefers `.build/channel-controller` (the trusted main
checkout); on older `build_commit` checkouts lacking the helper, warns
and skips while release checkouts fail closed.
`scripts/bundles/appimage_checks.py::main` previously required
`{name for _, name in socket.if_nameindex()} == {"lo"}`. On Linux hosts
with tunnel drivers loaded or built in (`ipip`, `sit`, `ip6_tunnel`,
`ip_gre`, etc., with default `net.core.fb_tunnels_only_for_init_net=0`),
the kernel creates down, unaddressed fallback devices (`tunl0`, `sit0`,
`ip6tnl0`, `gre0`, ...) in every new network namespace, including
`docker run --network none`. That caused `scripts/ci/linux_x64_userland.sh
accept` to exit immediately on Blacksmith x64 runners (canary runs
44690154688 and 44876973873).
Verify via `SIOCGIFFLAGS`, `SIOCGIFADDR`, and `/proc/self/net/{route,
if_inet6,ipv6_route}` that `lo` is up and loopback and every other
interface is down with no IPv4/IPv6 address and no routes, failing closed
with the concrete reason on root, active/addressed/routed interfaces, or
unreadable network state.
`hermes update`'s old-backend notice (hermes_cli/update_backend_notice.py) imports
hermes_cli/backend_migration_marker.py, so a change there must start the e2e_upgrade suite.
tests/ci/test_update_ci_routing.py::test_every_module_an_update_entry_point_imports_starts_its_suite
[_UPDATE_ENTRY_POINTS-e2e_upgrade] failed without this route.
`hermes dashboard password` moved the one core import of the bundled basic sign-in
provider's public `hash_password` from hermes_cli/main_dashboard.py into the shared
hermes_cli/dashboard_password.py (`store_basic_auth`), which the interactive prompt in
main_dashboard.py now calls. The count stays one: the baseline entry moves with the
import instead of a second crossing being added.
Only that entry changes; `boundary_lint.py --update` would also drop three stale
entries the base already no longer has, which belong to other changes.
Fixes tests/scripts/test_boundary_lint.py::test_boundary_violations_do_not_rise_above_the_baseline
(red on 17241882 in CI and with `scripts/boundary_lint.py --check`).
MakeAppx stores ZIP part names percent-encoded, so the stable bundled
package's Executable="app\Hermes Agent.exe" is the entry
app/Hermes%20Agent.exe (the published rc.3-v0.22.0 x64 MSIX reads that
way). The packaged-executable lookup compared raw entry names, found
nothing, and record() raised on every stable Windows candidate. Canary
never showed it because its executable is hermes-canary.exe.
Decode each entry name before comparing it with the manifest's path.
631b9d18c9's stable-desktop recovery check read the attempt's -desktop image through
_version_digest, which raises on any registry error. A failed read there, with the pointer
and the slim alias current, aborted the whole production pass before it could plan anything
newer. Either image failing to read is now inconclusive (not behind), like the alias itself;
promote_stable still reads both strictly when it actually moves them.
9bf56ac5a9 counted an unreadable `stable` alias as current. When the head read and the
recovery read both fail, a stale desktop pointer then got the full advance, whose Docker
promotion can move a newer Docker-only release's aliases back. An unreadable alias now leaves
the owner unknown, and like a newer owner it gets only the desktop-only `finish`.
Production always has the `stable` alias, so "unreadable" is a registry error there. A
registry where the alias was never created gets no Docker promotion from recovery either,
as on main, where channel_head counted the desktop head as done in that case.
631b9d18c9 checked alias ownership only when the pointer was current. With a stale or
missing pointer the pass returned the desktop head straight away, and plan() chose a full
advance because the head read matched it, which it can only do after a registry error
dropped a newer Docker-only release out of the head. That advance repeats the Docker
promotion and moves the aliases back to the older release.
_unfinished_desktop_head now returns the step itself. While a newer release owns the
aliases (it holds the channel head, or the alias carries its digest) a stale pointer gets
the desktop-only `finish`; otherwise a stale pointer or provably behind aliases get the
full `advance`.
4e8b5fd31b's alias check probed the registry a second time and compared the slim `stable`
alias with the desktop head's digest. Two gaps:
- A registry error on the head probe drops the combined head back to the desktop release;
if the second probe then succeeds with a newer Docker-only release's digest, that digest
read as a stopped promotion and the pass moved the aliases back to the older release.
- promote_stable moves the slim aliases before the desktop ones, so a slim alias that
carries the release says nothing about stable-desktop/latest-desktop.
The aliases now count as behind only when the alias read succeeds, its digest belongs to no
newer published release, and either the slim alias misses the head's digest or the
stable-desktop alias misses the attempt's desktop image (docker.stable_desktop_alias_behind).
An unreadable alias proves nothing and is left alone.
91fbd83fc8 re-advanced the desktop head only when its candidate pointer was wrong. Two cases
still read as done: the pointer PUT landed but its read-back failed, or the Docker promotion
itself failed, so the next pass saw a matching pointer and the Docker vX.Y.Z tag and
stable/latest aliases never moved. And with a newer release at the combined head the pass
refused outright, leaving the stale pointer for an operator.
While the desktop head is also the channel head, a Docker-carrying release whose stable alias
does not carry its digest now counts as unfinished too, and advances again through the normal
production advance. Under a newer head only the desktop advance repeats (a new `finish` step,
advance_stable alone), so that release's aliases stay where the newer release put them.
The pruner compared the canary pointer with the protected canary head only when the pointer
existed, and found the head by the record name `canary`. The first canary after today's legacy
v<stable>+canary.<stamp> head has no pointer until its write lands, so if that write failed the
live canary's archive was protected by nothing but its age; and a canary channel bootstrapped
under another name read as no head at all, so every prune refused with no way to fix it.
The pruner now picks the protected channel the way publication does
(channel_releases.select_channel): the one listed record whose policy is canary-release,
refusing when two claim it. It reads that head whenever the record exists, refuses when a
canary.<stamp>-vX.Y.Z head has no pointer, and fails closed on an unreadable record or head
manifest. A legacy head with no pointer prunes as before.
The pointer repair from 196d082b74 ran after the pass, against the combined publication head,
and called only advance_stable. Two gaps: production_advance moves the Docker vX.Y.Z tag and
stable/latest aliases after advance_stable, so a pointer write that failed after the head
moved also skipped them and the repair never ran them; and a newer Docker-only release could
become the combined head and hide the desktop head's stale pointer.
The pass now asks, before planning, whether the protected desktop head's candidate pointer
names it. If not, plan() advances that release again ahead of anything newer, through the
normal production advance (idempotent desktop advance, then the Docker promotion), so a
newer release can never run before it finishes. If a newer release already holds the head,
the pass refuses instead of moving that release's aliases back.
docker_tag() turned a retired vX.Y.Z+canary.<stamp> tag's `+` into `-`. Since canaries are
canary.<stamp>-vX.Y.Z claims it returns its input, yet admit still emitted it as a separate
docker-tag output that three stable-release.yml consumers read, with comments describing the
old conversion. The docker and publish-docker calls and the canary alias step take claim-tag
again, as they did on main, and the helper and output go.
The pinned-commit version test found an exact heredoc opener in build_deb.sh, cut its Python
body out and ran that fragment: a source-reading test (tests/AGENTS.md) that breaks on a
harmless shell refactor and still passes if the fragment sits in the wrong branch.
build_deb.sh now derives a tagged build's version once, through deb_version.py
--release-version, whether or not a commit is pinned; the heredoc keeps only the tagless
commit build's version_at read. It logs the payload version before its first post-version
gate. The tests run the real script against a throwaway git repo with docker, dpkg-deb and jq
stubbed, and stop at the missing --tui-product, so they see the version the stamp would carry
for each tag shape in both tag modes. Mutants caught: ${TAG#v}, the original ${TAG:1}, and
deriving the version only in tag mode.
scripts/releases/r2_apt.py imported relative_artifact_path from r2 while r2.prune imported
live_pool_keys back from it, both through function-local imports, and it added a flat
<stem>_<topic>.py sibling the root AGENTS.md no longer allows. r2.prune is its only caller,
so the 40 lines move beside prune and the cycle is gone. The two module constants gain a
TERMUX_CANARY prefix so they read unambiguously in r2. No behaviour change.
publish_release now writes releases/<channel>/release-candidates.json only after the
protected head advances, so a failed pointer write leaves the head on the new release and
the pointer on the previous one. Nothing then repaired it: the sequencer's plan() treats a
published version at the head as done, and the canary's quiet-day _resume_canary returns as
soon as the head matches.
Stable: each production pass now compares the pointer with the archived candidate of the
release at the head and, when it differs or is missing, repeats that release's desktop
advance (advance_stable only; Docker aliases stay put). publish_release is idempotent once
the head is there, so the repeat ends at the pointer write. The stable pointer is the source
channel's update target and the next release's upgrade baseline.
Canary: the pointer's only reader is the R2 pruner, and _resume_canary runs without R2 write
credentials. The pruner now reads the protected canary head and refuses to prune while the
pointer names another canary, so a lagging pointer can no longer expose the live canary's
archive. A rerun of that canary's publish-canary job (or the next canary) rewrites it.
The existing canary test matches the refusal with the case-sensitive
regex 'stale' (as the later feed/head checks word it), so the first
version's 'Stale canary publication ...' failed it before any pointer
assertion ran.
Red/green (local, py3.14): tests/scripts/test_release_channels.py 18
passed; with scripts/releases/channel_releases.py reverted to the PR head
the pointer assertion fails.
Refs: NousResearch/hermes-agent#142475
(cherry picked from commit 4d7049eaa22a96d6a68c331e8b74596e551bd1db)
Before overwriting the canary candidate pointer, compare the new claim's timestamp with the protected live head. A rejected older canary must never replace the retention pointer used by R2 pruning. Extend the existing end-to-end HTTP publisher regression to assert the pointer is unchanged after stale rejection.
Reported by alt-glitch in NousResearch/hermes-agent#152219.
Carrier work by ethernet8023 in NousResearch/hermes-agent#142475.
Counterexample identified by teknium1 in the carrier review.
(cherry picked from commit 2ffd4b1b05b533fb1dbfc3d5f3a04d4ac4128cfa)