Skip to content

docs(hooks): add doc comments to all public types#2447

Merged
Hmbown merged 2 commits into
Hmbown:mainfrom
HUQIANTAO:docs/hooks-crate-docs
May 31, 2026
Merged

docs(hooks): add doc comments to all public types#2447
Hmbown merged 2 commits into
Hmbown:mainfrom
HUQIANTAO:docs/hooks-crate-docs

Conversation

@HUQIANTAO
Copy link
Copy Markdown
Contributor

@HUQIANTAO HUQIANTAO commented May 31, 2026

Add doc comments to all public types in the hooks crate: HookEvent, HookSink trait, StdoutHookSink, JsonlHookSink, WebhookHookSink, UnixSocketHookSink, and HookDispatcher.

Greptile Summary

The review has been completed and submitted via the greptile-review tools. One P2 documentation inaccuracy was found in the HookSink trait doc where it claims errors are "logged" when they are actually silently discarded by HookDispatcher::emit.

Confidence Score: 4/5

Safe to merge; the change is documentation-only and does not touch any runtime logic.

All comments are accurate except for one sentence in the HookSink trait doc that says errors are logged when they are actually silently discarded by HookDispatcher::emit.

crates/hooks/src/lib.rs around lines 98-101 in the HookSink trait doc.

Reviews (1): Last reviewed commit: "docs(hooks): add doc comments to all pub..." | Re-trigger Greptile

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HUQIANTAO has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Hmbown
Copy link
Copy Markdown
Owner

Hmbown commented May 31, 2026

Thanks for filling in the hooks docs. I pushed a tiny maintainer follow-up to make the HookSink error-handling wording match the current dispatcher behavior: sink errors are discarded so hooks stay best-effort. Local checks passed in the PR worktree: cargo fmt --all --check, cargo test -p codewhale-hooks --all-features --locked, and git diff --check.

@Hmbown Hmbown merged commit 655f50e into Hmbown:main May 31, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants