Skip to content

ridp/rba build cms payload#327

Open
jayreddy519 wants to merge 6 commits intotrunkfrom
CU_868hwptd9
Open

ridp/rba build cms payload#327
jayreddy519 wants to merge 6 commits intotrunkfrom
CU_868hwptd9

Conversation

@jayreddy519
Copy link
Copy Markdown
Contributor

@jayreddy519 jayreddy519 commented Mar 20, 2026

https://app.clickup.com/t/868hwptd9

Summary by CodeRabbit

  • New Features

    • Added end-to-end RBA RIDP support: transforms family payloads into RIDP requests, constructs request payloads, and validates them against JSON Schemas.
    • Added JSON Schemas for request, response, and US state codes to enforce payload structure.
  • Tests

    • Added comprehensive specs covering successful flows and multiple failure cases (JSON parsing, contract validation, missing primary applicant/fields, construction errors, and schema validation).

@jayreddy519 jayreddy519 added the enhancement New feature or request label Mar 20, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
spec/operations/fdsh/ridp/rba/transform_family_to_rba_request_spec.rb (1)

8-8: Consider renaming let(:subject) to avoid shadowing RSpec's built-in method.

Using let(:subject) shadows RSpec's built-in subject helper, which can cause confusion. While functional, a more explicit name improves clarity.

♻️ Suggested rename
-  let(:subject) { described_class.new }
+  let(:operation) { described_class.new }

Then update usages like subject.call(payload) to operation.call(payload), or alternatively use RSpec's implicit subject { described_class.new } syntax.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spec/operations/fdsh/ridp/rba/transform_family_to_rba_request_spec.rb` at
line 8, Rename the test helper that currently uses let(:subject) to avoid
shadowing RSpec's built-in subject; change the declaration let(:subject) {
described_class.new } to a clearer name such as let(:operation) {
described_class.new } and update all usages (e.g., subject.call(payload)) to
operation.call(payload) or switch to RSpec's implicit subject {
described_class.new } and adjust calls accordingly so references use the new
identifier (operation) instead of subject.
app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb (1)

53-56: Consider preferring 'home' address similar to phone selection logic.

The code takes the first address regardless of kind, while fetch_telephone (lines 143-146) explicitly prefers 'mobile', then 'home'. For consistency and accuracy, consider preferring the 'home' address for residential verification.

♻️ Suggested approach
       def build_request_hash(person, family_hash)
-        address    = person.addresses&.first
+        address    = person.addresses&.detect { |a| a.kind == 'home' } ||
+                     person.addresses&.first
         ridp_rba   = family_hash.dig(:external_payloads, :ridp_rba)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb` around lines
53 - 56, build_request_hash currently grabs person.addresses&.first which may
pick a non-residential address; update it to prefer an address with kind ==
'home' (falling back to first or another appropriate kind) similar to the
fetch_telephone selection logic. Locate build_request_hash and change the
address selection to search person.addresses for a 'home' entry first, then fall
back to the first address if none found, ensuring downstream usage of address
uses this chosen address.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb`:
- Around line 103-105: The ZIP parsing assumes a continuous-digit string and
fails on hyphenated inputs; in the transform (transform_family_to_rba_request /
where zipCode and zipCodeExtension are built) normalize address.zip first by
stripping non-digit chars (e.g., gsub(/\D/, '')) into a local variable, then
derive zipCode from digits[0..4] and zipCodeExtension from digits[5..8] and only
set the extension when present (keep the .presence guard). This ensures inputs
like "04101-1234" yield "04101" and "1234" and prevents leading hyphens from
being returned.

In `@lib/aca_entities/fdsh/ridp/rba/schemas/RBA-RIDP-Response-schema.json`:
- Around line 28-37: The description for the JSON schema property
finalDecisionCode is inconsistent with its enum: it mentions "NO DECISION" but
the enum value is "NODECISION"; update the description string in the
finalDecisionCode block to use "NODECISION" (or otherwise match the exact enum
token used) so the human-readable docs align with the enum values defined for
finalDecisionCode.

