Skip to content

fix: scrub nested privacy structures recursively - #12

Merged
abrichr merged 1 commit into
mainfrom
fix/scrub-nested-gui-structures
Jul 28, 2026
Merged

fix: scrub nested privacy structures recursively#12
abrichr merged 1 commit into
mainfrom
fix/scrub-nested-gui-structures

Conversation

@abrichr

@abrichr abrichr commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • recurse through dictionaries and lists at every GUI structure depth
  • preserve the state scrub-all rule across direct values and nested containers
  • retain non-string geometry and metadata while scrubbing configured text fields

Root cause

The dictionary scrubber handled nested dictionaries, but it applied list rules only to direct string items. GUI trees can contain dictionaries and lists inside other lists. Text in those nested containers could remain unchanged even when the parent structure required scrubbing.

Impact

Structured GUI observations now apply one scrub state through the complete nested tree. This closes the path where patient or account text inside child elements, nested lists, or state containers could remain in an otherwise scrubbed derivative.

Validation

  • uv run --extra dev pytest tests/ -v --ignore=tests/test_presidio.py (71 passed, 1 skipped)
  • uv run --extra dev ruff check openadapt_privacy/base.py tests/test_pipelines.py
  • uv build
  • python scripts/check_source_boundary.py --require-dist
  • git diff --check origin/main...HEAD

The built wheel and source archive pass source policy sha256:09e5092a6f84cbad0b588a9aec65cc7d26492dced2ddce26ca288a3ff81992c9.

@abrichr
abrichr merged commit d078a07 into main Jul 28, 2026
4 checks passed
@abrichr
abrichr deleted the fix/scrub-nested-gui-structures branch July 28, 2026 13:46
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