Skip to content

chore(workspace): delete orphan HermesA2AExecutor (-1.8K LOC dead code) - #2152

Merged
hongmingwang-moleculeai merged 1 commit into
stagingfrom
chore/delete-orphan-hermes-executor
Apr 27, 2026
Merged

chore(workspace): delete orphan HermesA2AExecutor (-1.8K LOC dead code)#2152
hongmingwang-moleculeai merged 1 commit into
stagingfrom
chore/delete-orphan-hermes-executor

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

First step of #87 (universal-runtime violation refactor). Removes ~1.8K LOC of verified dead code:

  • `workspace/hermes_executor.py` (545 LOC) — `HermesA2AExecutor`, an OpenAI-compat direct-call executor that was the original hermes integration. The hermes template was rewritten to bridge to hermes-agent's sidecar API server (`HermesAgentProxyExecutor` in `workspace-configs-templates/hermes/executor.py`). The two implementations are independent; only the proxy one is used.
  • `workspace/tests/test_hermes_executor.py` (1307 LOC) — its test file.

Verified-dead-code analysis

  • Zero `from hermes_executor` / `import hermes_executor` imports anywhere in `workspace/`, `workspace-server/`, or `workspace-configs-templates/` (excluding the file itself + its test).
  • Hermes template uses `HermesAgentProxyExecutor`, which is local to the template repo, not imported from molecule_runtime.
  • Last touched in PR feat(workspace): migrate a2a-sdk from 0.3.x to 1.0.0 (KI-009) #1974 (a2a-sdk migration) — kept compiling but never wired into any code path.

Why now

Starting #87 with the safest concrete step. Dead-code deletion clears the landscape for the bigger move (`claude_sdk_executor.py` → claude-code template repo) without anyone defending HermesA2AExecutor as "actually used somewhere."

Verification

  • 1241/1241 workspace pytest pass (was 1312; the 71 dropped tests are exactly test_hermes_executor.py's coverage)
  • No new failures, no broken imports anywhere

Remaining for #87 (per scope: claude-code + hermes priority)

  • `workspace/claude_sdk_executor.py` (757 LOC) → move to claude-code template repo (next PR; multi-repo coordination)
  • `workspace/cli_executor.py` (461 LOC) → defer (codex/ollama still use runtime presets here; comes back later when those bump versions)

🤖 Generated with Claude Code

Removes:
  - workspace/hermes_executor.py (545 LOC) — HermesA2AExecutor, an
    OpenAI-compat direct-call executor that was the original hermes
    integration before the template was rewritten to bridge to
    hermes-agent's sidecar API server.
  - workspace/tests/test_hermes_executor.py (1307 LOC) — its test file.

Verified-dead-code analysis:
  - Zero `from hermes_executor` / `import hermes_executor` imports
    anywhere in workspace/, workspace-server/, or
    workspace-configs-templates/ (excluding the file itself + its test).
  - The hermes template (workspace-configs-templates/hermes/executor.py)
    uses HermesAgentProxyExecutor, NOT HermesA2AExecutor — they're
    independent implementations. The executor.py file imports from
    `executor` (local), not from molecule_runtime.
  - Last touched in PR #1974 (2026 a2a-sdk migration to 1.0.0) for SDK
    compatibility — kept compiling but never wired into any code path.
  - Older than that, only the 2026 open-source restructure rename.

Why now: starting task #87 (universal-runtime violation, move adapter-
specific code out of workspace/). Dead-code deletion is the safest
first step and motivates the broader refactor by clearing the
landscape — no risk of someone defending HermesA2AExecutor as
"actually used somewhere."

Verification:
  - 1241/1241 workspace pytest pass (was 1312; the 71 dropped tests
    are exactly test_hermes_executor.py's coverage)
  - No new failures, no broken imports anywhere

The remaining adapter-specific executors in workspace/ that #87 will
eventually relocate (per the user's scope: claude-code + hermes priority,
others later):
  - workspace/claude_sdk_executor.py (757 LOC) → claude-code template repo
  - workspace/cli_executor.py (461 LOC) → defer (codex/ollama/etc still
    use the runtime presets here; comes back later when those bump versions)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged via the queue into staging with commit 5d49cd7 Apr 27, 2026
14 checks passed
@molecule-ai
molecule-ai Bot deleted the chore/delete-orphan-hermes-executor branch May 20, 2026 06:21
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
Flips continue-on-error: true -> false on the two real-infra jobs:
- Handlers Postgres Integration
- E2E API Smoke Test

These contexts are already listed as required on branch protection,
but the mask made each job report success even when its steps failed,
so the required gate could never actually block a bad merge.

If CI surfaces broken underlying tests on this PR, root-fix them —
do NOT renew the mask.

Closes #2152

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
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