From 58e107b4824f4cd084ecdc7f3e01c6dd20f9e391 Mon Sep 17 00:00:00 2001 From: Drew Ritter Date: Tue, 3 Nov 2026 15:20:42 -0800 Subject: Fix Codex portal release metadata and hook packaging Drew reported that the v7.0.2 ZIP was rejected for a hooks declaration, a subtitle longer than 30 characters, and a missing support URL. The published main release lacked the fixes carried on the previous marketplace upload branch. Carry forward d19b503b, 6e11b443, and 705a8504: use the approved short subtitle and support URL, and omit only the staged manifest hooks field. Keep hooks: {} in the repository manifest so local installs do not auto-discover the Claude Code SessionStart hook. Preserve the extracted manifest permissions when writing its portal representation. Retain behavioral archive coverage for ZIP and tar.gz, unchanged source metadata, and restrictive umask. Add source-manifest checks for the portal subtitle length/single-line contract and required HTTPS support URL. The archive and source-manifest regressions failed before the fix; all pass after it, as do shellcheck, bash syntax, and diff checks. Build lineage is main/v7.0.2 at 22f0b463, with only these packaging and listing corrections. Drew explicitly required building the replacement ZIP from main before carrying the fixes onto dev. No dev content is part of the release build. Portal validation remains separate from local verification. Tracked in PRI-3439. --- scripts/package-codex-plugin.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/package-codex-plugin.sh') diff --git a/scripts/package-codex-plugin.sh b/scripts/package-codex-plugin.sh index fe90862..d20a13e 100755 --- a/scripts/package-codex-plugin.sh +++ b/scripts/package-codex-plugin.sh @@ -42,6 +42,7 @@ Options: The archive is rootless: .codex-plugin/, assets/, skills/, README.md, LICENSE, and CODE_OF_CONDUCT.md sit at the archive root. Source-only repo files, hooks, tests, docs, and other harness manifests are intentionally not shipped. +Hook declarations are removed from the packaged manifest for portal submission. EOF } @@ -244,6 +245,13 @@ git -C "$REPO_ROOT" -c tar.umask=0022 archive --format=tar "$REF" -- \ VERSION="$(jq -r '.version // empty' "$STAGE/.codex-plugin/plugin.json")" [[ -n "$VERSION" ]] || die "could not read version from .codex-plugin/plugin.json" +# Omit hook declarations from portal packages while retaining the source +# manifest's suppression of hook discovery for repository installs. +# Write into the extracted file to preserve its canonical mode. +manifest_tmp="$WORK_DIR/plugin-manifest.json" +jq 'del(.hooks)' "$STAGE/.codex-plugin/plugin.json" >"$manifest_tmp" +cat "$manifest_tmp" >"$STAGE/.codex-plugin/plugin.json" + if [[ -z "$OUTPUT" ]]; then case "$FORMAT" in zip) -- cgit