Skip to content

fix: run opted-in hooks on router bypass paths (#128) - #128

Merged
m-t-a97 merged 1 commit into
mainfrom
fix/router-bypass-hook-coverage
Oct 11, 2026
Merged

m-t-a97 merged 1 commit into
mainfrom
fix/router-bypass-hook-coverage

Conversation

@m-t-a97

@m-t-a97 m-t-a97 commented Oct 11, 2026

Copy link
Copy Markdown
Member

Bypass paths (isRequestDisabled 404s, Config.DisabledPaths 404s, and OPTIONS preflight) returned before the hook lifecycle began, so no hook ran at all and observability plugins missed the traffic.

  • Add Hook.RunOnBypass (default false) so observational hooks can opt in
  • Add runBypassHooks and route all three bypass paths through HookOnRequest -> runCompletionHooks -> finalizeResponse
  • Apply PluginID metadata filtering in runCompletionHooks for consistency
  • Add table-driven coverage tests and README note

@m-t-a97 m-t-a97 self-assigned this Oct 11, 2026
Bypass paths (isRequestDisabled 404s, Config.DisabledPaths 404s, and
OPTIONS preflight) returned before the hook lifecycle began, so no hook
ran at all on those requests.

- Add Hook.RunOnBypass (default false) so hooks can opt in
- Add runBypassHooks and route all three bypass paths through
  HookOnRequest -> runCompletionHooks -> finalizeResponse
- Apply PluginID metadata filtering in runCompletionHooks for consistency
- Add table-driven coverage tests
@m-t-a97
m-t-a97 force-pushed the fix/router-bypass-hook-coverage branch from 55328dd to 579242e Compare October 11, 2026 23:02
@m-t-a97
m-t-a97 merged commit f06874c into main Oct 11, 2026
6 checks passed
@m-t-a97
m-t-a97 deleted the fix/router-bypass-hook-coverage branch October 11, 2026 23:41
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.

1 participant