fix: correct stale tar.gz/tarball refs and publish UX gaps after zip default#1812
Closed
nadav-y wants to merge 1 commit into
Closed
fix: correct stale tar.gz/tarball refs and publish UX gaps after zip default#1812nadav-y wants to merge 1 commit into
nadav-y wants to merge 1 commit into
Conversation
…default (#1779) apm publish and apm pack --archive now produce .zip by default (#1720). This commit cleans all remaining stale references and fixes five UX gaps surfaced in the post-merge panel review. Stale reference cleanup: - docs/reference/cli/publish.md: .tar.gz -> .zip, --tarball -> --zip, tarball root -> archive root, remove tar czf example, fix ASCII - docs/guides/registries.md: same fixes + add cross-platform zip-build example in Custom layouts section - docs/reference/registry-http-api.md: correct publish format note - packages/apm-guide/.apm/skills/apm-usage/package-authoring.md: .tar.gz -> .zip, tarball -> archive, --tarball -> --zip - packages/apm-guide/.apm/skills/apm-usage/workflow.md: .zip as default - src/apm_cli/commands/publish.py: module docstring + em dash + tarball - src/apm_cli/deps/registry/extractor.py: "tarball sha256 mismatch" -> "archive sha256 mismatch" - src/apm_cli/deps/registry/resolver.py: em dash + tar.gz default Panel review fixes (post-merge): - publish.py _PUBLISH_HELP: add --package to all four examples (required=True flag was missing from every example -- copy-paste crash) - publish.py line 272: replace em dash with -- in Forbidden ClickException (user-visible on 403 responses; prior commit missed this one) - resolver.py lines 98, 104, 363, 369: replace "registry tarball for" with "registry archive for" in RegistryResolutionError strings (same class of fix as extractor.py, missed in first pass) - package-authoring.md: add --package to all publish examples - registries.md Custom layouts: add --package + python -m zipfile build step (Windows users had no actionable guidance after tar czf example was removed) - publish.md --zip row: add "(renamed from --tarball in v0.20.0)" migration note so CI pipelines using --tarball get a recovery path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR follows up on the zip-by-default shift for registry publishing/packing by sweeping remaining stale “tarball/tar.gz” references, tightening publish UX docs/examples to match the current CLI contract (--package required, --zip flag), and correcting a few user-visible messages.
Changes:
- Updated
apm publishhelp/examples and multiple docs pages to include the required--packageflag and to use.zip/--zipterminology. - Reworded resolver/extractor error strings from “tarball” to “archive” and refreshed docs around registry publish Content-Type defaults.
- Added custom-layout zip build guidance in the registries guide.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/apm_cli/deps/registry/resolver.py | Updates user-facing resolution errors and clarifies extraction comment wording. |
| src/apm_cli/deps/registry/extractor.py | Renames sha256 mismatch wording from tarball to archive. |
| src/apm_cli/commands/publish.py | Updates command doc/help examples and replaces non-ASCII punctuation in user-visible strings. |
| packages/apm-guide/.apm/skills/apm-usage/workflow.md | Refreshes install bundle format wording to reflect zip default + legacy tar.gz. |
| packages/apm-guide/.apm/skills/apm-usage/package-authoring.md | Updates publish examples and archive terminology for zip default. |
| docs/src/content/docs/reference/registry-http-api.md | Updates publish Content-Type/docs to match modern client zip behavior. |
| docs/src/content/docs/reference/cli/publish.md | Updates CLI docs for --zip, examples, and error snippets. |
| docs/src/content/docs/guides/registries.md | Adds cross-platform zip build guidance and updates publish examples/options. |
| """``apm publish`` command — upload a packed tarball to a registry. | ||
| """``apm publish`` command -- upload a packed zip archive to a registry. | ||
|
|
||
| Implements docs/proposals/registry-api.md §5.3: |
Comment on lines
292
to
+294
| # extract_archive dispatches on Content-Type (with magic-bytes | ||
| # fallback) — supports both tar.gz (default) and zip (Anthropic | ||
| # skills format). Hash check happens before any extraction. | ||
| # fallback) -- supports both zip (default) and legacy tar.gz. | ||
| # Hash check happens before any extraction. |
| | `--registry NAME` | _(required when multiple registries configured)_ | Registry name from the `registries:` block. | | ||
| | `--package OWNER/REPO` | _(required)_ | Package identity to publish as (e.g. `acme/my-skill`). | | ||
| | `--tarball PATH` | auto-pack | Path to a pre-built `.tar.gz`. Skips auto-pack. | | ||
| | `--zip PATH` | auto-pack | Path to a pre-built `.zip`. Skips auto-pack. (renamed from `--tarball` in v0.20.0) | |
Comment on lines
+308
to
+311
| # Cross-platform zip build (Python stdlib -- no extra tools needed) | ||
| python -m zipfile -c ./build/my-skill-0.0.1.zip apm.yml .apm/ | ||
|
|
||
| apm publish --package acme/my-skill --zip ./build/my-skill-0.0.1.zip |
Collaborator
Author
|
Superseded by the squash push to PR #1779. |
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
Follow-up to #1779 (the zip-default cleanup). Fixes five issues surfaced by the post-merge panel review, plus completes the stale-string sweep the first pass missed.
--packagemissing from all examples (_PUBLISH_HELPin publish.py and Custom layouts in package-authoring.md):--packageisrequired=Truebut every example omitted it -- copy-paste crash. Three panelists flagged this.registry tarball forstrings in resolver.py (lines 98, 104, 363, 369): same class of fix as extractor.py in the original PR, missed in the first pass. User-visible on every package validation failure.ForbiddenClickException (publish.py line 272): user-visible on 403 responses; prior commit fixed logger.info() calls in the same file but not this one.python -m zipfilestep.--tarballmigration note (publish.md--ziprow): CI pipelines usingapm publish --tarballgetNo such option: --tarballwith no recovery path.What was omitted and why
--packageoptional (infer fromapm.yml name:): design change, tracked as a separate issue per panel recommendation.test_mismatch_raisesaddingmatch=(nit): behavioral coverage confirmed; message-text trap deferred.Test plan
uv run pytest tests/unit/registry/passes (213 passed, 2 xfailed)ruff checkandruff format --checkpass on changed filesapm publish --helpshows--packagein all four examplesapm publish(no args) givesMissing option '--package'(not a crash from a different missing option)Generated with Claude Code