Background
Final holistic review of PR-E (#269) flagged that growth-hook.test.ts only exercises the send and swap tool paths. The remaining three slugs from TOOL_EVENT_MAP have no test coverage:
sipher_private_claim_completed (mapped from claim)
sipher_recurring_send_tick (mapped from drip)
sipher_batch_send_completed (mapped from splitSend)
If any of these mapping keys ever get a typo (e.g., splitSend → split_send), no test catches it. The fix is mechanical — 3 lines of it.each parametric coverage.
Why it wasn't fixed in PR-E
Two reasons:
- Scope discipline. PR-E was the canonical-contract rewrite, not a test-coverage expansion.
- Practical impact gated by sipher#262.
claim/drip/splitSend (and send/swap) currently return {status: 'awaiting_signature'} with no tx_signature, so the growth-hook silently no-ops for all of them. Only claim actually emits events today (it forwards its input deposit-tx-signature). The other 4 slugs are dead-on-arrival until sipher#262 is resolved.
So the coverage gap is real but the practical risk is low until #262 ships.
Suggested fix
Inside packages/agent/tests/integrations/torque/growth-hook.test.ts, add a parametric block:
```typescript
describe.each([
{ tool: 'claim', slug: 'sipher_private_claim_completed' },
{ tool: 'drip', slug: 'sipher_recurring_send_tick' },
{ tool: 'splitSend', slug: 'sipher_batch_send_completed' },
])('emits $slug for $tool tool', ({ tool, slug }) => {
it('builds correct event shape', async () => {
baseExecutor.mockResolvedValue({ action: tool, status: 'confirmed', signature: TX_SIG })
const wrapped = wrapExecutorWithGrowthHook(baseExecutor, opts)
await wrapped(tool, { wallet: WALLET, amount: 1, token: 'SOL', recipient: 'rector.sol' })
await new Promise((resolve) => setTimeout(resolve, 0))
expect(emitEventMock).toHaveBeenCalledWith(
expect.objectContaining({ eventName: slug })
)
})
})
```
Three tests, locks the slug mapping.
Priority
Low. Defer until either:
- sipher#262 ships (then these tools actually emit and coverage matters more)
- A general test-hygiene sweep happens
Context
PR-E #269 final holistic review, Minor issue #3.
Background
Final holistic review of PR-E (#269) flagged that
growth-hook.test.tsonly exercises thesendandswaptool paths. The remaining three slugs fromTOOL_EVENT_MAPhave no test coverage:sipher_private_claim_completed(mapped fromclaim)sipher_recurring_send_tick(mapped fromdrip)sipher_batch_send_completed(mapped fromsplitSend)If any of these mapping keys ever get a typo (e.g.,
splitSend→split_send), no test catches it. The fix is mechanical — 3 lines ofit.eachparametric coverage.Why it wasn't fixed in PR-E
Two reasons:
claim/drip/splitSend(andsend/swap) currently return{status: 'awaiting_signature'}with notx_signature, so the growth-hook silently no-ops for all of them. Onlyclaimactually emits events today (it forwards its input deposit-tx-signature). The other 4 slugs are dead-on-arrival until sipher#262 is resolved.So the coverage gap is real but the practical risk is low until #262 ships.
Suggested fix
Inside
packages/agent/tests/integrations/torque/growth-hook.test.ts, add a parametric block:```typescript
describe.each([
{ tool: 'claim', slug: 'sipher_private_claim_completed' },
{ tool: 'drip', slug: 'sipher_recurring_send_tick' },
{ tool: 'splitSend', slug: 'sipher_batch_send_completed' },
])('emits $slug for $tool tool', ({ tool, slug }) => {
it('builds correct event shape', async () => {
baseExecutor.mockResolvedValue({ action: tool, status: 'confirmed', signature: TX_SIG })
const wrapped = wrapExecutorWithGrowthHook(baseExecutor, opts)
await wrapped(tool, { wallet: WALLET, amount: 1, token: 'SOL', recipient: 'rector.sol' })
await new Promise((resolve) => setTimeout(resolve, 0))
expect(emitEventMock).toHaveBeenCalledWith(
expect.objectContaining({ eventName: slug })
)
})
})
```
Three tests, locks the slug mapping.
Priority
Low. Defer until either:
Context
PR-E #269 final holistic review, Minor issue #3.