---

Nitpick comments:
In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb`:
- Around line 53-56: build_request_hash currently grabs person.addresses&.first
which may pick a non-residential address; update it to prefer an address with
kind == 'home' (falling back to first or another appropriate kind) similar to
the fetch_telephone selection logic. Locate build_request_hash and change the
address selection to search person.addresses for a 'home' entry first, then fall
back to the first address if none found, ensuring downstream usage of address
uses this chosen address.

In `@spec/operations/fdsh/ridp/rba/transform_family_to_rba_request_spec.rb`:
- Line 8: Rename the test helper that currently uses let(:subject) to avoid
shadowing RSpec's built-in subject; change the declaration let(:subject) {
described_class.new } to a clearer name such as let(:operation) {
described_class.new } and update all usages (e.g., subject.call(payload)) to
operation.call(payload) or switch to RSpec's implicit subject {
described_class.new } and adjust calls accordingly so references use the new
identifier (operation) instead of subject.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f20f6be-91cb-4510-96df-278ca9a09dc9

📥 Commits

Reviewing files that changed from the base of the PR and between 6182d73 and 209bd01.

📒 Files selected for processing (5)
  • app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb
  • lib/aca_entities/fdsh/ridp/rba/schemas/RBA-RIDP-Request-schema.json
  • lib/aca_entities/fdsh/ridp/rba/schemas/RBA-RIDP-Response-schema.json
  • lib/aca_entities/fdsh/ridp/rba/schemas/USStateCode-schema.json
  • spec/operations/fdsh/ridp/rba/transform_family_to_rba_request_spec.rb

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb (1)

83-94: Consider defensive nil-check on person_demographics.

If person_demographics is unexpectedly nil (e.g., malformed data bypassing contract), demographics.dob would raise NoMethodError caught by the rescue block, but with a less informative message. The FamilyContract likely guarantees this field's presence, so this is optional.

🛡️ Optional defensive check
 def build_person_fields(person)
   demographics = person.person_demographics
+  return Failure('Missing person demographics') unless demographics
   {

Note: This returns a Failure which would require changing the method signature to return a Result and yielding it in build_request_hash. Alternatively, rely on the existing contract validation to guarantee presence.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb` around lines
83 - 94, build_person_fields currently assumes person.person_demographics is
present; add a defensive check at the top of build_person_fields to handle nil
demographics (e.g., if demographics = person.person_demographics; raise
ArgumentError, "missing person_demographics for person #{person.person_id ||
person.person_name&.last_name}" if demographics.nil?) so the error is explicit
and informative instead of a generic NoMethodError; if you prefer returning a
Failure Result instead, change build_person_fields to return a Result and
propagate that from build_request_hash (update build_request_hash to handle the
returned Failure), but at minimum add the explicit nil guard and a clear error
message referencing build_person_fields and person.person_demographics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb`:
- Around line 83-94: build_person_fields currently assumes
person.person_demographics is present; add a defensive check at the top of
build_person_fields to handle nil demographics (e.g., if demographics =
person.person_demographics; raise ArgumentError, "missing person_demographics
for person #{person.person_id || person.person_name&.last_name}" if
demographics.nil?) so the error is explicit and informative instead of a generic
NoMethodError; if you prefer returning a Failure Result instead, change
build_person_fields to return a Result and propagate that from
build_request_hash (update build_request_hash to handle the returned Failure),
but at minimum add the explicit nil guard and a clear error message referencing
build_person_fields and person.person_demographics.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e1bdd73-6556-4b14-90bf-09bab101c379

📥 Commits

Reviewing files that changed from the base of the PR and between 209bd01 and 2ca64ea.

📒 Files selected for processing (1)
  • app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb (2)

54-55: Prefer deterministic home-address selection before fallback.

Using the first address can be order-dependent and may send a mailing/old address to RIDP. Prefer selecting the home/residential address first, then fallback to first.

♻️ Proposed refinement
-          address    = person.addresses&.first
+          address    = person.addresses&.detect { |a| a.kind == 'home' } || person.addresses&.first
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb` around lines
54 - 55, The code currently picks an address with person.addresses&.first which
is order-dependent; change the selection in transform_family_to_rba_request (or
the surrounding method in transform_family_to_rba_request.rb) to first attempt a
deterministic home/residential lookup (e.g., find an address where the type/kind
equals "home" or "residential" or a residence flag is true) and only if none
found fall back to addresses.first; update the local variable address (and any
downstream usage such as ridp_rba handling) to use this deterministic selection
so RIDP receives the residential/home address when available.

