Skip to content

test: add diagnostic redaction regression tests (0 bounty)#22

Open
gaomingyi779-del wants to merge 1 commit into
Peter7896:mainfrom
gaomingyi779-del:test/add-diagnostic-redaction-regression
Open

test: add diagnostic redaction regression tests (0 bounty)#22
gaomingyi779-del wants to merge 1 commit into
Peter7896:mainfrom
gaomingyi779-del:test/add-diagnostic-redaction-regression

Conversation

@gaomingyi779-del

Copy link
Copy Markdown

Issue

Closes #1 — [$40 BOUNTY] [Python] Add diagnostic redaction regression tests

Changes

Added 9 regression tests in tests/test_diagnostic_redaction.py:

Path normalisation

  • Diagnostic paths are under diagnostic/ directory

No path/user leakage

  • No HOME directory in metadata
  • No TEMP directory in metadata
  • No username in metadata
  • No repo absolute path in metadata

Report structure

  • Commit ID present and correct
  • Diagnostic logd reference included
  • Empty results yield valid report
  • All path values are strings (not Path objects)

All 9 tests pass. No production code changes.

🤖 Generated with Claude Code

test: add diagnostic redaction regression tests ($40 bounty)

Adds 9 regression tests per issue Peter7896#1:
- Path normalisation: diagnostic files under diagnostic/ directory
- No home directory leakage in metadata JSON
- No temp directory leakage
- No username leakage
- No repo absolute path leakage
- Commit ID present in report metadata
- Diagnostic logd reference in report
- Empty results still produce valid report structure
- All path values are plain strings (not Path objects)

Validates that build_diagnostic_report output is safe to share in PRs.
All tests pass.

Closes Peter7896#1

Co-Authored-By: Claude <noreply@anthropic.com>
@
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.

[$40 BOUNTY] [Python] Add diagnostic redaction regression tests

1 participant