You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(plugins): reconcile the hook reference with HookType (missing 9 hooks + 2 categories) #1743
The hook reference in docs/docs/concepts/plugins.mdx presents itself as exhaustive — "Plugins are organized into six hook categories" and "Enum with all 18 hook types" — but has drifted out of sync with the HookType enum (mellea/plugins/types.py), which now defines 27 hook types across 8 groups. So the doc both omits a third of the hooks and makes a false completeness claim.
Missing from the doc (9 hooks, 2 whole categories):
Generation: generation_batch_pre_call, generation_batch_post_call, generation_batch_error, generation_event — the doc lists only 3 of the 7 generation hooks.
Why it matters: beyond the stale list, the "all 18" claim actively misleads. For example, sampling_loop_start is documented as firing "when a sampling strategy begins execution" with loop_budget writable — so a reader using stream(strategy=..., loop_budget=N) could reasonably expect it to fire and let them tune the budget, but streaming never fires the sampling_loop_* hooks (it uses the streaming_* hooks + RetryEvent). This surfaced in the #1697 review.
Fix — pick one direction:
Exhaustive and kept so: document the 9 missing hooks + the Adapter and Streaming categories, correct the counts (6 → 8 categories, 18 → 27 hooks), and add a guard (a test or doc-gen step) that keeps the reference in sync with HookType so it can't silently drift again.
Representative, not exhaustive: drop the completeness claim, keep a curated set of common hooks as examples, and link to the authoritative full list (the HookType enum / API reference). Lower maintenance; won't re-drift.
Scope: one doc file (docs/docs/concepts/plugins.mdx) plus HookType for the inventory; no runtime code. Good first issue — well-bounded, and a nice way to learn the hook surface.
Hi, I'd like to work on this one. I plan to take direction 1: document the 9 missing hooks and the Adapter and Streaming categories, fix the counts, and add a test that fails when a HookType member has no section or policy-table row in plugins.mdx.
@bernalalexis-try thank you for the interest, feel free to open a PR when you have one ready and I'll review. I personally would have taken direction 2 as the easier option so I'm interested in what your PR will look like :)
Sorry for the delay. PR is up: #1772. It takes direction 1 (documents the 9 missing hooks and the Adapter and Streaming categories, fixes the counts, and adds a test that fails when a HookType member has no section or policy table row).
Activity
bernalalexis-try commentedon Oct 16, 2026
Hi, I'd like to work on this one. I plan to take direction 1: document the 9 missing hooks and the Adapter and Streaming categories, fix the counts, and add a test that fails when a
HookTypemember has no section or policy-table row inplugins.mdx.ajbozarth commentedon Oct 16, 2026
@bernalalexis-try thank you for the interest, feel free to open a PR when you have one ready and I'll review. I personally would have taken direction 2 as the easier option so I'm interested in what your PR will look like :)
ajbozarth commentedon Oct 28, 2026
@bernalalexis-try are you still interested in working on this? No rush, just checking in since I hadn't seen a PR yet.
bernalalexis-try commentedon Oct 28, 2026
Sorry for the delay. PR is up: #1772. It takes direction 1 (documents the 9 missing hooks and the Adapter and Streaming categories, fixes the counts, and adds a test that fails when a HookType member has no section or policy table row).
Ashutosh2407 commentedon Oct 31, 2026
Hi, I’m new to this project and would like to work on this issue if it’s still open and valid. Could you assign it to me? Thanks!