69-70: Avoid broad StandardError rescue in request assembly.

Catching everything here can mask real coding bugs and make debugging harder. Consider rescuing only expected payload/shape exceptions and letting unexpected errors bubble.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb` around lines
69 - 70, The rescue in TransformFamilyToRBARequest (in method call/build)
currently swallows all StandardError; change it to only rescue expected
payload/shape errors (for example KeyError, TypeError, and JSON::ParserError if
parsing is involved) and return Failure with the specific error message for
those exceptions, but re-raise any other unexpected exceptions so real bugs
bubble up; update the rescue clause to list these specific exception classes and
ensure other errors are not rescued.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb`:
- Around line 54-55: The code currently picks an address with
person.addresses&.first which is order-dependent; change the selection in
transform_family_to_rba_request (or the surrounding method in
transform_family_to_rba_request.rb) to first attempt a deterministic
home/residential lookup (e.g., find an address where the type/kind equals "home"
or "residential" or a residence flag is true) and only if none found fall back
to addresses.first; update the local variable address (and any downstream usage
such as ridp_rba handling) to use this deterministic selection so RIDP receives
the residential/home address when available.
- Around line 69-70: The rescue in TransformFamilyToRBARequest (in method
call/build) currently swallows all StandardError; change it to only rescue
expected payload/shape errors (for example KeyError, TypeError, and
JSON::ParserError if parsing is involved) and return Failure with the specific
error message for those exceptions, but re-raise any other unexpected exceptions
so real bugs bubble up; update the rescue clause to list these specific
exception classes and ensure other errors are not rescued.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 38b6ebd1-2d21-40a8-b132-f95cd8aa15f8

📥 Commits

Reviewing files that changed from the base of the PR and between 2ca64ea and 3804ed5.

📒 Files selected for processing (1)
  • app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb

Success(primary.person)
end

def build_request_hash(person, family_hash)
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.

Can we move this into its own operation/class.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb (1)

63-68: Consider using let blocks instead of instance variables.

Using let(:result) { subject.call(person, family_hash) } instead of @result in a before block would be more idiomatic RSpec and provide lazy evaluation.

♻️ Suggested refactor
   context 'with valid inputs' do
-    before { `@result` = subject.call(person, family_hash) }
+    let(:result) { subject.call(person, family_hash) }

     it 'returns success' do
-      expect(`@result.success`?).to be_truthy
+      expect(result.success?).to be_truthy
     end

Apply similar changes throughout the file for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb` around lines 63 -
68, Replace the instance variable usage for the call result with an RSpec let:
remove the before hook that assigns `@result` = subject.call(person, family_hash)
and add let(:result) { subject.call(person, family_hash) }, then update
assertions that reference `@result` (e.g., expect(`@result.success`?).to be_truthy)
to use result (e.g., expect(result.success?).to be_truthy); apply the same
change consistently anywhere else in this spec file where `@result` is set or
referenced (keeping subject.call(person, family_hash), person and family_hash as
the call inputs).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb`:
- Around line 63-68: Replace the instance variable usage for the call result
with an RSpec let: remove the before hook that assigns `@result` =
subject.call(person, family_hash) and add let(:result) { subject.call(person,
family_hash) }, then update assertions that reference `@result` (e.g.,
expect(`@result.success`?).to be_truthy) to use result (e.g.,
expect(result.success?).to be_truthy); apply the same change consistently
anywhere else in this spec file where `@result` is set or referenced (keeping
subject.call(person, family_hash), person and family_hash as the call inputs).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 024bdf26-8c38-4eba-8507-661dec49dc7c

