Commit f788332
authored
chore: v1.1.6 production blocker fix bundle (P0-1/3/4/6/9) (#200)
* feat(hooks): add husky pre-commit gate template (P0-3 S1)
Author-whitelist + secret scan + private-pattern scan + lint hook
that downstream user repos receive after 'agentlint setup'. Sources
_shared.sh fail_with_help helper. Closes the v0.9.0 absorb-VibeKit
gap where setup.sh expected templates/hooks/husky/ but the directory
never existed.
* feat(hooks): add husky pre-push gate template (P0-3 S2)
Sources _shared-push.sh (main-skip + rebase on origin/main) then runs
the project's test command (npm test for Node, pytest for Python).
Part of the husky hook generation closing P0-3.
* feat(hooks): add husky commit-msg conventional-commit gate (P0-3 S3)
Rejects commit messages whose first line does not match
^(feat|fix|refactor|test|docs|chore|ci|style|perf|build|revert)(\(.+\))?: .+
Uses _shared.sh fail_with_help helper. Part of P0-3 husky hook bundle.
* fix(setup): fail-closed hook copy + carry _shared helpers (P0-3 S4)
scripts/setup.sh hook copy loop now:
- counts copied hooks (copied=0 ... copied=$((copied+1)))
- dies hard if copied==0 with 'no husky hooks generated; refusing to
set core.hooksPath' — prevents the audit-flagged failure mode where
setup falsely claims hooks installed and disables existing .git/hooks
via core.hooksPath redirect
- copies _shared.sh + _shared-push.sh helpers into user .husky/ so the
generated hooks (which 'source "$(dirname "$0")/_shared.sh"')
resolve their helper at runtime in the downstream repo
- only sets core.hooksPath=.husky when copied>0
Closes P0-3 from docs/p0-production-blocker-scan-2026-04-25.md.
* test(setup): pin husky hook generation positive + negative path (P0-3 S5)
tests/test-husky-hooks.sh covers two cases:
- positive: bash setup.sh --lang ts --no-install <tmp> writes
executable .husky/{pre-commit,pre-push,commit-msg} and sets
core.hooksPath=.husky
- negative: when no husky hook templates are reachable, setup exits
non-zero, leaves core.hooksPath unset, and creates no .husky files.
Pins the fail-closed behavior added in scripts/setup.sh (P0-3 S4)
and prevents the 'silent claim, empty .husky/' regression from
returning.
* docs(install): restore complete GitHub Action workflow with actions/checkout (P0-4 S1)
INSTALL.md GH Action snippet was reduced to a 4-line excerpt during
PR1's collapse, dropping the surrounding 'name', 'on', 'permissions',
and 'jobs' boilerplate plus the critical 'actions/checkout@v4' step.
Users copy-pasting the snippet ended up with a workflow that runs
AgentLint against an empty runner workspace.
Restores the full copy-paste workflow with checkout. Adds an inline
note that explains why checkout is required.
docs/content/intro.md already had the complete workflow (PR1 only
collapsed INSTALL.md), so no intro.md change is needed for S2.
The hygiene test added in S3 enforces both files keep checkout.
* test(registry): pin Action snippets carry actions/checkout (P0-4 S3)
Scans every yaml/yml fenced block in README.md, README_CN.md,
INSTALL.md, docs/content/intro.md. For any block that references
0xmariowu/AgentLint@<ref> or 0xmariowu/agent-lint@<ref>, asserts
the same block contains 'actions/checkout'.
Locks the F002/S1 fix in: future doc edits cannot drop checkout
from the canonical Action quickstart again.
registry-consistency suite: 96 -> 97 tests.
* fix(install): replace failing 'agentlint check --help' verify command (P0-6 S1)
INSTALL.md Verify section told users to run 'agentlint check --help'
right after install. The command exits 1 with 'scanner produced no
output' because the help router does not handle 'check --help' as a
help request — it falls through to scanner.sh which expects scan
input on stdin and finds none.
Replaces with 'agentlint help', which prints the full CLI help and
exits 0. Smoke-tested via npm pack + isolated --prefix install.
Closes P0-6 first-use install verification failure.
* test(registry): pin INSTALL.md Verify uses working commands (P0-6 S2)
Locks in F003/S1 fix: INSTALL.md '## Verify' section must NOT contain
'agentlint check --help' (broken: scanner.sh blocks on stdin) AND
must contain 'agentlint --version' AND ('agentlint help' OR
'agentlint check --project-dir').
Future doc edits that reintroduce the broken verify command fail CI.
registry-consistency suite: 97 -> 98 tests.
* docs: surface npm install -g side effects up front (P0-9 S1+S2)
INSTALL.md gains a '## Side effects' section right after the
'For AI coding agents' frontmatter, before '## Default'. States
plainly that 'npm install -g agentlint-ai' writes to ~/.claude/
and registers the /al plugin, and points at --ignore-scripts as
the opt-out path (also in Failure modes).
README.md install snippet gets an inline blockquote pointing at
INSTALL.md#side-effects so users see the disclosure without leaving
the canonical README path.
Closes P0-9 — restores the prominent opt-in notice that PR1's
install collapse dropped along with the --ignore-scripts narrative.
* test(registry): pin INSTALL Side effects + raise length cap to 100 (P0-9 S3)
New runTest 'INSTALL.md Side effects section is present and lists
~/.claude + --ignore-scripts' locks the F004/S1 admonition in:
INSTALL.md must contain '## Side effects' header + ~/.claude mention
+ --ignore-scripts mention.
Reconciles with two PR1-era tests that started failing once side-
effect disclosure was restored:
1. README/README_CN must NOT mention '--ignore-scripts' (stays clean
of npm flag noise on the main install path). README inline note
rewritten to point at INSTALL.md#side-effects without naming the
flag literally.
2. INSTALL.md length cap was 80 lines (PR1.5 buffer). Today's P0
work added 12 lines of GitHub Action workflow expansion (P0-4)
plus 4 lines of Side effects section (P0-9). Cap raised to 100
so legitimate future P0 fix additions don't force prose trimming
gymnastics.
registry-consistency suite: 98 -> 99 tests.
* test(e2b): assert husky hooks generated + core.hooksPath set in S04 (P0-3 / F005 S1)
setup-ts scenario verifier (run.sh inline Python) now checks:
- .husky/pre-commit / pre-push / commit-msg exist and are executable
- git config core.hooksPath == .husky
S04-setup-lang-ts specs.json expected.files_exist also lists the
husky paths for documentation; the live check happens in run.sh.
S05-setup-lang-python intentionally NOT changed: scripts/setup.sh
only walks the husky branch when LANG != python, so Python projects
do not produce .husky/. Asserting them there would always fail.
Closes the e2b coverage gap that let pre-PR5 scans pass S04 while
the .husky directory was empty (audit P0-3).
Plan F005/S1 verify command (which only checked S04) updated by
this commit's behavior; specs.json still references hook paths so
the verify python -c S04 grep continues to pass.
* fix(e2b): accept husky 9+ .husky/_ as valid core.hooksPath value
Husky 9 set core.hooksPath to .husky/_ (internal forwarder) instead
of .husky directly; user-facing hooks at .husky/<name> are still
invoked via the forwarder. First v116-p0-revalidate run flagged S04
PARTIAL on this strict equality.
Relax the check to accept either '.husky' or '.husky/_'. Both are
correct husky configurations; rejecting one or the other is a tooling
implementation detail, not a setup failure.
Confirmed: v116-p0-revalidate2 now 21/21 PASS (Pass rate 100.0%).
* chore: bump version to 1.1.6
Bump 5 version sources via scripts/bump-version.sh:
- package.json
- .claude-plugin/plugin.json
- .claude-plugin/marketplace.json
- release-metadata.json (regenerated, 58 checks / 6 core dimensions)
- README badge + intro check counts (regenerated)
Plus CHANGELOG.md v1.1.6 entry naming the 5 P0 fixes from
docs/p0-production-blocker-scan-2026-04-25.md (P0-1 bump itself,
P0-3 husky hooks, P0-4 INSTALL Action checkout, P0-6 verify
command, P0-9 side-effects disclosure) and the 4 deferred P0
items (P0-2 / P0-5 / P0-7 / P0-8) tracked for v1.1.7+.
Pre-tag verify gate green:
- npm test: 11 suites, 99/99 in registry-consistency
- npm run lint:shell: clean
- bash scripts/sanitize.sh: 2 warnings (non-fail, history-related)
- npm pack --json --dry-run: version 1.1.6
- npm publish --dry-run: + agentlint-ai@1.1.6 (canonical success line)
- e2b 21/21 PASS (run-id v116-p0-revalidate2, 68s)1 parent f5efb9a commit f788332
16 files changed
Lines changed: 471 additions & 19 deletions
File tree
- .claude-plugin
- docs/content
- scripts
- templates/hooks/husky
- tests
- e2b/scenarios/install
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
5 | 32 | | |
6 | 33 | | |
7 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
29 | 50 | | |
30 | 51 | | |
31 | | - | |
| 52 | + | |
32 | 53 | | |
33 | 54 | | |
34 | 55 | | |
| |||
44 | 65 | | |
45 | 66 | | |
46 | 67 | | |
47 | | - | |
| 68 | + | |
48 | 69 | | |
49 | 70 | | |
50 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
5 | 32 | | |
6 | 33 | | |
7 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
642 | 643 | | |
| 644 | + | |
643 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
644 | 655 | | |
645 | 656 | | |
646 | 657 | | |
| |||
785 | 796 | | |
786 | 797 | | |
787 | 798 | | |
788 | | - | |
| 799 | + | |
789 | 800 | | |
790 | 801 | | |
791 | 802 | | |
792 | 803 | | |
793 | | - | |
| 804 | + | |
794 | 805 | | |
795 | 806 | | |
796 | 807 | | |
| |||
800 | 811 | | |
801 | 812 | | |
802 | 813 | | |
803 | | - | |
| 814 | + | |
804 | 815 | | |
805 | 816 | | |
806 | 817 | | |
807 | | - | |
| 818 | + | |
808 | 819 | | |
809 | 820 | | |
810 | 821 | | |
811 | | - | |
| 822 | + | |
812 | 823 | | |
813 | 824 | | |
814 | 825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments