Skip to content

feat(build): add diagnostic redaction regression tests#16

Closed
thanhle74 wants to merge 1 commit into
Peter7896:mainfrom
thanhle74:feat/diagnostic-redaction-tests
Closed

feat(build): add diagnostic redaction regression tests#16
thanhle74 wants to merge 1 commit into
Peter7896:mainfrom
thanhle74:feat/diagnostic-redaction-tests

Conversation

@thanhle74

Copy link
Copy Markdown

Summary

Adds deterministic regression tests for diagnostic metadata redaction, artifact pairing, and repository-relative path reporting in build.py.

Changes

  • Added tests/test_diagnostic_redaction.py with 29 tests covering:
    • Repository-relative path validation (forward slashes, no absolute paths)
    • No leaking of home, repo, temp paths, hostnames, usernames, env vars
    • .logd artifact pairing with JSON metadata
    • Clear failure on missing/mismatched artifacts
    • Cross-platform deterministic behavior (Windows + Unix-like)

Testing

python3 -m pytest tests/test_diagnostic_redaction.py -v
============================== 29 passed in 0.13s

Checklist

  • Tests pass locally (29/29)
  • Changes scoped to PR purpose
  • Cross-platform determinism considered
  • Error handling for missing/mismatched artifacts covered

/claim #1

- Add 29 unit tests for diagnostic metadata redaction and artifact pairing
- Validate repository-relative path reporting in diagnostic metadata
- Assert no leaking of home, repo, temp paths, hostnames, usernames
- Confirm .logd reference in JSON matches generated encrypted artifact
- Test clear failure on missing/mismatched artifacts
- Cross-platform deterministic coverage (Windows + Unix-like hosts)
- All 29 tests pass

Bounty: Peter7896/TentOfTrials #1 ($40)
@thanhle74 thanhle74 closed this by deleting the head repository Jun 27, 2026
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