Skip to content

decrating: fold in-tree registry logic into shipper-registry crate#61

Merged
EffortlessSteven merged 1 commit into
mainfrom
feature/decrating-fold-registry
Apr 15, 2026
Merged

decrating: fold in-tree registry logic into shipper-registry crate#61
EffortlessSteven merged 1 commit into
mainfrom
feature/decrating-fold-registry

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Phase 4 of the decrating plan (registry special case). Unlike the other
Phase 2 absorptions, shipper-registry stays public — the work is the
opposite direction: move the canonical in-tree implementation INTO
the public crate so shipper-registry becomes a complete, publishable
registry client.

  • Move crates/shipper/src/registry.rs (4791 LOC, canonical) into
    crates/shipper-registry/src/context.rs (Registry-aware RegistryClient,
    the full surface with backoff/index/owners/readiness-evidence).
  • Keep the existing public HTTP-only client as
    crates/shipper-registry/src/http.rs (renamed struct:
    HttpRegistryClient) so the shipper-engine-parallel crate continues
    to compile with a single-line use change.
  • New crates/shipper-registry/src/lib.rs facade with top-level
    constants (CRATES_IO_API, DEFAULT_TIMEOUT_SECS, USER_AGENT) and
    convenience fns (is_version_visible, is_crate_visible,
    sparse_index_path).
  • Delete the in-tree duplicate (registry.rs) and the 239-LOC shim
    (registry_micro.rs).
  • Make shipper-registry a non-optional dep of shipper; drop the
    micro-registry feature (and remove it from micro-parallel /
    micro-all).
  • shipper::registry::* public surface preserved via
    pub use shipper_registry as registry; at shipper/src/lib.rs — no
    breaking change for external library users.

Sub-file split

crates/shipper-registry/src/
├── lib.rs          71 LOC   (facade, constants, convenience fns)
├── context.rs    4791 LOC   (canonical RegistryClient, tests, snapshots)
├── http.rs       1262 LOC   (HttpRegistryClient, bare-URL API, tests)
└── snapshots/             (28 files: 9 context__tests__, 19 http__tests__)

Snapshot migration

  • crates/shipper/src/snapshots/shipper__registry__tests__*.snap
    crates/shipper-registry/src/snapshots/shipper_registry__context__tests__*.snap
  • Existing shipper_registry__tests__*.snap renamed to
    shipper_registry__http__tests__*.snap to match new module path.

Dependencies added to shipper-registry

  • chrono (readiness evidence timestamps)
  • rand (jitter for backoff)
  • shipper-types (Registry, ReadinessConfig, ReadinessEvidence,
    ReadinessMethod)

CI/docs cleanup

  • Removed micro-registry from .github/workflows/ci.yml matrix.
  • Removed micro-registry from templates/circleci-config.yml.
  • Updated docs/architecture.md (removed (optional) tag and the
    micro-registry feature entry).

RELEASE_CHECKLIST_v0.3.0.md still lists shipper-registry as a
publish target — retained, still correct.

Validation

  • cargo check --workspace: clean.
  • cargo test -p shipper-registry --lib: 258 tests; all pass in
    isolation. One timing-sensitive test
    (server_errors_500_502_503_all_classified_as_not_visible_in_backoff)
    is environment-flaky under parallel load but passes standalone — this
    is a pre-existing issue inherited from the in-tree.
  • cargo test -p shipper --lib: 584 passed / 0 failed.
  • cargo test -p shipper-cli --bins: 16 passed / 0 failed.
  • cargo test --test cli_e2e -p shipper-cli: 22 passed / 0 failed.
  • cargo test -p shipper-engine-parallel: 65 passed / 0 failed.
  • cargo clippy --workspace --all-targets --all-features -- -D warnings:
    clean.
  • cargo fmt --all -- --check: clean.

LOC delta

  • shipper: -5030 LOC (registry.rs -4791, registry_micro.rs -239)
  • shipper-registry: +4831 LOC (context.rs +4791, http.rs split/rename
    ~-31 net after removing duplicated constants/convenience fns, lib.rs
    facade +71)

Test plan

  • cargo check --workspace
  • cargo test -p shipper-registry
  • cargo test -p shipper (lib)
  • cargo test -p shipper-cli (bins + cli_e2e)
  • cargo test -p shipper-engine-parallel
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • cargo build -p shipper-cli

@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

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 23 seconds before requesting another review.

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 14 minutes and 23 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 061c7c23-d406-465e-9042-3f48eb588316

📥 Commits

Reviewing files that changed from the base of the PR and between 8c34573 and 9b4e9c8.

⛔ Files ignored due to path filters (30)
  • Cargo.lock is excluded by !**/*.lock
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__empty_owner_list_detail.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_empty_users.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_multiple_with_mixed_names.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_response_parsed.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_with_teams.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__readiness_evidence_multi_attempt.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__readiness_evidence_single_attempt.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__registry_debug_repr.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__registry_debug_repr_no_index.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__crate_info.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_connection_refused.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_owners_forbidden.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_owners_not_found.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_unexpected_status.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owner_all_fields.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owner_minimal.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_api_user_with_id.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_api_user_without_id.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_response_empty.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_response_multiple.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_1char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_2char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_3char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_4char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_long.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_crate.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_custom_registry.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_owners.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_version.snap is excluded by !**/*.snap
📒 Files selected for processing (13)
  • .github/workflows/ci.yml
  • crates/shipper-cli/Cargo.toml
  • crates/shipper-engine-parallel/src/lib.rs
  • crates/shipper-registry/Cargo.toml
  • crates/shipper-registry/src/context.rs
  • crates/shipper-registry/src/http.rs
  • crates/shipper-registry/src/lib.rs
  • crates/shipper/Cargo.toml
  • crates/shipper/src/engine_parallel_micro.rs
  • crates/shipper/src/lib.rs
  • crates/shipper/src/registry_micro.rs
  • docs/architecture.md
  • templates/circleci-config.yml

Walkthrough

This pull request consolidates registry functionality by extracting the registry client implementation into a standalone HTTP-backed module within shipper-registry, removing the feature-gated micro-registry dependency, and updating all consumers to use the new unified API surface through non-optional shipper-registry dependency imports.

Changes

Cohort / File(s) Summary
CI/CD Configuration
.github/workflows/ci.yml, templates/circleci-config.yml
Removed micro-registry and micro-store from feature matrix test lists in CI workflows, simplifying build configurations.
Manifest Dependencies
crates/shipper-cli/Cargo.toml, crates/shipper/Cargo.toml
Removed micro-registry feature declarations and made shipper-registry a non-optional dependency in the main facade crate.
Registry Crate Refactoring
crates/shipper-registry/Cargo.toml, crates/shipper-registry/src/lib.rs, crates/shipper-registry/src/context.rs
Added chrono, rand, and shipper-types dependencies; refactored module structure with new public exports of HttpRegistryClient and related types while maintaining existing RegistryClient from context module.
HTTP Client Implementation
crates/shipper-registry/src/http.rs
New 1262-line module introducing HttpRegistryClient with synchronous HTTP methods for crate/version/owner queries, ETag-based sparse index caching, timeout configuration, and comprehensive unit/snapshot test coverage.
Consumer Updates
crates/shipper-engine-parallel/src/lib.rs, crates/shipper/src/lib.rs, crates/shipper/src/engine_parallel_micro.rs
Updated imports to use HttpRegistryClient from new module structure; replaced feature-gated registry module with direct re-export of shipper_registry crate.
Deleted File
crates/shipper/src/registry_micro.rs
Removed 239-line feature-gated registry abstraction including RegistryClient, backoff retry logic, and ownership verification, consolidating functionality into the standalone registry crate.
Documentation
docs/architecture.md
Updated dependency graph to reflect shipper-registry as unconditional dependency and removed micro-registry feature from documentation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 The registry hops free from feature gates so tight,
HTTP client now shines in shipper-registry's light,
Code consolidated, dependencies clean,
No more micro-flags in the build machine!
Crates and versions flow clear as can be,
A refactored future—as organized as can be! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: moving the canonical in-tree registry implementation into the public shipper-registry crate as part of the decrating plan, which is the primary objective of this PR.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, detailing the movement of registry logic, file restructuring, dependency changes, CI updates, test results, and LOC metrics.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/decrating-fold-registry

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: 8c3457334a

