Skip to content

decrating: absorb shipper-store into shipper::state::store#57

Merged
EffortlessSteven merged 1 commit into
mainfrom
feature/decrating-absorb-store
Apr 15, 2026
Merged

decrating: absorb shipper-store into shipper::state::store#57
EffortlessSteven merged 1 commit into
mainfrom
feature/decrating-absorb-store

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Absorbs the standalone shipper-store microcrate (2816 LOC) into crates/shipper/src/state/store/ as crate-private modules. Deletes the stale 386-LOC duplicate at crates/shipper/src/store.rs and the 1-LOC re-export shim at store_micro.rs. Removes shipper-store from the workspace, the shipper and shipper-cli Cargo.toml deps, and drops the micro-store feature flag.

Per docs/decrating-plan.md Phase 2.

File layout

Source split into 5 files for readability:

  • mod.rs (59 LOC) - StateStore trait + validate_schema_version + module wiring
  • fs.rs (89 LOC) - FileStore struct + impl StateStore for FileStore
  • tests.rs (1712 LOC) - unit, transition, corrupt-data, and proptest coverage
  • snapshot_tests.rs (859 LOC) - insta snapshot tests for persisted JSON/JSONL formats
  • path_edge_case_tests.rs (118 LOC) - unicode/spaces/emoji/nested path coverage

All 28 snapshot files moved to crates/shipper/src/state/store/snapshots/ and renamed to match the new module path (shipper__store__snapshot_tests__*.snap).

Public API compatibility

The public path shipper::store::* is preserved via a #[path = "state/store/mod.rs"] attribute in crates/shipper/src/lib.rs. External integration tests (crates/shipper/tests/*, crates/shipper-cli/tests/bdd_publish.rs) that import shipper::store::{FileStore, StateStore} or shipper::store::validate_schema_version continue to work unchanged.

Coordination note: events+state PR

This PR was intended to be stacked on the events+state absorption PR (feature/decrating-absorb-events-state), which would create crates/shipper/src/state/{CLAUDE.md, mod.rs} as the layer-3 folder. That PR was not pushed within the 5-minute coordination window, so this PR branches directly from feature/decrating-phase1-scaffold and uses #[path] instead of a state/mod.rs entry.

When the events+state PR lands, a small follow-up can:

  1. Delete crates/shipper/src/state.rs (become a folder)
  2. Add pub(crate) mod store; to the new state/mod.rs
  3. Remove the #[path] attribute in lib.rs (or repoint it to a simple pub use crate::state::store re-export if backcompat must be preserved).

Validation

  • cargo check --workspace - clean
  • cargo fmt --all -- --check - clean
  • cargo clippy --workspace --all-targets --all-features -- -D warnings - clean
  • cargo test -p shipper --lib store:: - 112 passed, 0 failed
  • cargo test -p shipper - 859 unit + all integration tests pass
  • cargo test -p shipper-cli - all pass

Test plan

  • CI green on the PR
  • Verify base branch architecture-guard does not flag new imports (state depends only on events/types/crate::state helpers; no imports from engine/plan)
  • Confirm shipper CLI binary still boots and can round-trip state

