Skip to content

fix: prevent local packages from shadowing hooks - #58

Merged
pDJJq merged 3 commits into
mainfrom
fix-stop-hook-npx-resolution
Aug 27, 2026
Merged

fix: prevent local packages from shadowing hooks#58
pDJJq merged 3 commits into
mainfrom
fix-stop-hook-npx-resolution

Conversation

@pDJJq

@pDJJq pDJJq commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • run lifecycle hooks through a distinct scoped npm alias so a consumer repository local @tokenroll/llmdoc dependency cannot shadow the published CLI
  • validate the exact commands declared in hooks/hooks.json, including SessionStart, Stop, and PreCompact execution
  • document the launcher boundary and release invariant, and bump all package/plugin surfaces to 3.5.3

Root cause

In repositories that depend on @tokenroll/llmdoc via file:cli, npx resolves that same-name local package first. A fresh npm ci does not expose node_modules/.bin/llmdoc for it, so the hook process exits 127 before the CLI fail-open logic can run.

Validation

  • npm run lint
  • npm run typecheck
  • npm test (55/55)
  • node scripts/check-codex-surface.mjs
  • npm run check:prompts, including all three exact configured hook launchers
  • npm run validate:dogfood
  • launcher smoke tests with npm 8, 9, and 11
  • llmdoc validate; final status: 0 impacted, 0 needs-review, 0 dirty

@pDJJq
pDJJq merged commit 91cdc22 into main Aug 27, 2026
5 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