Skip to content

decrating: absorb shipper-plan + levels + chunking into shipper::plan#56

Merged
EffortlessSteven merged 1 commit into
feature/decrating-phase1-scaffoldfrom
feature/decrating-absorb-plan
Apr 15, 2026
Merged

decrating: absorb shipper-plan + levels + chunking into shipper::plan#56
EffortlessSteven merged 1 commit into
feature/decrating-phase1-scaffoldfrom
feature/decrating-absorb-plan

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Phase 2 absorption: Move three planning-layer microcrates into the shipper library as crate-private modules, so that crates/shipper/src/plan/ is the single home for workspace planning algorithms.

  • shipper-plan (3492 LOC) -> crates/shipper/src/plan/mod.rs
  • shipper-levels (1450 LOC) -> crates/shipper/src/plan/levels/mod.rs
  • shipper-chunking (814 LOC) -> crates/shipper/src/plan/chunking/mod.rs

Three crates, one layer, one atomic PR: creating the plan/ layer dir requires deleting the existing flat crates/shipper/src/plan.rs, so all three absorptions must coexist with that structural change in the same commit.

Why all three at once

plan/mod.rs (from shipper-plan), plan/levels/ (from shipper-levels), and plan/chunking/ (from shipper-chunking) must all share the new crates/shipper/src/plan/ directory — Rust disallows both plan.rs and plan/mod.rs, so the layer has to come into existence as one structural change.

What changed

Source moves

  • Copied shipper-plan/src/lib.rs into crates/shipper/src/plan/mod.rs (single file — kept as one module, tests reference super::* heavily).
  • Copied shipper-levels/src/lib.rs into crates/shipper/src/plan/levels/mod.rs.
  • Copied shipper-chunking/src/lib.rs into crates/shipper/src/plan/chunking/mod.rs.
  • Moved all 54 .snap files and renamed them from shipper_plan__*, shipper_levels__*, shipper_chunking__* to shipper__plan__*, shipper__plan__levels__*, shipper__plan__chunking__*.

Deletes

  • crates/shipper/src/plan.rs (1584 LOC, stale duplicate)
  • crates/shipper/src/plan_micro.rs (1 LOC shim)
  • crates/shipper-plan/, crates/shipper-levels/, crates/shipper-chunking/

Visibility

  • build_plan, PlannedWorkspace, SkippedPackage stay reachable from outside (public library API — re-exported from shipper::plan).
  • group_packages_by_levels, PublishLevel<T>, chunk_by_max_concurrent are now pub(crate) inside shipper::plan::*.

Downstream fallout (no shim crates)

shipper-engine-parallel and shipper-types sit BELOW shipper in the graph and cannot depend on shipper, so they cannot simply re-import from shipper::plan:

  • Moved the domain types PlannedWorkspace and SkippedPackage into shipper-types (natural home for shared plan data types). shipper::plan re-exports them so the public surface is unchanged.
  • Added a crate-public group_packages_by_levels<T, F>() generic algorithm + GenericPublishLevel<T> to shipper-types to replace the absorbed shipper-levels dependency. ReleasePlan::group_by_levels now uses this inline function.
  • Inlined chunk_by_max_concurrent<T: Clone>() into shipper-engine-parallel (17 LOC algorithm, natural home since parallel engine is the only consumer).
  • Updated fuzz targets to consume the absorbed APIs through shipper::plan::build_plan, shipper_engine_parallel::chunk_by_max_concurrent, and shipper_types::group_packages_by_levels.

Features + deps

  • Dropped the micro-plan feature from crates/shipper/Cargo.toml and crates/shipper-cli/Cargo.toml.
  • Removed micro-plan from the micro-parallel and micro-all feature lists.
  • shipper-cargo and shipper-state are now non-optional dependencies of shipper (they were previously feature-gated for the old micro-plan path; the absorbed canonical code uses them unconditionally).
  • Removed shipper-levels dependency from shipper-types and shipper.
  • Removed shipper-plan and shipper-chunking deps from shipper-engine-parallel.
  • Removed all three crates from workspace members.
  • Added console and insta["yaml"] to shipper dev-dependencies (required by absorbed tests).

Misc

  • Updated .github/workflows/mutation.yml, docs/testing.md, and RELEASE_CHECKLIST_v0.3.0.md to drop references to deleted crates.

LOC delta

