CROSSLINK-301 patron profile validation - #746
Open
adamdickmeiss wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
NCIP request compatibility and ineligible-patron workflow handling remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds configurable NCIP patron-profile eligibility validation across the Directory and broker services.
Changes:
- Defines and persists ordered patron-profile eligibility rules.
- Validates NCIP user privileges against configured rules.
- Adds API, persistence, PATCH, and adapter test coverage.
Required changes:
- Request
User Privilegeonly when profile validation is configured. - Map profile-ineligibility errors to the review outcome and add workflow-level coverage.
File summaries
| File | Description |
|---|---|
directory/test/entries_test.go |
Tests profile persistence and clearing. |
directory/test/apifixtures/entry-with-lmsconfig.post.req.json |
Adds POST profile input. |
directory/test/apifixtures/entry-with-lmsconfig.post.refetch.json |
Adds expected POST output. |
directory/test/apifixtures/entry-with-lmsconfig.patch.req.json |
Adds PATCH profile input. |
directory/test/apifixtures/entry-with-lmsconfig.patch.refetch.json |
Adds expected PATCH output. |
directory/query.sql |
Extends LMS configuration upserts. |
directory/migrations/006_lms_patron_profiles.up.sql |
Adds profile storage. |
directory/migrations/006_lms_patron_profiles.down.sql |
Removes profile storage. |
directory/api/lms_config.go |
Serializes and patches profile rules. |
directory/api/lms_config_test.go |
Tests profile PATCH semantics. |
directory/api/entries.go |
Persists and returns profiles. |
directory/api.yaml |
Defines patron-profile schemas. |
broker/lms/lms_adapter_test.go |
Tests profile extraction and eligibility rules. |
broker/lms/lms_adapter_ncip.go |
Implements NCIP profile extraction and validation; requires request and outcome fixes. |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
and action ActionOUtcomeReview
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The critical profile-selection flaw and shared-lookup validation issue must be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 17/17 changed files
- Comments generated: 2
- Review effort level: Balanced
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.
https://index-data.atlassian.net/browse/CROSSLINK-301