decrating: absorb shipper-policy into shipper::runtime::policy#54
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 41 minutes and 28 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (34)
📒 Files selected for processing (26)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.
Move shipper-policy crate (1040 LOC) into crates/shipper/src/runtime/policy/ as crate-private modules. Delete the stale 168-LOC duplicate at crates/shipper/src/policy.rs and the 7-LOC shim at policy_micro.rs. Remove shipper-policy from workspace members and from shipper's deps. Drop the micro-policy feature flag. policy stays pub(crate) - it was internal-only before and remains so. Inline an equivalent PolicyEffects + policy_effects in shipper-engine-parallel so it no longer depends on shipper-policy. Drop the fuzz/policy_effects fuzz target since the crate it targeted no longer exists. Update mutation testing workflow, architecture doc, and release checklist to match. Per docs/decrating-plan.md section 6 Phase 2.
3be898e to
54dbadf
Compare
Stacks on PR #53 (env+storage+git dual-impl cleanup). Move the 2202-LOC shipper-environment crate into crates/shipper/src/runtime/environment/ as crate-private modules (mod.rs + fingerprint.rs + ci.rs, ~2190 LOC total). Preserves the deduped in-tree wrapper logic (normalize_version, EnvironmentInfo::collect delegation with graceful fallback) from PR #53. Split seams: - mod.rs — CiEnvironment, detect_environment, is_ci, collect_environment_fingerprint (the absorbed shim), CiEnvironment snapshot tests. - fingerprint.rs — EnvironmentInfo, get_rust_version, get_cargo_version, get_environment_fingerprint, normalize_tool_version, collect_env_vars, tests + proptests. - ci.rs — get_ci_branch, get_ci_commit_sha, is_pull_request, provider-specific tests. All 13 snapshots preserved (renamed to `shipper__runtime__environment__ snapshot_tests__*.snap`). All 130 absorbed tests pass in-tree. Surgical unblock (precedent: PR #54 policy→engine-parallel inline): shipper-state depended on shipper-environment via one call site in migrate_v1_to_v2. Because shipper-state is an (optional) dep of shipper, it cannot depend on shipper itself — a dep cycle. Inlined an ~20-LOC collect_environment_fingerprint into shipper-state (marked `#[doc(hidden)]`, with a comment pointing back at crate::runtime::environment for the post-shipper-state-absorption replacement), and dropped shipper-environment from shipper-state's Cargo.toml. Will be replaced with a direct call to crate::runtime::environment::collect_environment_fingerprint after shipper-state is itself absorbed into shipper::state. Module is `pub(crate) mod runtime; mod environment;` — the former public `shipper::environment` API had no external consumers in-tree and is now crate-private per the runtime-layer discipline. `#[allow(dead_code)]` is applied at the runtime::environment level because several absorbed items (CI branch/SHA/PR helpers, the short pipe-fingerprint form, EnvironmentInfo::fingerprint) currently have no in-crate callers but retain full test coverage for future wiring. Also updates shipper's `insta` dev-dep to enable the `yaml` feature (required by the moved snapshot_tests module). Per docs/decrating-plan.md section 6 Phase 2.
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.
Stacks on PR #53 (env+storage+git dual-impl cleanup). Move the 2202-LOC shipper-environment crate into crates/shipper/src/runtime/environment/ as crate-private modules (mod.rs + fingerprint.rs + ci.rs, ~2190 LOC total). Preserves the deduped in-tree wrapper logic (normalize_version, EnvironmentInfo::collect delegation with graceful fallback) from PR #53. Split seams: - mod.rs — CiEnvironment, detect_environment, is_ci, collect_environment_fingerprint (the absorbed shim), CiEnvironment snapshot tests. - fingerprint.rs — EnvironmentInfo, get_rust_version, get_cargo_version, get_environment_fingerprint, normalize_tool_version, collect_env_vars, tests + proptests. - ci.rs — get_ci_branch, get_ci_commit_sha, is_pull_request, provider-specific tests. All 13 snapshots preserved (renamed to `shipper__runtime__environment__ snapshot_tests__*.snap`). All 130 absorbed tests pass in-tree. Surgical unblock (precedent: PR #54 policy→engine-parallel inline): shipper-state depended on shipper-environment via one call site in migrate_v1_to_v2. Because shipper-state is an (optional) dep of shipper, it cannot depend on shipper itself — a dep cycle. Inlined an ~20-LOC collect_environment_fingerprint into shipper-state (marked `#[doc(hidden)]`, with a comment pointing back at crate::runtime::environment for the post-shipper-state-absorption replacement), and dropped shipper-environment from shipper-state's Cargo.toml. Will be replaced with a direct call to crate::runtime::environment::collect_environment_fingerprint after shipper-state is itself absorbed into shipper::state. Module is `pub(crate) mod runtime; mod environment;` — the former public `shipper::environment` API had no external consumers in-tree and is now crate-private per the runtime-layer discipline. `#[allow(dead_code)]` is applied at the runtime::environment level because several absorbed items (CI branch/SHA/PR helpers, the short pipe-fingerprint form, EnvironmentInfo::fingerprint) currently have no in-crate callers but retain full test coverage for future wiring. Also updates shipper's `insta` dev-dep to enable the `yaml` feature (required by the moved snapshot_tests module). Per docs/decrating-plan.md section 6 Phase 2.
Summary
Phase 2 of the decrating effort (per
docs/decrating-plan.md§6): absorb the standaloneshipper-policymicrocrate intocrates/shipper/src/runtime/policy/as crate-private modules.crates/shipper-policy/src/lib.rsintocrates/shipper/src/runtime/policy/mod.rs(plusCLAUDE.md, renamed snapshot files).crates/shipper/src/policy.rsand the 7-LOC shim atcrates/shipper/src/policy_micro.rs.policy_bdd.rs,runtime_options_contract.rs, etc.) intoruntime::policy's#[cfg(test)]modules.shipper-policyfrom workspace members, fromshipper's deps, and drop themicro-policyfeature flag on bothshipperandshipper-cli.Visibility:
policystayspub(crate)— it was internal-only before (as called out in the audit) and remains so.Collateral
shipper-engine-parallelpreviously depended onshipper-policy. Since that crate is gone, inline a localPolicyEffectsstruct +policy_effects()function (~25 LOC) intoshipper-engine-parallel/src/lib.rs. No behavior change.fuzz/fuzz_targets/policy_effects.rstargetedshipper_policy::*directly. Deleted it — policy is no longer a public API surface, so it cannot be fuzzed across a crate boundary. Remove the corresponding[[bin]]and dep fromfuzz/Cargo.toml.#[cfg(feature = "micro-policy")]gate incrates/shipper-cli/tests/bdd_publish.rsdropped; the test now runs unconditionally.docs/architecture.md,docs/testing.md,RELEASE_CHECKLIST_v0.3.0.md, and.github/workflows/mutation.ymlno longer referenceshipper-policy.crates/shipper's dev-dependency oninstaswitched to{ workspace = true }so YAML snapshot features (needed by the absorbed serialization_snapshot_tests) are available.Test plan
cargo check --workspace— clean.cargo test -p shipper runtime::policy— 75 tests pass.cargo test -p shipper— all 837+ unit + integration tests pass.cargo test -p shipper-cli— all pass.cargo test -p shipper-engine-parallel— 65 pass (inlinedPolicyEffectskeeps snapshot parity).cargo build -p shipper-cli— succeeds.cargo clippy --workspace --all-targets --all-features -- -D warnings— clean.cargo fmt --all -- --check— clean.Conflict notes
crates/shipper/src/runtime/mod.rsis only touched here (runtime layer); other Phase 2 PRs targetops/— no overlap.crates/shipper/Cargo.toml,crates/shipper-cli/Cargo.toml, and rootCargo.tomlare disjoint line edits vs. other Phase 2 PRs; git auto-merge should handle.