chore(workspace): drop claude_sdk_executor — Phase 2 of #87 - #2156
Merged
HongmingWang-Rabbit merged 1 commit intoApr 27, 2026
Merged
Conversation
Phase 2 of the universal-runtime refactor (task #87). Now that the claude-code template repo ships its own claude_sdk_executor.py (template PR #13 merged + image rebuilt at 07:36 UTC) the molecule-runtime no longer needs to ship the file. Deletes: - workspace/claude_sdk_executor.py (704 LOC) - workspace/tests/test_claude_sdk_executor.py (~1.6K LOC) Updates: - workspace/runtime_wedge.py — drops the "Compatibility shim" docstring section. The shim was time-bounded ("removed once #87 Phase 2 lands"); this is that PR. - workspace/tests/test_runtime_wedge.py — drops the TestClaudeSdkExecutorReExportShim test class (the shim doesn't exist anymore so the identity assertions would fail at import). - workspace/tests/conftest.py — drops the claude_agent_sdk stub. Its only consumer was test_claude_sdk_executor.py which is gone; no other test imports the SDK. - workspace/cli_executor.py — comment refresh: claude-code template repo (not workspace/) is now the home for ClaudeSDKExecutor. Verified-safe-to-delete: - heartbeat.py: migrated to runtime_wedge in PR #2154 (no longer imports from claude_sdk_executor) - cli_executor.py: only comments referenced claude_sdk_executor; its line-117 ValueError defends against accidental routing - tests: only test_claude_sdk_executor.py + test_runtime_wedge.py's shim class consumed the deleted module; both removed in this PR Verification: - 1182/1182 workspace pytest pass (was 1251; -69 = exactly the deleted test cases — zero unexpected regressions) - No live import of claude_sdk_executor anywhere in molecule-core after deletion (grep verified) Closes #87 for the claude-code adapter. Hermes is already template-only. The remaining adapter-specific code in workspace/ is cli_executor.py (codex/ollama/gemini-cli) tracked by task #122. preflight.py's SUPPORTED_RUNTIMES static list is tracked by task #123 (PR #2155 in flight). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
HongmingWang-Rabbit
requested a review
from hongmingwang-moleculeai
as a code owner
April 27, 2026 07:53
HongmingWang-Rabbit
enabled auto-merge
April 27, 2026 07:53
3 tasks
HongmingWang-Rabbit
pushed a commit
that referenced
this pull request
Apr 27, 2026
…on gemini-cli image rebuild) DRAFT — do NOT merge until gemini-cli template image rebuilds with its local cli_executor.py copy (template PR #9 just merged at 07:59 UTC; image build kicks off now). Final adapter-specific deletion from molecule-runtime, completing #87 for the priority adapters (claude-code via PR #2156, plus gemini-cli via this PR + template #9). Deletes: - workspace/cli_executor.py (461 LOC) — CLIAgentExecutor + the RUNTIME_PRESETS dict for codex / ollama / gemini-cli. The file moved to molecule-ai-workspace-template-gemini-cli (PR #9, merged). - workspace/tests/test_agent_base_urls.py — only consumer of CLIAgentExecutor in the test suite. Tests for the executor behavior live in the template repo now. Updates: - workspace/tests/test_executor_helpers.py — docstring refresh: executor_helpers.py is the runtime-agnostic shared helpers; the executor classes themselves live in template repos post-#87. Codex / ollama presets disappear naturally with the file. They never had template repos, so no production path could invoke them anyway — this is dead-code removal as a side effect of the move. Verified-safe-to-delete: - heartbeat.py: doesn't import cli_executor - claude_sdk_executor.py: deleted by PR #2156 (in flight) - preflight.py: only references runtime names by string; no import - main.py: doesn't import cli_executor (uses adapter discovery via ADAPTER_MODULE; the template's adapter constructs the executor) - Only test_agent_base_urls.py + test_executor_helpers.py docstring referenced cli_executor Verification: - 1249/1249 workspace pytest pass (was 1251; -2 = test_agent_base_urls.py cases — exact match) - No live import of cli_executor anywhere in molecule-core after deletion (grep verified) Sequencing: 1. ✅ Template PR #9 (gemini-cli local copy) — MERGED 2. ⏳ Template image rebuild — running 3. THIS PR — wait until image is published, then mark ready-for-review Closes #87 for the priority adapters: workspace/ is now adapter- agnostic except for adapter discovery (ADAPTER_MODULE) + the runtime_wedge primitive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
HongmingWang-Rabbit
pushed a commit
that referenced
this pull request
Jun 12, 2026
…ce_auth_tokens + org_api_tokens (#2148) The table-presence guard in .gitea/workflows/handlers-postgres-integration.yml hard-fails the integration job if a load-bearing table is missing after migration replay. The previous list covered delegations / workspaces / activity_logs / pending_uploads / workspace_schedules, but the registry-auth TestIntegration_ suite (#2156 / #2148) also requires workspace_auth_tokens (migration 020) and org_api_tokens (migration 035). Without this guard, a silently-skipped migration 020 or 035 (the surrounding apply-all-or-skip loop suppresses migration failures) would let the auth tests run against missing tables and falsely green. This change makes the guard catch that class of regression. This is the CR2 action item flagged in the #2156 WIP body: 'consider adding workspace_auth_tokens + org_api_tokens to that sanity list so a skipped auth-table migration fails loud instead of skipping silently.' Closes the guard gap for #2148 independently of the #2156 test-suite WIP (cleanly-separable; the WIP test work remains the devops-engineer's lane).
HongmingWang-Rabbit
pushed a commit
that referenced
this pull request
Jun 12, 2026
…-file #2156) Re-files the stalled WIP #2156 (originally by molecule-code-reviewer) on current main, de-duplicating against #2449 which already merged the handlers-postgres table-presence guard. Coverage (10 tests, //go:build integration, INTEGRATION_DB_URL): 1. RegistryRowState (4 tests) — register/heartbeat #73 tombstone guard: - RegisterDoesNotResurrectRemoved - RegisterUpsertsLiveWorkspaceToOnline - HeartbeatDoesNotResurrectRemoved - HeartbeatUpdatesLiveWorkspace 2. WSAuth (3 tests) — cross-tenant token binding: - TokenBoundToIssuingWorkspace - TokenOfRemovedWorkspaceRejected - RevokeAllForWorkspaceKillsToken 3. CanCommunicate (1 test) — parent_id hierarchy isolation: - HierarchyAndCrossTenantIsolation 4. OrgToken (2 tests) — revoke/validate row-state: - RevokeStopsValidation - ListExcludesRevoked Also widens detect-changes handlers-postgres profile to include internal/registry/ + internal/orgtoken/ so regressions in those packages trigger the integration gate. Closes #2148 Refs #2156
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of the universal-runtime refactor (task #87). The claude-code template repo now ships its own `claude_sdk_executor.py` (template PR #13 merged + image rebuilt at 07:36 UTC), so molecule-runtime no longer needs to ship the file.
-2.2K LOC of adapter-specific code leaves the universal runtime.
Deletes
Updates
Safety check (verified before deletion)
Verification
Closes #87 for claude-code
Hermes is already template-only. Remaining for full #87 closure (tracked separately):
🤖 Generated with Claude Code