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
{{ message }}
Repository navigation
test(security): use claude-code/testing tool noun in public-surface-scrub tests #1855
The register() tests in plugins/magpie-security/hooks/public-surface-scrub.test.ts should dispatch tool calls via claude-code/testing's native tool noun ($.tool.call({ tool: 'Bash', command: '...' })) rather than hand-building mock on and $ fixtures.
Why
Follow-up to merged PR #1676 (noted by maintainer @potiuk in his approval review):
"One follow-up, not blocking: the register() tests still hand-build on and $ rather than using claude-code/testing's tool noun, so a drift between the mock event and the real one (like the earlier e.input.command bug) would not be caught."
Using $.tool.call tests the real event dispatch pipeline and ensures any future harness event schema drift is caught deterministically.
Which layer
Other / unsure
Boundary conditions
Host APIs invoked by the mod hook ($.session.root(), $.fs.read(), $.env.get()) should be mocked using standard on('session.root', ...) / on('fs.read', ...) / on('env.get', ...) event handlers, with on('tool.call', ...) providing the downstream next(e) fallback target.
Out of scope
No modifications to the public-surface-scrub.ts runtime logic itself; this is strictly a test suite refactoring to eliminate hand-synthesized event objects.
Activity
test(security): use claude-code/testing tool noun in public-surface-s…
feat(hook-manager): register managers that need no install fix (#1825) (