@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: 7878b671-d587-44a4-8743-2abe62125da1

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-store

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cb42c4642

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 49 to 50
micro-state = ["shipper/micro-state"]
micro-store = ["shipper/micro-store"]
micro-all = ["shipper/micro-all"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reintroduce a micro-store feature alias

Removing micro-store from the CLI feature table breaks the existing BDD matrix entry in .github/workflows/ci.yml (feature-set: ... "micro-store" ... with cargo test -p shipper-cli --test bdd_publish --features "${{ matrix.feature-set }}"). After this change, that leg fails immediately with the package 'shipper-cli' does not contain this feature: micro-store, so CI will be red until the alias (or matrix entry) is updated.

Useful? React with 👍 / 👎.

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.
Move shipper-store crate (2816 LOC) into crates/shipper/src/state/store/
as a set of crate-private modules, split into mod.rs + fs.rs +
tests.rs + snapshot_tests.rs + path_edge_case_tests.rs. Delete the stale
386-LOC duplicate at crates/shipper/src/store.rs and the 1-LOC re-export
shim at store_micro.rs. Remove shipper-store from the workspace members
and from shipper's dependencies. Drop the micro-store feature flag from
both shipper and shipper-cli.

The StateStore trait stays as a trait -- multiple impls (fs, future
cloud, mocks for tests). The FileStore filesystem impl keeps its atomic
write semantics via the existing crate::state helpers.

The physical files live under state/store/ to match the layered
architecture (layer 3: state). The public path shipper::store is
preserved via a #[path] attribute in lib.rs for backward compatibility
with integration tests and downstream consumers.

NOTE: This PR was intended to be stacked on the events+state absorption
PR (feature/decrating-absorb-events-state) so that state/ could be a
first-class folder with state/mod.rs and state/CLAUDE.md. That PR was
not pushed within the coordination window, so this PR branched directly
from feature/decrating-phase1-scaffold and uses #[path] instead of a
state/mod.rs entry. When events+state lands, a follow-up can convert
state.rs -> state/mod.rs and add `pub(crate) mod store;` there.

All 28 snapshot files moved from crates/shipper-store/src/snapshots to
crates/shipper/src/state/store/snapshots and renamed to match the new
module path (shipper__store__snapshot_tests__*).

Per docs/decrating-plan.md Phase 2.
@EffortlessSteven EffortlessSteven force-pushed the feature/decrating-absorb-store branch from 9cb42c4 to 3706c80 Compare April 15, 2026 06:03
@EffortlessSteven EffortlessSteven changed the base branch from feature/decrating-phase1-scaffold to main April 15, 2026 06:05
@EffortlessSteven EffortlessSteven merged commit 0cf0099 into main Apr 15, 2026
2 checks passed
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
PR #60 landed shim absorption (re-exports from crate::state::events and
crate::state::execution_state pointing at standalone crates) because
shipper-store (PR #57) and shipper-engine-parallel (PR #64) had trait-
signature deps on them. Both blockers landed via merge train round 2,
unblocking this physical removal.

Move 2821 LOC (events) + 2725 LOC (state) from standalone crates into
crates/shipper/src/state/events/ and crates/shipper/src/state/execution_state/
as absorbed modules.

Events split into three files:
 - mod.rs (production: EventLog, EVENTS_FILE, events_path)
 - tests.rs (unit + insta snapshot tests)
 - proptests.rs (property-based tests)

Execution-state split into two files:
 - mod.rs (production: atomic write, migration, encrypted I/O)
 - tests.rs (unit + snapshot tests; nested proptests + proptests_extended
   submodules preserved)

Snapshots relocated and renamed for the new module path
(shipper__state__events__tests__* and
shipper__state__execution_state__tests__*).  Integration test moved to
crates/shipper/tests/state_integration.rs (was
crates/shipper-state/tests/state_integration.rs) with imports rewritten to
use shipper::state::execution_state::*.

shipper-events fuzz target (fuzz/fuzz_targets/event_log_roundtrip.rs)
repointed to shipper::state::events::EventLog; its shipper-events dep
removed from fuzz/Cargo.toml.

Internal shipper imports rewritten:
 - shipper_events → crate::state::events
 - shipper_state → crate::state::execution_state
 - shipper_environment::collect_environment_fingerprint →
   crate::runtime::environment::collect_environment_fingerprint
   (also already absorbed; execution_state no longer needs the external dep)

Delete crates/shipper-events and crates/shipper-state. Remove from workspace
members and shipper's deps. CLAUDE.md files updated to reflect the now-
physically-absorbed state. docs/architecture.md updated to remove dangling
standalone-crate edges.

Per docs/decrating-plan.md §6 Phase 2 follow-up + §6.A R-PR-1..R-PR-5.

Validation: cargo check --workspace, cargo test -p shipper (1640 lib +
integration tests), cargo test -p shipper-cli, cargo clippy --workspace
--all-targets --all-features -- -D warnings, cargo fmt --all -- --check —
all green.
EffortlessSteven added a commit that referenced this pull request May 23, 2026
…-tp-proof-2026-05-23

merge: backfill shipper Trusted Publishing proof sync
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