hook-augment: prove the hook's build identity without hashing the whole executable in every hook process
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ả
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
- 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.
- A read-only hook channel with a narrower identity requirement, since
hook-augmentonly reads the graph. - 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DeusData/codebase-memory-mcp
-
bug editor/integration
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DeusData/codebase-memory-mcp#2787 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
editor/integration parsing/quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DeusData/codebase-memory-mcp#2286 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
install writes an unsupported `args` key into the Claude Code SubagentStart hook, so it never runsĐang mởbug editor/integration priority/high stability/performance ux/behavior
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DeusData/codebase-memory-mcp#2239 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug priority/high ux/behavior
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DeusData/codebase-memory-mcp#2232 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
documentation editor/integration parsing/quality priority/normal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
DeusData/codebase-memory-mcp#2169 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của DeusData/codebase-memory-mcp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
HexaCluster/credcheck#86 ·
-
Wheels for Python 3.15Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
mongodb/winkerberos#175 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AOMediaCodec/SVT-AV1#3320 ·
-
Add `CPC_TAKE_TILL_CHARS`Đang mởdifficulty: easy
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100