feat: add release update channel - #24938
Conversation
|
Thanks for picking this up @Sunwo0u — this is a solid first step toward #34514, and the 1. Default channel — worth aligning on scope#34514 talks about release-tracking being the default, but on reflection I don't think a hard default-flip is a must — keeping 2. Release path clobbers tag pins instead of respecting themThe issue specifically calls out that a tag-pinned (detached-HEAD) install gets forced back onto
3. Release path skips the post-pull syntax guard + rollbackCurrent 4. Pinning a specific release (nice-to-have, follow-up is fine)The issue floated Minor
Happy to help with any of the above (default flip, tag-pin/detached-HEAD handling, or wiring the syntax guard into the release path) if it's useful. Thanks again for moving this forward. |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for implementing an opt-in release channel; current main still defaults updates to main (hermes_cli/main.py:8386-8394), so the capability is useful. The branch needs substantive updater-path integration before it is safe to salvage.
Problems
- PR
hermes_cli/main.py:7602treats a tag ancestor ofHEADas release-current. A checkout onmainafter the latest tag therefore remains on unreleased code when release mode is selected. - PR
hermes_cli/main.py:7566-7585,7627checks outmainand resets it to the tag. That both discards detached tag-pin state and makes localmaindiverge fromorigin/main. - The release reset path bypasses current main's syntax validation and rollback (
hermes_cli/main.py:9767-9841; introduced byaedb8ac83b8c6ecb89b9d370909fa46ff4733da2).
Suggested changes
- Make release mode compare against and land on the exact tag commit; add a test for
HEADahead of the latest tag. - Preserve tag state without moving
main, and route the release path through the current validation/rollback guarantees. - Document
updates.channelin the update and configuration guides.
Automated hermes-sweeper review.
| if not latest_tag: | ||
| print("✗ No release tags found.") | ||
| sys.exit(1) | ||
| if _head_contains_ref(git_cmd, PROJECT_ROOT, latest_tag): |
There was a problem hiding this comment.
merge-base --is-ancestor also succeeds when HEAD is on main after this tag. In that common opt-in transition, this reports release-current and leaves untagged main code installed; compare HEAD to the resolved tag commit (and add that regression case) instead.
| _create_pre_update_snapshot() | ||
| print("→ Moving main to latest release tag...") | ||
| reset_result = subprocess.run( | ||
| git_cmd + ["reset", "--hard", latest_tag], |
There was a problem hiding this comment.
This runs after the unconditional checkout of main, so it moves local main to the tag rather than preserving a release/tag pin. That leaves main diverged from origin/main; use a release-specific detached/ref strategy and retain the current update rollback guard around the transition.
|
can we please prioritize this. thanks |
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Two PRs address release-based update channels. #11450 adds an edge/stable selector around the update command, while #24938 extends the same core capability to update checks and the startup banner but does not yet safely enforce exact release-tag state.
Related pull requests
- #11450 [closed]
duplicate— (+886/-137) — superseded reference: Addsupdate.channelwith edge/stable CLI and config selection plus release-tag checkout tests, but its updater extraction predates latercmd_updatesafety refactors. Although closed, it remains relevant as the earlier implementation and its author explicitly offered commitbcb358a1for selective reuse. - #24938
related— (+530/-104) — keep open with a salvage path: Addsupdates.channelwith main/release modes acrosshermes update,--check, banner checks, remote tag discovery, and tests. The contributor keep_open review on #24938 correctly identifies blocking updater-path defects in the diff: ancestor testing treats HEAD ahead of the latest tag as current,reset --hard <tag>moves localmaininstead of preserving an exact tag checkout, and the release path bypasses current syntax-validation and rollback guarantees.
Duplicates
#11450 and #24938 substantially duplicate the opt-in release-channel mechanism; #24938 is the broader successor because it also integrates release tracking into --check and banner update checks.
Suggested consolidation
Keep open with a salvage path for #24938: retain its channel configuration, CLI override, remote release-tag discovery, banner/--check integration, and associated tests, but rework updates to compare HEAD with the exact tag commit, land on that tag without moving local main, and pass through the existing syntax-validation and rollback path; add coverage for HEAD being ahead of the latest tag. Keep #11450 closed as a duplicate superseded by #24938, using bcb358a1 only for any still-useful isolated pieces.
Complex graph
flowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
subgraph Dup11450 ["PRs duplicating each other"]
P11450["PR #11450 (closed)"]
P24938["PR #24938 (open)"]
end
class P11450 closed
class P24938 open
class P24938 target
click P11450 "https://github.com/NousResearch/hermes-agent/pull/11450"
click P24938 "https://github.com/NousResearch/hermes-agent/pull/24938"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).
Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 93 kB of PR diffs, 5 kB of issue/PR text, 6 kB of discussion (4 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
Summary
updates.channelwithmainandreleasemodes for Hermes updateshermes update --channel {main,release}and apply the same override to--checkSafety notes
mainreleasevia profile config without changing global behaviorls-remote --tags --refs, avoiding stale/local-only tags when possible--channel mainremains available for emergency hotfixes between releasesTest Plan
python -m py_compile hermes_cli/main.py hermes_cli/banner.py hermes_cli/config.pypython -m pytest tests/hermes_cli/test_update_check.py tests/hermes_cli/test_cmd_update.py -q -o 'addopts='git diff --check{}python -m hermes_cli.main --profile evah update --checkpython -m hermes_cli.main --profile evah update --check --channel main