Skip to content

CROSSLINK-301 patron profile validation - #746

Open
adamdickmeiss wants to merge 6 commits into
mainfrom
CROSSLINK-301-patron-profile-validation
Open

CROSSLINK-301 patron profile validation#746
adamdickmeiss wants to merge 6 commits into
mainfrom
CROSSLINK-301-patron-profile-validation

Conversation

@adamdickmeiss

@adamdickmeiss adamdickmeiss commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Copilot AI balanced review requested due to automatic review settings September 3, 2026 14:10
@adamdickmeiss adamdickmeiss changed the title Crosslink 301 patron profile validation CROSSLINK-301 patron profile validation Sep 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 Privilege only 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.

Comment thread broker/lms/lms_adapter_ncip.go Outdated
Comment thread broker/lms/lms_adapter_ncip.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread broker/lms/lms_adapter_ncip.go Outdated
Comment thread broker/lms/lms_adapter_ncip.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The reviewed changes have no unresolved approval-blocking issues.

Review details
  • Files reviewed: 18/18 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants