-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Update PartyIdentification validation to accept EIN, TIN, and FIN codes for Party 30 and 34 #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: Update PartyIdentification validation to accept EIN, TIN, and FIN codes for Party 30 and 34 #108
Conversation
…IN codes for Party 30 and 34
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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.
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>
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 Number4- Tax Identification Number (TIN)Party Type 34 (Financial Institution) - Accepts TIN types:
1- Employer Identification Number (EIN)2- Social Security Number (SSN) / Financial Institution Number4- Tax Identification Number (TIN)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.