refactor(oci): remove out-of-scope feature-authoring publish/upload code#164
Merged
Merged
Conversation
The feature/template authoring commands were already deleted, but the OCI publish/upload implementation survived in crates/core/src/oci/ with no caller reachable from any binary (every caller was a test). This violates the consumer-only constitution (II Consumer-Only Scope), so remove it entirely. Removed: - fetcher.rs: publish_feature, publish_template, publish_feature_multi_tag, publish_collection_metadata, upload_blob, upload_blob_generic, upload_blob_template, upload_manifest, upload_manifest_template - types.rs: PublishResult (+ its re-export in oci/mod.rs) - progress.rs: ProgressEvent::OciPublishBegin / OciPublishEnd and match arms - observability.rs: spans::REGISTRY_PUBLISH and registry_publish_span() - client.rs: publish-only HttpClient::put_with_headers / post_with_headers trait methods and all impls/mocks (ReqwestClient, MockHttpClient, test mocks) - Publish-only tests in integration_fake_registry.rs and integration_oci_enhancements.rs (consumer tests retained); the publish mock methods in integration_oci_auth.rs and oci_timeout.rs - Stale, uncompiled crates/core/src/oci.rs.old backup (pre-split copy of the same authoring code) The consumer-side fetch/pull/install path (fetch_feature, download_layer, get_manifest*, list_tags) is untouched. Verified locally: cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo deny check all pass. The retained OCI consumer tests (deacon-core integration_fake_registry / integration_oci_auth / integration_oci_enhancements / oci_timeout, and the oci unit tests) pass. NOTE: a full `make test-nextest` cannot complete cleanly on this branch OR on main because of a pre-existing, unrelated failure in deacon::integration_cli::test_debug_logging_with_subcommand (a stale workspace-path error-message assertion); that is being fixed separately in PR #166 and is not touched here. The MSRV-1.85 gate likewise fails identically on main due to pre-existing lockfile drift (deps now require rustc >= 1.86). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7e7d6af to
27d814b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The feature/template authoring commands were already removed from deacon, but the OCI publish/upload implementation still lived in
crates/core/src/oci/with no path reachable from any binary — every caller was a test. This violates the consumer-only constitution (§II "Consumer-Only Scope"), under which feature authoring (test/info/plan/package/publish) is permanently out of scope. This PR deletes the dead authoring code entirely.Removed
fetcher.rs:publish_feature,publish_template,publish_feature_multi_tag,publish_collection_metadata,upload_blob,upload_blob_generic,upload_blob_template,upload_manifest,upload_manifest_templatetypes.rs: thePublishResultstruct (+ its re-export inoci/mod.rs)progress.rs:ProgressEvent::OciPublishBegin/OciPublishEndvariants and theirid()/timestamp()match armsobservability.rs:spans::REGISTRY_PUBLISHandregistry_publish_span()client.rs: the publish-onlyHttpClient::put_with_headers/post_with_headerstrait methods and every impl/mock (ReqwestClient,MockHttpClient, and the in-tree test mocks inintegration_oci_auth.rsandoci_timeout.rs). All callers were inside the deleted upload functions.integration_fake_registry.rs(the push/pull cycle) andintegration_oci_enhancements.rs(thetest_publish_feature_multi_tag_*set), plus thetest_publish_collection_metadata_*inline tests inoci/mod.rs. Consumer tests (list_tags,get_manifest, semver utils) are retained.crates/core/src/oci.rs.old— an uncompiled, git-tracked backup left over from the originaloci.rs→oci/split, containing the same authoring code.Out of scope / untouched
The consumer-side fetch/pull/install path —
fetch_feature,download_layer,get_manifest*,get_manifest_by_digest,list_tags— is unchanged. Noerrors.rspublish/upload variants existed. No test binary was fully deleted, so.config/nextest.tomlneeds no changes.Acceptance
grep -rnacrosscrates/returns no hits forpublish_feature,publish_template,publish_collection_metadata,publish_feature_multi_tag,OciPublish,PublishResult,REGISTRY_PUBLISH,registry_publish_span,put_with_headers,post_with_headers,upload_blob, orupload_manifest.Gates (run locally against this tree)
cargo fmt --all -- --check— passcargo clippy --all-targets --all-features -- -D warnings— passcargo deny check— advisories/bans/licenses/sources okdeacon-coreintegration_fake_registry,integration_oci_auth,integration_oci_enhancements,oci_timeout, and theociunit tests).Known pre-existing failures (NOT caused by this PR, reproduce identically on
main)make test-nextestdoes not run to completion becausedeacon::integration_cli::test_debug_logging_with_subcommandfails on a stale workspace-path error-message assertion. This is unrelated to OCI/publish code and is being fixed separately in build: raise MSRV to 1.95 to restore the MSRV CI gate #166.cargo +1.85 check(MSRV) fails on pre-existing lockfile drift (transitive deps now require rustc ≥ 1.86). Also fails onmain; out of scope here.🤖 Generated with Claude Code