Skip to content

Conversation

@arun-kushwaha04
Copy link

FinCEN Documentation Compliance

According to FinCEN documentation, the following party types accept multiple TIN type codes for PartyIdentification:

Party Type 30 (Filing Institution) - Accepts TIN types:

  • 1 - Employer Identification Number (EIN)
  • 2 - Social Security Number (SSN) / Financial Institution Number
  • 4 - Tax Identification Number (TIN)
  • image

Party Type 34 (Financial Institution) - Accepts TIN types:

  • 1 - Employer Identification Number (EIN)
  • 2 - Social Security Number (SSN) / Financial Institution Number
  • 4 - Tax Identification Number (TIN)
  • image

Previous Behavior

The validation was incorrectly restricted to only accept PartyIdentificationTypeCode "2", causing valid filings to fail validation.

New Behavior

Validation now requires at least one of the accepted TIN types (1, 2, or 4) to be present, matching FinCEN requirements.

@gemini-code-assist
Copy link

Summary of Changes

Hello @arun-kushwaha04, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a compliance issue by updating the validation rules for PartyIdentification within PartyType 30 (Filing Institution) and PartyType 34 (Financial Institution). Previously, the system incorrectly restricted these party types to only accept a specific identification code, leading to failures for otherwise valid filings. The changes expand the accepted identification types to include EIN, TIN, and FIN, ensuring that the validation logic correctly reflects FinCEN requirements by requiring at least one of these valid codes to be present.

Highlights

  • FinCEN Compliance Update: Updated PartyIdentification validation for PartyType 30 (Filing Institution) and PartyType 34 (Financial Institution) to align with FinCEN documentation.
  • Expanded Accepted TIN Types: The validation now accepts Employer Identification Number (EIN - "1"), Tax Identification Number (TIN - "4"), and Financial Institution Number (FIN - "2") for these party types, where previously only FIN ("2") was accepted.
  • Code Changes: Introduced the PartyITCEIN constant and modified validation logic in pkg/suspicious_activity/activity.go to check for the presence of any of the three accepted TIN types.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly updates the validation logic for PartyIdentification for party types 30 and 34 to accept EIN, TIN, and FIN codes, aligning with FinCEN documentation. The changes in pkg/suspicious_activity/activity.go are logical and address the issue described. However, the pull request is missing corresponding unit tests to verify the new validation behavior. It is crucial to add tests that cover cases where only one of the newly allowed identification types is present (e.g., only EIN), and cases where none of the required types are present to ensure the validation fails as expected. I've also added a couple of suggestions to improve code readability.

arun-kushwaha04 and others added 2 commits November 10, 2025 19:52
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.

1 participant