You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The loader is one of the most complex pieces of code in the tree and it runs on every hook. Each edge case above has burned someone once. Tests pin the current behaviour (even if nuanced) so future refactors — including several of the perf enhancements in this batch — don't regress them silently.
Proposed enhancement
Add these cases:
Symlinks in the import tree
Policy entry imports a file that's a symlink inside the same project — loader follows it once, no infinite loop.
Deep transitive imports
entry.js → a.js → b.js → c.js; assert every file is rewritten and the hooks from c.js register.
Cleanup on error
Entry imports a file with a syntax error. Loader should unlink every .__failproofai_tmp__.mjs it created, not just the entry.
Convention + explicit collision
A convention file and the explicit customPoliciesPath both register a hook named "my-hook". Assert the explicit one is NOT tagged with __conventionScope (current code handles this; lock it in).
Activity