molecule-core/workspace/tests
Hongming Wang 661eec2659 chore(smoke-mode): harden module-load + drop dead except clause
Two follow-ups from the #2275 Phase 1 self-review:

1. `_SMOKE_TIMEOUT_SECS = float(os.environ.get(...))` was evaluated at
   module load. main.py imports smoke_mode unconditionally — before
   the is_smoke_mode() check — so a malformed
   MOLECULE_SMOKE_TIMEOUT_SECS env value would SystemExit every
   workspace boot, not just smoke runs. Wrapped in try/except with a
   5.0 fallback. Probability of a typo'd env var hitting production
   is low (it's a CI-only knob), but the footgun is removed entirely.
   Regression test reloads the module under a malformed env value.

2. `_real_a2a_sdk_available()` caught (ImportError, AttributeError).
   `from X import Y` raises ImportError when Y is missing on X — never
   AttributeError. Dropped the unreachable branch.

No behavior change for the happy path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 21:31:08 -07:00
..
adapters
snapshots feat(workspace-runtime): add inbox polling for standalone molecule-mcp path 2026-04-30 16:32:48 -07:00
__init__.py
_signature_snapshot.py test(runtime_wedge): module-functions signature snapshot drift gate 2026-04-30 07:01:10 -07:00
conftest.py feat(runtime): add new_response_message helper for adapter A2A responses 2026-04-29 01:13:34 -07:00
test_a2a_cli.py
test_a2a_client.py refactor(workspace-runtime): send_a2a_message takes peer_id, validates UUID 2026-04-30 17:43:01 -07:00
test_a2a_executor.py
test_a2a_mcp_server.py feat(mcp): notifications/claude/channel for push-feel inbox UX 2026-04-30 20:10:01 -07:00
test_a2a_tools_impl.py refactor(workspace-runtime): send_a2a_message takes peer_id, validates UUID 2026-04-30 17:43:01 -07:00
test_a2a_tools_module.py
test_adapter_base_signature.py test: extract shared signature-snapshot helpers + skill_loader gate 2026-04-30 06:27:20 -07:00
test_agent_card_well_known_path.py fix(workspace): use SDK constant for agent-card readiness probe 2026-04-27 16:43:32 -07:00
test_agent.py
test_agents_md.py
test_approval.py
test_audit_ledger.py
test_audit.py
test_awareness_client_full.py
test_compliance.py
test_config.py feat(config): add explicit provider: field alongside model: 2026-04-30 20:47:09 -07:00
test_consolidation.py
test_coordinator_parent.py
test_coordinator_routing.py feat(platform): single-source-of-truth tool registry — adapters consume, no drift 2026-04-28 17:11:36 -07:00
test_delegation.py feat(platform): single-source-of-truth tool registry — adapters consume, no drift 2026-04-28 17:11:36 -07:00
test_events.py
test_executor_helpers.py feat(runtime): add new_response_message helper for adapter A2A responses 2026-04-29 01:13:34 -07:00
test_gh_wrapper.sh
test_governance.py
test_heartbeat_runtime_metadata.py fix(test): drop unused MagicMock import in test_heartbeat_runtime_metadata 2026-04-26 22:58:21 -07:00
test_heartbeat.py fix(workspace): in-container heartbeat persists platform_inbound_secret 2026-04-30 18:18:10 -07:00
test_hitl.py
test_inbox.py feat(mcp): notifications/claude/channel for push-feel inbox UX 2026-04-30 20:10:01 -07:00
test_internal_chat_uploads.py feat(workspace): /internal/chat/uploads/ingest endpoint (RFC #2312, PR-B) 2026-04-29 14:16:32 -07:00
test_internal_file_read.py feat(chat_files): rewrite Download as HTTP-forward (RFC #2312, PR-D) 2026-04-29 15:19:02 -07:00
test_jsonrpc_wire_role_format.py fix(runtime): use lowercase wire role for v0.3 JSON-RPC compat layer 2026-04-27 12:40:11 -07:00
test_main_initial_prompt.py
test_mcp_cli.py feat(mcp_cli): agent_card from env vars (capability discovery) 2026-04-30 18:57:39 -07:00
test_mcp_memory.py
test_memory.py feat(platform): single-source-of-truth tool registry — adapters consume, no drift 2026-04-28 17:11:36 -07:00
test_molecule_ai_status.py test(runtime): update molecule_ai_status test for renamed error prefix 2026-04-27 11:48:05 -07:00
test_namespaces.py
test_openclaw_adapter.py
test_platform_auth_signature.py test(platform_auth): module-functions signature snapshot drift gate 2026-04-30 08:41:42 -07:00
test_platform_auth.py fix(workspace-runtime): add Origin header so SaaS edge WAF accepts MCP tool calls 2026-04-30 15:30:15 -07:00
test_platform_inbound_auth.py feat(saas): deliver platform_inbound_secret via /registry/register (RFC #2312, PR-F) 2026-04-29 15:12:34 -07:00
test_platform_tools.py chore(registry): snapshot tests + CLI-block alignment for #2240 2026-04-28 20:42:15 -07:00
test_plugins_builtins.py
test_plugins_registry.py
test_plugins.py
test_pre_stop.py
test_preflight.py feat(preflight): replace SUPPORTED_RUNTIMES static list with adapter discovery 2026-04-27 00:44:51 -07:00
test_prompt.py feat(prompt): Platform Capabilities preamble at top of system prompt 2026-04-29 21:31:13 -07:00
test_routing_policy.py
test_runtime_capabilities.py feat(runtime): adapter-declared idle_timeout_override end-to-end 2026-04-26 22:38:01 -07:00
test_runtime_wedge_signature.py test(runtime_wedge): module-functions signature snapshot drift gate 2026-04-30 07:01:10 -07:00
test_runtime_wedge.py chore(workspace): drop claude_sdk_executor — Phase 2 of #87 2026-04-27 00:52:55 -07:00
test_safe_env.py
test_sandbox.py
test_secret_redact.py
test_security_scan.py
test_shared_runtime_peer_summary.py fix(workspace): keep peers visible in coordinator prompt when agent_card is null 2026-04-28 14:10:29 -07:00
test_skill_loader_signature.py test: extract shared signature-snapshot helpers + skill_loader gate 2026-04-30 06:27:20 -07:00
test_skills_loader.py feat(skills): per-skill runtime compatibility (#119, hermes pattern) 2026-04-27 01:57:43 -07:00
test_skills_watcher.py test(skills): make watcher test fakes accept current_runtime kwarg 2026-04-27 02:04:26 -07:00
test_smoke_mode.py chore(smoke-mode): harden module-load + drop dead except clause 2026-04-30 21:31:08 -07:00
test_snapshot_scrub.py
test_telemetry.py
test_temporal_workflow.py
test_transcript_auth.py
test_watcher.py