📥 Commits

Reviewing files that changed from the base of the PR and between 3804ed5 and 3c86df6.

📒 Files selected for processing (4)
  • app/operations/fdsh/ridp/rba/build_rba_request.rb
  • app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb
  • spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb
  • spec/operations/fdsh/ridp/rba/transform_family_to_rba_request_spec.rb
🚧 Files skipped from review as they are similar to previous changes (1)
  • spec/operations/fdsh/ridp/rba/transform_family_to_rba_request_spec.rb

Copy link
Copy Markdown
Contributor

@ymhari ymhari left a comment

Choose a reason for hiding this comment

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

Make the changes as per our discussion in the call.

@ideacrew ideacrew deleted a comment from coderabbitai bot Mar 27, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":404,"request":{"method":"PATCH","url":"https://api.github.com/repos/ideacrew/fdsh_gateway/issues/comments/4100151817","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- This is an auto-generated comment: review paused by coderabbit.ai -->\n\n> [!NOTE]\n> ## Reviews paused\n> \n> It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the `reviews.auto_review.auto_pause_after_reviewed_commits` setting.\n> \n> Use the following commands to manage reviews:\n> - `@coderabbitai resume` to resume automatic reviews.\n> - `@coderabbitai review` to trigger a single review.\n> \n> Use the checkboxes below for quick actions:\n> - [ ] <!-- {\"checkboxId\": \"7f6cc2e2-2e4e-497a-8c31-c9e4573e93d1\"} --> ▶️ Resume reviews\n> - [ ] <!-- {\"checkboxId\": \"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe\"} --> 🔍 Trigger review\n\n<!-- end of auto-generated comment: review paused by coderabbit.ai -->\n\n<!-- walkthrough_start -->\n\n<details>\n<summary>📝 Walkthrough</summary>\n\n## Walkthrough\n\nAdds operations to parse and validate a Family JSON, build an RBA RIDP request from the primary applicant and external payloads, validate the request against new JSON Schemas, and includes associated schemas and specs.\n\n## Changes\n\n|Cohort / File(s)|Summary|\n|---|---|\n|**Transform Operation** <br> `app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb`|New `Fdsh::Ridp::Rba::TransformFamilyToRbaRequest#call(payload)` — parses/symbolizes JSON, validates with `FamilyContract`, builds `AcaEntities::Families::Family`, finds primary applicant, invokes `BuildRbaRequest`, validates final hash against the RBA-RIDP Request JSON Schema, returns Dry::Monads Success/Failure with descriptive messages.|\n|**Request Builder** <br> `app/operations/fdsh/ridp/rba/build_rba_request.rb`|New `Fdsh::Ridp::Rba::BuildRbaRequest#call(params)` — validates presence of `external_payloads.ridp_rba` and `extra_information`, extracts primary address/phones/emails, maps person/address/device fields into a compacted `rbaRIDPRequest` hash (zip parsing, phone priority, flowType defaulting), returns Dry::Monads Result; explicit Failure messages on missing data or exceptions.|\n|**JSON Schemas** <br> `lib/aca_entities/fdsh/ridp/rba/schemas/RBA-RIDP-Request-schema.json`, `lib/aca_entities/fdsh/ridp/rba/schemas/RBA-RIDP-Response-schema.json`, `lib/aca_entities/fdsh/ridp/rba/schemas/USStateCode-schema.json`|Added strict Request and Response schemas (request requires `rbaRIDPRequest` with typed fields, enums, regexes, `USStateCode` ref) and a US state code enum definition.|\n|**Specs — Transform** <br> `spec/operations/fdsh/ridp/rba/transform_family_to_rba_request_spec.rb`|New RSpec covering success path and failure modes: JSON parse error, contract validation failure, missing primary applicant, `BuildRbaRequest` failure propagation, and schema validation failures.|\n|**Specs — Builder** <br> `spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb`|New RSpec exercising mapping logic, zip/phone/address selection, `flowType` defaulting and pass-through, and negative tests for missing `ridp_rba`, tokens, extra_information, and missing address.|\n\n## Sequence Diagram\n\n```mermaid\nsequenceDiagram\n    participant Client as Client\n    participant Transform as TransformFamilyToRbaRequest\n    participant Contract as FamilyContract\n    participant Builder as BuildRbaRequest\n    participant Schema as JSONSchemaValidator\n\n    Client->>Transform: call(payload)\n    Transform->>Transform: parse JSON & symbolize keys\n    Transform->>Contract: validate family payload\n    Contract-->>Transform: Success / Failure\n\n    alt Contract Failure\n        Transform-->>Client: Failure(contract error)\n    else Contract Success\n        Transform->>Transform: build Family entity & find primary applicant\n        alt Missing Primary\n            Transform-->>Client: Failure(\"No primary applicant found\")\n        else Primary Found\n            Transform->>Builder: call(person, family.external_payloads)\n            Builder-->>Transform: Success(rbaRIDPRequest) / Failure(error)\n\n            alt Builder Failure\n                Transform-->>Client: Failure(builder error)\n            else Builder Success\n                Transform->>Schema: validate(request_hash)\n                Schema-->>Transform: Valid / [errors...]\n\n                alt Schema Invalid\n                    Transform-->>Client: Failure(schema validation errors)\n                else Schema Valid\n                    Transform-->>Client: Success(rbaRIDPRequest)\n                end\n            end\n        end\n    end\n```\n\n## Estimated code review effort\n\n🎯 3 (Moderate) | ⏱️ ~25 minutes\n\n## Suggested labels\n\n`cr-120+`\n\n## Suggested reviewers\n\n- vkghub\n- saikumar9\n- jacobkagon\n\n## Poem\n\n> 🐇 I nibbled JSON, keys all bright,  \n> Found the primary under moonlight,  \n> Stitched jsc, hdim, address and zip,  \n> Validated schema—no loose slip,  \n> A rabbit’s hop to RBA delight.\n\n</details>\n\n<!-- walkthrough_end -->\n\n\n<!-- pre_merge_checks_walkthrough_start -->\n\n<details>\n<summary>🚥 Pre-merge checks | ✅ 2 | ❌ 1</summary>\n\n### ❌ Failed checks (1 warning)\n\n|     Check name     | Status     | Explanation                                                                          | Resolution                                                                         |\n| :----------------: | :--------- | :----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- |\n| Docstring Coverage | ⚠️ Warning | Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |\n\n<details>\n<summary>✅ Passed checks (2 passed)</summary>\n\n|     Check name    | Status   | Explanation                                                                                                                                                        |\n| :---------------: | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled.                                                                                                        |\n|    Title check    | ✅ Passed | The title 'ridp/rba build cms payload' directly describes the main change—introducing new classes and schemas to build RBA RIDP request payloads for the CMS flow. |\n\n</details>\n\n<sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub>\n\n</details>\n\n<!-- pre_merge_checks_walkthrough_end -->\n\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n<details>\n<summary>📝 Generate docstrings</summary>\n\n- [ ] <!-- {\"checkboxId\": \"7962f53c-55bc-4827-bfbf-6a18da830691\"} --> Create stacked PR\n- [ ] <!-- {\"checkboxId\": \"3e1879ae-f29b-4d0d-8e06-d12b7ba33d98\"} --> Commit on current branch\n\n</details>\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n- [ ] <!-- {\"checkboxId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Commit unit tests in branch `CU_868hwptd9`\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n\n<!-- tips_start -->\n\n---\n\nThanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=ideacrew/fdsh_gateway&utm_content=327)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.\n\n<details>\n<summary>❤️ Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->\n\n<!-- internal state start -->\n\n\n<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+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PkwwL5NADdMFLchAA -->\n\n<!-- internal state end -->"},"request":{"retryCount":1,"signal":{}}},"response":{"url":"https://api.github.com/repos/ideacrew/fdsh_gateway/issues/comments/4100151817","status":404,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Fri, 27 Mar 2026 12:19:39 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"github.com","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept-Encoding, Accept, X-Requested-With","x-accepted-github-permissions":"issues=write; pull_requests=write","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-api-version-selected":"2022-11-28","x-github-media-type":"github.v3; format=json","x-github-request-id":"4775:200C04:B42E54:2DCD9CE:69C675DB","x-ratelimit-limit":"15000","x-ratelimit-remaining":"14963","x-ratelimit-reset":"1774617311","x-ratelimit-resource":"core","x-ratelimit-used":"37","x-xss-protection":"0"},"data":{"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#update-an-issue-comment","status":"404"}}}

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb (1)

