Skip to content

RG-T137 Fixing Profile Saving Issue - #538

Merged
ucswift merged 1 commit into
masterfrom
fix-profile
Oct 2, 2026
Merged

ucswift merged 1 commit into
masterfrom
fix-profile

Conversation

@ucswift

@ucswift ucswift commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes phone number validation failures that prevented profiles containing phone numbers from being saved.

Changes

  • Added a direct libphonenumber-csharp dependency at version 9.0.40 to ensure the resolved PhoneNumbers assembly satisfies the version required by GlobalPhone.
  • Added a regression test verifying that the resolved PhoneNumbers assembly version is greater than or equal to the version referenced by GlobalPhone.

This prevents assembly binding failures that caused phone number parsing to fail and valid numbers to be reported as invalid.

@Resgrid-Bot

Resgrid-Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ❌
Security ✅
Business Logic ❌

Access your configuration settings here.

​

@request-info

request-info Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Resgrid/Core/.coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: dfc325e4-5cbf-44f1-8956-c44a34e62d3c

📥 Commits

Reviewing files that changed from the base of the PR and between 0bdf2c0 and 29f2653.

⛔ Files ignored due to path filters (1)
  • Tests/Resgrid.Tests/Providers/PhoneNumberLibraryBindingTests.cs is excluded by !**/Tests/**
📒 Files selected for processing (2)
  • Providers/Resgrid.Providers.Number/Resgrid.Providers.Number.csproj
  • Web/Resgrid.Web.Services/Resgrid.Web.Services.xml

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.


📝 Walkthrough

Walkthrough

The pull request adds a direct phone-number package reference and updates service XML documentation for staffing, personnel, protocols, and units. It also relocates the v3 staffing input and result documentation entries.

Changes

Phone number package

Layer / File(s) Summary
Direct phone-number package reference
Providers/Resgrid.Providers.Number/Resgrid.Providers.Number.csproj
Adds libphonenumber-csharp version 9.0.40 and a comment describing the reported assembly-version mismatch and phone-number parsing failures.

Service XML documentation

Layer / File(s) Summary
Staffing documentation
Web/Resgrid.Web.Services/Resgrid.Web.Services.xml
Moves the v3 staffing input and result entries after the staffing-schedule entries. Adds documentation entries for personnel locations and staffing inputs and results.
Personnel and protocol documentation
Web/Resgrid.Web.Services/Resgrid.Web.Services.xml
Adds entries for v4 personnel filters and information, and protocol results and data.
Unit and status documentation
Web/Resgrid.Web.Services/Resgrid.Web.Services.xml
Adds entries for unit-status inputs and results, unit-role inputs, and unit and unit-info results.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 29f26

No actionable issue was confirmed. The phone-number binding fix still needs validation in the supported build environment.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the reported issue and matches the pull request objective. The package and test changes support a phone-number binding fix that can affect profile saving.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

Comment on lines +22 to +24
var resolved = typeof(PhoneNumbers.PhoneNumberUtil).Assembly.GetName().Version;

resolved.Should().BeGreaterThanOrEqualTo(required);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug high

Assembly-binding validation allows an incompatible PhoneNumbers version, so provider parse calls can fail when the resolved assembly is 9.0.40.0 while GlobalPhone references 8.10.1.0, allowing this test to pass while profile saves reject valid phone numbers. Assert the exact assembly identity required by GlobalPhone or exercise an actual GlobalPhone parse under the production host binding, then select a package/build or binding configuration that satisfies that identity.

var resolvedAssembly = typeof(PhoneNumbers.PhoneNumberUtil).Assembly.GetName();\nresolvedAssembly.Name.Should().Be("PhoneNumbers");\nresolvedAssembly.Version.Should().Be(required);
Prompt for LLM

File Tests/Resgrid.Tests/Providers/PhoneNumberLibraryBindingTests.cs:

Line 22 to 24:

Assembly-binding validation allows an incompatible PhoneNumbers version, so provider parse calls can fail when the resolved assembly is 9.0.40.0 while GlobalPhone references 8.10.1.0, allowing this test to pass while profile saves reject valid phone numbers. Assert the exact assembly identity required by GlobalPhone or exercise an actual GlobalPhone parse under the production host binding, then select a package/build or binding configuration that satisfies that identity.

Suggested Code:

var resolvedAssembly = typeof(PhoneNumbers.PhoneNumberUtil).Assembly.GetName();\nresolvedAssembly.Name.Should().Be("PhoneNumbers");\nresolvedAssembly.Version.Should().Be(required);

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

@ucswift

ucswift commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift
ucswift merged commit 2835267 into master Oct 2, 2026
13 of 14 checks passed
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.

2 participants