Repository navigation
refactor: use config from meta_core, CloneQueue from meta_git_lib - #14
Conversation
Import config from meta_core instead of meta_cli across all modules. Move CloneQueue/CloneTask to meta_git_lib, keeping only the worker thread pool (clone_worker.rs) in this crate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughSwitches config usage from Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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 (3)
src/commit.rs (1)
49-53:⚠️ Potential issue | 🔴 CriticalPipeline failure: Type inference issue requires explicit annotation.
The CI reports a type inference error at this location. The
dirscollection type cannot be inferred, likely due to changes in theparse_meta_configreturn type frommeta_core.🐛 Proposed fix: Add explicit type annotation
let (projects, _) = config::parse_meta_config(&meta_path)?; - let mut dirs = vec![".".to_string()]; + let mut dirs: Vec<String> = vec![".".to_string()]; dirs.extend(projects.iter().map(|p| p.path.clone())); dirssrc/clone_worker.rs (1)
28-34:⚠️ Potential issue | 🟡 MinorPipeline failure: Type annotations needed.
The CI reports type annotation errors. These are likely caused by the missing
CloneQueuetype frommeta_git_lib::clone_queue. Once the upstream dependency is available, the compiler should be able to infer types. If errors persist after merge, explicit type annotations may be needed.src/ssh.rs (1)
83-88:⚠️ Potential issue | 🔴 CriticalFix type mismatch: Convert
&strtoStringforRemoteMismatch.expectedfield.The
expected_urlvariable after destructuring&project.repois of type&str, but theRemoteMismatch.expectedfield requiresString. Calling.clone()on&strreturns&str, notString.Proposed fix
if !meta_git_lib::urls_match(&actual_url, expected_url) { mismatches.push(RemoteMismatch { name: project.name.clone(), - expected: expected_url.clone(), + expected: expected_url.to_string(), }); }
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.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/workflows/auto-format.yml:
- Around line 36-40: The loop that clones repos (uses BRANCH and repo) currently
silences failures and continues if both git clone attempts fail; update the
for-loop after the two clone attempts to check the exit status and, on failure,
print a clear error mentioning the repo and BRANCH and exit non‑zero (fail fast)
so subsequent steps don't run with missing repositories.
In @.github/workflows/ci.yml:
- Around line 29-33: The current git clone in the loop discards stderr and
silently falls back when cloning with BRANCH fails, so change the clone logic in
the for loop to detect the first failure and emit a clear log message before
attempting the fallback; specifically, replace the "git clone --depth 1 -b
\"$BRANCH\" ... 2>/dev/null || git clone --depth 1 ..." pattern with a
conditional or short-circuit that captures the failure (e.g., run the first
clone without redirecting stderr or test its exit status), and on non-zero exit
print a message like "Branch clone for $repo with branch $BRANCH failed, falling
back to default branch" before running the second "git clone --depth 1" so CI
logs show when the fallback occurred.
- 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>
Summary
configfrommeta_coreinstead ofmeta_cliacross all modulesCloneQueue/CloneTaskfrommeta_git_libinstead of local moduleclone_queue.rstoclone_worker.rs(keeps only the worker thread pool logic)meta_coredependencyMerge order
Merge after: gitkb/meta_core#3 and gitkb/meta_git_lib#2
Test plan
cargo build --workspacepassescargo test --workspacepassesbats tests/git.bats— 51/51 pass🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores
Chores