refactor(bin/arcane_swarm): extract BackendRuntime trait + implementations and control mode#39
Open
claude[bot] wants to merge 1 commit intomainfrom
Open
refactor(bin/arcane_swarm): extract BackendRuntime trait + implementations and control mode#39claude[bot] wants to merge 1 commit intomainfrom
claude[bot] wants to merge 1 commit intomainfrom
Conversation
…tions and control mode - Create runtime.rs module with BackendRuntime trait and SpacetimeRuntime + ArcaneRuntime implementations - Create control_mode.rs module for control mode orchestration (dynamic player spawning via TCP) - Extract common backend_runtime creation into helper function - Add 6 unit tests covering runtime trait methods (name, spawn_read) and cache counter snapshots - Reduce main.rs from 714 to 186 lines (74% reduction), well under 350 line requirement - Improves code organization by isolating backend-specific concerns - No functional changes to behavior or public APIs Resolves arcane_swarm#38 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
5 tasks
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
Extracts the
BackendRuntimetrait and its implementations (SpacetimeRuntime,ArcaneRuntime) frommain.rsinto a dedicatedruntime.rsmodule, and moves control mode orchestration logic intocontrol_mode.rs.Changes
New Modules
BackendRuntimetrait +SpacetimeRuntime+ArcaneRuntimeimplementations with 6 unit testsrun_control_modefunction and TCP control server logicRefactored
crate::runtime::BackendRuntimeTesting
cargo buildpasses cleanlycargo testpasses all 8 tests (6 new runtime tests + 2 existing tests)cargo fmt --all -- --checkpassesAcceptance Criteria Met
🤖 Generated with Claude Code