Repository navigation
Expose consent policy validation from authserver - #7348
Merged
Merged
Conversation
Let the runner validate consent exemptions without importing an internal package. Reject negative upstream counts when exemptions are configured, and test that an empty exemption list still needs no upstream. Co-authored-by: Mecatl <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7348 +/- ##
==========================================
- Coverage 82.50% 82.50% -0.01%
==========================================
Files 938 938
Lines 96113 96114 +1
==========================================
- Hits 79302 79300 -2
- Misses 16806 16809 +3
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ChrisJBurns
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The embedded runner needs to validate its resolved consent exemptions without depending on an internal authserver package. Expose
authserver.ValidateConsentPolicyand use it from both the runner andConfigvalidation. With exemptions configured, the public validator requires at least one upstream; an empty exemption list remains valid regardless of the count.Type of change
Test plan
git diff --check origin/main..HEADpassed after rebasing.task test): the local run timed out after two minutes before the rebase. The new regression test covers a negative count with and without exemptions.Does this introduce a user-facing change?
Previously, Go embedders could not call the consent-policy validator on its own. They can now validate a list without resolving client registrations. Existing ToolHive deployments see no change: their upstream count comes from the length of the configured upstream list.