Skip to content

[ef-36] fix: custom hooks loading + p alias for policies + bump to 0.0.1-beta.10#36

Merged
NiveditJain merged 1 commit into
mainfrom
ef-36
Apr 7, 2026
Merged

[ef-36] fix: custom hooks loading + p alias for policies + bump to 0.0.1-beta.10#36
NiveditJain merged 1 commit into
mainfrom
ef-36

Conversation

@NiveditJain

@NiveditJain NiveditJain commented Apr 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix custom hooks loading (-c flag): bin/failproofai.mjs now sets FAILPROOFAI_DIST_PATH at startup (mirroring how FAILPROOFAI_PACKAGE_ROOT is set). Previously findDistIndex() returned null, the ESM shim was never created, and import ... from 'failproofai' in user hook files would throw Cannot find package 'failproofai'.
  • Add p alias for the policies subcommand — failproofai p -i -c <path> now works. Implemented as a single early normalization (if (args[0] === "p") args[0] = "policies") so all downstream routing is transparent.
  • Bump version to 0.0.1-beta.10.

Test plan

  • failproofai policies -i -c ~/failproofai/examples/policies-notification.js loads without Cannot find package error
  • failproofai p lists policies
  • failproofai p -i runs install flow
  • failproofai p -i -c <path> loads custom hooks correctly
  • failproofai p -h shows help
  • failproofai --version prints 0.0.1-beta.10

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added "p" as a shorthand command for listing policies and their status.
  • Documentation

    • Updated package alias documentation with simplified table format and corrected examples.
  • Chores

    • Version bump to 0.0.1-beta.10.

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@NiveditJain has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 52 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 2 minutes and 52 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 1b1dbff2-6079-4309-93c3-db4c3e3d923c

📥 Commits

Reviewing files that changed from the base of the PR and between ef008d5 and 608c441.

📒 Files selected for processing (2)
  • bin/failproofai.mjs
  • package.json
📝 Walkthrough

Walkthrough

The pull request introduces a shorthand command alias (ppolicies) for the CLI, initializes the FAILPROOFAI_DIST_PATH environment variable, updates help documentation, revises package alias documentation with new status formatting, and bumps the package version to beta.10.

Changes

Cohort / File(s) Summary
Command-line Enhancement
bin/failproofai.mjs
Added environment variable initialization for FAILPROOFAI_DIST_PATH, implemented command-argument normalization to rewrite p to policies, and updated help text to document the new shorthand.
Documentation Updates
docs/package-aliases.md
Revised package alias tables by removing npm install commands, updating status indicators, changing example references from failproof-ai to failproof and failprof-ai, and simplifying ownership claims.
Version Bump
package.json
Updated package version from 0.0.1-beta.9 to 0.0.1-beta.10.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop, hop, hooray! A shorthand p takes flight,
The policies command now swift and polite,
With paths initialized and docs set straight,
Beta.10 arrives—our version feels great!
✨ Small tweaks, big care—this change is just right!


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

…s + bump to 0.0.1-beta.10

- Fix custom hooks loading failure: bin entry now sets FAILPROOFAI_DIST_PATH so
  findDistIndex() resolves the dist module and rewrites `import from 'failproofai'`
  in user hook files — previously returned null and left the import unrewritten
- Add `p` as a shorthand alias for the `policies` subcommand (normalised early so
  all downstream routing works transparently)
- Bump version to 0.0.1-beta.10

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NiveditJain NiveditJain merged commit 4d2bebe into main Apr 7, 2026
7 of 8 checks passed
@NiveditJain NiveditJain deleted the ef-36 branch April 21, 2026 01:31
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