Skip to content

feat(hermes-agent): version registry for v0.12 + v0.13 (Wave 2 P2-1) - #162

Merged
Ghenghis merged 2 commits into
feat/hermes3d-7-complete-gui-repo-wiringfrom
claude/agent-version-registry
May 10, 2026
Merged

feat(hermes-agent): version registry for v0.12 + v0.13 (Wave 2 P2-1)#162
Ghenghis merged 2 commits into
feat/hermes3d-7-complete-gui-repo-wiringfrom
claude/agent-version-registry

Conversation

@Ghenghis

Copy link
Copy Markdown
Owner

Summary

  • Adds services/agent_version_registry.py — a frozen-dataclass registry of known Hermes Agent versions (v0.12 @ v2026.4.30, v0.13 @ v2026.5.7) with their feature flags. Pairs with agent_checkout.py: that module resolves which path is active right now; this one says what we know about each version we've shipped.
  • active_version() reads the live checkout via hermes_agent_checkout() so per-call env-flips (PR feat(hermes-agent): canary env-switch resolver (Wave A4 + A5 combined) #155 / Wave A5) propagate, and returns None if the operator points HERMES_AGENT_CHECKOUT at an unknown custom fork.
  • Read-only on agent_checkout.py. Imports DEFAULT_AGENT_CHECKOUT, V012_FALLBACK_CHECKOUT, hermes_agent_checkout only.

Why a separate module

agent_checkout.py answers which path is live; downstream callers (compat matrix, proof-event tagger, rollback UI) need what we know about each version. Keeping that metadata in its own frozen-record module:

  • Makes feature-gating explicit (if active_version().has_kanban: ...) instead of string-matching paths.
  • Survives operator env flips because active_version() re-reads the checkout per-call.
  • Cannot leak state across callers (frozen dataclass; __setattr__ raises FrozenInstanceError).

Required surface

Symbol Status
HermesAgentVersion(label, upstream_tag, checkout_path, venv_python, redaction_default_on, has_kanban, has_heartbeat_reclaim, has_zombie_detection, has_pluggable_providers_dir) shipped, frozen=True
V012, V013 (module constants) shipped
KNOWN_VERSIONS: tuple[HermesAgentVersion, ...] shipped (order: V012, V013)
active_version() -> HermesAgentVersion | None shipped, returns None for unknown paths

Pinned facts (each pinned by a test)

Fact Source
v0.12 upstream tag = v2026.4.30 Wave 1 promotion brief
v0.13 upstream tag = v2026.5.7 ("Tenacity Release") Wave 1 promotion brief
v0.13 redaction_default_on=True NousResearch/hermes-agent#21193, Wave A3 verified
v0.12 redaction_default_on=False Wave 2 prior swarm Agent 2 finding
v0.13 ships kanban + heartbeat-reclaim + zombie-detection + plugins/model-providers/ Wave 1 candidate snapshot
active_version() defaults to v0.13 with env unset post PR #160 default
active_version() returns v0.12 when HERMES_AGENT_CHECKOUT=G:/Github/hermes-agent-fresh per-call env semantics
active_version() returns None for unknown paths resolver fallthrough

Persistence note

Feature flags here are static booleans per shipped version. If a future feature is conditionally available (e.g. only present when an extra is installed), do not mutate these frozen records — open a follow-up next_fix_attempt issue and add the flag once the conditional is resolved at instance construction.

Constraint compliance

  • Source: 89 file lines, 67 non-blank/non-comment LoC (target ≤80).
  • Tests: 114 lines, 13 cases (target ~80).
  • No edits to existing files. Only ADDs the 2 new files.
  • Online research: Python dataclasses frozen-instance docs + Django AppConfig registry pattern (cross-comparison) — both cited inline in the module docstring.
  • No secret values; venv_python typed Path | None, never strings.
  • MCP locks held for both new files (33eb9592..., a37b5c7b...); released after PR open.

Test plan

  • pytest 04_testing/pytest/unit/test_agent_version_registry.py — 13/13 pass in 0.08s
  • pytest 04_testing/pytest/unit/test_agent_checkout_resolver.py 04_testing/pytest/unit/test_agent_version_registry.py — 24/24 pass in 1.54s (no resolver regression)
  • Pre-push hook ran the project's fast-suite, all green
  • CI mech-review check (auto-runs on PR open)

Hermes evidence chain: PASS

  • Task ID: a2a_p2_1_version_registry
  • hermes_run_gate: pending CI
  • MCP locks: acquired (33eb9592..., a37b5c7b...); will release after PR opens

Handoff

  • P2-5 (compat matrix) reads KNOWN_VERSIONS to render the "feature × version" capability table.
  • P2-6 (version-tagged proof events) reads active_version().label and active_version().upstream_tag to add a version_tag field on every proof event so post-mortem can rebuild what version produced what evidence.

Source links

Ghenghis and others added 2 commits May 9, 2026 17:18
… 7/7 gates green)

Wave 1 of the v0.13 production promotion swarm cleared all 7 hard gates.
This PR flips the resolver default from v0.12 (hermes-agent-fresh) to
v0.13 (hermes-agent-v013-canary). v0.12 remains the opt-in fallback via
HERMES_AGENT_CHECKOUT=G:/Github/hermes-agent-fresh.

Hard gates (all PASS, evidence below)
1. MiniMax accepted=true       — P1-1 (ev_84c2ba93c25d4017)
2. DeepSeek accepted=true      — P1-1 (ev_6fa1536b411822db)
3. Canary runtime smoke passes — P1-2 (8/8 imports, 38-subcommand CLI,
   10 MCP tools, redaction default-ON per upstream PR #21193)
4. v0.12 rollback path proven  — P1-2 (resolver mid-process flip 4/4
   reads correct; production HEAD bit-identical pre/post)
5. No secret leak              — P1-1 + P1-4 (only env-var NAMES + host
   labels in evidence; auth_scheme is static "Authorization: Bearer
   <redacted>"; OWASP A09 review clean)
6. No v0.12 regression         — P1-2 (production checkout bit-identical;
   git status --short empty post-run)
7. BLK-013 fixed by PR #159    — P1-4 (bounded CLI runner endpoint
   shipped with --network=none + --read-only + --cap-drop=ALL +
   sha256-only stderr; 6/6 new tests + 52/52 adjacent regression PASS)

Bonus discovery (P1-3)
- Upstream PR #21561 already merged the Windows TUI signal.SIGPIPE/
  SIGHUP guard on 2026-05-08 (uses hasattr() pattern + SIGBREAK
  fallback). Canary at v2026.5.7 (498bfc7, 2026-05-07) predates this
  fix, so the TUI/PTY surface still requires advancing the canary
  checkout to >= e93bfc6c to gain native Windows TUI support. Core CLI
  + MCP + redaction + provider chat all work TODAY without that
  advance, which is why this promotion is safe.

Patch
- DEFAULT_AGENT_CHECKOUT now points to v0.13 (canary path).
- New V012_FALLBACK_CHECKOUT constant exposes the v0.12 path for
  operators + tests that need explicit fallback semantics.
- CANARY_AGENT_CHECKOUT retained as alias for back-compat.

Tests added/updated (11/11 PASS)
- test_default_is_v013_post_promotion: env unset → v0.13
- test_v012_fallback_via_env: env=hermes-agent-fresh → v0.12
- test_resolver_constants_are_correct: DEFAULT == CANARY == v0.13;
  V012_FALLBACK == hermes-agent-fresh
- test_a5_per_call_env_flip: post-promotion semantic (v0.13 ↔ v0.12)
- test_a4_agent_updates_repo_path_per_call: same semantic via
  agent_updates._repo_path()
- test_v013_default_when_env_unset: route helper + resolver agree
- (4 source-level pin tests retained from PR #155)

Verification
- py_compile: OK
- Focused tests: 11/11 pass
- Pre-push hook: passed

Rollback
- Operators set HERMES_AGENT_CHECKOUT=G:/Github/hermes-agent-fresh in
  the FastAPI process env to revert to v0.12 mid-process (no restart;
  per-call resolver from PR #155).
- Or revert this PR (1 commit) to restore v0.12 as the file-level
  default.
- Production v0.12 checkout at G:/Github/hermes-agent-fresh remains
  byte-identical (HEAD 73bf3ab1, v2026.4.30, status clean) — never
  modified by canary work.

Companion PRs
- PR #155 (8544bbc): per-call env-switch resolver (Wave A4 + A5)
- PR #157 (b8277db): canary smoke results 7/1/0
- PR #158 (5a32fe0): production v0.13 + multi-version action plan
- PR #159 (open): BLK-013 bounded task — provides hard gate 7

Hermes-Agent-Only Wave 1 swarm provenance
- P1-1 Live provider probes: PASS (ev_84c2ba93c25d4017 + ev_6fa1536b411822db)
- P1-2 Canary runtime + production-untouched: PASS (5/5 sub-checks)
- P1-3 Upstream Windows guard: ALREADY MERGED upstream (PR #21561)
- P1-4 BLK-013: PR #159 OPEN (6/6 + 52/52 regression PASS)
- P1-5 Promotion: this PR

References
- Upstream v0.13.0 release: https://github.com/NousResearch/hermes-agent/releases/tag/v2026.5.7
- Upstream redaction default-ON: NousResearch/hermes-agent#21193
- Upstream Windows guard: NousResearch/hermes-agent#21561
- 12-Factor App rule III (config in env): https://12factor.net/config

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds services/agent_version_registry.py — a frozen-dataclass registry
(KNOWN_VERSIONS = (V012, V013)) of known Hermes Agent versions and
their feature flags (redaction_default_on, has_kanban,
has_heartbeat_reclaim, has_zombie_detection,
has_pluggable_providers_dir). Pairs with agent_checkout.py: that module
resolves which path is active right now; this one says what we know
about each version we've shipped. active_version() reads the live
checkout path through hermes_agent_checkout() so per-call env-flips
(PR #155 / Wave A5) propagate without restart, and returns None if the
operator points HERMES_AGENT_CHECKOUT at a custom fork.

Reads agent_checkout module-level constants only; does not edit it.

Pinned by tests:
- KNOWN_VERSIONS = (v0.12@v2026.4.30, v0.13@v2026.5.7) in order.
- v0.13.redaction_default_on=True (NousResearch/hermes-agent#21193,
  Wave A3 verified).
- v0.12.redaction_default_on=False (Wave 2 prior swarm Agent 2).
- active_version() == v0.13 with env unset (post-PR #160 default).
- active_version() == v0.12 when env=hermes-agent-fresh.
- active_version() is None for unknown checkouts.
- FrozenInstanceError on any field mutation (no cross-version leak).

LoC: 89 lines source (67 non-blank/non-comment) + 114 lines tests.
Tests: 13/13 pass; combined with test_agent_checkout_resolver.py 24/24 pass.

References:
- Python @DataClass(frozen=True): https://docs.python.org/3/library/dataclasses.html#frozen-instances
- Django AppConfig metadata pattern: https://docs.djangoproject.com/en/5.1/ref/applications/

Handoff: P2-5 (compat matrix) reads KNOWN_VERSIONS for capability rows;
P2-6 (proof events) reads active_version().label/upstream_tag for the
version_tag field on every event.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 475c0ff6-2eab-4196-93f8-cc007fc1f656

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/agent-version-registry

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ghenghis
Ghenghis changed the base branch from claude/v013-promotion-flip to feat/hermes3d-7-complete-gui-repo-wiring May 10, 2026 01:39
@Ghenghis
Ghenghis merged commit 330437b into feat/hermes3d-7-complete-gui-repo-wiring May 10, 2026
1 check passed
@Ghenghis
Ghenghis deleted the claude/agent-version-registry branch May 10, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant