decrating: absorb shipper-lock into shipper::ops::lock#52
Conversation
Adds two of the five layered architecture directories per docs/decrating-plan.md §4. Each folder gets a CLAUDE.md describing its single responsibility and import rules, plus an empty mod.rs stub. Layer rules (enforced by .github/workflows/architecture-guard.yml): - ops (layer 1, bottom) — I/O primitives, may import nothing above - runtime (layer 2) — pure-data runtime context, may import ops - state (layer 3) — persistence, may import runtime/ops [deferred] - plan (layer 4) — planning algorithms [deferred] - engine (layer 5, top) — orchestration [deferred] The state/, plan/, and engine/ directories are deferred because each name collides with an existing flat module file (state.rs, plan.rs, engine.rs) and Rust cannot disambiguate <name>.rs from <name>/mod.rs simultaneously. Those three layer directories will be created in their respective Phase 2 absorption PRs (where the flat file is deleted in the same commit, removing the conflict atomically).
Move shipper-lock crate (2059 LOC) into crates/shipper/src/ops/lock/
as a crate-private module. Delete the stale 337-LOC duplicate at
crates/shipper/src/lock.rs and the 1-LOC pub-use shim at lock_micro.rs.
Remove shipper-lock from workspace members and from shipper's deps.
Drop the micro-lock feature flag (shipper, shipper-cli) and strip it
from the CI/CircleCI feature-matrix arrays.
The public surface at shipper::lock is preserved via
`pub use crate::ops::lock;` in lib.rs so that shipper-cli and
integration-test callers of shipper::lock::{LockFile, LockInfo,
lock_path, LOCK_FILE, is_locked, read_lock_info} continue to work
unchanged. The ops/ scaffold from PR #49 gets its first inhabitant:
ops/mod.rs now declares `pub mod lock;`.
Files kept flat: everything lives in ops/lock/mod.rs (core is ~270
non-test LOC — well under the 500-LOC guideline; the remainder is the
test suite which per instructions stays inline).
Tests preserved inline:
- 127 lock tests (ops::lock::{tests, snapshot_tests, edge_case_tests,
hardened_tests, proptest_edge_cases, hardened_proptests,
lock_edge_case_tests, tests::proptests}).
- 25 insta snapshot files moved under ops/lock/snapshots/ and renamed
from `shipper_lock__*` to `shipper__ops__lock__*` to match the new
crate + module path. Internal `source:` headers rewritten to
`crates/shipper/src/ops/lock/mod.rs`. No snapshot content changes.
insta yaml feature added to shipper's dev-dependencies (shipper-lock
previously pulled it in via `insta = { workspace = true }`; shipper
only had `insta = "1.46.3"`).
Per docs/decrating-plan.md §6 Phase 2.
|
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 58 minutes and 36 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 (27)
📒 Files selected for processing (17)
✨ 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.
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.
Summary
Phase 2 of the decrating plan (docs/decrating-plan.md §6): absorb the standalone
shipper-lockmicrocrate intoshipperascrate::ops::lock.crates/shipper-lock/src/lib.rs(2059 LOC) →crates/shipper/src/ops/lock/mod.rs(first child of theops/scaffold landed in decrating: Phase 1 — scaffold ops/ and runtime/ layer dirs #49).crates/shipper/src/lock.rsand the 1-LOC pub-use shim atcrates/shipper/src/lock_micro.rs.shipper-lockfrom the workspace[members]array and fromshipper's[dependencies].micro-lockfeature flag fromshipper,shipper-cli, and the feature-matrix arrays in.github/workflows/ci.ymlandtemplates/circleci-config.yml.shipper::lock::*public API viapub use crate::ops::lock;inlib.rs(callers inshipper-cliand the integration tests continue to work unchanged).LOC delta
crates/shipper-lock/src/lib.rs(removed)crates/shipper/src/lock.rs(stale dup, removed)crates/shipper/src/lock_micro.rs(shim, removed)crates/shipper/src/ops/lock/mod.rs(added)crates/shipper/src/ops/lock/CLAUDE.md(added)Commit stat:
41 files changed, 111 insertions(+), 488 deletions(-)(dominated by 25 snapshot renames and the double-removal of the stalelock.rs).Architectural justification
Per
docs/decrating-plan.md§6 Phase 2,shipper-lockis a small, well-bounded I/O microcrate with no downstream public consumers outside this workspace. The pre-existingcrates/shipper/src/lock.rsduplicate (stale fork left from before the micro-extraction) is deleted alongside the microcrate itself. The one-linelock_micro.rsshim becomes redundant once the canonical implementation lives in-tree. Theops/layer dir scaffolded in #49 receives its first inhabitant.File-by-file diff summary
Cargo.toml— removecrates/shipper-lockfrom[workspace] members.crates/shipper-lock/— deleted in full (lib.rs, Cargo.toml, README.md, CLAUDE.md, 25 snapshot files).crates/shipper/Cargo.toml— removeshipper-lockdep, removemicro-lockfeature, remove"micro-lock"frommicro-all. Addfeatures = ["yaml"]to theinstadev-dep (the microcrate pulled this in transitively viainsta = { workspace = true }).crates/shipper-cli/Cargo.toml— removemicro-lock = ["shipper/micro-lock"]feature.crates/shipper/src/lib.rs— replace the#[cfg(feature = "micro-lock")]dualpub mod lock;block withpub(crate) mod ops;+pub use crate::ops::lock;.crates/shipper/src/lock.rs— deleted (stale duplicate).crates/shipper/src/lock_micro.rs— deleted (redundant shim).crates/shipper/src/ops/mod.rs— replace empty scaffold withpub mod lock;.crates/shipper/src/ops/lock/mod.rs— new. Contents ported verbatim fromshipper-lock/src/lib.rs; only the top-level crate docstring and the three inlineuse shipper_lock::LockFile;doc-example lines were rewritten touse shipper::lock::LockFile;. Everything else (public API, internal helper, tests) is bit-identical.crates/shipper/src/ops/lock/CLAUDE.md— new. Describes the module's single responsibility, the preservedshipper::lockfacade, invariants (not a true atomic mutex; RAII drop is best-effort; stale detection is wall-clock;DefaultHasherdisambiguation), and layer rules.crates/shipper/src/ops/lock/snapshots/— 25 insta snapshot files, renamedshipper_lock__*→shipper__ops__lock__*(matching the new crate + module path that insta uses to compute the filename). Internalsource:headers updated tocrates/shipper/src/ops/lock/mod.rs. No content changes..github/workflows/ci.yml— drop"micro-lock"from the BDD feature-set matrix.templates/circleci-config.yml— drop"micro-lock"from the CircleCI BDD matrix.Cargo.lock— auto-regenerated (removesshipper-lockentry).Validation
All six validation gates pass locally:
cargo check --workspace→ clean.cargo test -p shipper ops::lock→ 127 passed; 0 failed.cargo test -p shipper→ 886 + integration suites pass; 0 failed.cargo test -p shipper-cli→ all integration suites pass (cli_e2e126,facade_integration45,pipeline_integration34, etc.); 0 failed.cargo build -p shipper-cli→ finished dev build.cargo clippy -p shipper --all-targets --all-features -- -D warnings→ clean.cargo test -p shipper --doc→ 3 passed, 3 ignored.Snapshots were renamed to match the new module path and
source:headers were rewritten. No test needed aninsta accept— every assertion fired against the pre-existing recorded content.Public API impact
Zero breaking changes for
shipper::lock::*consumers.shipper::lock::{LockFile, LockInfo, lock_path, LOCK_FILE, is_locked, read_lock_info}all resolve identically to before via thepub usere-export. Theshipper-lockcrate itself is gone from crates.io's perspective (not yet released at 0.3.0 from this workspace), so there is no external docs.rs page to replace. Downstream projects consumingshipper-lockdirectly would need to switch toshipper::lock— an expected consequence of the decrating effort.Stack note
Branched from
feature/decrating-phase1-scaffold(PR #49). When #49 merges, the diff againstmainfor this PR collapses to the net absorption (this commit only).Test plan
architecture-guardworkflow doesn't flag the newops/lock/imports.shipper::lock::LockFile::acquirestill works in theshipper-clilock info/lock clearsubcommands (seecrates/shipper-cli/src/main.rs:1487, 1499, 2102, 2108, 2130, 2136).shipper-lockexists on crates.io (it was not yet released from this workspace at the current version).