Skip to content

refactor: use config from meta_core, drop meta_cli dependency - #5

Merged
mateodelnorte merged 3 commits into
mainfrom
refactor/move-config-to-meta-core
Feb 14, 2026
Merged

mateodelnorte merged 3 commits into
mainfrom
refactor/move-config-to-meta-core

Conversation

@mateodelnorte

@mateodelnorte mateodelnorte commented Feb 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Import config from meta_core instead of meta_cli
  • Replace meta_cli dependency with meta_core (no longer needs meta_cli at all)

Merge order

Merge after: gitkb/meta_core#3

Test plan

  • cargo build --workspace passes
  • cargo test --workspace passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Replaced an internal dependency with its consolidated counterpart and added the indexmap library.
    • CI/workflows: bumped actions, made cloning branch-aware with fallbacks, introduced workspace creation for multi-package builds, and scoped formatting/check/commit steps to the project directory.

meta_rust_cli only needed meta_cli for config parsing. Now that config
lives in meta_core, the meta_cli dependency is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 13, 2026 •

Copy link
Copy Markdown

Walkthrough

Replaces the meta_cli dependency with meta_core, adds indexmap = "2", updates src/lib.rs to call meta_core::config::walk_meta_tree, and broad CI workflow updates: checkout action bump, branch-aware cloning of meta_plugin_protocol and meta_core, and creation/usage of a workspace Cargo.toml across formatting and CI jobs.

Changes

Cohort / File(s) Summary
Dependency Manifest
Cargo.toml
Removed meta_cli dependency; added meta_core (path = "../meta_core") and indexmap = "2".
Source
src/lib.rs
Replaced meta_cli::config::walk_meta_tree with meta_core::config::walk_meta_tree; preserved error handling and fallback.
CI Workflows
.github/workflows/auto-format.yml, .github/workflows/ci.yml
Bumped checkout action version; added branch-aware clone steps for meta_plugin_protocol and meta_core; added steps to create a workspace Cargo.toml including meta_rust_cli, meta_plugin_protocol, and meta_core; scoped cargo fmt and related steps to meta_rust_cli.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through crates and CI streams,
Swapped cli for core in moonlit dreams,
Added maps that keep order bright,
Workflows fetch branches through the night,
A tiny hop — the repo's light. ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: refactoring to use config from meta_core and dropping the meta_cli dependency, which is directly reflected in the dependency changes in Cargo.toml and the import changes in src/lib.rs.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/move-config-to-meta-core

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
Cargo.toml (2)

1-6: ⚠️ Potential issue | 🟠 Major

CI blocker: workspace-root inheritance fails for this manifest.

The pipeline error shows cargo fmt fails because edition.workspace (and other workspace.* fields) can’t resolve without a workspace root. Ensure CI runs from the workspace root, or make this crate standalone by setting explicit values (edition/version/license/repository) or adding a workspace root manifest to the repo.


18-23: ⚠️ Potential issue | 🔴 Critical

Fix broken path dependency reference for meta_core.

The path dependency meta_core = { path = "../meta_core" } (line 19) cannot be resolved—../meta_core/Cargo.toml does not exist. Verify the correct workspace path or convert to a published dependency if meta_core is not part of this workspace.

The indexmap dependency (line 23) is justified—it is used in src/main.rs via use indexmap::IndexMap;.

@mateodelnorte

Copy link
Copy Markdown
Contributor Author

The outside-diff comments about workspace inheritance and path dependencies are false positives. This repo is part of a meta-repo workspace — the parent Cargo.toml at ../Cargo.toml defines the workspace root, and all sibling crates (meta_core, etc.) are available via relative path. CI runs from the workspace root where everything resolves correctly.

CI was failing because the repo uses workspace-inherited fields
(version.workspace = true) but was checked out in isolation without
a workspace root. Add proper workspace setup and smart branch cloning.
Also update dependencies to only meta_plugin_protocol and meta_core
(removed meta_cli dependency since config moved to meta_core).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/workflows/auto-format.yml:
- Around line 34-55: The "Clone dependencies" step uses inline interpolation of
github.head_ref into BRANCH which risks shell injection; change the job step to
pass the branch value via environment (export or the step's env) instead of
embedding the expression in the multiline run, and then reference the sanitized
$BRANCH inside the script; update the step that defines BRANCH in the "Clone
dependencies" run block (and any other uses in the following commands that rely
on BRANCH/Cargo.toml generation) to read the branch from the step env so branch
names with quotes are not injected into the shell.

In @.github/workflows/ci.yml:
- Around line 29-48: The workflow is vulnerable to shell injection by
interpolating github.head_ref into the run block; instead set BRANCH via the
job/step env (using the expression github.head_ref || github.ref_name) and
reference the environment variable $BRANCH inside the shell run block (used by
the git clone loop and any other uses), ensuring you do not inline the GitHub
expression inside the heredoc or commands; update the step that defines BRANCH
and the "Create workspace Cargo.toml" shell run so all uses rely on the safe
$BRANCH env variable.

Comment thread .github/workflows/auto-format.yml
Comment thread .github/workflows/ci.yml Outdated
- 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>
@mateodelnorte
mateodelnorte merged commit 27fc4fe into main Feb 14, 2026
7 checks passed
@mateodelnorte
mateodelnorte deleted the refactor/move-config-to-meta-core branch February 14, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant