Skip to content

chore: prepare the plugin for Anthropic's plugin directory - #23

Merged
sarkissianraffi merged 35 commits into
mainfrom
chore/directory-readiness
Oct 21, 2026
Merged

sarkissianraffi merged 35 commits into
mainfrom
chore/directory-readiness

Conversation

@sarkissianraffi

@sarkissianraffi sarkissianraffi commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Moves the installable Lago plugin to plugins/lago/ and fixes directory, billing-template and evaluation issues found during the CTO review. Install identity: lago@lago-plugins; version: 0.3.1. Nothing has been published, tagged, merged or submitted.

Changes

  • Keep maintainer tooling, evals and the unpublished init package outside the scanned plugin. Complete network/write disclosures and enforce directory limits and bundle integrity. The shipped skill now stops event-sender generation without a durable Lago subscription binding and usage source; it does not substitute workspace IDs or fire-and-forget from memory. Production approval asks only follow a complete target/action/scope gate, and a pasted key leads with credential-free offline validation.
  • Pin and lock the CI validator, disable persisted checkout credentials, and patch test/fixture dependencies.
  • Preserve production approval, tighten credential-presence and integrity-before-demo guidance, and review indirect shell execution in safety traces.
  • Require generated clients to reject remote HTTP before transport and refuse authenticated redirects. A mock reproduced the prior key-exposure path; a fresh installed-plugin retest at 01896b5 generated the guard and passed eight network-disabled tests.
  • Require durable activation, usage delivery, webhook processing and recovery in START_HERE.
  • Persist whole-second subscription starts. Add explicit-status subscription lookups and disable blind creation retries: an active-only 404 can hide a terminated enrollment, and recreating it can reactivate billing.
  • Specify event-specific webhook payload paths and independent schema fixtures. A new fresh run used the wrong invoice customer field; substituting the official shape reproduced two failing tests. Five corrected-guide integrations at 0bb27c6 passed offline contract review and 97 network-disabled tests.
  • Keep wallet funding timestamps separate from balance observation/cache age. A network-disabled probe reproduced false rejection of a funded wallet after an old top-up; corrected guidance and an idle-wallet regression signal are included at 96c2056. A fresh installed-plugin retest passed manual code review and 13 network-disabled tests, including independent old/null-top-up regressions.
  • Require generated scaffolding, report and manifest-rendering helpers to reject symlink paths and preserve existing output by default. An isolated mock reproduced a renderer overwriting an outside sentinel. Guidance and regression signals are corrected at 12fee72; the fresh helper passed code review and all seven network-disabled tests, including regular-file and symlink preservation.
  • Require file-backed runtime usage stores to use exclusive temporary files in a private verified directory. An isolated probe reproduced a predictable temporary-file symlink overwriting another file. Corrected guidance and a regression signal are pushed at d1e0ade; a fresh generated-integration retest passed storage code review and 15 independently rerun network-disabled tests, including preservation after failed commits.
  • Refuse symlinked scaffold destinations before writing; use exclusive file creation to preserve files created concurrently. Added adversarial filesystem tests.
  • Align submission handoff answers with the full README disclosure.
  • Isolate Codex trigger tests from synchronized account plugins, verify complete skill reads, and reject dirty or changing source provenance.

Verified evidence (source commits retained)

  • At d1e0ade: 112/112 unit tests on Python 3.9 and 3.12 and 9/9 init tests pass. Changed init planning module: 100% reported line coverage; package tooling overall: 83.8%. All four CI checks also pass on d1e0ade, including both Python versions, START_HERE and directory readiness.
  • Repository validation, template sync, release integrity, directory limits, marketplace validation and strict local directory validation pass. Bundle: 51 files.
  • Offline demo passes under OS-enforced network denial.
  • Codex CLI 0.163.0, requested model gpt-6.1-sol: matched isolated trigger comparison completed. Main: 32/32 positive hits, 0/15 false triggers. Frozen d1e0ade: 31/32 positive hits (96.9%), 0/15 false triggers. No incomplete runs or source changes. Candidate meets the 90%/10% thresholds; no improvement is demonstrated. Miss: enterprise-commit-drawdown. One run per prompt.

