#391 sz_explorer: strip null/empty entries from UNMAPPED_DATA#392
#391 sz_explorer: strip null/empty entries from UNMAPPED_DATA#392jbutcher21 wants to merge 3 commits into
Conversation
🤖 Claude Code ReviewI'll review the PR diff against the checklist now. Code ReviewCode Quality✅ No commented-out code — Clean diff, no leftover debug code. ✅ Meaningful variable names (mostly) — ✅ DRY principle followed — The two functions have clean separation of concerns: ✅ No defects found — Logic traced through the following edge cases:
def _strip_null_values(value: Any) -> Any:
def _clean_unmapped_data(node: Any) -> None:
Testing❌ No tests added — Two new module-level functions (
Documentation✅ CHANGELOG.md updated — Entry is clear, correctly placed under ✅ Docstrings present — Both functions document their non-obvious contracts (return Security✅ No hardcoded credentials ✅ No sensitive data in logs ✅ No license files (.lic) ✅ Input validation — The functions defensively handle all JSON-compatible Python types via Summary
The core fix looks correct. The main gap is the absence of unit tests for the two new utility functions given their edge-case-sensitive behavior.Automated code review analyzing defects and coding standards |
🤖 Claude Code ReviewPR Code Review: v0.0.41 – sz_explorer UNMAPPED_DATA null/empty stripCode Quality✅ Code style followed ✅ No commented-out code ✅ Meaningful variable names ❌ DRY principle – minor issue ❌ Logic defect – More importantly: if a nested dict under ✅ No obvious bugs, crashes, race conditions, or security vulnerabilities ✅ CLAUDE.md is appropriate Testing❌ No unit tests added for ❌ Edge case not covered: Documentation✅ CHANGELOG.md updated ❌ CHANGELOG.md formatting – minor ✅ Inline docstrings present ✅ README: no changes needed Security✅ No hardcoded credentials Summary
Recommend: Add unit tests for
|
Closes #391.
Summary
DATE: null,STATUS: "",NAME_MIDDLE: "", nestedADDR_CITY: null) were returned by the engine insideUNMAPPED_DATAand rendered as noise insz_explorer's "Additional Data" column.EdaSdkWrapper.call_sdknow passes every parsed engine response through a recursive cleaner before PII masking, call-cache append, and return. One choke point coversget_entity,compare_entities, the call-cache export, and any future consumer.nulland"", keep0/False/ other non-null values, recurse into nested dicts and lists, drop nested containers that collapse to empty.Test plan
sz_explorer→get 17(Darla Anderson):DATE: NoneandSTATUS:no longer appear;AMOUNT: 0still does; nested FEATURES shows only non-null fields.sz_explorer→compare <id1> <id2>exercises the second call site cleanly.export call cacheshows the cleaned response (consistent debugging output).make lintpasses (pylint, mypy, black, flake8, isort, bandit).