Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

hook-augment: prove the hook's build identity without hashing the whole executable in every hook process

Đang mở
#2,683 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
28/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
backend, performance

Hướng nghiên cứu

Read the hook identity and peer verification work in #2335, plus the version-cohort and activation contract issues #2178, #1955, and #2335; review the #1767 Windows metadata discussion. Compare the three listed options against the macOS, Linux, and Windows identity requirements. Done means a work counter proves the hook path hashes no executable bytes, identity remains valid on all three platforms, and CPUs without SHA instructions return context before the default deadline.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

editor/integration enhancement priority/normal stability/performance windows

Problem

Before a hook-augment process can ask the daemon for graph context, it computes the SHA-256 of its own executable (about 300 MB) as its daemon build identity.

Since #2575 (e93e4386, first released in v0.12.0) that hash runs on the CPU's SHA instructions where they exist. Measured on current main (354ccecb), Apple arm64, over the 305 MB image:

path time per hash
hardware (ARMv8 SHA2) 0.10 s
portable fallback 0.95 s

CPUs without SHA instructions take the portable path on every hook call. Reporters measured about 2.3 s of startup CPU on their machines (#1335, #1388, #2441), which is past the 2000 ms hook deadline, so the hook exits 0 with no output. Even when it stays under the deadline, every Grep/Glob/Bash call pays that latency.

Constraints

  • The build identity is part of the version-cohort and activation contract (#2178, #1955, #2335). A hook process must not be able to pass as a different build.
  • A cache keyed on file metadata (size, timestamps, file index) is not a stable identity on Windows for any file other than the running image, because the change time can be set through SetFileInformationByHandle. This came up in the #1767 review.
  • Hooks stay fail-open and never add noise to stdout.

Options to evaluate

  1. Daemon-side verification. The daemon verifies the connecting hook's image, as #2335 does for peers with the verified handle held open, and the hook process does not hash itself.
  2. A read-only hook channel with a narrower identity requirement, since hook-augment only reads the graph.
  3. An install-time digest, recorded by the installer in an owner-only file and checked by the daemon against its own verification of the peer image.

Done when

  • A hook process does no full-image hash on the hook path, asserted by a work counter (bytes hashed), never by wall time.
  • The identity contract holds on macOS, Linux and Windows.
  • Hooks on CPUs without SHA instructions return context at the default deadline.
Ngôn ngữ chính
C
Star
45.8k
Fork
3.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
208

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DeusData/codebase-memory-mcp

Tất cả issue của DeusData/codebase-memory-mcp

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.