Skip to content

feat(access): hybrid mode routing (issue #41)#43

Merged
levleontiev merged 2 commits intomainfrom
feature/issue-41-hybrid-mode
Mar 16, 2026
Merged

feat(access): hybrid mode routing (issue #41)#43
levleontiev merged 2 commits intomainfrom
feature/issue-41-hybrid-mode

Conversation

@levleontiev
Copy link
Contributor

Summary

  • src/nginx/access.lua: adds hybrid mode branch — checks wrapper.get_provider(uri) first; if a known provider prefix matches, calls wrapper.access_handler() and returns; otherwise falls through to decision_api.access_handler() for normal enforcement
  • docker/entrypoint.sh: adds hybrid to allowed FAIRVISOR_MODE values
  • 2 new BDD scenarios documenting hybrid routing decision (36 total, all pass)

Closes #41

Test plan

  • 36 BDD unit scenarios pass locally
  • CI lua-quality + validate-config-and-policies
  • e2e-smoke

🤖 Generated with Claude Code

codex and others added 2 commits March 16, 2026 14:56
In hybrid mode, requests to known LLM provider prefixes (/openai,
/anthropic, etc.) are routed through wrapper.access_handler(); all
other requests fall through to decision_api.access_handler() for
normal enforcement. Added "hybrid" to entrypoint.sh allowed modes.
36 BDD scenarios pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…de + access.lua dispatch tests

- bin/ci/validate_nginx_template.sh: loop over decision_service, wrapper,
  hybrid to validate nginx config renders correctly for all modes
- spec/unit/access_spec.lua + features/access.feature: 5 BDD scenarios
  that load src/nginx/access.lua via loadfile and verify the actual
  dispatch logic (hybrid→wrapper, hybrid→decision_api, wrapper, reverse_proxy,
  decision_service)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@levleontiev levleontiev merged commit 7c1bf86 into main Mar 16, 2026
8 checks passed
@levleontiev levleontiev deleted the feature/issue-41-hybrid-mode branch March 16, 2026 15:25
levleontiev pushed a commit that referenced this pull request Mar 16, 2026
…tization rules

Both Rule sections (hybrid mode routing decision from #43 and
Response auth header sanitization from #42) are preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

feat(wrapper): hybrid mode — route known provider prefixes through wrapper alongside decision_api

2 participants