chore: remove stale check-manifests references left by e647f14

e647f14 deleted scripts/check-manifests.sh but missed three live files
that still named it: the apm-marketplace-check hook description in
.pre-commit-config.yaml, and comments in sync-plugin-content.sh and
lib/marketplace-plugins.sh explaining design decisions by pointing at
a script that no longer exists.

Also deletes list_marketplace_remote_plugin_names from
marketplace-plugins.sh — its only caller was check-manifests.sh, so
it's been dead code since that commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YR2CjVumUbEGWcMikcoXBD
This commit is contained in:
2026-09-12 21:50:46 +00:00
parent ace2d66343
commit f11b6455ce
3 changed files with 13 additions and 37 deletions

View File

@@ -104,7 +104,7 @@ repos:
- id: apm-marketplace-check - id: apm-marketplace-check
name: apm marketplace check name: apm marketplace check
description: Validate every marketplace.packages[] entry resolves, including network reachability of remote refs -- catches stale/unreachable remote package references that check-manifests.sh deliberately skips (local-source checks only) description: Validate every marketplace.packages[] entry resolves, including network reachability of remote refs -- the only hook that checks remote package references rather than local-source paths
entry: apm marketplace check entry: apm marketplace check
language: system language: system
stages: [pre-push] stages: [pre-push]

View File

@@ -1,21 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Shared helper: enumerates the local (string-source) plugin entries declared in # Shared helper: enumerates the local (string-source) plugin entries declared in
# .claude-plugin/marketplace.json. Sourced by scripts/sync-plugin-content.sh # .claude-plugin/marketplace.json. Sourced by scripts/sync-plugin-content.sh
# (--all) and scripts/check-manifests.sh so a future marketplace.json schema # (--all), kept as its own file so a future marketplace.json schema change (e.g.
# change (e.g. a new source type) only has to be handled in one place instead # a new source type) has one place to land if a second caller needs the walk.
# of drifting between two hand-maintained copies of the same walk.
# #
# Requires jq. Not meant to be executed directly -- source it. # Requires jq. Not meant to be executed directly -- source it.
# assert_marketplace_manifest_usable <marketplace_json_path> # assert_marketplace_manifest_usable <marketplace_json_path>
# #
# Checks the preconditions list_marketplace_local_plugins depends on but cannot # Checks the preconditions list_marketplace_local_plugins depends on but cannot
# report on. Both callers run the walk inside a process substitution # report on. The caller runs the walk inside a process substitution
# (`done < <(list_marketplace_local_plugins ...)`), which is its own subshell: a # (`done < <(list_marketplace_local_plugins ...)`), which is its own subshell: a
# jq abort in there kills only that subshell, so an unparseable manifest yields # jq abort in there kills only that subshell, so an unparseable manifest yields
# zero lines and reads exactly like "this marketplace declares no local plugins". # zero lines and reads exactly like "this marketplace declares no local plugins".
# The caller then blames whatever its empty-set branch blames -- for # sync-plugin-content.sh --all's own empty-set check (see there) is what catches
# check-manifests.sh, every plugin directory on disk being unlisted. # that reading; it cannot tell an empty manifest from an unparseable one on its
# own, which is why this assert has to run first, in the caller's own shell.
# #
# It also rejects an entry whose `source` is neither a local path string nor a # It also rejects an entry whose `source` is neither a local path string nor a
# remote source object. Only those two shapes are classifiable: the walk below # remote source object. Only those two shapes are classifiable: the walk below
@@ -26,10 +26,9 @@
# #
# The check is deliberately typed as "not string AND not object" rather than # The check is deliberately typed as "not string AND not object" rather than
# enumerating `.source == null`. Rejecting null specifically left every other # enumerating `.source == null`. Rejecting null specifically left every other
# malformed value (`"source": 42`, `"source": []`) passing the assert, skipped by # malformed value (`"source": 42`, `"source": []`) passing the assert while
# the walk below, AND rescued by check-manifests.sh's disk -> marketplace name # silently dropping out of the walk below -- i.e. exactly the defect the null
# axis -- i.e. exactly the defect the null case was fixed for, reached with a # case was fixed for, reached with a different value.
# different value.
# #
# Exits 1 with a specific message on any violation, so call it from the caller's # Exits 1 with a specific message on any violation, so call it from the caller's
# own shell -- never inside `< <(...)`, which is the exact swallowing this guards. # own shell -- never inside `< <(...)`, which is the exact swallowing this guards.
@@ -70,7 +69,7 @@ assert_marketplace_manifest_usable() {
# #
# Prints one "<name>\t<absolute_plugin_dir>" line per local (string `source:`) # Prints one "<name>\t<absolute_plugin_dir>" line per local (string `source:`)
# marketplace entry. Remote sources (github/git/npm objects) have no local # marketplace entry. Remote sources (github/git/npm objects) have no local
# directory to walk and are skipped, matching both callers' prior behavior. # directory to walk and are skipped.
list_marketplace_local_plugins() { list_marketplace_local_plugins() {
local repo_root="$1" marketplace="$2" local repo_root="$1" marketplace="$2"
local plugin_count i name source_type source local plugin_count i name source_type source
@@ -85,26 +84,3 @@ list_marketplace_local_plugins() {
printf '%s\t%s\n' "$name" "$repo_root/$source" printf '%s\t%s\n' "$name" "$repo_root/$source"
done done
} }
# list_marketplace_remote_plugin_names <marketplace_json_path>
#
# Prints the `name` of every REMOTE (object `source:`) marketplace entry, one per
# line -- the exact complement of list_marketplace_local_plugins.
#
# check-manifests.sh's disk -> marketplace pass uses it as its name axis: a plugin
# vendored on disk but declared with the remote-object shape has no local entry to
# path-match against, so without a name match it would be reported as unlisted when
# its entry is in fact right there.
#
# The select is `(.source | type) == "object"`, an allowlist of the one shape that
# axis is actually for -- NOT the denylist `(.source | type) != "string"` it used to
# be. That denylist was true for `null` (and for numbers, arrays, booleans), so a
# malformed entry marked its same-named directory "listed" while the local walk above
# skipped it for lacking a string source: one bad entry disabled BOTH directions of
# the check at once. assert_marketplace_manifest_usable rejects those shapes too, but
# this function must be correct on its own -- it is called from a different script,
# and a precondition that stops running is not a property of this select.
list_marketplace_remote_plugin_names() {
local marketplace="$1"
jq -r '.plugins[]? | select((.source | type) == "object") | .name // empty' "$marketplace"
}

View File

@@ -192,8 +192,8 @@ fi
if [[ "$ALL" -eq 1 ]]; then if [[ "$ALL" -eq 1 ]]; then
# Derives the plugin list from marketplace.json via the shared # Derives the plugin list from marketplace.json via the shared
# list_marketplace_local_plugins helper (scripts/lib/marketplace-plugins.sh), # list_marketplace_local_plugins helper (scripts/lib/marketplace-plugins.sh),
# the same one scripts/check-manifests.sh uses, instead of hand-maintaining a # a single implementation of the walk instead of hand-maintaining a
# duplicate walk at every call site (see .pre-commit-config.yaml's # duplicate at every call site (see .pre-commit-config.yaml's
# check-plugin-content-sync). # check-plugin-content-sync).
# #
# Hard error rather than a `|| pwd` fallback, on scripts/sync-marketplace-mirror.sh's # Hard error rather than a `|| pwd` fallback, on scripts/sync-marketplace-mirror.sh's