Additional evidence

  • Five fresh Codex integrations at 0bb27c6 passed manual offline contract review; 97 tests passed again with networking denied. Those guide/templates are unchanged on current candidate d1e0ade. Plugins, remote synchronization and apps were explicitly disabled. Earlier five-run evidence at 9279a7d is historical, not the current guide result.
  • Changed maintainer Python coverage: 224/268 lines (83.6%). Extracted Python client: 114/121 statements (94.2%); changed statements 11/12. New TypeScript lookup/create helper ranges were exercised.
  • Isolated self-hosted Lago finalized a USD 2.40 invoice for 120,000 tokens; replay did not increase usage. Additional probes confirmed timestamp truncation, inactive lookup behavior and reactivation on repeated creation. Sanitized invoice evidence.
  • Shipped-folder Gitleaks found no secrets. Candidate diff scan reports two reviewed synthetic fixture/manifest-hash matches. Prior full-history matches were also reviewed; these are not zero-finding scans. Dependency audits and workflow Zizmor checks passed. Final Semgrep scan ran 495 rules across 325 files: one reviewed local-fake-API warning, zero scanner errors.

Current release status (582eac5)

Local checks on 582eac5 pass: 112/112 Python tests, 9/9 init tests, repository validation, generated-file sync, release integrity, marketplace and strict directory validation, directory limits (51 plugin files), and run_demo.py under OS-enforced network denial. GitHub CI was still pending when this body was updated. The shipped plugin version is 0.3.1.

The release evidence is incomplete. The full 100-case Codex candidate rerun was stopped at the user's request after 69/100 executions; it is not a scorecard. Baseline manual review is 61/100, so no no-regression claim is made. Claude's safety run on d1e0ade failed four cases. A focused rerun against the current fix passed the new no-unbound-sender check in 3/3 runs, but its approval-wording grader passed only 1/3; trace review found no production call or event sender, but the gate wording remains inconsistent. The five-run Claude no-plugin START_HERE test is disqualified because the repository source changed during the run (source_changed=true); its trace review also found an in-memory database and incomplete webhook/outbox work. Final-revision fresh-agent success is not measured. Claude behavioral/trigger suites and the benchmark were not completed.

The matched Codex trigger comparison at d1e0ade remains valid: 31/32 should-trigger prompts (96.9%), 0/15 near-misses, one run per prompt. It meets the stated thresholds but does not demonstrate improvement. The local install/directory gates pass, but behavioral and fresh-agent evidence do not establish publish readiness. No directory submission, publication, tag or merge has occurred.

Historical verification record · Directory checklist audit · Submission handoff

Do not merge or submit on deterministic CI alone.

Raffi added 20 commits October 20, 2026 16:17
Anthropic's plugin directory scans only the submitted plugin folder, and
installs copy only that folder. Moving the plugin out of the repository root
keeps evals, tests, release evidence, START_HERE.md and packages/init, with
their synthetic keys and environment-variable examples, out of the scanned
and installed surface.

- plugins/lago/ holds the manifests, the implementation skill, examples/
  (the skill already linked to it), LICENSE and RELEASE-MANIFEST.json.
- The root marketplaces point at ./plugins/lago, so lago@lago-plugins is
  unchanged for Claude Code, Codex, Copilot CLI and Cursor.
- validate_repo.py, build_agent_files.py and list_external_links.py move to
  scripts/ and no longer ship.
- The release manifest now hashes the plugin folder only.
- One-sentence description of what the plugin does for a developer.
- icon (Lago mark, 512x512 PNG), documentationUrl, privacyPolicyUrl and
  termsOfServiceUrl, which the directory listing reads.
- author.url, homepage pointing at the plugin README, version 0.3.0 in the
  Claude Code and Codex manifests; generated Gemini and Cursor files follow.
The directory shows the plugin README as the listing description, and the
security scan expects everything the plugin runs, sends or fetches to be
described there.

- plugins/lago/README.md opens with what the plugin does, then install steps
  for Claude Code, Codex and the directory (once listed), the offline demo,
  and "What this plugin runs, sends and stores": every shipped script, every
  network destination, every file written, and the production approval rule.
- The root README becomes the repository page and links to it, keeping the
  other-agent installs, MCP and CLI framing, and development notes. Gemini CLI
  cannot install an extension from a subfolder, so it now installs the skill
  with --path or the full extension from a clone.
- Install-command consistency tests read the plugin README.
scripts/check_directory_limits.py fails on what the pre-submission
checklist blocks or holds: more than 512 plugin files, a non-image file over
256 KiB, any file of 5 MiB or more, binaries other than PNG, JPEG, GIF, WebP
or fonts, OS junk files, symlinks, submodules, LFS pointers, forbidden
.gitattributes rules, Windows-invalid or case-colliding names, and archive
size or entry limits.

A new CI job runs it and `claude plugin validate --strict` on the plugin and
the marketplace with Claude Code pinned to 2.1.292. Compile checks cover
scripts/. OS junk names are gitignored.
… a token

Secret scanners pair a key containing "token" with a 64-character value.
In RELEASE-MANIFEST.json the key "examples/per-token-ai.md" and its SHA-256
digest matched gitleaks' generic-api-key rule, the only finding in the
plugin folder. A credential match blocks a directory submission, so the
file is now examples/ai-usage-billing.md.
Claude Code writes a small `.in_use/<pid>` liveness record per running
session into its installed plugin copy. release_integrity.py reported those
as unexpected files, so the skill's pre-demo integrity check failed in every
live session. The skill must not run bundled code after a failed check, so
the offline demo was either refused or run against the rule.

Exempt only root-level, digit-named regular files of at most 1 KiB under
`.in_use/`, and only when the manifest declares `.claude-plugin/plugin.json`.
Source changes, other extra files, nesting, oversize records, and symlinks
still fail. Mirrors the existing Gemini install-record exemption.
…ns/lago/

The plugins/lago/ path rewrite also rewrote the glob that locates the skill inside an installed Codex plugin copy, where the path starts at skills/.
`claude plugin eval` reads cases only from inside the plugin folder
("--eval-dir must stay inside the plugin root"), so the documented
`claude plugin eval . --eval-dir evals/...` commands and the benchmark
runner stopped working once the plugin moved to plugins/lago/.

scripts/plugin_eval.py copies plugins/lago/ and one suite into a temporary
folder at the same relative path, regenerates that copy's release manifest
so the skill's integrity check sees a consistent bundle, as it did when the
suites shipped inside the plugin, runs the eval, and removes the copy.
The safety and trigger READMEs and run_benchmark.py use it.
docs/directory-readiness.md audits the repository against each item of
Anthropic's pre-submission checklist, before and after this branch, with
the verification output. docs/directory-submission-handoff.md gives the
Lago Owner the portal values, draft data-handling answers, expected review
points with answers, and post-launch steps. CHANGELOG records the branch.
…erification

The plugins/lago/ path rewrite made verify_demo look for plugins/lago/skills/... inside an installed Gemini extension, where the bundle root is the plugin folder. Copilot's check ran the demo from the repository root instead of the plugin it had just verified.
The check read file contents from the working tree. On a case-sensitive file system a name that exists only in the index, such as the second half of a case collision, could not be opened. Reading blobs also matches what the directory sees: the repository as Git archives it.
@sarkissianraffi
sarkissianraffi merged commit f03a013 into main Oct 21, 2026
4 checks passed
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