Skip to content

Fix: handle mixed entry types in reference list display - #175

Merged
mihirvala08 merged 3 commits into
google:mainfrom
MRADULTRIPATHI:fix/reference-list-entry-type
Oct 1, 2025
Merged

mihirvala08 merged 3 commits into
google:mainfrom
MRADULTRIPATHI:fix/reference-list-entry-type

Conversation

@MRADULTRIPATHI

Copy link
Copy Markdown
Contributor

This PR fixes issue #168.

Changes

  • Added robust handling for entries that may be str, dict, or objects.
  • Prevents AttributeError: 'str' object has no attribute 'value'.
  • Safely converts unexpected types to string.
  • Limit display to first 50 entries with overflow note.

Testing

  • Verified with unit tests for strings, dicts, objects, and mixed inputs.
  • Confirmed output matches expected behavior without errors.

… display

Prevent 'str' object has no attribute 'value' error by checking entry type.
- Strings used directly
- Dicts fetch 'value' or fallback to 'Unknown'
- Objects with .value handled
- Other types fallback to str()
Includes safeguard for large lists (limit 50).
@MRADULTRIPATHI
MRADULTRIPATHI requested a review from a team September 2, 2025 21:07
@google-cla

google-cla Bot commented Sep 2, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@MRADULTRIPATHI

Copy link
Copy Markdown
Contributor Author

Hi, I’ve signed the CLA. The fix ensures reference list tools handle mixed entry types safely.
Please review when convenient. Thanks!

@MRADULTRIPATHI

MRADULTRIPATHI commented Sep 2, 2025 •

Copy link
Copy Markdown
Contributor Author

Hi @google/mergers and @dandye
I’ve signed the CLA and all checks have passed
This PR fixes issue #168 by handling mixed entry types (string, dict, object) safely in reference list management.
Requesting your review at the earliest convenience. Thanks a lot for your time

@Adriana1969

Copy link
Copy Markdown

Hi, I've tested and can confirm that the issue has been resolved. Thank you

@MRADULTRIPATHI

MRADULTRIPATHI commented Sep 3, 2025 •

Copy link
Copy Markdown
Contributor Author

Hi @Adriana1969 and @alberto-mate team,

The reporter has confirmed that this PR #175 resolves the issue successfully ✅.
All checks have passed and CLA is signed.

Kindly requesting the maintainers to review and merge the PR at the earliest convenience. Thanks a lot

@MRADULTRIPATHI

Copy link
Copy Markdown
Contributor Author

Hi @google/mergers @dandye @emeryray2002 @alberto-mate,

The original issue reporter @Adriana1969 has confirmed that the issue is resolved by PR #175.
All checks have passed and the CLA is signed.

Kindly requesting your review and approval so this fix can be merged at the earliest convenience.
Thank you very much for your attention!

@mihirvala08

Copy link
Copy Markdown
Collaborator

@MRADULTRIPATHI Thanks for this change.

I was still running into the str has no attribute value issue with the proposed changes. It turns out that the get_reference_list method in ChronicleClient expects a StrEnum rather than a plain string, which was causing the error.

I’ve updated the view handling in addition to the existing changes.

I’ll update get_reference_list separately, but in the meantime these PR changes should work.

@mihirvala08

Copy link
Copy Markdown
Collaborator

Test Plan

Tested Following using Cline extension in VS Code and able to successfully utilize get_reference_list tool from secops-mcp.

  1. Get reference list details
Screenshot 2025-10-01 133801
  1. Get reference list details with entries
Screenshot 2025-10-01 134113

@MRADULTRIPATHI

Copy link
Copy Markdown
Contributor Author

Hi @dandye @emeryray2002,

The PR #175 is now fully ready:

  • Approved ✅ by collaborator @mihrivala-crestdata
  • All checks have passed ✅
  • No conflicts with base branch

Kindly requesting your review and merge at the earliest convenience 🙏
Thanks a lot for helping close this out!

@MRADULTRIPATHI

Copy link
Copy Markdown
Contributor Author

Hi @mihirvala-crestdata,

Thank you so much for your support, updates, and for approving this PR.
Your additional fixes and the test plan were really helpful in making sure everything works correctly.

If I may ask — do you have an idea of how much time it might take for this PR to get merged?
Thanks again for your time and guidance!

@MRADULTRIPATHI

Copy link
Copy Markdown
Contributor Author

Hi @google/mergers,

The PR #175 is now:

  • Approved
  • All checks passed
  • No conflicts with base branch

It is fully ready to merge. Kindly requesting your assistance to complete the merge

@mihirvala08
mihirvala08 merged commit d142e4a into google:main Oct 1, 2025
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.

3 participants