Skip to content

Tests check the manifests' wiring, and CI runs weekly - #4

Merged
parintorns merged 1 commit into
mainfrom
manifest-wiring
Sep 30, 2026
Merged

parintorns merged 1 commit into
mainfrom
manifest-wiring

Conversation

@parintorns

Copy link
Copy Markdown
Contributor

What changes

claude plugin validate --strict (the validate CI job) passes two broken states: a monitors/monitors.json that is not JSON, and a hook in hooks/hooks.json that runs a subcommand scripts/mailbox.py does not have. Both were reproduced on a copy of the repository (validate exited 0 for the marketplace and for plugin.json).

  • tests/test_manifests.py (stdlib only, runs in the existing test jobs):
    • every tracked *.json manifest parses (at least four are found);
    • each command in hooks/hooks.json and monitors/monitors.json runs a script under ${CLAUDE_PLUGIN_ROOT} that exists, with a subcommand that mailbox.py's main() dispatches on (command == "...").
  • CI also runs every Monday at 03:00 UTC, because the validate job installs the latest Claude Code, whose checks can tighten with no commit here.
  • CONTRIBUTING describes the new test.

No change to the plugin's behaviour.

Checks

  • python3 -m unittest discover -s tests: 20 OK locally (macOS).
  • On the broken copy, the new tests fail on both cases: the unparseable monitors.json and the hook running nosuch.
  • claude plugin validate --strict .: passed.

🤖 Generated with Claude Code

claude plugin validate --strict passes a monitors.json that is not JSON and a hook that runs a
subcommand mailbox.py does not have. test_manifests.py parses every JSON manifest and checks each
hook and monitor command against the subcommands the script dispatches on. CI also runs every
Monday, since the validate job takes the latest Claude Code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@endgame-code-triage endgame-code-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at f22a470. I read the full files: tests/test_manifests.py, .github/workflows/ci.yml, CONTRIBUTING.md, scripts/mailbox.py, hooks/hooks.json, monitors/monitors.json, .gitignore.

I traced the CALL regex against every command string in both manifests — it correctly captures scripts/mailbox.py and each subcommand. I verified the command == "([\w-]+)" regex extracts all 9 dispatched commands from mailbox.py's main(), and every hook/monitor subcommand (session-start, session-end, prompt, tool-done, waiting, stop, watch) is present in that set. I confirmed the recursive commands() walker correctly traverses both manifest structures. The rglob("*.json") + assertGreaterEqual(len(found), 4) check matches the repo's 4 tracked JSON files. The CI schedule cron is valid and the CONTRIBUTING.md addition is accurate.

Confidence: 85/100 — all code paths verified against actual file contents; the test logic is sound and the CI change is straightforward.

There are no review comments to provide on this diff.

@parintorns
parintorns merged commit 8121b31 into main Sep 30, 2026
3 checks passed
@parintorns
parintorns deleted the manifest-wiring branch September 30, 2026 22:14
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