Skip to content

ci(mcp): keep a read-only copy of the plugin in libredb/libredb-studio-claude-plugin for Anthropic's directory - #2266

Merged
cevheri merged 1 commit into
mainfrom
ci/plugin-mirror
Nov 6, 2026
Merged

cevheri merged 1 commit into
mainfrom
ci/plugin-mirror

Conversation

@cevheri

@cevheri cevheri commented Nov 6, 2026

Copy link
Copy Markdown
Member

Anthropic's plugin directory validates only repositories of fewer than 10,000 files and folders, and this one holds more, so the plugin needs its own repository.
The new workflow copies plugins/libredb-studio and LICENSE from main to the root of libredb/libredb-studio-claude-plugin: one commit by github-actions[bot] naming the source commit when they changed, none otherwise, never a force push. It runs on main alone; forks skip it.
PLUGIN_MIRROR_TOKEN, a fine-grained token for the copy alone, lives in the claude-plugin-mirror environment and reaches only the push step; a run without it fails, and a dry-run push proves it when nothing changed.
Tests pin the wiring, run the guard steps in bash and the script end to end against local repositories. The full local gate passed.

…o-claude-plugin for Anthropic's directory

Anthropic's plugin directory validates only a repository of fewer than 10,000 files and folders, and this one holds more, so a submission names a separate repository that holds the plugin alone.
The new Claude Plugin Mirror workflow copies plugins/libredb-studio and LICENSE from main to the root of libredb/libredb-studio-claude-plugin.
scripts/sync-claude-plugin-mirror.sh builds the copy's tree from main's committed objects alone and pushes one commit, authored as github-actions[bot] and naming the source commit, when the plugin folder or LICENSE changed, and none otherwise.
It never pushes with force, and when nothing changed a dry-run push still proves that the token can push.
It runs on a push to main that touches those paths and by hand on main; any other ref fails at once, and forks skip the job.
The token is PLUGIN_MIRROR_TOKEN, a fine-grained token for the copy alone with Contents read and write, kept in the claude-plugin-mirror environment, which only main can deploy to.
It reaches only the push step, as GH_TOKEN, and git gets it from gh's credential helper, so it is never in a URL, a file or the log; a run without it fails with an error naming it.

tests/unit/claude-plugin-mirror-workflow.test.ts holds the wiring, pinning every expression to the step that holds it and the keys of the workflow, its push trigger, the job and each step.
It runs the two guard steps in bash, and runs the script end to end against local bare repositories from a shallow checkout, where the copy holds main alone, its LICENSE is the committed one, and a stand-in token is printed nowhere.
docs/MCP.md says what the copy is for and that it is no marketplace, and docs/DISTRIBUTION.md lists the token as the one publishing secret whose absence fails the run.
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@cevheri
cevheri merged commit cb7b261 into main Nov 6, 2026
29 checks passed
@cevheri
cevheri deleted the ci/plugin-mirror branch November 6, 2026 13:07
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