191-229: Consolidate duplicated address priority specs.

context 'address priority' is defined twice with the same behavior checks. Keep one block (preferably the instance_double version) to reduce duplication and spec maintenance overhead.

♻️ Suggested cleanup
-    context 'address priority' do
-      it 'prefers home address' do
-        home = double(kind: 'home', address_1: 'Home St', city: 'Augusta', state: 'ME', zip: '04210')
-        work = double(kind: 'work', address_1: 'Work St', city: 'Augusta', state: 'ME', zip: '04211')
-        allow(person).to receive(:addresses).and_return([work, home])
-        result = subject.call(valid_params)
-        expect(result.value![:rbaRIDPRequest][:streetName]).to eq('Home St')
-      end
-
-      it 'falls back to first address when no home address' do
-        work = double(kind: 'work', address_1: 'Work St', city: 'Augusta', state: 'ME', zip: '04211')
-        allow(person).to receive(:addresses).and_return([work])
-        result = subject.call(valid_params)
-        expect(result.value![:rbaRIDPRequest][:streetName]).to eq('Work St')
-      end
-    end
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb` around lines 191 -
229, Remove the duplicated "context 'address priority'" block and keep only the
version using instance_double(AcaEntities::Locations::Address); specifically,
delete the earlier block that uses plain double(...) and retain the later block
that sets up home/work as instance_double, leaves the allow(person).to
receive(:addresses) stubs, and the expectations against
subject.call(valid_params)[:rbaRIDPRequest][:streetName]; ensure there is a
single context 'address priority' with both the "prefers home address" and
"falls back to first address when no home address" examples.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb`:
- Around line 191-229: Remove the duplicated "context 'address priority'" block
and keep only the version using
instance_double(AcaEntities::Locations::Address); specifically, delete the
earlier block that uses plain double(...) and retain the later block that sets
up home/work as instance_double, leaves the allow(person).to receive(:addresses)
stubs, and the expectations against
subject.call(valid_params)[:rbaRIDPRequest][:streetName]; ensure there is a
single context 'address priority' with both the "prefers home address" and
"falls back to first address when no home address" examples.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 517c5370-acb6-4ecb-9c26-00acc5564e73

📥 Commits

Reviewing files that changed from the base of the PR and between 3c86df6 and be6455f.

📒 Files selected for processing (3)
  • app/operations/fdsh/ridp/rba/build_rba_request.rb
  • app/operations/fdsh/ridp/rba/transform_family_to_rba_request.rb
  • spec/operations/fdsh/ridp/rba/build_rba_request_spec.rb

@jayreddy519 jayreddy519 requested review from geetha-1z and ymhari March 27, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants