Skip to content

docs(utils): reconcile bug_report path-free docstring and clarify redact_paths contract (#9644) - #9650

Closed
ShayanMuhammad-CS wants to merge 1 commit into
OpenMined:devfrom
ShayanMuhammad-CS:fix-bug-report-redact-paths
Closed

ShayanMuhammad-CS wants to merge 1 commit into
OpenMined:devfrom
ShayanMuhammad-CS:fix-bug-report-redact-paths

Conversation

@ShayanMuhammad-CS

Copy link
Copy Markdown

Pull Request: Reconcile sy.bug_report docstring and clarify redact_paths contract

Title

docs(utils): reconcile bug_report path-free docstring and clarify redact_paths contract (#9644)


Description

What does this PR do?

Reconciles the docstring in sy.bug_report() (syft/utils.py) to align with the privacy guarantees of its collectors and footer output, while formally documenting the redact_paths parameter as a backward-compatible contract.

Context & Root Cause

In Issue #9644, it was noted that:

  1. sy.bug_report()'s docstring stated:
    "The output is safe to share: it prints only versions, paths, and config metadata."
    However, all collectors and the printed NOTES section explicitly guarantee:
    "This report contains no tokens, secrets, paths, or PII."
  2. The redact_paths parameter was accepted in the signature but unused by collectors since the report is path-free by design.

Changes

  1. Updated syft/utils.py:658 docstring to clarify that only versions and config metadata are included, omitting the misleading mention of paths.
  2. Clarified redact_paths in docstring args: preserved as a stable, forward/backward compatible parameter.
  3. Added automated unit tests in tests/unit/test_bug_report.py covering:
    • Dictionary generation schema integrity (as_dict=True).
    • Output parity between redact_paths=False and redact_paths=True.
    • Standard output confirmation of zero paths/PII guarantee.

Closes #9644

@koenvanderveen

Copy link
Copy Markdown
Collaborator

Thanks for picking this up! We decided to remove redact_paths instead of keeping it as a no-op (option 1 in #9644), so I am closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sy.bug_report: the redact_paths argument is accepted but never read

2 participants