git diff --stat summary vs feature/decrating-phase1-scaffold:

  • 90 files changed, 245 insertions(+), 2059 deletions(-)

The deletions include the 1584-LOC stale duplicate plan.rs plus the smaller shipper-levels / shipper-chunking READMEs, Cargo.tomls, test files, and CLAUDE.mds. The absorbed sources themselves are renames (zero LOC delta for the copies).

Validation

  • cargo check --workspace --all-targets --all-features — clean
  • cargo clippy --workspace --all-targets --all-features -- -D warnings — clean
  • cargo test -p shipper — 1077 tests pass (959 lib + 118 integration), 4 ignored
  • cargo test -p shipper-cli — all CLI tests pass
  • cargo test -p shipper-types -p shipper-engine-parallel — all pass
  • cargo build -p shipper-cli — clean
  • All 27 plan::tests snapshot tests pass (with renamed snapshot files)
  • All 9 plan::levels::snapshot_tests snapshot tests pass
  • All 17 plan::chunking::snapshot_tests snapshot tests pass

Test plan

  • cargo check --workspace
  • cargo test -p shipper plan
  • cargo test -p shipper
  • cargo test -p shipper-cli
  • cargo build -p shipper-cli
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • CI full pipeline

…to shipper::plan

Move shipper-plan (3492 LOC), shipper-levels (1450 LOC), and
shipper-chunking (814 LOC) into crates/shipper/src/plan/ as crate-private
modules. plan/mod.rs absorbs shipper-plan; plan/levels/ absorbs
shipper-levels; plan/chunking/ absorbs shipper-chunking.

Delete the stale 1584-LOC duplicate at crates/shipper/src/plan.rs and the
1-LOC re-export shim at plan_micro.rs. Remove all three standalone crates
from workspace members and shipper's deps. Drop the micro-plan feature.

build_plan, PlannedWorkspace, and SkippedPackage stay publicly reachable
(public library API). Other plan internals become pub(crate). Since
shipper-engine-parallel and shipper-types sit below shipper in the
dependency graph, move the shared domain types (PlannedWorkspace,
SkippedPackage) into shipper-types; add a crate-public
group_packages_by_levels algorithm to shipper-types to replace the
absorbed shipper-levels dependency; inline chunk_by_max_concurrent into
shipper-engine-parallel for the same reason. Update fuzz targets to
consume the absorbed APIs via shipper::plan and shipper_types.

All three absorbed in one PR because they share creation of the new
crates/shipper/src/plan/ layer dir (Rust can't have both plan.rs and
plan/mod.rs simultaneously).
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: abc4e3ed-6638-4710-8688-3e1d092cee1a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/decrating-absorb-plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

EffortlessSteven added a commit that referenced this pull request Apr 15, 2026
Sweep-cleanup of CI workflows, templates, and docs for references to
microcrates and micro-* feature flags that have been deleted or are
queued for deletion via absorption PRs #52 #54 #55 #56 #57 #58.

Changes:
- .github/workflows/ci.yml - removed deleted features (micro-lock,
  micro-plan, micro-policy, micro-process, micro-store) from BDD matrix
- .github/workflows/mutation.yml - removed shipper-plan, shipper-policy,
  shipper-levels from the mutation-testing target list
- .github/workflows/release.yml - added note that publish order is
  finalized in Phase 8 of the decrating plan
- templates/circleci-config.yml - matching feature-matrix cleanup
- docs/architecture.md - per-crate absorbed notes in microcrates table
  plus top-of-section notes on Dependency Graph and Module
  Responsibilities pointing out those sections reflect pre-decrating state
- docs/testing.md - removed deleted crates from example test invocations
  and the mutation-testing example
- RELEASE_CHECKLIST_v0.3.0.md - header note listing absorbed crates and
  pruned publish steps
- RELEASE_NOTES_v0.3.0.md - reworded Modular Architecture bullet to
  reflect the consolidated public-crate layout

References to still-in-flight absorptions (auth, environment, git, storage,
engine-parallel, registry, progress) are left alone - they will be cleaned
up in their respective absorption PRs.

Per docs/decrating-plan.md.
@EffortlessSteven EffortlessSteven merged commit 2562e11 into feature/decrating-phase1-scaffold Apr 15, 2026
13 of 17 checks passed
EffortlessSteven added a commit that referenced this pull request Apr 15, 2026
- Reorder `pub use` after `use` in `crates/shipper/src/plan/mod.rs` to
  satisfy `cargo fmt --check` (import grouping rule).
- Fix broken intra-doc links `[ReleasePlan]` and `[PlannedWorkspace]`
  in the `plan` module-level docs by using disambiguated paths
  `[`ReleasePlan`](shipper_types::ReleasePlan)` and
  `[`PlannedWorkspace`](shipper_types::PlannedWorkspace)`. The bare
  links failed under `-D rustdoc::broken-intra-doc-links` because
  neither name is in scope at doc-resolution time for the module.

CI logs:
- https://github.com/EffortlessMetrics/shipper/actions/runs/24437331983/job/71394343775
- https://github.com/EffortlessMetrics/shipper/actions/runs/24437331983/job/71394343790
EffortlessSteven added a commit that referenced this pull request Apr 15, 2026
Sweep-cleanup of CI workflows, templates, and docs for references to
microcrates and micro-* feature flags that have been deleted or are
queued for deletion via absorption PRs #52 #54 #55 #56 #57 #58.

Changes:
- .github/workflows/ci.yml - removed deleted features (micro-lock,
  micro-plan, micro-policy, micro-process, micro-store) from BDD matrix
- .github/workflows/mutation.yml - removed shipper-plan, shipper-policy,
  shipper-levels from the mutation-testing target list
- .github/workflows/release.yml - added note that publish order is
  finalized in Phase 8 of the decrating plan
- templates/circleci-config.yml - matching feature-matrix cleanup
- docs/architecture.md - per-crate absorbed notes in microcrates table
  plus top-of-section notes on Dependency Graph and Module
  Responsibilities pointing out those sections reflect pre-decrating state
- docs/testing.md - removed deleted crates from example test invocations
  and the mutation-testing example
- RELEASE_CHECKLIST_v0.3.0.md - header note listing absorbed crates and
  pruned publish steps
- RELEASE_NOTES_v0.3.0.md - reworded Modular Architecture bullet to
  reflect the consolidated public-crate layout

References to still-in-flight absorptions (auth, environment, git, storage,
engine-parallel, registry, progress) are left alone - they will be cleaned
up in their respective absorption PRs.

Per docs/decrating-plan.md.
EffortlessSteven added a commit that referenced this pull request Apr 15, 2026
# Conflicts:
#	.github/workflows/mutation.yml
#	Cargo.toml
#	crates/shipper-engine-parallel/Cargo.toml
#	crates/shipper/Cargo.toml
#	docs/testing.md
EffortlessSteven added a commit that referenced this pull request Apr 15, 2026
Adds 5 binding rules learned from real incidents during execution:

- R-PR-1: Always pass --base main explicitly to gh pr create.
  Real incident: PR #56 merged to feature/decrating-phase1-scaffold
  instead of main. Content never reached main. Cargo + execution-core
  absorptions silently broke against the stale main. Recovery required
  PR #70 (replay of #56 onto main).

- R-PR-2: Verify branch state at session start (worktree HEAD switching).

- R-PR-3: Use forward-slash absolute paths in Edit/Write on Windows
  (backslash paths silently fail to persist).

- R-PR-4: Pre-flight grep for cross-crate deps before absorbing.

- R-PR-5: Type-promotion fallback when cascade is too tangled for
  global reorder (per PR #56's pattern).

These rules are now binding for all remaining agent prompts.
EffortlessSteven added a commit that referenced this pull request Apr 15, 2026
- Reorder `pub use` after `use` in `crates/shipper/src/plan/mod.rs` to
  satisfy `cargo fmt --check` (import grouping rule).
- Fix broken intra-doc links `[ReleasePlan]` and `[PlannedWorkspace]`
  in the `plan` module-level docs by using disambiguated paths
  `[`ReleasePlan`](shipper_types::ReleasePlan)` and
  `[`PlannedWorkspace`](shipper_types::PlannedWorkspace)`. The bare
  links failed under `-D rustdoc::broken-intra-doc-links` because
  neither name is in scope at doc-resolution time for the module.

CI logs:
- https://github.com/EffortlessMetrics/shipper/actions/runs/24437331983/job/71394343775
- https://github.com/EffortlessMetrics/shipper/actions/runs/24437331983/job/71394343790
EffortlessSteven added a commit that referenced this pull request Apr 15, 2026
decrating: replay PR #56 (plan+levels+chunking absorption) onto main
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