Skip to content

feat(#1135): /release pre-flight runs claude plugin validate; post-tool never hard-blocks; current model aliases - #1207

Merged
admarble merged 6 commits into
mainfrom
feat/1135-release-plugin-validate
Sep 28, 2026
Merged

admarble merged 6 commits into
mainfrom
feat/1135-release-plugin-validate

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

Track C of #1135 (AC-9, AC-10). Track B is #1206. #1135 stays open until both land, and AC-12's full suite is this PR's CI.

AC-9: continueOnBlock does not apply to post-tool.sh. Evidence below; no registration change

AC-9 asks for continueOnBlock "where it currently hard-blocks". Nothing hard-blocks, and the field can't be applied here anyway:

  1. It is a prompt-hook option. Upstream CHANGELOG ## 2.1.139: "Added hook continueOnBlock config option for PostToolUse". The installed 2.1.283 binary defines it only in the type: "prompt" hook schema (continueOnBlock:O().optional().describe('Sets the continue value for the decision:"block" produced when ok is false…')) and reads it only in the prompt-hook runner. Sequant registers post-tool.sh as type: "command" in both .claude/settings.json and hooks/hooks.json.
  2. post-tool.sh never blocks. Every exit in all three copies is exit 0. It emits no decision JSON, and security patterns and test failures only go to the quality log.

The new fixture case in __tests__/pre-tool-hook.integration.test.ts, post-tool.sh never hard-blocks (#1135 AC-9) [%s], covers all three hook copies. It feeds a .ts write containing eval( and a failing npm test payload, then asserts exit 0, no "decision" on stdout, and both warnings in the log. If a later change makes the hook block, this test catches it.

Docs: docs/reference/run-command.md keeps aliases in its examples and adds a table of what they resolve to as of Claude Code 2.1.283. Each row was checked with a real claude -p --model <alias> … | jq '.modelUsage|keys': opus → claude-opus-5-5, sonnet → claude-sonnet-5, haiku → claude-haiku-4-5-20251001, fable → claude-fable-5-1.

AC-10: claude plugin validate in pre-flight

  • Why two lines: claude plugin validate . validates only marketplace.json and silently skips plugin.json, so the new ### Plugin Checks step names each manifest.
  • Non-strict on purpose: plugin.json passes today with one warning ("CLAUDE.md at the plugin root is not loaded as project context"), so --strict would block every release.
  • What stops a release: an error, or no claude on PATH.

Output I got running both commands against this branch:

Validating plugin manifest: …/.claude-plugin/plugin.json
⚠ Found 1 warning:
  ❯ root: CLAUDE.md at the plugin root is not loaded as project context. …
✔ Validation passed with warnings        (exit 0)
Validating marketplace manifest: …/.claude-plugin/marketplace.json
✔ Validation passed                       (exit 0)

Acceptance criteria

  • AC-9: npx vitest run __tests__/pre-tool-hook.integration.test.ts passed (384 tests, including the new case for all three copies); the evidence for "no hard-block exists" is above.
  • AC-10: npx vitest run src/lib/__tests__/release-plugin-validate-skill.test.ts passed, 9 of 9. The test runs the skill's own pre-flight bash block against a stub claude: a failing stub must stop the release after the plugin.json check, and a passing stub must call both manifests in order.
  • AC-12 (lint): npm run lint:skill-sync reported 44 synced, 0 diverged, and lint:skill-calls reported no violations. For the full suite, see CI test.

Mutation records

Mutation-verified: AC-9 — added exit 2 after the SECURITY_WARNING log line in .claude/hooks/post-tool.sh; tests/pre-tool-hook.integration.test.ts failed; restored.

Mutation-verified: AC-10 — replaced the plugin.json line's || { echo …; exit 1; } with || true in .claude/skills/release/SKILL.md; src/lib/tests/release-plugin-validate-skill.test.ts failed; restored.

The first AC-10 mutation survived, because the marketplace line still exited non-zero. The test was tightened to require that nothing runs after a plugin.json failure; after that, the mutation above fails it.

Test plan

  • Both gate files (393 passed), the skill lints, and the real claude plugin validate, run after merging main
  • CI test + canary

🤖 Generated with Claude Code

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