Skip to content

refactor(oci): remove out-of-scope feature-authoring publish/upload code#164

Merged
pofallon merged 1 commit into
mainfrom
refactor/remove-authoring-publish-code
May 30, 2026
Merged

refactor(oci): remove out-of-scope feature-authoring publish/upload code#164
pofallon merged 1 commit into
mainfrom
refactor/remove-authoring-publish-code

Conversation

@pofallon
Copy link
Copy Markdown
Contributor

@pofallon pofallon commented May 30, 2026

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_template
  • types.rs: the PublishResult struct (+ its re-export in oci/mod.rs)
  • progress.rs: ProgressEvent::OciPublishBegin / OciPublishEnd variants and their id() / timestamp() match arms
  • observability.rs: spans::REGISTRY_PUBLISH and registry_publish_span()
  • client.rs: the publish-only HttpClient::put_with_headers / post_with_headers trait methods and every impl/mock (ReqwestClient, MockHttpClient, and the in-tree test mocks in integration_oci_auth.rs and oci_timeout.rs). All callers were inside the deleted upload functions.
  • Tests: publish-only tests in integration_fake_registry.rs (the push/pull cycle) and integration_oci_enhancements.rs (the test_publish_feature_multi_tag_* set), plus the test_publish_collection_metadata_* inline tests in oci/mod.rs. Consumer tests (list_tags, get_manifest, semver utils) are retained.
  • Stale file: crates/core/src/oci.rs.old — an uncompiled, git-tracked backup left over from the original oci.rsoci/ 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. No errors.rs publish/upload variants existed. No test binary was fully deleted, so .config/nextest.toml needs no changes.

Acceptance

grep -rn across crates/ returns no hits for publish_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, or upload_manifest.

Gates (run locally against this tree)

  • cargo fmt --all -- --checkpass
  • cargo clippy --all-targets --all-features -- -D warningspass
  • cargo deny check — advisories/bans/licenses/sources ok
  • Retained OCI consumer tests pass (deacon-core integration_fake_registry, integration_oci_auth, integration_oci_enhancements, oci_timeout, and the oci unit tests).

Known pre-existing failures (NOT caused by this PR, reproduce identically on main)

  • make test-nextest does not run to completion because deacon::integration_cli::test_debug_logging_with_subcommand fails 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 on main; out of scope here.

🤖 Generated with Claude Code

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>
@pofallon pofallon force-pushed the refactor/remove-authoring-publish-code branch from 7e7d6af to 27d814b Compare May 30, 2026 02:51
@pofallon pofallon merged commit 4ec5331 into main May 30, 2026
12 checks passed
@pofallon pofallon deleted the refactor/remove-authoring-publish-code branch May 30, 2026 18:24
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