refactor: use config from meta_core instead of local module - #14
Conversation
Replace local config module with re-export from meta_core. Move to_dependencies() conversion into dependency_graph.rs as a From impl to break the circular dependency between config and dependency_graph. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughPublic config implementation was replaced with a re-export from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
The docstring coverage warning (0%) is expected — this PR's diff contains only a |
When coordinated changes span multiple repos, CI needs to clone dependency repos from the same branch (not just main) to pick up changes that haven't merged yet. Add smart branch cloning that tries the PR branch name first before falling back to main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
26-53: 🧹 Nitpick | 🔵 TrivialConsider extracting shared setup into a composite action.
The clone-dependencies, create-workspace, and create-VERSION steps are duplicated across all three jobs. A composite action could reduce this repetition and make future updates easier.
📁 Example composite action structure
Create
.github/actions/setup-workspace/action.yml:name: 'Setup Workspace' description: 'Clone dependencies and create workspace' runs: using: 'composite' steps: - name: Clone dependencies shell: bash run: | BRANCH="${{ github.head_ref || github.ref_name }}" for repo in meta_core meta_plugin_protocol loop_lib; do git clone --depth 1 -b "$BRANCH" "https://github.com/harmony-labs/${repo}.git" 2>/dev/null || \ git clone --depth 1 "https://github.com/harmony-labs/${repo}.git" done - name: Create workspace Cargo.toml shell: bash run: | cat > Cargo.toml << 'EOF' [workspace] members = ["meta_cli", "meta_core", "meta_plugin_protocol", "loop_lib"] resolver = "2" # ... rest of config EOF - name: Create VERSION file shell: bash run: | grep '^version' meta_cli/Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/' > VERSIONThen in each job:
- uses: ./.github/actions/setup-workspace
- Move github.head_ref from inline shell interpolation to env: section to prevent command injection from malicious branch names - Add clone failure handling (fail fast with ::error:: annotation) - Add branch logging so CI shows which branch was used for each dep Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 31-40: Extract the repeated clone loop into a reusable composite
action named "clone-deps" and replace each duplicated loop with a single "uses"
step; the composite should accept inputs for BRANCH and repo list (defaulting to
"meta_core meta_plugin_protocol loop_lib"), perform the same logic (try depth-1
clone of https://github.com/harmony-labs/${repo}.git on BRANCH, fall back to
default branch, and fail with an error on total failure), and preserve the
existing echo messages and exit behavior so callers (the CI jobs currently
running the for repo ... clone logic) can simply call the action with the BRANCH
input.
Summary
configmodule with re-export frommeta_coreto_dependencies()intodependency_graph.rsas aFrom<ProjectInfo>impl to break circular dependencymeta_core::configMerge order
Merge after: gitkb/meta_core#3
Test plan
cargo build --workspacepassescargo test --workspacepasses🤖 Generated with Claude Code
Summary by CodeRabbit
Refactor
Chores