ℹ️ 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".

reporter: &mut dyn crate::engine::Reporter,
) -> anyhow::Result<Vec<PackageReceipt>> {
let reg = reg.inner();
let http_reg = HttpRegistryClient::new(reg.registry().api_base.as_str());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve index cache when constructing parallel HTTP client

This rebuilds a fresh HttpRegistryClient from only api_base, which drops the cache configuration already attached to reg (set by init_registry_client in engine.rs). In parallel runs that use index-based readiness (ReadinessMethod::Index/Both), shipper-engine-parallel polls sparse-index files repeatedly, so losing cache_dir disables ETag/cache reuse and can materially increase request volume, latency, and registry rate-limit failures on larger publish waves.

Useful? React with 👍 / 👎.

@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: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/shipper-registry/src/http.rs`:
- Around line 3-7: Update the module docs to point at the actual registry-aware
client: replace references/links to `crate::HttpRegistryClient` with the correct
symbol `crate::context::RegistryClient` (or use the short link
`crate::context::RegistryClient` in the doc comments) where `HttpRegistryClient`
is mentioned (e.g., the paragraph referencing "For the complete registry
surface, use the [`crate::HttpRegistryClient`] from the [`crate::context`]
module" and the similar occurrence around lines 18-19); ensure the inline doc
links use the exact symbol `RegistryClient` within the `crate::context` module
so rustdoc resolves to the real API.

In `@crates/shipper-registry/src/lib.rs`:
- Around line 32-39: The public Owner and OwnersResponse types are duplicated
between context and http, causing API incompatibility; consolidate them into a
single shared module (e.g., a new models or types module) and export that
module's Owner and OwnersResponse from the crate root, then update both
RegistryClient (context::RegistryClient) and HttpRegistryClient methods
(HttpRegistryClient::get_owners, HttpRegistryClient::list_owners) to return the
shared types instead of http::Owner/http::OwnersResponse, and remove the
duplicate definitions in context and http so both clients use the same DTOs.

In `@crates/shipper/src/engine_parallel_micro.rs`:
- Around line 38-40: The current adaptation creates an HttpRegistryClient from
only reg.registry().api_base, dropping Registry::index_base so index-based
readiness (ReadinessMethod::Index/Both) fetches from the wrong host; update the
construction and call site to thread the original registry index_base through to
micro::run_publish_parallel (or pass the full Registry) so readiness checks use
Registry::index_base. Locate the HttpRegistryClient::new call and the
micro::run_publish_parallel call in engine_parallel_micro.rs and either
construct the client with both api_base and index_base or pass the Registry (not
just api_base) into run_publish_parallel so ReporterAdapter/HttpRegistryClient
retain index_base for readiness paths.

In `@templates/circleci-config.yml`:
- Line 47: The CircleCI BDD matrix loop in templates/circleci-config.yml omits
the valid feature sets "micro-plan" and "micro-policy"; update the for-loop that
iterates over feature_set to include "micro-plan" and "micro-policy" so it
matches the GitHub Actions matrix (see the loop variable feature_set in that
file) and restores per-feature coverage across CI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 15d54275-5290-473f-a92f-20f401386120

📥 Commits

Reviewing files that changed from the base of the PR and between 6b6f278 and 8c34573.

⛔ Files ignored due to path filters (30)
  • Cargo.lock is excluded by !**/*.lock
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__empty_owner_list_detail.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_empty_users.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_multiple_with_mixed_names.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_response_parsed.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__owners_with_teams.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__readiness_evidence_multi_attempt.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__readiness_evidence_single_attempt.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__registry_debug_repr.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__context__tests__registry_debug_repr_no_index.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__crate_info.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_connection_refused.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_owners_forbidden.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_owners_not_found.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__error_unexpected_status.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owner_all_fields.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owner_minimal.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_api_user_with_id.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_api_user_without_id.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_response_empty.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__owners_response_multiple.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_1char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_2char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_3char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_4char.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__sparse_path_long.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_crate.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_custom_registry.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_owners.snap is excluded by !**/*.snap
  • crates/shipper-registry/src/snapshots/shipper_registry__http__tests__url_version.snap is excluded by !**/*.snap
📒 Files selected for processing (13)
  • .github/workflows/ci.yml
  • crates/shipper-cli/Cargo.toml
  • crates/shipper-engine-parallel/src/lib.rs
  • crates/shipper-registry/Cargo.toml
  • crates/shipper-registry/src/context.rs
  • crates/shipper-registry/src/http.rs
  • crates/shipper-registry/src/lib.rs
  • crates/shipper/Cargo.toml
  • crates/shipper/src/engine_parallel_micro.rs
  • crates/shipper/src/lib.rs
  • crates/shipper/src/registry_micro.rs
  • docs/architecture.md
  • templates/circleci-config.yml
💤 Files with no reviewable changes (2)
  • crates/shipper-cli/Cargo.toml
  • crates/shipper/src/registry_micro.rs

Comment on lines +3 to +7
//! This module provides [`HttpRegistryClient`] — a thin reqwest wrapper that
//! takes a bare base-URL string. Intended for callers that do not have a full
//! [`shipper_types::Registry`] handy (e.g. the parallel engine helper crate).
//! For the complete registry surface, use the [`crate::HttpRegistryClient`] from
//! the [`crate::context`] module.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the doc links to point at RegistryClient.

These docs currently say the “complete” registry-aware client is crate::HttpRegistryClient in crate::context, but context exposes RegistryClient. As written, the docs send readers to the wrong API.

Suggested doc fix
-//! For the complete registry surface, use the [`crate::HttpRegistryClient`] from
+//! For the complete registry surface, use the [`crate::RegistryClient`] from
 //! the [`crate::context`] module.
@@
-/// Use [`crate::HttpRegistryClient`] for the full `Registry`-aware client with
+/// Use [`crate::RegistryClient`] for the full `Registry`-aware client with
 /// sparse-index visibility checks, readiness backoff, etc.

Also applies to: 18-19

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/shipper-registry/src/http.rs` around lines 3 - 7, Update the module
docs to point at the actual registry-aware client: replace references/links to
`crate::HttpRegistryClient` with the correct symbol
`crate::context::RegistryClient` (or use the short link
`crate::context::RegistryClient` in the doc comments) where `HttpRegistryClient`
is mentioned (e.g., the paragraph referencing "For the complete registry
surface, use the [`crate::HttpRegistryClient`] from the [`crate::context`]
module" and the similar occurrence around lines 18-19); ensure the inline doc
links use the exact symbol `RegistryClient` within the `crate::context` module
so rustdoc resolves to the real API.

Comment thread crates/shipper-registry/src/lib.rs
Comment on lines +38 to +40
let http_reg = HttpRegistryClient::new(reg.registry().api_base.as_str());
let mut adapter = ReporterAdapter { inner: reporter };
micro::run_publish_parallel(ws, opts, st, state_dir, reg, &mut adapter)
micro::run_publish_parallel(ws, opts, st, state_dir, &http_reg, &mut adapter)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Preserve index_base when adapting the registry client.

This drops the original Registry context down to api_base only, but shipper-engine-parallel still does sparse-index readiness checks. In the current flow, ReadinessMethod::Index/Both will end up fetching sparse entries from api_base instead of Registry::index_base (for crates.io: https://crates.io/... instead of https://index.crates.io/...), so index-based readiness can fail after a successful publish. Please thread the original index base through to the micro client, or keep the registry-aware client for readiness paths.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/shipper/src/engine_parallel_micro.rs` around lines 38 - 40, The
current adaptation creates an HttpRegistryClient from only
reg.registry().api_base, dropping Registry::index_base so index-based readiness
(ReadinessMethod::Index/Both) fetches from the wrong host; update the
construction and call site to thread the original registry index_base through to
micro::run_publish_parallel (or pass the full Registry) so readiness checks use
Registry::index_base. Locate the HttpRegistryClient::new call and the
micro::run_publish_parallel call in engine_parallel_micro.rs and either
construct the client with both api_base and index_base or pass the Registry (not
just api_base) into run_publish_parallel so ReporterAdapter/HttpRegistryClient
retain index_base for readiness paths.

Comment thread templates/circleci-config.yml Outdated
name: Run BDD compatibility matrix
command: |
for feature_set in "" "micro-auth" "micro-git" "micro-events" "micro-lock" "micro-encrypt" "micro-environment" "micro-storage" "micro-cargo" "micro-registry" "micro-process" "micro-webhook" "micro-types" "micro-config" "micro-state" "micro-store" "micro-all"; do
for feature_set in "" "micro-auth" "micro-git" "micro-events" "micro-lock" "micro-encrypt" "micro-environment" "micro-storage" "micro-cargo" "micro-process" "micro-webhook" "micro-types" "micro-config" "micro-state" "micro-store" "micro-all"; do

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

CircleCI BDD matrix omits valid feature sets (micro-plan, micro-policy).

This line now diverges from the GitHub matrix at Line [213] in .github/workflows/ci.yml, reducing per-feature coverage in CircleCI.

Suggested fix
-            for feature_set in "" "micro-auth" "micro-git" "micro-events" "micro-lock" "micro-encrypt" "micro-environment" "micro-storage" "micro-cargo" "micro-process" "micro-webhook" "micro-types" "micro-config" "micro-state" "micro-store" "micro-all"; do
+            for feature_set in "" "micro-auth" "micro-git" "micro-events" "micro-lock" "micro-encrypt" "micro-environment" "micro-storage" "micro-cargo" "micro-plan" "micro-policy" "micro-process" "micro-webhook" "micro-types" "micro-config" "micro-state" "micro-store" "micro-all"; do
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
for feature_set in "" "micro-auth" "micro-git" "micro-events" "micro-lock" "micro-encrypt" "micro-environment" "micro-storage" "micro-cargo" "micro-process" "micro-webhook" "micro-types" "micro-config" "micro-state" "micro-store" "micro-all"; do
for feature_set in "" "micro-auth" "micro-git" "micro-events" "micro-lock" "micro-encrypt" "micro-environment" "micro-storage" "micro-cargo" "micro-plan" "micro-policy" "micro-process" "micro-webhook" "micro-types" "micro-config" "micro-state" "micro-store" "micro-all"; do
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/circleci-config.yml` at line 47, The CircleCI BDD matrix loop in
templates/circleci-config.yml omits the valid feature sets "micro-plan" and
"micro-policy"; update the for-loop that iterates over feature_set to include
"micro-plan" and "micro-policy" so it matches the GitHub Actions matrix (see the
loop variable feature_set in that file) and restores per-feature coverage across
CI.

Move the canonical 4791-LOC implementation from crates/shipper/src/registry.rs
INTO crates/shipper-registry/src/, split into:

- lib.rs (facade, top-level fns, constants)
- context.rs (canonical Registry-aware RegistryClient + tests + snapshots)
- http.rs (lightweight HttpRegistryClient with bare-url API, kept for
  shipper-engine-parallel; previously the entire public surface)

shipper-registry becomes the complete public registry client. shipper
depends on it via `pub use shipper_registry as registry;` re-export at
lib.rs, preserving the `shipper::registry::*` surface.

Delete the in-tree duplicate (registry.rs, 4791 LOC) and the shim
(registry_micro.rs, 239 LOC). Drop the `micro-registry` feature flag.
Make shipper-registry a non-optional dep of shipper.

Move insta snapshots:
- crates/shipper/src/snapshots/shipper__registry__tests__*.snap
  -> crates/shipper-registry/src/snapshots/shipper_registry__context__tests__*.snap
- Rename pre-existing snapshots from `shipper_registry__tests__*` to
  `shipper_registry__http__tests__*` to match new module path.

shipper-engine-parallel continues to use the bare-url API via
`use shipper_registry::HttpRegistryClient as RegistryClient;` (single-line
import change).

Update .github/workflows/ci.yml, templates/circleci-config.yml and
docs/architecture.md to remove `micro-registry` references.

Per docs/decrating-plan.md Phase 4 (registry special case).
@EffortlessSteven EffortlessSteven force-pushed the feature/decrating-fold-registry branch from 8c34573 to 9b4e9c8 Compare April 15, 2026 06:21
@EffortlessSteven EffortlessSteven merged commit 9abecad into main Apr 15, 2026
1 of 3 checks passed
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