Skip to content

bug(build): genie-hook binary missing from standard build + 99MB compile vs 20MB wish gate (#1485 followup) #1493

@namastex888

Description

@namastex888

Summary

Followup to #1485. Two related issues with the genie-hook thin-client native binary:

  1. Missing from standard build artifactbun run build does not produce dist/genie-hook. Operators must manually run bun build --compile src/hooks/dispatch-client.ts --outfile dist/genie-hook to get it.
  2. Compiled size is 99,301,083 bytes (~95MB) — vs the wish's stated gate of <=20MB.

Both make the daemon-mode hook dispatch unusable as a production default: it's not built by default, and the manual build is 5x oversize.

Repro

cd /home/genie/workspace/repos/genie/.worktrees/dogfood-session
bun run build
ls dist/genie-hook   # absent

bun build --compile src/hooks/dispatch-client.ts --outfile dist/genie-hook
ls -la dist/genie-hook
# 99,301,083 bytes

Evidence: /home/genie/workspace/agents/genie/.genie/agents/dog-fooder/state/evidence/batch-2034c4f3

Why this matters

src/hooks/inject.ts (per #1485 commit body): "buildDispatchCommand() now prefers the compiled binary at GENIE_HOOK_BIN, ~/.genie/bin/genie-hook, or repo dist/genie-hook (in that order); falls back to the legacy bun .../genie.ts hook dispatch". Since the binary isn't built, every install falls back to the legacy bun fork. Same outcome as #1490 (UDS not created in detached daemon), from a different angle.

Acceptance

  • bun run build produces dist/genie-hook as part of the standard artifact set
  • Compiled binary size <= 20MB (per wish gate); investigate why it's currently 99MB (likely full tree-shaking opportunities, or bundling unused subsystems)
  • Published npm @automagik/genie package includes dist/genie-hook so end-users get daemon-mode dispatch by default

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions