Skip to content

feat(#851): build a slim release branch for the Anthropic plugin directory - #853

Merged
fdaviddpt merged 3 commits into
mainfrom
feat/release-branch
Oct 2, 2026
Merged

fdaviddpt merged 3 commits into
mainfrom
feat/release-branch

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

The Anthropic directory listing is stuck on v0.29.1. Every version since was held by directory policy. On v0.36.0 it fetched 474 files and 9.2 MB, then reported "Validation ran out of time". This PR adds a release branch that carries only what the plugin runs, built and checked by CI whenever a version tag is pushed. main doesn't change.

Closes #851

What it adds

  • .github/scripts/build_release_tree.py builds the tree from a git ref, using git ls-tree and git cat-file. It never uses git archive, so no export-ignore is needed, and it never reads the working tree. It:
    • drops the deny-list (a deny-list, not an allow-list, on purpose: an extra file is caught loudly by the check, a missing one would not be);
    • cuts CHANGELOG.md to the latest released section, plus a link to the full file;
    • rewrites links that point at removed paths to absolute URLs on main;
    • refuses symlinks, submodules and a forbidden .gitattributes.
  • .github/scripts/check_release_tree.py checks the tree against every automated row of the directory's pre-submission checklist: the 256 KiB / 512-file / file-type rules, names valid on Windows and macOS, .gitattributes, README and LICENSE, hooks.json shape and command form, front matter, launchers, and lockfiles. Code that reads a credential is printed as REVIEW lines for README disclosure; those never fail the check.
  • .github/scripts/smoke_release_tree.py runs claude plugin validate --strict, then every hook in hooks/hooks.json once, in an isolated temp HOME and project, with a fake claude/codex that refuses every call.
  • .github/release-branch.json holds everything specific to this repo, so claude-jit-context and claude-supertool can reuse the scripts with their own config.
  • .github/workflows/release-branch.yml runs on v* tags and workflow_dispatch.
    • A read-only verify job builds, checks and smoke-tests.
    • The publish job is the only one with contents: write. It rebuilds, refuses to push unless the tree hash matches the one verify produced, and adds one commit on top of release.
    • The push is never forced: the official marketplace pins plugins by commit sha, and a force-push would make older pinned commits unreachable. Pushing the same tree again pushes nothing.
  • docs/releasing.md gives the new release sequence with the reason for each step. It also explains how the directory picks the branch it reads, the one-time portal switch, the effect on our own marketplace, and how to reuse this in another plugin.

Measured on v0.36.0

  • Before: 474 files, 9,171,849 bytes; CHANGELOG.md 625,712 bytes.
  • After: 73 files, 1,300,959 bytes; the largest file is 143,947 bytes; CHANGELOG.md 6,039 bytes. No images or binaries.
  • claude plugin validate --strict (2.1.280): passes.
  • Hook smoke test: SessionStart, UserPromptSubmit, PostToolUse and SessionEnd all exit 0, and no background process outlives them.

Testing

  • tests/test_release_branch_{build,check,preflight,smoke}_851.py, written red first. Every "must remove / must fail" case is paired with a "must keep / must pass" control.
  • Full pytest: 2970 passed, 60 skipped.

Not in this PR

  • Switching the listing to release. That's a one-time step in the portal, done after the first release commit exists.
  • README disclosure gaps the check's REVIEW lines point at. Tracked separately.
  • The oss plugin's /oss:release. It should treat the tag push and this workflow run as a required step. Out of scope; filed as a follow-up.

Cross-platform claims

  • Observed on macOS: the build, check and smoke scripts, and the publish logic, simulated against a local bare remote.
  • Reasoned, not observed:
    • the case-collision check runs on Linux CI (macOS's file system is case-insensitive);
    • the npm install of the claude CLI works on ubuntu-latest;
    • a tag pushed with GITHUB_TOKEN would not trigger the workflow. That's documented GitHub behaviour; our release flow pushes tags with the maintainer's own credentials.

🤖 Generated with Claude Code

[AI-generated]

fdaviddpt and others added 3 commits October 2, 2026 10:59
…rectory

The directory has held every version since v0.29.1: the full repository
(474 files, 9.2 MB, a 611 KiB CHANGELOG.md) times out its validator and
breaks its file rules. main keeps everything; a tag push now builds the
tree the plugin actually runs and publishes it to `release`.

- .github/scripts/build_release_tree.py: extracts a ref with git ls-tree +
  cat-file (no git archive, no export-ignore), drops the deny-list in
  .github/release-branch.json, cuts CHANGELOG.md to the latest released
  section, rewrites links into removed paths to absolute URLs on main.
- .github/scripts/check_release_tree.py: the directory's pre-submission
  checklist, every mechanically decidable row, every offender named;
  credential reads reported as REVIEW lines, never failed.
- .github/scripts/smoke_release_tree.py: claude plugin validate --strict,
  then every hooks.json command once against a copy of the tree with a
  temp HOME/project/TMPDIR and a fake claude; lingering children reaped.
- .github/workflows/release-branch.yml: on v* tags and workflow_dispatch;
  read-only verify job (build, check, validate, smoke), then a publish
  job that rebuilds, requires the identical tree, and pushes one commit
  on top of `release` (own linear history, never forced).
- docs/releasing.md: the new release sequence and the one manual portal
  step; linked from README.md and CONTRIBUTING.md.

v0.36.0 builds to 73 files, 1,300,959 bytes; check and validate pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…d not measure

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…teps, our marketplace, and reuse in other plugins

Co-Authored-By: Max <noreply>
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.

Anthropic directory: ship a slim release branch, the listing is stuck on v0.29.1 because the full repo is held by directory policy

1 participant